Qltools Updated to handle ED discs.

Anything QL Software or Programming Related.
User avatar
NormanDunbar
Super Gold Card
Posts: 680
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Qltools Updated to handle ED discs.

Postby NormanDunbar » Fri Nov 02, 2018 4:23 pm

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?
If at first you don't succeed, don't take up skydiving!
If you think your job is pointless, remember, there's someone in Germany who fits indicators to BMWs.
Andrew
Trump Card
Posts: 161
Joined: Tue Jul 17, 2018 9:10 pm

Re: Qltools Updated to handle ED discs.

Postby Andrew » Fri Nov 02, 2018 5:15 pm

hxcfe must be HxC Floppy Emulator


User avatar
XorA
Super Gold Card
Posts: 577
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: Qltools Updated to handle ED discs.

Postby XorA » Fri Nov 02, 2018 5:22 pm

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
Super Gold Card
Posts: 680
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Qltools Updated to handle ED discs.

Postby NormanDunbar » Fri Nov 02, 2018 5:49 pm

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?
If at first you don't succeed, don't take up skydiving!
If you think your job is pointless, remember, there's someone in Germany who fits indicators to BMWs.
User avatar
NormanDunbar
Super Gold Card
Posts: 680
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Qltools Updated to handle ED discs.

Postby NormanDunbar » Sat Nov 03, 2018 2:11 pm

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?
If at first you don't succeed, don't take up skydiving!
If you think your job is pointless, remember, there's someone in Germany who fits indicators to BMWs.
User avatar
NormanDunbar
Super Gold Card
Posts: 680
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Qltools Updated to handle ED discs.

Postby NormanDunbar » Wed Jan 30, 2019 4:17 pm

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?
If at first you don't succeed, don't take up skydiving!
If you think your job is pointless, remember, there's someone in Germany who fits indicators to BMWs.
User avatar
NormanDunbar
Super Gold Card
Posts: 680
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Qltools Updated to handle ED discs.

Postby NormanDunbar » Thu Jan 31, 2019 10:20 pm

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?
If at first you don't succeed, don't take up skydiving!
If you think your job is pointless, remember, there's someone in Germany who fits indicators to BMWs.
User avatar
NormanDunbar
Super Gold Card
Posts: 680
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: Qltools Updated to handle ED discs.

Postby NormanDunbar » Fri Feb 01, 2019 6:20 pm

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?
If at first you don't succeed, don't take up skydiving!
If you think your job is pointless, remember, there's someone in Germany who fits indicators to BMWs.

Who is online

Users browsing this forum: Martin_Head and 3 guests