Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More typescript conversion #46

Merged
merged 12 commits into from
Nov 24, 2020

Conversation

iflan
Copy link
Contributor

@iflan iflan commented Nov 17, 2020

This change converts:

  • js/ram.ts to be a Typescript class
  • js/mmu.js to Typescript
  • js/apple2io to Typescript
  • js/canvas to Typescript
  • js/apple2 to Typescript
  • js/prefs to Typescript
  • js/roms/* to Typescript
  • js/formats/format_utils to Typescript

These conversions were done fairly mechanically, so there is probably room for improvement.

Also, there is a change that combines the two interfaces ReadablePage and WriteablePage into Page and combines the page arrays.

As @whscullin said in PR whscullin#38, there's no need to have both readable
and writable pages since all implementations are currently both. This
change combines them into `Page`. Likewise, `PageHandler` now extends
`Page`.

`Apple2IO` now implements `PageHandler`. This caught a bug where `end`
had been renamed `endend` by mistake.

There are a few other formatting changes as well.
Now all of the ROMs are classes that extend the ROM class. There is
some rudamentary checking to make sure that the length of the ROM
matches the declared start and end pages. (This caught what looks to
be an error in roms/apple2e, but it's hard for me to tell.)

The typing also caught an error where the character ROM was being
used for the main ROM for the apple2j version.
This change also seems to fix a bug with `.po` image files that
weren't being read correctly.
@whscullin
Copy link
Owner

These all seem great, I can land it now or is there more in the works?

@iflan
Copy link
Contributor Author

iflan commented Nov 24, 2020

There are always more in the works :-), but probably nothing until next weekend. I can just keep creating PRs until everything is done, or I can pile it all on this one. If you're planning changes, then probably landing this soon is better. It's up to you, really.

@whscullin whscullin merged commit b80436d into whscullin:master Nov 24, 2020
@iflan iflan deleted the more-typescript-conversion branch January 1, 2021 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants