TomHarte / CLK

A latency-hating emulator of: the Acorn Electron and Archimedes, Amstrad CPC, Apple II/II+/IIe and early Macintosh, Atari 2600 and ST, ColecoVision, Enterprise 64/128, Commodore Vic-20 and Amiga, MSX 1/2, Oric 1/Atmos, early PC compatibles, Sega Master System, Sinclair ZX80/81 and ZX Spectrum.
MIT License
910 stars 50 forks source link

Wrong drive speed emulation for 800k disks on Macintosh #1329

Open valexv opened 4 months ago

valexv commented 4 months ago

800k disks don't seem to be emulated properly on Macintosh. It takes an unrealistically long time to boot from a System 6 disk and the emulated machine is so unresponsive that it's unusable. I did a test where I booted from a hard disk image and copied the same 400kb file to a blank 400k and 800k disk and these were my results:

400k disk Write - 45 sec Read - 18 sec

800k disk Write - 235 sec Read - 145 sec

I think the emulator is slowing down the speed of the drive too much because the read and write speeds should be more or less the same between these two.

ryandesign commented 4 months ago

I've observed this slowness too, definitely on 800K HFS disks but I'm not sure that 400K MFS disks are completely unaffected. I assume it's not an intentional slowing down but rather a continuation of the disk reading issues I've reported with the Apple II Disk II emulation since Macintosh disks are similar and share code in Clock Signal. I hoped that continuing to tackle those Apple II disk issues would improve the reliability of Macintosh disk access too. I assume the Macintosh is just having trouble finding the sectors it needs and is having to retry many times before finding them, thus slowing things down. By adding head position logging I see when booting to an 800K HFS disk that the head keeps making wild swings all across the disk, repeatedly returning to track 0 after almost every read, as if needing to reset back to a known position after getting lost.