whscullin / apple2js

An Apple II emulator originally written in Javascript, now being converted to TypeScript
http://www.scullinsteel.com/apple2/
MIT License
438 stars 57 forks source link

Fix 2mg header parsing and add tests #127

Closed iflan closed 2 years ago

iflan commented 2 years ago

Before, the offset for FLAGS in 2mg.ts was 0x0A, which is incorrect according to the spec at:

https://apple2.org.za/gswv/a2zine/Docs/DiskImage_2MG_Info.txt

Now, all of the fields in the 2mg header are described, including their lengths and any constraints. These constraints are enforced by read2MGHeader and tested by new tests.