Expand description
§Apple 5.25 inch disk module
This handles bit-level processing of a 5.25 inch GCR disk track. The logic state sequencer is approximated by a simple model.
Acknowledgment: some of this module is adapted from CiderPress.
Structs§
- How to find and read the sector address fields
- How to find and read the sector data
- This is the main interface for interacting with 5.25 inch disk tracks. Writing to the track is at the bit stream level, any bit pattern will be accepted. Reading can be done by direct bit stream consumption, or through a soft latch. This will also behave as a cyclic buffer to reflect a circular track.
Constants§
Functions§
- Convenient form of
create_trackfor compatibility with DOS 3.0, 3.1, and 3.2 - Convenient form of
create_trackfor compatibility with DOS 3.3 and ProDOS - This creates a WOZ track including sync bytes, address fields, nibbles, checksums, etc.. The returned tuple has (track buffer, TrackBits object) For 13 sector disks, data segments are filled with high bits. For 16 sector disks, the data segment is created, and the data itself is zeroed.
- decode two bytes, returning the nibbles in a single u8
- This creates a NIB or WOZ track including sync bytes, address fields, nibbles, checksums, etc.. The returned tuple has (track buffer, TrackBits object) For 13 sector disks, data segments are filled with high bits. For 16 sector disks, the data segment is created, and the data itself is zeroed.
sync_bits= 8 for NIB, 9 for WOZ 13 sector, 10 for WOZ 16 sector. Track is padded tobuf_lenwith 0x00 for WOZ, 0xFF for NIB. - Convenient form of
formatfor compatibility with DOS 3.0, 3.1, and 3.2 - Convenient form of
formatfor compatibility with DOS 3.3 and ProDOS