Amiga, Gotek, EmuTOS and DSKCHANGE

HxC Floppy Emulator on Amiga support
Post Reply
BlankVector
Posts: 6
Joined: Mon Nov 14, 2016 2:05 am

Amiga, Gotek, EmuTOS and DSKCHANGE

Post by BlankVector »

My hardware is A500+ with Gotek and HxC firmware v3.0.8.2a.
It works fine with AmigaOS and ADF images.

I want to use EmuTOS to read ST floppies. The latest snapshot 20170102 has new floppy routines and floppy support enabled by default. I use emutos-floppy-20170102.zip from there (EmuTOS as ADF):
https://sourceforge.net/projects/emutos ... /20170102/

Those new floppy routines use the DSKCHANGE bit in CIAAPRA. On each new access, the drive is selected, and the DSKCHANGE bit is checked to determine if the floppy has changed. It works perfectly with real Amiga floppy drive and ST floppies.

With Gotek and ST images, disk changes are not detected by EmuTOS. For example, select a first slot with ST image. Double-click A:. Select a different slot then press Esc to refresh the window contents. The list of files is not updated. This is wrong. But if I switch to a slot with an ADF image, the floppy change is detected (and EmuTOS displays an alert as it can't read Amiga floppies). When I switch back to a slot with another ST image, the floppy change is properly detected.

It seems that switches between ST images don't produce the expected signal on DSKCHANGE bit. On the other hand, it works fine when switching ADF images. Also, switching real ST floppies work fine. So this might indicate an HxC firmware bug.

For memory, the C code of EmuTOS floppy driver for Amiga is there. Look at the bottom for amiga_flop_mediach() and amiga_floppy_has_disk_changed().

BlankVector
Posts: 6
Joined: Mon Nov 14, 2016 2:05 am

Re: Amiga, Gotek, EmuTOS and DSKCHANGE

Post by BlankVector »

New tests after Jeff hints:

1) In HxCFloppyEmulator.exe:
- SD HxC Floppy Emulator settings
- Load config file (from USB drive)
- In "SD HxC Floppy Emulator Interface setting" section, set Drive A mode from "From HFE" to Amiga.
- Save config file (to USB drive)

As far as I understand, this should enable the DSKCHANGE bit for the drive, even for ST images. Unfortunately, it does not change anything :(
Maybe that setting is ignored for ST images? It should not.

2) Second try by converting ST images to HFE
- In HxCFloppyEmulator.exe:
- SD HxC Floppy Emulator settings
- HFE file Interfacemode: Mode "Amiga". As far as I understand, this will set "Amiga interface mode" in next created HFE images.
- Load and ST image
- Export HFE image

I have converted 2 ST images to HFE using the above method and... it works fine :)

So there is definitely a problem with ST images on Amiga.

BlankVector
Posts: 6
Joined: Mon Nov 14, 2016 2:05 am

Re: Amiga, Gotek, EmuTOS and DSKCHANGE

Post by BlankVector »

Just tested with firmware v3.1.16.1a:
It works fine :D
Thanks for the fix.

Post Reply