New Tool, qemu-unzip

Discussion and advice about emulating the QL on other machines.
User avatar
XorA
Site Admin
Posts: 1358
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

New Tool, qemu-unzip

Post by XorA »

https://github.com/xXorAa/qem-unzip

An unzip program that goes directory from zip file to Q-Emulator headers.
mkdir unzip
cd unzip
qem-unzip ~/Downloads/unzip541.zip
Then you will find the executables have Q-Emulator headers.

Feel free to file issues on github!


Exile
ROM Dongle
Posts: 38
Joined: Sat Jan 15, 2022 8:55 pm

Re: New Tool, qemu-unzip

Post by Exile »

Nice! It makes getting zip files into sQLux that bit easier. :)


User avatar
Sparrowhawk
Super Gold Card
Posts: 624
Joined: Wed Dec 15, 2010 12:33 pm
Location: @131072
Contact:

Re: New Tool, qemu-unzip

Post by Sparrowhawk »

Great stuff. thanks


a.k.a. Jean-Yves
User avatar
XorA
Site Admin
Posts: 1358
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: New Tool, qemu-unzip

Post by XorA »

Updated now to add -d <directory> support.


User avatar
Sparrowhawk
Super Gold Card
Posts: 624
Joined: Wed Dec 15, 2010 12:33 pm
Location: @131072
Contact:

Re: New Tool, qemu-unzip

Post by Sparrowhawk »

I'm not very familiar with C based programs and their build tools, but I managed to work it out and run the tool on macOS, and I think that the steps are identical on Linux (including Windows WSL), so here is the README file I wrote for future-me to remember (I find I have to do this a lot these days :D ). Hopefully it's of use to anyone else who does not do C programming.

Code: Select all

$ cat README.txt 
An unzip for Sinclair QL zip files, it creates the needed Q-Emulator headers for common emulators. 
By QLForum member XorA

In Terminal:

1. cd to an appropriate parent folder, eg:
   $ cd ~/Development/SinclairQL

2. $ git clone https://github.com/xXorAa/qem-unzip.git

3. $ cd qem-unzip

4. $ cmake .

5. $ make

All done

Usage: $ ./sqlux-unzip [-d directory] zipfile
Note: Do not enter the $ character - it is there to represent a terminal prompt.

If you are not familiar with git or it is not installed on your machine, you can just download the Zip file from GitHub, then pick up at Step 3 (using the full path to the location where you unzipped it)


PS - I could not find pre-compiled binaries, but I may have missed them on the GitHub page?


a.k.a. Jean-Yves
User avatar
XorA
Site Admin
Posts: 1358
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: New Tool, qemu-unzip

Post by XorA »

Sparrowhawk wrote:I'm not very familiar with C based programs and their build tools, but I managed to work it out and run the tool on macOS, and I think that the steps are identical on Linux (including Windows WSL), so here is the README file I wrote for future-me to remember (I find I have to do this a lot these days :D ). Hopefully it's of use to anyone else who does not do C programming.

Code: Select all

$ cat README.txt 
An unzip for Sinclair QL zip files, it creates the needed Q-Emulator headers for common emulators. 
By QLForum member XorA

In Terminal:

1. cd to an appropriate parent folder, eg:
   $ cd ~/Development/SinclairQL

2. $ git clone https://github.com/xXorAa/qem-unzip.git

3. $ cd qem-unzip

4. $ cmake .

5. $ make

All done

Usage: $ ./sqlux-unzip [-d directory] zipfile
Note: Do not enter the $ character - it is there to represent a terminal prompt.

If you are not familiar with git or it is not installed on your machine, you can just download the Zip file from GitHub, then pick up at Step 3 (using the full path to the location where you unzipped it)


PS - I could not find pre-compiled binaries, but I may have missed them on the GitHub page?
Gah, you found a bug ;-)

I have not added binaries as I have not added mingw building yet, thats the next step now basic works.

(I don't have a developer license for macOS so no binaries for that anyway)


User avatar
Sparrowhawk
Super Gold Card
Posts: 624
Joined: Wed Dec 15, 2010 12:33 pm
Location: @131072
Contact:

Re: New Tool, qemu-unzip

Post by Sparrowhawk »

Hahah! Clever me ;)

I'm moving off macOS to Linux for the same reason as it goes. Just waiting for the laptop supplier I want to buy from to start using intel gen12 mobile processors first, so maybe mid year I'm guessing.

I did have one question: the program unzips files with the PC style .bas, .txt etc file extensions, rather than keeping the QL's _bas, _txt. Would it be possible to have a flag to keep them as QL extensions?


a.k.a. Jean-Yves
User avatar
XorA
Site Admin
Posts: 1358
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: New Tool, qemu-unzip

Post by XorA »

Sparrowhawk wrote:Hahah! Clever me ;)

I'm moving off macOS to Linux for the same reason as it goes. Just waiting for the laptop supplier I want to buy from to start using intel gen12 mobile processors first, so maybe mid year I'm guessing.

I did have one question: the program unzips files with the PC style .bas, .txt etc file extensions, rather than keeping the QL's _bas, _txt. Would it be possible to have a flag to keep them as QL extensions?
Thats not something I would use as the Emulator does that conversion for me!

But pull requests always welcome!


User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: New Tool, qemu-unzip

Post by NormanDunbar »

Sparrowhawk wrote:here is the README file I wrote for future-me to remember (I find I have to do this a lot these days :D ).
Welcome to my world! ;)

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
User avatar
Sparrowhawk
Super Gold Card
Posts: 624
Joined: Wed Dec 15, 2010 12:33 pm
Location: @131072
Contact:

Re: New Tool, qemu-unzip

Post by Sparrowhawk »

XorA wrote: Thats not something I would use as the Emulator does that conversion for me!
In Q-emulator, when I attach the folder where I qem-unzip'ed a zip file from Dilwyn's site and do a DIR FLP1_, I see the files with dot notation. Is that normal or have I missed something? It's always done that, I assumed it was a quirk that was needed for Q-emulator to work and that I had to rename things manually.
But pull requests always welcome!
You are too kind when you assume I'd have a clue where to start - my knowedge of C is limited to reading the K&R book ;)


a.k.a. Jean-Yves
Post Reply