jscrane / UK101

Compukit UK101 hardware emulator on Stellarpad, ESP8266 and ESP32
GNU General Public License v2.0
7 stars 4 forks source link

OS65D write to disk #16

Closed jscrane closed 9 months ago

jscrane commented 9 months ago

https://www.osiweb.org/computes_gazette/Compute_n020_p136_OS65D_Disk_Routines_Part1.pdf

Skeleton support for this exists, however:

jscrane commented 9 months ago

Example track header from disk image:

000900 43 57 01 58 76 01 08 52 41 43 4b 20 00 68 20 92

The first 4 bytes are the track header. According to this article

This data constitutes the Track Header. On Initialization, a track is erased then the Track Header is written on the Track. This Track Header is not rerecorded at any future read or write.

This means that the first byte of a track should be written at position 4, not position 0.