From: Toni Wilen Date: Sat, 10 Oct 2020 14:11:47 +0000 (+0300) Subject: Disk write length fix. X-Git-Tag: 4900~292 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=1ca031a87d3f60d22bd7986129396f49a1f0120a;p=francis%2Fwinuae.git Disk write length fix. --- diff --git a/disk.cpp b/disk.cpp index 17c28f76..870707bb 100644 --- a/disk.cpp +++ b/disk.cpp @@ -63,12 +63,13 @@ int floppy_writemode = 0; /* support HD floppies */ #define FLOPPY_DRIVE_HD -/* writable track length with normal 2us bitcell/300RPM motor, 12667 PAL, 12797 NTSC */ -#define FLOPPY_WRITE_LEN_PAL 12668 -#define FLOPPY_WRITE_LEN_NTSC 12798 +/* Writable track length with normal 2us bitcell/300RPM motor, 12688 PAL, 12784 NTSC */ +/* DMA clock / (7 clocks per bit * 5 revs per second * 8 bits per byte) */ +#define FLOPPY_WRITE_LEN_PAL 12668 // 3546895 / (7 * 5 * 8) +#define FLOPPY_WRITE_LEN_NTSC 12784 // 3579545 / (7 * 5 * 8) #define FLOPPY_WRITE_LEN (currprefs.floppy_write_length > 256 ? currprefs.floppy_write_length / 2 : (currprefs.ntscmode ? (FLOPPY_WRITE_LEN_NTSC / 2) : (FLOPPY_WRITE_LEN_PAL / 2))) #define FLOPPY_WRITE_MAXLEN 0x3800 -/* This works out to 350 */ +/* This works out to 350 PAL, 408 NTSC */ #define FLOPPY_GAP_LEN (FLOPPY_WRITE_LEN - 11 * 544) /* 7 CCK per bit */ #define NORMAL_FLOPPY_SPEED (7 * 256)