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

Split out drivers #160

Closed iflan closed 1 year ago

iflan commented 1 year ago

With this change, the actual logic of reading an image is moved into a "driver". The DiskII class still controls the state of the card, I/O, and basic drive state (like head positioning). There are three new driver classes:

The idea is that splitting these classes apart provides better separation of concerns and, perhaps, easier testing. It will allow changing the drivers without having to worry (much) about breaking the other drivers.

Follow-on changes will put these drivers in their own files, fix up some bad naming, and improve the documentation. Feedback is welcome!

This draft PR includes the 13 sector disk support, but that has its own PR and should probably be submitted first.