Commit Graph

30 Commits

Author SHA1 Message Date
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
be35aa9315
NTSC shader (#58)
Incorporate a real NTSC shader.
2021-02-21 18:38:21 -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
Will Scullin
1aaa94a8ed
enforce indent case like vscode prefers 2020-11-25 17:28:37 -08:00
Ian Flanigan
1e4e8381ec
Fix calls to cpu.cycles() and cpu.sync() (#43)
Apparently, I broke everything when I removed the underscores from the
field names and added them to the method names. The fix is just to
rename the methods `getCycles` and `getSync` and call it a day.
2020-11-15 17:54:13 -08:00
Will Scullin
8d74ccaa13
typo 2020-09-20 06:37:26 -07:00
Will Scullin
ab05e99d81
Simple Smartport (#31)
* Simple Smartport

* Block device support

* turn off verbose debugging

* rom cleanup

* Turn off debugging, again

* Turn off debugging, again, again
2020-09-12 19:42:18 -07:00
Will Scullin
1e56b0af63
No Slot Clock 2020-09-03 20:39:35 -07:00
Will Scullin
bb6e36f964
Various fixes (#23)
* Sort disks in category order

* Fix saving disk

* Fix keyboard not working after modal

* Make caps lock key on keyboard work, while keeping caps lock on virtual keyboard working too

* Fix delete local storage

* Fix minus key on Mac

* Remove backtick

* Credit.

Co-authored-by: Matthew Hebley <Matthew.Hebley@navico.com>
2020-04-23 19:47:44 -07:00
Will Scullin
ddcabc5683
Really brief delay for CFFA. 2020-01-12 13:06:40 -08:00
Will Scullin
b647b3c2bb
CFFA (#20)
* CFFA

* CFFA multi-disk and write functionaliity.

* Clean up multi-devices/partition behavior.

* ProDOS WIP

* Update against refactored codebase.

* WIP

* Wait until disks load, show progress.

* Don't wait so long to boot floppies.

* Forgot to save :|.

* Credit.
2020-01-02 11:11:04 -08:00
Will Scullin
506dfc52de
Small cleanup and fixes. 2020-01-02 10:57:26 -08:00
Will Scullin
f75a2fa962
Fix acceleration, normalize heavily used signatures. (#18) 2019-12-29 19:13:59 -08:00
Will Scullin
bcbe36db0c
Refactor main (#17)
* Refactor UI elements.

* Cleanup.

* Refactor core.

* Fix printer.

* Small fixes

* Fix frame counts
2019-12-27 15:04:07 -08:00
Will Scullin
37e0c8a84c
Fix Thunderclock with more correct implementation. 2019-12-01 09:52:14 -08:00
Will Scullin
0059910122
Fix Disk II writing. 2019-12-01 06:43:42 -08:00
Will Scullin
69bdd3fde4
Move ROM data out of card sources. (#16) 2019-11-24 16:52:01 -08:00
Will Scullin
5e4aac70d2
Use bit math more places. (#15) 2019-11-23 19:05:52 -08:00
Will Scullin
3b95726655
Crude native woz support. (#13)
Readonly for now.
2019-10-01 19:56:10 -07:00
Will Scullin
c5ca5ee132
Less ES6 2019-06-15 15:59:02 -07:00
Will Scullin
ea8766f370
Back out last change. 2019-06-15 09:38:38 -07:00
Will Scullin
dfe1b28476
Fix undefined toHex. 2019-06-15 09:36:17 -07:00
Will Scullin
be715f3f63
Remove jQuery and jQuery UI dependencies. 2019-03-12 21:11:00 -07:00
Will Scullin
573f36510d
Convert to webpack first pass. 2019-02-28 21:21:18 -08:00
Will Scullin
b8261252e3
True up with website.
* Drag and drop support.
* Re-enable audio in newer Chrome, Safari
* Minimal Printer
* Video dirty regions
2019-02-18 20:42:50 -08:00
Will Scullin
77372d388b
Ditch makefiles, switch to eslint, fix linting. 2019-01-09 00:51:25 -08:00
Will Scullin
de4f1fc2d8 State save/restore work, updated audio class. 2017-12-02 20:45:02 -08:00
Will Scullin
566630920f One canvas to rule them all. 2017-09-24 07:06:57 -07:00
Will Scullin
c02ea762d8 D13 support, closer to real hardward behavior. 2017-09-23 11:34:24 -07:00
Will Scullin
37a3fb9bcd Refactoring. 2017-09-22 21:42:57 -07:00