Gotek + Flashfloppy: How-to.

Nagging hardware related question? Post here!
stephen_usher
Trump Card
Posts: 181
Joined: Tue Mar 11, 2014 8:00 pm

Gotek + Flashfloppy: How-to.

Postby stephen_usher » Mon Oct 21, 2019 9:37 pm

This is the text I've asked to be added to the Flashfloppy Github site WiKi but is possibly more useful here.

The Sinclair QL with any of the floppy interfaces tried so far (Sandy Q-Board, Miracle Systems Trump Card and Super Gold Card) will read and write IMG files without the need for an IMG.CFG file. The settings in the FF.CFG need to be set to the following otherwise formatting will not work and HD disks won't work on the Super Gold Card (even if FLP_DENSITY is used to manually set the disk type):

Code: Select all

interface = shugart
host = unspecified
pin02 = dens
pin34 = rdy


The interfaces don't need index pulses or a track change delay so these don't need to be changed from the default.

It should be noted that all interfaces which use the default Q-Jump Toolkit II version of the FORMAT command fail to determine the correct number of sides on in a floppy image and hence format single sided, giving 720 sectors rather than the expected 1440. However, if a pre-formatted image generated by dumping a real floppy or from an emulator is used then everything works. It's only the FORMAT command which is broken. (The reason for this is being investigated.)

The version of FORMAT on the Miracle Systems Gold Card and Super Gold Card use a different algorithm and work correctly.

It is unknown if the FORMAT command in SMSQ/e running on a Super Gold Card works or not.

To create an empty DSDD image using the following command under UNIX/Linux:

Code: Select all

dd if=/dev/zero of=myfloppy.img bs=512 count=1440


And an DSHD image using:

Code: Select all

dd if=/dev/zero of=myhdfloppy.img bs=512 count=2880


An attempt has been made to support ED disk images however the data rate seems to be too high for the Gotek to reliably read/write, giving many CRC errors. Although formatting seems to succeed the image produced contains garbage.


stephen_usher
Trump Card
Posts: 181
Joined: Tue Mar 11, 2014 8:00 pm

Re: Gotek + Flashfloppy: How-to.

Postby stephen_usher » Wed Oct 23, 2019 9:15 am

The reason for the failure of the Q-Jump FORMAT command on DSDD disks has been discovered.

This is what the developer of FF, Keir Fraser, has to say:
It looks like format writes extra sectors to track 0 side 1. These will not fit and will overwrite the normal sectors. It will then try to read normal sectors on side 0. If it cannot then side 1 and 0 are the same (single sided).

This kind of trick is not a fit for FF IMG handling. Use HFE and then convert to IMG after the format. You could even keep that as your formatted blank, clone and relabel it whenever you need a blank?


So it looks like DSDD disk images will have to be formatted outside of Flashfloppy using either an emulator or qltools.


User avatar
tofro
QL Wafer Drive
Posts: 1669
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Gotek + Flashfloppy: How-to.

Postby tofro » Wed Oct 23, 2019 10:08 am

If formatting seems to be a problem, would it then make sense to deposit some formatted empty images in DD, HD, ED for download somewhere?

Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
stephen_usher
Trump Card
Posts: 181
Joined: Tue Mar 11, 2014 8:00 pm

Re: Gotek + Flashfloppy: How-to.

Postby stephen_usher » Wed Oct 23, 2019 10:41 am

tofro wrote:If formatting seems to be a problem, would it then make sense to deposit some formatted empty images in DD, HD, ED for download somewhere?

Tobias


Indeed, or just use qltools to create them.


stephen_usher
Trump Card
Posts: 181
Joined: Tue Mar 11, 2014 8:00 pm

Re: Gotek + Flashfloppy: How-to.

Postby stephen_usher » Wed Oct 23, 2019 10:43 am

Here's an updated "How-To":

The Sinclair QL with any of the floppy interfaces tried so far (Sandy Q-Board, Miracle Systems Trump Card and Super Gold Card) will read and write IMG files without the need for an IMG.CFG file. The settings in the FF.CFG need to be set to the following otherwise formatting will not work and HD disks won't work on the Super Gold Card (even if FLP_DENSITY is used to manually set the disk type):

Code: Select all

interface = shugart
host = unspecified
pin02 = dens
pin34 = rdy


The interfaces don't need index pulses or a track change delay so these don't need to be changed from the default.

It should be noted that all interfaces which use the default Q-Jump Toolkit II version of the FORMAT command fail to determine the correct number of sides on in a floppy image and hence format single sided, giving 720 sectors rather than the expected 1440. However, if a pre-formatted image generated by dumping a real floppy or from an emulator is used then everything works. This is due to a trick used by the command to determine the number of sides only working on real hardware.

The version of FORMAT on the Miracle Systems Gold Card and Super Gold Card use a different algorithm and work correctly.

It is unknown if the FORMAT command in SMSQ/e running on a Super Gold Card works or not.

You cannot format ED disk images but with the following entry in IMG.CFG you can read and write to pre-formated images:

Code: Select all

[qled]
cyls = 80
heads = 2
secs = 10
bps = 2048


Images can be generated using the 'qltools' utility from the qltools Github site (https://github.com/NormanDunbar/qltools/releases) in the following manner:

Double-sided, double-density:

Code: Select all

qltools myimage.img -fdd DSKLABEL

Double-sided, high-density:

Code: Select all

qltools myimage.qlhd.img -fhd DSKLABEL


Double-sided, extended-density:

Code: Select all

qltools myimage.qled.img -fed DSKLABEL


qltools is available as pre-built binaries for Linux and Windows and will build with minor modifications on macOS using the Xcode command line tools up to macOS Mojave, Catalina isn't supported as qltools needs to be built s a 32 bit application and Catalina only supports 64 bit executables.


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

Re: Gotek + Flashfloppy: How-to.

Postby NormanDunbar » Thu Oct 31, 2019 11:38 am

stephen_usher wrote:Here's an updated "How-To":

...

Images can be generated using the 'qltools' utility from the qltools Github site (https://github.com/NormanDunbar/qltools/releases) in the following manner:

...


It's best to grab releases and/or source code from the official Sinclair QL repository rather than mine. You can get the latest code for Windows and Linux from https://github.com/SinclairQL/qltools/releases/latest - it's all in 32 bit format, but will work on 64 bit systems (assuming you have the support files installed.)


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: No registered users and 10 guests