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.
* Convert `js/util.js` to Typescript and add tests
Besides converting `js/util.js` to Typescript, this change also adds
`js/types.ts` that defines common types used in apple2js. Some of
these types, like `byte` and `word` are for information only.
* Convert `js/base64.js` to Typescript
This also adds a new type, `memory`, that is either an array of
numbers, or a Uint8Array.
* Convert `js/ram.js` to Typescript
This change does not convert `RAM` to a class; it just introduces types.
* Basic typing of cpu6502
This is a really rough first pass. There are some problems that can't
be fixed until this is turned into a real class, but at least all of
the function arguments are now typed. This caught a few cases where
extra arguments were being passed in.
* Convert `js/cpu6502` to a class
In theory, idiomatic classes should be better than the previous
closure-based classes. However, this conversion shows that the
instruction table does not fit well with idiomatic classes as method
referenced in the table need to be called with the correct `this`
everywhere.
This should, at best, be considered a first attempt.
This change adds basic, non-optimal support for Typescript with
webpack. It functions well in development mode and deployment boots
ProDOS. There are probably many ways this configuration can be sped
up, but I haven't investigated that yet.
Note that no Typescript files are added in this change; it is merely a
configuration change.
This change adds a download link to the printer dialog. The contents
of the download will be the raw bytes written to the parallel
interface. Note that often these bytes will have the high-bit set
causing the contents to look like gibberish.
However, this is extremely handy because it allows one to turn the
printer output into a PDF:
1. In Appleworks (for example) configure an Apple ImageWriter in slot
1 and print a file.
2. Download the printer output.
3. Download the header file from https://github.com/AppleWin/AppleWin/files/1168047/ImageWriterEmulator-NoLF.ps.txt
4. In Linux, run:
```shell
$ cat ImageWriterEmulator-NoLF.ps.txt raw_printer_output.bin | ps2pdf - printer_output.pdf
```
Note that the parallel port emulation in apple2js does not yet support
Print Shop, so I haven't been able to test that out.
Micromodal maintains a reference to the current open dialog in
this.modal. If one dialog is open while opening another, Micromodal
can get confused and maintain a reference to the wrong one.
One of the problems is that the close action is not instantaneous, so
even closing one dialog and opening another immediately after can
cause the problem.
This change adds a small delay before opening the alert dialog to work
around the problem.
Before, when using `requestAnimationFrame`, the emulator did not save
the id returned by the browser. This broke the invariant of `run`,
namely that on exit either `runAnimationFrame` or `runTimer` would be
set. This meant that sometimes when the emulator restarted, there
would be two callbacks to `requetsAnimationFrame` run on every frame.
Now the id is saved correctly and the invariant of `run` is maintained.
* 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>
* 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.