Commit Graph

250 Commits

Author SHA1 Message Date
Will Scullin
e3bbd2d640
lint 2021-03-28 16:56:06 -07:00
Will Scullin
a7aa5ab902
Oh, Safari 2021-03-28 16:49:09 -07:00
Ian Flanigan
4d7068208a
Typescriptify all of the UI peripherals (#73)
* Typescriptify all of the UI peripherals

This converts the audio, gamepad, keyboard, printer, and tape
peripherals into Typescript. This is a pretty mechanical change.

It does fix issue #72, though.

* Add  and  that were missing
2021-03-28 16:39:18 -07:00
Will Scullin
08ff6f93d5
escape that . 2021-03-26 13:45:04 -07:00
Will Scullin
0c89f44560
Update watch options, package-lock.json 2021-03-26 13:29:15 -07:00
Ian Flanigan
54eddb178c
Update webpack-dev-server to 4.0.0-beta1 (#71)
When using the old webpack-dev-server with webpack 5+, we get bitten
by webpack/webpack-dev-server#2692. This upgrades to 4.0.0-beta1 which
also (unhelpfully) changes the config options.  The `watchContentBase`
and `watchOptions` don't seem to have analogs in the new versions, but
I left them commented out for future reference.

Also, this does not update `package-lock.json` because even just
updating locally gave different output since I'm on a different
version of node, I'm guessing.
2021-03-26 13:21:45 -07:00
Will Scullin
8f20fb8829
Specify webpack mode 2021-03-26 11:42:30 -07:00
Ian Flanigan
6395a9009e
Converts ui/drive_lights.js to Typescript (#70)
This change also exposes the `Callbacks` and `DriveNumber` types from
`disk2.ts`.
2021-03-26 07:45:51 -07:00
Ian Flanigan
342f024a85
Fix webpack ignored files (#69)
Before, the configuration used an array of regex literals. With
webpack 2.1.1, this breaks as it expects a list of glob strings.

See https://webpack.js.org/configuration/watch/#watchoptionsignored
2021-03-26 07:44:43 -07:00
Will Scullin
f3ca6f11d0
Spring cleaning '21, package edition 2021-03-25 07:48:47 -07:00
Will Scullin
fc8b5b4abc
Refresh package-lock.json 2021-03-23 13:04:42 -07:00
Ian Flanigan
f230c58bbf
Add green screen support for the GL renderer (#68)
* Add green screen support for the GL renderer

This adds a configuration that is equivalent to a Monitor II monitor
(at least according to the Open Emulator Project) to GL renderer.
This does not need a restart to take effect.

* Update `package.json` to latest `apple2shader` version
2021-03-23 13:02:31 -07:00
Ian Flanigan
a94fdaa065
Fix issue #64 (#66)
During the typescriptification of `disk2.js`
(9d0ec5489c), `drive`, a parameter
reference, was changed into `this.drive`, the current active disk, by
mistake. This change fixes that error.
2021-03-21 09:10:55 -07:00
Will Scullin
db36ca4553
type vidoemodes 2021-03-16 19:16:17 -07:00
Will Scullin
4a4d2a2004
lint 2021-03-16 06:33:32 -07:00
Will Scullin
e0ab1f9891
Avoid startup hiccup 2021-03-15 21:08:33 -07:00
Will Scullin
ecef3010fd
stop nibble stream when drive off 2021-03-15 19:27:55 -07:00
Will Scullin
ab3e97e8d1
Convert more cards to typescript (#63)
Convert more cards to typescript
2021-03-15 12:51:40 -07:00
Will Scullin
027b113cd4
reset flag less agressively 2021-03-14 15:15:54 -07:00
Will Scullin
afa33a4710
fix test 2021-03-13 16:54:09 -08:00
Will Scullin
e83fdd999e
Make breakpoints behave better 2021-03-13 16:08:24 -08:00
Will Scullin
b4d6e95ec2
Unenhanded default to non-smartport 2021-03-13 16:07:29 -08:00
Will Scullin
71814744eb
minor cleanup 2021-03-13 13:22:45 -08:00
Will Scullin
a3c7dd136b
Port language card and smartport to TypeScript (#62)
Port language card and smartport to TypeScript.
2021-03-13 13:18:32 -08:00
Will Scullin
bf483e1178
bind this for debugger api 2021-03-13 12:36:19 -08:00
Will Scullin
bb09a1ec33
Improve debug performance, abstract debugger. (#61)
Stop stringifying opcodes during runtime and only do so upon inspection. Moves all the debugging logic to a common place to allow building an interface.
2021-03-11 22:03:05 -08:00
Will Scullin
5f0d07623d
Revert slot 3 rom change 2021-03-09 06:37:34 -08:00
Will Scullin
63e49696b8
Goose slot detection code 2021-03-08 19:28:52 -08:00
Will Scullin
b9bd03b958
correctly report page2 status 2021-03-07 10:48:09 -08:00
Will Scullin
017e152476
fix double cycle when in debug 2021-03-07 10:35:02 -08:00
Will Scullin
2958fe53c1
Fix strobe pass-through 2021-03-07 04:56:41 -08:00
Will Scullin
b687dd9ac3
tweak video7 behaviors 2021-03-06 18:35:55 -08:00
Will Scullin
87b60d4eb4
Type restructuring 2021-03-06 15:07:06 -08:00
Will Scullin
3c5ded7058
Clean up, restructure MMU switches 2021-03-04 06:31:56 -08:00
Will Scullin
24680b989f
fix typo 2021-03-01 21:06:28 -08:00
Will Scullin
774dcf8089
Fix bank 1 bleed-through 2021-03-01 20:47:15 -08:00
Will Scullin
afc5280ac2
Flesh out some state stuff (#59)
Get save and restore state limping along to nearly as well as before I refactored and broke everything.
2021-02-27 19:17:36 -08:00
Will Scullin
983026aa1d
don't watch git 2021-02-23 19:30:57 -08:00
Will Scullin
1802f79769
Add audit disk 2021-02-23 19:23:25 -08:00
Will Scullin
45dfc801fc
still trying to figure out git actions 2021-02-22 03:12:58 -08:00
Will Scullin
3004aa99f2
Fix some edge cases 2021-02-21 21:26:07 -08:00
Will Scullin
be35aa9315
NTSC shader (#58)
Incorporate a real NTSC shader.
2021-02-21 18:38:21 -08:00
Will Scullin
1923d7a71c
Fix gamepad support
Thanks @JasonWoof
2021-02-15 17:55:46 -08:00
Will Scullin
3f966ad608
Basic binary file support. (#56) 2021-02-07 21:58:19 -08:00
Will Scullin
8ddb17202b
fix test typing 2021-02-07 21:54:11 -08:00
Ian Flanigan
279f770e28
Update Typescript and Jest dependencies (#55)
This is a mechanical update to Typescript and Jest dependencies, but
since I also upgraded `npm` to 7.5.2, the `package-lock.json` file has
a lot of churn.
2021-02-07 20:52:16 -08:00
Ian Flanigan
910238bf63
Convert cards/disk2.js to Typescript (#54)
* Convert `cards/disk2.js` to Typescript

This is mostly a straightforward conversion of `cards/disk2.js` to
Typescript, with the following exceptions:

*   `setState()` did not restore the drive light state correctly
    because the callback was called with the old `on` value.

*   `setPhase()` did not work for WOZ images.

*   `getBinary()` did not work for `nib` files.

*   `getBase64()` did not work for `nib` files and maybe didn't work
    right at all.

Even with these fixes, local storage still doesn't work correctly.

I have also added several TODOs where methods don't support WOZ disks.

* Convert most uses of `memory` to `Uint8Array`

There are many places in the existing code where we use `Uint8Array`
directly. This change merely makes the `memory` type equivalent to
`Uint8Array`.

This change also changes most ROM data to be read-only in Typescript
to ensure that it is not modified by mistake. This can't be done just
by applying `as const` to the declaration because `Uint8Array`s are
can not be expressed as literals. Instead, we create a new type,
`ReadonlyUint8Array` that drops the mutation methods and makes indexed
access read-only.

See
https://www.growingwiththeweb.com/2020/10/typescript-readonly-typed-arrays.html
for details.

* Tighten types and document `disk2.ts`

While trying to understand the Disk ][ emulation, I tighted the types
and documented the parts that I could, including references to other
sources, like _Understanding the Apple //e_ by Jim Sather.

The one functional change is the addition of the P6 ROM of DOS 3.2 and
earlier. This is automatically selected if the card is initialized for
13 sector disks.
2021-02-07 20:50:50 -08:00
Ian Flanigan
dc13b6a59a
DOS 13-sector tests and fixes (#53)
Like the DOS 3.3 and ProDOS sector order issues, this change fixes the
physical order of the sectors on 13-sector disks when nibblized.

This change also adds tests for the 13-sector format to verify the
sector order.

One of the crazy things is that _Beneath Apple DOS_ failed me in this
instance because it doesn't discuss what happens to the last byte in
"5 and 3" encoding anywhere (AFAICT). I went back to the DOS 3.1
source released by the Computer History Museum here:

    https://computerhistory.org/blog/apple-ii-dos-source-code/

The code is in `appdos31.lst` in the `POSTNIB` routine on line 4777.
2021-01-03 15:01:30 -08:00
Ian Flanigan
ab748b3aa6
Add JS typing to remaining disk types (#52) 2021-01-03 15:00:40 -08:00
Ian Flanigan
715ea6ffaa
ProDOS image format tests and fixes (#51)
Like the DOS 3.3 sector order issues in #49, this change fixes the
order of the physical sectors on the ProDOS disk when nibblized.

This change also adds tests similar to the DOS 3.3 tests to verify the
sector order.

Because the DOS 3.3 and ProDOS tests are so similar, the utility
methods have been refactored into their own file.
2021-01-03 14:59:42 -08:00