Having implemented tools to format/write such disk format, I have found an issue with the floppy emulator, in that writing to these images fails for some reason, the error given is a timeout (a single FDC command must finish within ~2000ms, a seperate READ DATA/WRITE DATA command is used for each track; therefore: reading/writing a (partial) track must complete within ~2000ms).
Later GEM devices running MIOS 3 increased this limit to ~3000ms; when hooking various calls on S2/S3 to also provide this limit (obviously intended as a temporary measure), writing a later track fails with sector not found error (SR1 bit 2).
This problem does not occur with a real floppy drive.
(For the record, the same problem occurs when writing large files (~1MB) to raw .img images of disk layout GENERALMUSIC_GEM_S3_1600KB.)
I am using a Gotek emulator with HxE firmware v3.1.48.1a.
Here is the (custom) XML I am using to create a HFE image:
Code: Select all
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- HxC Floppy Emulator Disk Layout -->
<disk_layout>
<disk_layout_name>GENERALMUSIC_GEM_S3_1760KB</disk_layout_name>
<disk_layout_description>GeneralMusic Gem S2/3 Type-4 HD Floppy Disk</disk_layout_description>
<prefered_file_extension>img</prefered_file_extension>
<interface_mode>IBMPC_HD_FLOPPYMODE</interface_mode>
<file_size>1802240</file_size>
<layout>
<number_of_track>80</number_of_track>
<number_of_side>2</number_of_side>
<format>IBM_MFM</format>
<start_sector_id>1</start_sector_id>
<sector_per_track>11</sector_per_track>
<sector_size>1024</sector_size>
<interleave>1</interleave>
<skew_per_side>0</skew_per_side>
<skew_per_track>0</skew_per_track>
<formatvalue>0xCB</formatvalue>
<gap3>38</gap3>
<bitrate>500000</bitrate>
<pregap>0</pregap>
<rpm>300</rpm>
</layout>
</disk_layout>
Code: Select all
case 0x400:
v1[1].buf.bytes[2] = 3; // 1024 bytes/sector
v1[1].buf.bytes[3] = 11; // 11 sectors per track
v1[1].buf.bytes[4] = 38; // gap3 length
break;
Code: Select all
case 0x400: // S2S3 1760KB
operation->write1_buf[5] = 3;
operation->write1_buf[6] = 11;
operation->write1_buf[7] = 12;
break;
Reading from these images seems to work fine; the issue is with writing.