Commit Graph

429 Commits

Author SHA1 Message Date
dependabot[bot]
df56e6eeaa
Bump follow-redirects from 1.14.8 to 1.15.4 (#206)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.8 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.8...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-09 10:06:18 -08:00
Will Scullin
7c2c2a3e6d
Fix active key state 2023-12-28 17:43:36 -08:00
Will Scullin
184a102877
de-prettier keyboard layouts 2023-12-03 18:26:33 -08:00
Kaloyan Tenchov
9d536ae367
Add Pravetz 82 support (#204)
* Initial support for Pravetz 82

* Add character ROM for Pravetz 82 (#2)

* Initial working Pravetz 82 keyboard (#3)

* Fix row1 wrapping
2023-11-26 11:40:22 -08:00
Will Scullin
aaca31f96b
VS Code and prettier are fighting... 2023-11-24 16:30:59 -08:00
Will Scullin
67abcd4efd
Audit fixes 2023-11-24 10:13:25 -08:00
Will Scullin
45a5e63cf9
Use debugger from submodule 2023-11-24 10:12:19 -08:00
Will Scullin
1e79d9d59d
Prettier (#203)
* Enabled prettier

* Update lint, fix issues

* Restore some array formatting
2023-11-24 06:45:55 -08:00
Will Scullin
e7891114c6
Use submodules for apple2shader and cpu6502 (#202)
* Use submodules for apple2shader and cpu6502

* Update instructions
2023-11-22 16:28:40 -08:00
dependabot[bot]
eab7de7db3
Bump @babel/traverse from 7.17.10 to 7.23.2 (#200)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.17.10 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-18 06:56:16 -07:00
dependabot[bot]
f4c5a0e024
Bump postcss from 8.4.25 to 8.4.31 (#199)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.25 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.25...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-08 07:23:50 -07:00
Ian Flanigan
486f554d5b
Improve Disk II test reliability (#195)
Before, the garbage test had only about a 92% chance of success
because it relied on random numbers not being equal.  This change just
repeats the test 5 times and allows up to 1 failure.  This increases
the chance of the test passing to a hair less that 99.8%.
2023-08-12 15:50:48 -07:00
Ian Flanigan
0047b9dbb3
Improve FileChooser behavior with file input element (#197)
Before, the `FileChooser` could create a malformed `accept` parameter
by repeating extensions if they were specified by several MIME types.
This no longer happens and there is a test for it.
2023-08-12 15:49:46 -07:00
Ian Flanigan
4490cc9bc7
Update @types/wicg-file-system-access (#196)
With the latest TypeScript, there was a difference between `libdom`
and `wicg-file-system-access` that caused weird errors.  Updating this
fixes them.
2023-08-12 15:47:18 -07:00
Will Scullin
9f7c9f25f9
Simplify op table (#194) 2023-08-06 20:59:25 -07:00
Will Scullin
44fef94b4d
Update Typescript (#193) 2023-08-06 18:34:53 -07:00
Will Scullin
25d82c0d74
Node 14.x is EOL (#191)
Update engine >= 16, test against 16 and 18
2023-07-08 13:14:31 -07:00
Will Scullin
ee2cc9f0ff Update jest-image-snapshot 2023-07-08 12:41:53 -07:00
dependabot[bot]
63459864da
Bump stylelint from 15.6.0 to 15.10.1 (#189)
Bumps [stylelint](https://github.com/stylelint/stylelint) from 15.6.0 to 15.10.1.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/15.6.0...15.10.1)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-08 12:25:01 -07:00
dependabot[bot]
f92a103944
Bump tough-cookie from 4.0.0 to 4.1.3 (#190)
Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.0.0 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/tough-cookie/compare/v4.0.0...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-08 11:19:41 -07:00
Ian Flanigan
6923d43873
Fix issue #187 (and upgrade jest) (#188)
* Update jest to v29.5.0

This updates jest to the latest version (29.5.0) and fixes everything
that the upgrade breaks.  One of the biggest differences is that the
mock types changed and I'm once again confused as to the "proper" way
to create mocks in jest.  Whatever.

* Fix issue #187 were bank writing was not working correctly

Before, `mmu.ts` would deactivate writing to the language card if
`prewrite` was reset.  However, it is totally possible to reset
`prewrite` and leave writing enabled, as shown my Sather in
_Understanding the Apple IIe_, table 5.5, p. 5-24.  For example:

```assembly_x86
    sta  $c08a  ; WRITE DISABLE; READ DISABLE
    lda  $c08b  ; PRE-WRITE set
    lda  $c08b  ; WRITE enabled
    sta  $c08a  ; PRE-WRITE reset; WRITE still enabled!
    lda  $c08b  ; PRE-WRITE set; WRITE still enabled!
```

would not work correctly because the last line would clear `_writebsr`
before setting `_prewrite`, which is incorrect.

Now, `_writebsr` is only set when `_prewrite` is set and thus only
cleared when `writeSwitch` is false.  This matches Table 5.5.

* Fix pre-write for the language card

This is the same issue as the `MMU`, namely that `langcard.ts` would
deactivate writing to the language card if `prewrite` was reset.
However, it is totally possible to reset `prewrite` and leave writing
enabled, as shown my Sather in _Understanding the Apple II_, table
5.4, p. 5-30. See the previous commit for an example.

This change also adds a test for the `LanguageCard` class.
2023-07-08 11:18:38 -07:00
Will Scullin
c52f03a7e1
Shorter touch delay, delay on release (#186) 2023-06-11 16:02:01 -07:00
dependabot[bot]
c8bc512655
Bump webpack from 5.28.0 to 5.76.0 (#183)
* Bump webpack from 5.28.0 to 5.76.0

Bumps [webpack](https://github.com/webpack/webpack) from 5.28.0 to 5.76.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.28.0...v5.76.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix build

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Will Scullin <scullin@scullin.com>
2023-05-28 16:24:47 -07:00
dependabot[bot]
e85aa735da
Bump yaml, stylelint, stylelint-config-css-modules, stylelint-config-standard, stylelint-config-standard-scss and stylelint-scss (#184)
Removes [yaml](https://github.com/eemeli/yaml). It's no longer used after updating ancestor dependencies [yaml](https://github.com/eemeli/yaml), [stylelint](https://github.com/stylelint/stylelint), [stylelint-config-css-modules](https://github.com/pascalduez/stylelint-config-css-modules), [stylelint-config-standard](https://github.com/stylelint/stylelint-config-standard), [stylelint-config-standard-scss](https://github.com/stylelint-scss/stylelint-config-standard-scss) and [stylelint-scss](https://github.com/stylelint-scss/stylelint-scss). These dependencies need to be updated together.


Removes `yaml`

Updates `stylelint` from 14.16.1 to 15.6.0
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/14.16.1...15.6.0)

Updates `stylelint-config-css-modules` from 4.1.0 to 4.2.0
- [Release notes](https://github.com/pascalduez/stylelint-config-css-modules/releases)
- [Changelog](https://github.com/pascalduez/stylelint-config-css-modules/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pascalduez/stylelint-config-css-modules/compare/4.1.0...4.2.0)

Updates `stylelint-config-standard` from 26.0.0 to 33.0.0
- [Release notes](https://github.com/stylelint/stylelint-config-standard/releases)
- [Changelog](https://github.com/stylelint/stylelint-config-standard/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint-config-standard/compare/26.0.0...33.0.0)

Updates `stylelint-config-standard-scss` from 6.1.0 to 9.0.0
- [Release notes](https://github.com/stylelint-scss/stylelint-config-standard-scss/releases)
- [Changelog](https://github.com/stylelint-scss/stylelint-config-standard-scss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint-scss/stylelint-config-standard-scss/compare/v6.1.0...v9.0.0)

Updates `stylelint-scss` from 4.3.0 to 4.6.0
- [Release notes](https://github.com/stylelint-scss/stylelint-scss/releases)
- [Changelog](https://github.com/stylelint-scss/stylelint-scss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stylelint-scss/stylelint-scss/compare/v4.3.0...v4.6.0)

---
updated-dependencies:
- dependency-name: yaml
  dependency-type: indirect
- dependency-name: stylelint
  dependency-type: direct:development
- dependency-name: stylelint-config-css-modules
  dependency-type: direct:development
- dependency-name: stylelint-config-standard
  dependency-type: direct:development
- dependency-name: stylelint-config-standard-scss
  dependency-type: direct:development
- dependency-name: stylelint-scss
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 06:14:17 -07:00
Will Scullin
c6f5c9f504
Fix disable mouse joystick (#180) 2023-02-23 20:29:35 -08:00
Will Scullin
eab02bff31
Fix scss linting (#178) 2023-01-31 17:49:07 -08:00
Will Scullin
031c278d57
Rearrange save buttons (#177) 2023-01-29 07:45:36 -08:00
Will Scullin
7a97414e5d
Fix disk format type checks (#176) 2023-01-28 09:06:03 -08:00
Will Scullin
d042a5b319
Don't reload already loaded disk (#174) 2023-01-22 18:31:35 -08:00
Will Scullin
9173bff1ba
Switch to scss, better scope rules (#170)
Restrict element types and global styling to improve embedability
2023-01-11 18:14:44 -08:00
Will Scullin
3d59142ee9
audit fix 2022-12-30 19:41:56 -08:00
Will Scullin
4ffc47aa90
Fix build 2022-12-30 19:27:54 -08:00
Will Scullin
6bd550c985
Merge pull request #168 from whscullin/dependabot/npm_and_yarn/qs-and-express-6.11.0
Bump qs and express
2022-12-09 06:14:56 -08:00
dependabot[bot]
76d1f3775f
Bump qs and express
Bumps [qs](https://github.com/ljharb/qs) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.

Updates `qs` from 6.7.0 to 6.11.0
- [Release notes](https://github.com/ljharb/qs/releases)
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.7.0...v6.11.0)

Updates `express` from 4.17.1 to 4.18.2
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.1...4.18.2)

---
updated-dependencies:
- dependency-name: qs
  dependency-type: indirect
- dependency-name: express
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-09 07:14:22 +00:00
Will Scullin
887f8515e7
Merge pull request #167 from whscullin/dependabot/npm_and_yarn/decode-uri-component-0.2.2
Bump decode-uri-component from 0.2.0 to 0.2.2
2022-12-02 16:40:39 -08:00
dependabot[bot]
5e8da71e5e
Bump decode-uri-component from 0.2.0 to 0.2.2
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-03 00:37:14 +00:00
Will Scullin
2d9968ee09
Merge pull request #166 from whscullin/dependabot/npm_and_yarn/loader-utils-2.0.4
Bump loader-utils from 2.0.0 to 2.0.4
2022-11-15 20:49:23 -06:00
dependabot[bot]
a476d7da8e
Bump loader-utils from 2.0.0 to 2.0.4
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.0 to 2.0.4.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v2.0.0...v2.0.4)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 22:16:27 +00:00
Will Scullin
5bd51d64c5
Merge pull request #163 from iflan/split-drivers-into-files
Split drivers into files
2022-10-01 11:17:12 -07:00
Will Scullin
0be830784a
Merge pull request #161 from iflan/split-out-drivers
Split handling of nibble disks and WOZ disks into separate drivers
2022-10-01 11:16:14 -07:00
Will Scullin
2fcd6a377c
Revert "Minor cleanup (#162)" (#164)
This reverts commit 8c2299e43e.
2022-10-01 11:15:57 -07:00
Ian Flanigan
8c2299e43e
Minor cleanup (#162)
* Split handling of nibble disks and WOZ disks into separate drivers

Before, the `DiskII` object took care of both nibble disks and WOZ
disks at the same time. This made it hard to see which code affected
which disks.

Now, nibble disks are handled by the `NibbleDiskDriver` and WOZ disks
are handled by the `WozDiskDriver`. This separation of code should
lead to easeir testing and, perhaps, faster evolution of disk
handling.

An upcoming change will move the `NibbleDiskDriver` and the
`WozDiskDriver` to separate files.

This passes all tests, compiles, and runs both nibble disks and WOZ
disks.

* Rename drive number fields/variables/parameters to `driveNo`

Before, the naming of fields, variables, and parameters that took
`DriveNumber` was very inconsistent. This changes them all to
`driveNo`.

* Organize imports in `disk2.ts`

The imports were automatically organized using VS Code's organize
imports action.
2022-10-01 11:08:58 -07:00
Ian Flanigan
a7bf5d025d
Split drivers into different files
Before, all of the disk drivers were in the `disk2.ts` file. With this
change, they are now in separate files with a common `types.ts` file
for shared types. Now, none of the drives depend on the `disk2.ts`
except the WOZ driver that needs access to the sequencer rom. (This
may be moved in a future refactoring.)
2022-09-24 09:51:40 +02:00
Ian Flanigan
630a3e9d38
Organize imports in disk2.ts
The imports were automatically organized using VS Code's organize
imports action.
2022-09-24 08:54:02 +02:00
Ian Flanigan
4bbfac5a5a
Rename drive number fields/variables/parameters to driveNo
Before, the naming of fields, variables, and parameters that took
`DriveNumber` was very inconsistent. This changes them all to
`driveNo`.
2022-09-24 08:53:48 +02:00
Ian Flanigan
51ba03ac28
Split handling of nibble disks and WOZ disks into separate drivers
Before, the `DiskII` object took care of both nibble disks and WOZ
disks at the same time. This made it hard to see which code affected
which disks.

Now, nibble disks are handled by the `NibbleDiskDriver` and WOZ disks
are handled by the `WozDiskDriver`. This separation of code should
lead to easeir testing and, perhaps, faster evolution of disk
handling.

An upcoming change will move the `NibbleDiskDriver` and the
`WozDiskDriver` to separate files.

This passes all tests, compiles, and runs both nibble disks and WOZ
disks.
2022-09-18 21:37:03 +02:00
Ian Flanigan
e280c3d7b8
Add 13 sector disk support to getBinary (#159)
Before, `getBinary` did not work for 13 sector disks because it
assumed that all tracks had 16 sectors. On top of that, `readSector`
could not decode sectors with 5 and 3 encoding. And finally,
`findSector` couldn't even find sectors with DOS 3.2 address fields.

All of these have been fixed and some tests added to make sure that
they keep working.
2022-09-18 06:40:08 -07:00
Ian Flanigan
2793c25c9f
Split disk data out into its own record (#158)
* Harmonize drive and disk type hierarchies

Before, the `XXXDrive` and `XXXDisk` type hierarchies were similar,
but not exactly the same. For example, `encoding` and `format` were
missing on some `XXXDisk` types where they existed on the `XXXDrive`
type. This change attempts to bring the hierarchies closer together.

However, the biggest visible consequence is the introduction of the
`FLOPPY_FORMATS` array and its associated `FloppyFormat` type.  This
replaces `NIBBLE_FORMATS` in most places.  A couple of new type guards
for disk formats and disks have been added as well.

All tests pass, everything compiles with no errors, and both WOZ and
nibble format disks load in the emulator.

* Move disk data to a `disk` field in the drive

Before, disk data was mixed in with state about the drive itself (like
track, motor phase, etc.). This made it hard to know exactly what data
was necessary for different image formats.

Now, the disk data is in a `disk` field whose type depends on the
drive type.  This makes responisbility a bit easier.

One oddity, though, is that the `Drive` has metadata _and_ the `Disk`
has metadata.  When a disk is in the drive, these should be `===`, but
when there is no disk in the drive, obviously only the drive metadata
is set.

All tests pass, everything compiles, and both WOZ and nibble disks
work in the emulator (both preact and classic).

* Squash the `Drive` type hierarchy

Before, the type of the drive depended on the type of the disk in the
drive. Thus, `NibbleDrive` contained a `NibbleDisk` and a `WozDrive`
contained a `WozDisk`.  With the extraction of the disk data to a
single field, this type hierarchy makes no sense.  Instead, it
suffices to check the type of the disk.

This change removes the `NibbleDrive` and `WozDrive` types and type
guards, checking the disk type where necessary. This change also
introduces the `NoFloppyDisk` type to represent the lack of a
disk. This allows the drive to have metadata, for one.

All tests pass, everything compiles, and both WOZ and nibble disks
work locally.

* Use more destructuring assignment

Now, more places use constructs like:

```TypeScript
    const { metadata, readOnly, track, head, phase, dirty } = drive;
    return {
        disk: getDiskState(drive.disk),
        metadata: {...metadata},
        readOnly,
        track,
        head,
        phase,
        dirty,
    };
```

* Remove the `Disk` object from the `Drive` object

This change splits out the disk objects into a record parallel to the
drive objects. The idea is that the `Drive` structure becomes a
representation of the state of the drive that is separate from the
disk image actually in the drive. This helps in an upcoming
refactoring.

This also changes the default empty disks to be writable. While odd,
the write protect switch should be in the "off" position since there
is no disk pressing on it.

Finally, `insertDisk` now resets the head position to 0 since there is
no way of preserving the head position across disks. (Even in the real
world, the motor-off delay plus spindle spin-down would make it
impossible to know the disk head position with any accuracy.)
2022-09-17 06:41:35 -07:00
Ian Flanigan
41e0609f55
Floppy controller refactorings 1 (#155)
* Add `DiskMetada` to the `Disk` interface

Before, metadata about the image, such as name, side, etc. was mixed
in with actual disk image information.  This change breaks that
information into a separate structure called `DiskMetadata`.
Currently, the only two fields are `name` and `side`, but the idea is
that more fields could be added as necessary, like a description, a
scan of the disk or label, etc.  In a follow-on change, the default
write-protection status will come from the metadata as well.

The current implementation copies the metadata when saving/restoring
state, loading disk images, etc.  In the future, the metadata should
passed around until the format is required to change (like saving one
disk image format as another).  Likewise, in the future, in may be
desirable to be able to override the disk image metadata with
user-supplied metadata.  This could be use, for example, to
temporarily add or remove write-protection from a disk image.

All existing tests pass and the emulator builds with no errors.

* Rename `writeMode` to `q7`

Before, nibble disk emulation used the `writeMode` field to keep track
of whether the drive should be read from or written to, but the WOZ
emulation used `q7` to keep track of the same state.

This change renames `writeMode` to `q7` because it more accurately
reflects the state of the Disk II controller as specified in the
manuals, DOS source, and, especially, _Understanding the Apple //e_ by
Jim Sather.

* Remove the coil state

Before, `q` captured the state of the coils.  But it was never read.
This change just deletes it.

* Use the bootstrap and sequencer ROMs with indirection

Before, the contents of the bootstrap ROM and sequencer ROM were set
directly on fields of the controller.  These were not saved or
restored with the state in `getState` and `setState`.  (It would have
been very space inefficient if they had).

Now, these ROMs are used from constants indexed by the number of
sectors the card supports.  This, in turn, means that if the number of
sectors is saved with the state, it can be easily restored.

* Split out the Disk II controller state

This change factors the emulated hardware state into a separate
structure in the Disk II controller.  The idea is that this hardware
state will be able to be shared with the WOZ and nibble disk code
instead of sharing _all_ of the controller state (like callbacks and
so forth).

* Factor out disk insertion

Before, several places in the code essentially inserted a new disk
image into the drive, which similar—but not always exactly the
same—code.  Now there is an `insertDisk` method that is responsible
for inserting a new `FloppyDisk`.

All tests pass, everything compiles, manually tested nibble disks and
WOZ disks.
2022-08-31 18:55:01 -07:00
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