apple2js/test/js
Ian Flanigan 5e224006e4
Make DiskII.drives a Record instead of an array (#154)
Before, the `drives` field was an `array[0..1]` of `Drive`, but all of
the methods took a `DriveNumber`, which was `[1..2]`.  This meant that
code everywhere was always subtracting 1 from the drive number.

Now, `drives` is a `Record<DriveNumber, Drive>`, which means tha it
has indexes `1, 2` and there's no need to subtract 1 everywhere.

This change updates the `DiskII` class and its tests.

The motivation for this change is to slowly split the WOZ disk
implementation from the nibble disk implementation.  I've tried twice,
but the change has always grown too big and hairy, so I'm starting
very small this time and working my way up.
2022-08-31 09:06:38 -07:00
..
__image_snapshots__ Videomode refactor 2 (#80) 2021-05-25 12:08:10 -07:00
__mocks__ Add the recommended eslint plugins for TypeScript (#121) 2022-05-31 08:38:40 -07:00
applesoft Debugger disk info groundwork (#145) 2022-07-23 12:00:38 -07:00
cards Make DiskII.drives a Record instead of an array (#154) 2022-08-31 09:06:38 -07:00
formats 2IMG Download support. (#137) 2022-06-21 20:34:19 -07:00
ui Preact UI (#106) 2022-05-10 06:52:06 -07:00
base64.test.ts Flesh out some state stuff (#59) 2021-02-27 19:17:36 -08:00
canvas.test.ts jest 27 2021-10-02 07:21:37 -07:00
debugger.spec.ts More debugger panels (#141) 2022-07-13 20:34:50 -07:00
gl.test.ts jest 27 2021-10-02 07:21:37 -07:00
rom.test.ts Jest lint (#118) 2022-05-30 09:29:48 -07:00
util.test.ts 2IMG Download support. (#137) 2022-06-21 20:34:19 -07:00