Preamble or why GOTEK?
One can find a lot of stuff and rumors about the „HxC floppy emulators“ in relevant forums and also, that „cheap“ alternatives won’t work with computers like Amiga or Atari. This article should prove the opposite, since I successfully exchanged my internal HD-drive for the floppy-emu “SFR1M44-U100 updated version” from “Gotek”.
I decided for this paticular drive, because it (theoretically) can deal with 1000 disks and supports HD. Also, I feel the price of the HxC-emus a bit overdrawn. On Amazon or ebay there are always a lot offers for about 20€ for the Gotek devices. Here’s a product picture:
What means „updated version“?
“updated version” refers to a schematic error, that could have lead to the computer failing to detect that the drive is ready (please insert a disk…). For the updated version certain chip-resistors have been reduced in their values, so that the detection runs reliable. One can distinguish the updated version by the values of “RN4″ to “RN6″ (red square in the picture). If the value is 102 (= 1 kOhms), it’s already the updated version.
If one has the old version, it is recommended to replace the resistors by 1 kOhm-resistors. Regarding this I found a PDF document on the CD of my version with the name “REPAIR SOLUTION – VB516.pdf”. If you’re missing it, you can download it here.
Requirements for a successful operation
The following criteria have to be met if one want’s to use the 1.44MB-model of the floppy-emu with an Atari:
- The floppy-controller already needs to be fitted for HD-operation. That mean, it should run at 16MHz und should be able to stand this clockspeed permanently. So this means either the Ajax-FDC or a WD1772-02–02.
- Mixed operation with an additional, external drive may be possible, but hasn’t been tested so far.
- On the floppy-emu the jumpers “MO” and “S0″ need to be set (see picture). The Atari (in contrast to a PC) expects the first drive to be ID0.
- One needs an USB-key with enough space. Since the floppy-bus only runs with 500kb/s it doesn’t need to be fast.
- For comfortable disk management on the key one needs a PC running Windows. Maybe there’s also appropriate software for Mac OS or Linux, but I don’t know.
What works, what doesn’t work?
– What works:
- Using either DD or HD virtual disks. One can mix them in any order.
- Formatting virtual disks via software on the PC, writing and reading data, importing or exporting standard disk-images.
- Formatting DD-disks any arbitrary disk-format using the Atari, writing and reading, importing and exporting disk-images in any format(*).
- Formatting HD-disks using the Atari, writing and reading, importing and exporting images.
- Boot from the first disk (or the currently selected one if you do a warm boot).
– What doesn’t work:
- HD-disks with more than 18 sectors. 18 is the limit of the emu’s firmware. If one tries more, one gets an „illegal sector“ error.
- Trying to write disk-images with „strange“ formats via the PC software. In that case the program refuses to work saying it’s not a „FAT-12″ image file.
- Since the disks are put sequentially as binary images on the key, it’s not possible to access any other than the first disk directly via the Windows Explorer without additional software.
(*) Using JayMSA I was able to write *.ST-Images on the virtual disks. This, however, only worked running it on the Atari. So selecting the desired disk via the two buttons and then using the program to write the ST-image on the disk. More on that further down!
The sorry subject detecting media(disk) change
Unfortunately Atari saved a few pennies that days when designing the floppy-bus. So the disk change is not detected properly using the dedicated pin 2, but misusing the pin 28 (write protect) in that way, that this line is pulled to 0V (GND) for a short time when the user changes a disk. (Thanks to P. Putnik at this point for the analysis, further reading on this topic here.) A few older drives offered the option to get this demand by setting some jumper, but for modern drives or floppy-emus I’m quite sure there is no such option any more.
Hence I present a „dead simple“ solution for this that is easy to build and at least works like a charm for my Gotek floppy-emu:
My solution relies on the fact that pressing the buttons pulls a dedicated line to GND (0V). That’s exactly what we need to simulate the media change. Using two schottky-diodes this „pulling to ground“ is fed to pin 28 of the floppy-bus. The diodes prevent that the buttons are short-cicuited and that signals on pin 28 coming from the bus can’t trigger an unwanted counting-up of the selected image.
On the pictures one can see the wire connected to pin 28. The other end of the wire is connected via one diode to the „free“ pin of one button, respectively. In my case I just connected them to two through-holes of the traces to the buttons.
If one now presses one of the buttons the pin 28 is pulled to ground simultaneously. This is interpreted as a disk change by the Atari then.
Below you can find a schematic of the circuit with my modifications marked in red:
The floppy-emu in use
Here’s a picture of the floppy-emu in use. The funny case is from an old Commodore-PC. Inside there’s the mobo of an Atari 1040STF with lots of extensions (4MB RAM, SCSI-controller, 2 HDs, CDROM, real time clock, Lacescan, …). The bunch of wires crossing the case has nothing in common with the Atari, it’s just from my musicial equipment. But that just as an aside. 😉
Sorry at this point for the mediocre picture quality. These are „real“ screen-shots and it seems my TFT and my digicam aren’t best friends. 😉
Formatting of all available virtual disks at once / Initializing of the USB-key
If one wants to initialize or format all of the available virtual disks at once, one can simply use the inbuilt function of the emu’s firmware. To do so, keep both buttons pressed while powering up the computer. Shortly after switching on the version of the installed firmware will be displayed on the seven-segment displays, then there’s displayed „F01“. If one now releases the button, the drive INSTANTLY starts formatting all of the disks. Caution, there is no further security query.
So why one should use that function at least once with a new USB-key is a short story: The controller checks how many virtual disks can be created on the key and formats them. That way one knows the excact number of available disks and additionally can be sure that the key is working correctly on the drive.
However, doing so will result in all disks formatted with 1.44MB. If one wants other formats, the following procedure may help:
Formatting of custom formats
Like I already mentioned at „What works“, one can format disks with customs formats using the Atari. The number of tracks doesn’t seem to be limited, at least I was able to format a DD-disk with 85 tracks and 11 sectory/track using Kobold (thats the max Kobold can handle!). For testing I put as many files as possible on that „disk“ from the GEM-desktop to see if they can be opened correctly again afterwards. Indeed, that works without any problems!
Theoretically one could also format HD-disks that way, but like I already mentioned at „What doen’t work“ 18 sectors is the maximum. So the only option that is left over is to increase the number of tracks. For me, it’s no big deal since I hardly saw any up-formatted HD-disks anyway.
Writing back of disk-images using JayMSA
Like I mentioned above, one can write back disk-images using JayMSA. On the following screenshots you can see me using that procedure to write back an image of “Zak MC Kracken”. When using that tool one should pay attention to two points: On the file selection dialog one has to change the extension to *.* manually (see red mark on the picture). If not, one can’t select *.ST images there. The physical writing-back is labeled „Extract“ in the tool. For me, I’d suspect some other function behind that name. However, using that function the writing-back works perfectly like you can see on the additional screenshots.
Questions and answers
Here I will collect and hopefully be able to answer questions I got via comments here or on the Atari forums
Q: Do you connect the floppy cable just the same way as to a ST floppy drive or do you need to twist the cable?
A: No, like I wrote the Atari expects the first drive to be „A“ or ID0. So there is no need to twist the cable. Just plug the cable of the former disk drive on the emu’s connector.
Q: Do you have a picture of where the diodes are soldered to the switches?
A: I’ve just updated the relevant paragraph with a schematics picture that reflects the changes.
Q: Once all the mods are done, is it possible to write the game .ST images to the usb pendrive on a PC or can it only be done from a ST? And how to do this?
A: This is only possible for the first virtual disk since the PC „sees“ only the first disk. The software supplied with the emu does not work with ST-images unfortunately. I’m planning to write an application that can access all virtual disks on the key and supports ST and STX images.
Q: With the program Winimage it is possible to make .img files from real Atari ST disks, this is the file format the gotek uses to put files on the usbstick in Windows, would these images work in the ST?
A: I can’t answer that since I haven’t tried it yet.
Q: Do the games boot from the floppy emulator and can disks be swapped for multidisk games? Can games be saved on the emulated disks?
A: Yes and yes if you have modified the media change circuit so that the game can detect the disk change correctly.
Q: What about images of copy-protected (original) disks? Any chance to get them running on the Gotek?
A: Sorry, but no chance. The Gotek only supports „cooked“ images, no raw trackdata. Thus all copy-protected disks relying on „weak“ sectors and stuff will certainly fail.
To be continued…