Qltools Updated to handle ED discs.

Anything QL Software or Programming Related.
Post Reply
User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Qltools Updated to handle ED discs.

Post by NormanDunbar »

I've been playing with qltools (in my own repository - https://github.com/NormanDunbar/qltools) and I've made a few changes over version 2.15.

I haven't pushed any changes to the SinclairQL repo, nor raised a pull request just yet - if people could test and see how it goes, I'd be grateful. It seems to work fine for images - formatting, map ifo, writing files etc, but I don;t know about accessing an actual floppy drive with an ED disc.

Also, I've only updated the Linux (and DOS?) versions. That other directory 'Hxcfe' hasn't been touched - so most likely won't work, yet. (What is it? Does anyone know?)

Changes are:

Revision 2.15.1
  • Much reformatting of code, renaming to give better names etc.
  • Fixed bug in ZeroSomeSectors (DOS/Linux only) - nothing was being done.
  • Removed many hard coded magic numbers.
  • Slight update to version number, 2.15 to 2.15.1.
  • Some error messages corrected.
Revision 2.15.2
  • More variables renamed.
  • Added -t option to usage.
  • Reformatted usage output better (in my opinion!)
  • Adjusted MAXALB to 12 from 6. This is the number of 512 byte sectors needed for a
  • floppy cluster for the map. DD/ED need 6 * 512 while ED needs 3 * 2048 (or 12 & 512).
  • Added ED disks/image processing.

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
Andrew
Aurora
Posts: 786
Joined: Tue Jul 17, 2018 9:10 pm

Re: Qltools Updated to handle ED discs.

Post by Andrew »

hxcfe must be HxC Floppy Emulator


User avatar
XorA
Site Admin
Posts: 1359
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: Qltools Updated to handle ED discs.

Post by XorA »

Allows qltools to operate directly on .hfe files the hxc floppy emulator uses. Its probably broken at minute as the api changes to libhxcfe.so.

G


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

Re: Qltools Updated to handle ED discs.

Post by NormanDunbar »

Thanks for the info. To be honest, I've never heard of it!
It will definiteky be broken in 2.15.2.

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
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Qltools Updated to handle ED discs.

Post by NormanDunbar »

Another update:

Revision 2.15.3
  • More tidying up of the usage messages. Proper letter case etc.
  • Extracted common code from the three format routines to reduce duplication.
  • Validated the requested format to be 'd', 'e' or 'h' - due to the above.
  • Version bumped to 2.15.3.
Available from https://github.com/NormanDunbar/qltools - enjoy.


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
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Qltools Updated to handle ED discs.

Post by NormanDunbar »

Another update:

Revision 2.15.4
1) Now compiles under Windows with Gcc. I used CodeBlocks with the built in
32bit gcc to do the builds. There's also a makefile for shell usage.

2) Fixed 32bit bug in formatting an ed image file. It would segfault on Windows
64bit when compiled as 32bit, but not as a 64 bit build. Turned out to be a
bug in my 'ed' formatting code.

3) If the image file doesn't exist, it will now be created when formatting an image.

4) Files were being corrupted when extracted from an image with the '-n' option.
This was because the 'DOS_LIKE' define was not being done on modern C
compilers/operating systems. It is now! The corruption was to add a CR in front
of every LF in the file.

5) When changing the dataspace of a file with '-x' the dataspace size was allowed to
be an odd size. I'm sure this causes trouble on a QL, so it now gets rounded up
if it is odd.

6) The '-M' option to create a level 2 directory wasn't working. This was because it
was opening the image file in read only mode. I may have been responsible for
breaking this - but don't quote me. It's fixed now.

7) Dumping an ED cluster with the '-u' option (ASCII dump) was only dumping 32 lines
of 16 bytes - 512 bytes in total. The number of lines was hard coded. It has been
changed to calculate the number of lines from the sector size. This now works for
ED drives as well.

8) Windows uses the '/' character for command line options, unlike Linux which uses '-'
and while there was some code that allowed the '/' when 'DOS_LIKE' was defined,
it wasn't in all the places it needed to be. Now it is. Windows users have the choice
of whichever flag symbol they like. (Well, '-' or '/' is all the choice actually!)

9) Slightly weird. If the '-w' option was used to write a file into an image, and that
that file was already there, it didn't prompt to overwrite. I spent ages tracking it
down and it turned out that running in a Windows command session does prompt, only
running in a bash shell, on Windows, does it not prompt. As most users won't be in
my development bash shell, I'm not fixing this.

10)

Source Code is available from https://github.com/NormanDunbar/qltools, but if you want or need a binary, let me know via here, and I'll put up a release with Linux and Windows binaries.


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
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Qltools Updated to handle ED discs.

Post by NormanDunbar »

I broke it!

It seems that compiling under gcc on Windows allows files to be created without initial permissions being set, but not on Linux. This was as part of the new feature that creates an image file when formatting.

Hence, 2.15.5 is available at https://github.com/NormanDunbar/qltools.

Sorry (Rich) for any hassle. :oops:


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
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Qltools Updated to handle ED discs.

Post by NormanDunbar »

And finally for this week, I've put up some releases of binaries for Windows and Linux, with a pdf manual at https://github.com/NormanDunbar/qltools/releases.

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.
Post Reply