QL Filer - New in 2019 - Archive media extractor

Anything QL Software or Programming Related.
Tuna
ROM Dongle
Posts: 20
Joined: Fri Dec 21, 2018 1:25 pm

QL Filer - New in 2019 - Archive media extractor

Post by Tuna »

As I was trying to figure out how to get old disks found in my loft working on the current generation of emulators, I quickly discovered that there is fairly inconsistent support for the various media formats on modern PCs. QL Zip files are a bit mysterious, and the tools to handle .mdv and .win files often don't run under current versions of Windows or Linux.

So I've written a small utility that can parse, list and extract from .zip, .win and .mdv files. It can tell you what's in the files, and understands QL File headers, so you can view and export header information from all of these media formats.

When extracting files, it produces both the original file and a matching header file (with a .qlinfo extension) that is machine (and human) readable. It should be possible to use that header file to restore QL headers when transferred between computers that don't understand the native QL file format.

For now, this is read only (you can only read and extract from media, not update or write to it), and fairly untested (I'm sure there are bugs) but may be useful to people on here.

The release is here: https://github.com/atoone/ql-filer/releases - download the qlfiler.jar file.

The source code is here: https://github.com/atoone/ql-filer for those that are interested - with some instructions

You'll need to install Java, which you can do for free here https://www.java.com/en/ (there are also instructions for Linux systems and the OpenJDK here: https://openjdk.java.net/install/)

Once you've got java installed (type 'java' on the command line and check it works), you run the utility with

Code: Select all

java -jar qlfiler.jar
It should give you a list of command line options. The arguments are a sequence of commands (eg.

Code: Select all

open <filename>
to open a media file, then

Code: Select all

dir
to list the contents). You can

Code: Select all

export <filename>
files (give a case insensitive filename, DOS-style wildcards are accepted) or

Code: Select all

dump <filename>
them to get a hex dump of the contents.

Code: Select all

info
gives a more detailed directory listing.

There are limitations - it doesn't handle subdirectories in .win files, and you can't modify the media (eg. add, update or delete files). If there is sufficient interest I may add these at a later date.

At the moment this utility is LotteryWare - It's free to use, but if you win the lottery, please send me loads of money. :)


Derek_Stewart
Font of All Knowledge
Posts: 3928
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: QL Filer - New in 2019 - Archive media extractor

Post by Derek_Stewart »

Hi,

Looks a lot of work, modt too complicated for me to understand.

Why not download QPC2 and install onto a PC with a floppy disk drive running Windows. QPC2 will copy all the disk software includding sud dirctories to a flp or mdv image or even a win container.


Regards,

Derek
Tuna
ROM Dongle
Posts: 20
Joined: Fri Dec 21, 2018 1:25 pm

Re: QL Filer - New in 2019 - Archive media extractor

Post by Tuna »

Thanks for the encouragement, I won't bother with any more software for the QL. If it doesn't suit your needs, then don't use it :)

The problem (for me at least) is that QPC and the others are really not very good at exchanging files with PCs or Macs or Linux - and I want to be able to get files out of QL 'disks' onto machines where I have more modern editors, assemblers and other tools. The fact that the QDOS zip format appears to be completely opaque suggested that building a utility that understood QL file headers might be useful to some.

My PC hasn't had a floppy drive for a decade or more, and I currently run machines with no drives at all, so trying to get them to talk with old hardware is a pain. It's nice to be able to resurrect old software though. It doesn't help that half of the tools listed on the QL sites require versions of Windows that are nearly as out of date as the QL.


martyn_hill
Aurora
Posts: 909
Joined: Sat Oct 25, 2014 9:53 am

Re: QL Filer - New in 2019 - Archive media extractor

Post by martyn_hill »

Hi Tuna

Don't be discouraged - our Mr Stewart is ever the pragmatist!

Your initiative is a good one and I plan to tinker with your program once I find some time - extracting QL software within Windows/Unix remains a bug-bear, when you need to retain those pesky QDOS headers...


Tuna
ROM Dongle
Posts: 20
Joined: Fri Dec 21, 2018 1:25 pm

Re: QL Filer - New in 2019 - Archive media extractor

Post by Tuna »

martyn_hill wrote:Don't be discouraged - our Mr Stewart is ever the pragmatist!.
Tongue in cheek there :)


Derek_Stewart
Font of All Knowledge
Posts: 3928
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: QL Filer - New in 2019 - Archive media extractor

Post by Derek_Stewart »

Hi,

I did not mean to discouarge any software development. Just trying to state there are existing solutions.

I have Core i7 PC running Windows 10, which has all the current Microsoft updates installed. The PC doez not have a floppy disk interface on the motherboard. I use a USB floppy disk drive, QPC2 reads all my Double Density and High Density formatted QL disks.

The PC acts as a Server to a Q68 via SerNET connected via a USB - SERial adapter.

The Q68 accesses the floppy disk drive over the serial network by defining an FLP device mapped to QPC2 floppy disk drive.


Regards,

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

Re: QL Filer - New in 2019 - Archive media extractor

Post by NormanDunbar »

Evening Tuna.

Speaking of utilities to extract QL files from stuff, have you tried qltools at all. I use it on Linux from time to time when I need to delve into a floppy image. You can get my fork at https://github.com/NormanDunbar/qltools and the official version from https://github.com/SinclairQL/qltools. Mine does ED floppies in addition to HD and ED.

I'm not sure what you mean by a/an .mdv file by the way, I'm assuming it's an image copy of a microdrive cartridge?

Zip files are pretty standard, so I don't follow why you would say that the QL ones are "completely opaque". The only problem I'm aware if is the executable QL files need a special header that Windows/Linux/Mac created zip files don't preserve.

I also use QPC and it has no problems exchanging files with Linux. I too like to use editing tools I'm most familiar with, when writing my QL Assembly eMagazine and I do all my coding in Linux before assembling the code in QPC. (https://github.com/NormanDunbar/QLAssem ... e/releases)

Having said all that, good luck with the utility, we can never have too many!

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
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: QL Filer - New in 2019 - Archive media extractor

Post by mk79 »

Tuna wrote:The problem (for me at least) is that QPC and the others are really not very good at exchanging files with PCs or Macs or Linux - and I want to be able to get files out of QL 'disks' onto machines where I have more modern editors, assemblers and other tools.
More tools is always better, so thanks! But I don't quite get that part. QPC has direct access to the native file system, so copying stuff to it should be fairly easy. In the next version it will even translate the file extension separator "_" to "." so the files feel native to both sides of the emulation.
The fact that the QDOS zip format appears to be completely opaque suggested that building a utility that understood QL file headers might be useful to some.
In the next QPC2 version it will support the QemuLator style header, so this might become the de-facto standard for QL header on PC file systems.

Cheers, Marcel


User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: QL Filer - New in 2019 - Archive media extractor

Post by mk79 »

By the way, QPC does not support MDV images ;)


User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: QL Filer - New in 2019 - Archive media extractor

Post by tofro »

mk79 wrote:By the way, QPC does not support MDV images ;)
Using a proper driver, it does ;)

Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Post Reply