apple2js/js/roms/pigfont_char.ts
Ian Flanigan b80436d99c
More typescript conversion (#46)
* Convert js/ram to a class

* Convert js/mmu to Typescript

* Convert js/apple2io to Typescript

* Convert js/canvas to Typescript

* Use new types in js/mmu

* Rename js/symbols.js to js/symbols.ts

* Remove the difference between readPages and writePages

As @whscullin said in PR #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.

* Convert js/apple2 to Typescript

* Convert js/prefs to Typescript

* Convert all of the ROMs in js/roms to Typescript

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.

* Convert js/roms/cards/* to Typescript

* Convert js/formats/format_utils to Typescript

This change also seems to fix a bug with `.po` image files that
weren't being read correctly.
2020-11-24 08:48:14 -08:00

263 lines
11 KiB
TypeScript

import { bytify } from "../util";
const pigfont_charset = bytify([
0x00,0x1c,0x22,0x2a,0x2e,0x20,0x1e,0x00,
0x0c,0x12,0x21,0x3f,0x21,0x21,0x00,0x00,
0x3e,0x11,0x1e,0x11,0x11,0x3e,0x00,0x00,
0x1e,0x21,0x20,0x20,0x21,0x1e,0x00,0x00,
0x3e,0x01,0x11,0x11,0x11,0x3e,0x00,0x00,
0x3f,0x00,0x3c,0x20,0x20,0x3f,0x00,0x00,
0x3f,0x00,0x3c,0x20,0x20,0x20,0x00,0x00,
0x1e,0x20,0x27,0x21,0x21,0x1e,0x00,0x00,
0x21,0x21,0x7f,0x21,0x21,0x21,0x00,0x00,
0x0e,0x04,0x04,0x04,0x04,0x0e,0x00,0x00,
0x07,0x02,0x02,0x02,0x22,0x1c,0x00,0x00,
0x22,0x24,0x38,0x24,0x22,0x21,0x00,0x00,
0x20,0x20,0x20,0x20,0x20,0x3f,0x00,0x00,
0x21,0x33,0x2d,0x2d,0x21,0x21,0x00,0x00,
0x21,0x31,0x29,0x25,0x23,0x21,0x00,0x00,
0x1e,0x01,0x21,0x21,0x21,0x1e,0x00,0x00,
0x3e,0x01,0x3e,0x20,0x20,0x20,0x00,0x00,
0x1e,0x01,0x21,0x25,0x22,0x1d,0x00,0x00,
0x3e,0x01,0x3e,0x24,0x22,0x21,0x00,0x00,
0x1e,0x20,0x1e,0x01,0x21,0x1e,0x00,0x00,
0x7f,0x08,0x08,0x08,0x08,0x08,0x00,0x00,
0x21,0x21,0x21,0x21,0x21,0x1e,0x00,0x00,
0x21,0x21,0x12,0x12,0x0c,0x0c,0x00,0x00,
0x21,0x21,0x2d,0x2d,0x33,0x21,0x00,0x00,
0x21,0x12,0x0c,0x12,0x21,0x21,0x00,0x00,
0x41,0x22,0x1c,0x08,0x08,0x08,0x00,0x00,
0x3f,0x01,0x06,0x18,0x20,0x3f,0x00,0x00,
0x3e,0x30,0x30,0x30,0x30,0x3e,0x00,0x00,
0x00,0x20,0x10,0x08,0x04,0x02,0x00,0x00,
0x3e,0x06,0x06,0x06,0x06,0x3e,0x00,0x00,
0x0c,0x12,0x21,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x0c,0x0c,0x0c,0x0c,0x00,0x0c,0x00,0x00,
0x33,0x33,0x33,0x00,0x00,0x00,0x00,0x00,
0x12,0x3f,0x12,0x3f,0x12,0x00,0x00,0x00,
0x0a,0x1f,0x20,0x1e,0x01,0x3e,0x14,0x00,
0x31,0x32,0x04,0x08,0x13,0x23,0x00,0x00,
0x18,0x24,0x18,0x25,0x22,0x1d,0x00,0x00,
0x06,0x06,0x0c,0x00,0x00,0x00,0x00,0x00,
0x02,0x04,0x08,0x08,0x04,0x02,0x00,0x00,
0x10,0x08,0x04,0x04,0x08,0x10,0x00,0x00,
0x00,0x04,0x15,0x0e,0x15,0x04,0x00,0x00,
0x00,0x0c,0x0c,0x3f,0x0c,0x0c,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x0c,0x0c,0x18,
0x00,0x00,0x00,0x3f,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x0c,0x0c,0x00,0x00,
0x00,0x02,0x04,0x08,0x10,0x20,0x00,0x00,
0x1e,0x03,0x25,0x29,0x31,0x1e,0x00,0x00,
0x04,0x0c,0x14,0x04,0x04,0x1f,0x00,0x00,
0x1e,0x21,0x06,0x18,0x20,0x3f,0x00,0x00,
0x1e,0x21,0x0e,0x01,0x21,0x1e,0x00,0x00,
0x02,0x06,0x0a,0x12,0x3f,0x02,0x00,0x00,
0x3f,0x00,0x3e,0x01,0x21,0x1e,0x00,0x00,
0x1e,0x20,0x3e,0x21,0x21,0x1e,0x00,0x00,
0x3f,0x21,0x02,0x04,0x08,0x08,0x00,0x00,
0x1e,0x21,0x1e,0x21,0x21,0x1e,0x00,0x00,
0x1e,0x21,0x1f,0x01,0x02,0x1c,0x00,0x00,
0x00,0x0c,0x0c,0x00,0x0c,0x0c,0x00,0x00,
0x00,0x00,0x0c,0x0c,0x00,0x0c,0x0c,0x18,
0x00,0x03,0x0c,0x30,0x0c,0x03,0x00,0x00,
0x00,0x00,0x3e,0x00,0x3e,0x00,0x00,0x00,
0x00,0x30,0x0c,0x03,0x0c,0x30,0x00,0x00,
0x1e,0x21,0x06,0x08,0x00,0x08,0x00,0x00,
0x9e,0xa1,0xad,0xae,0xa0,0x9f,0x80,0x80,
0x8c,0x92,0xa1,0xbf,0xa1,0xa1,0x80,0x80,
0xbe,0x81,0x9e,0x91,0x91,0xbe,0x80,0x80,
0x9e,0xa1,0xa0,0xa0,0xa1,0x9e,0x80,0x80,
0xbe,0x81,0x91,0x91,0x91,0xbe,0x80,0x80,
0xbf,0x80,0xbc,0xa0,0xa0,0xbf,0x80,0x80,
0xbf,0x80,0xbc,0xa0,0xa0,0xa0,0x80,0x80,
0x9e,0xa0,0xa7,0xa1,0xa1,0x9e,0x80,0x80,
0xa1,0xa1,0xbf,0xa1,0xa1,0xa1,0x80,0x80,
0x8e,0x84,0x84,0x84,0x84,0x8e,0x80,0x80,
0x87,0x82,0x82,0x82,0xa2,0x9c,0x80,0x80,
0xa2,0xa4,0xb8,0xa4,0xa2,0xa1,0x80,0x80,
0xa0,0xa0,0xa0,0xa0,0xa0,0xbf,0x80,0x80,
0xa1,0xb3,0xad,0xad,0xa1,0xa1,0x80,0x80,
0xa1,0xb1,0xa9,0xa5,0xa3,0xa1,0x80,0x80,
0x9e,0x81,0xa1,0xa1,0xa1,0x9e,0x80,0x80,
0xbe,0x81,0xbe,0xa0,0xa0,0xa0,0x80,0x80,
0x9e,0x81,0xa1,0xa5,0xa2,0x9d,0x80,0x80,
0xbe,0x81,0xbe,0xa4,0xa2,0xa1,0x80,0x80,
0x9e,0xa0,0x9e,0x81,0xa1,0x9e,0x80,0x80,
0xff,0x88,0x88,0x88,0x88,0x88,0x80,0x80,
0xa1,0xa1,0xa1,0xa1,0xa1,0x9e,0x80,0x80,
0xa1,0xa1,0x92,0x92,0x8c,0x8c,0x80,0x80,
0xa1,0xa1,0xad,0xad,0xb3,0xa1,0x80,0x80,
0xa1,0x92,0x8c,0x92,0xa1,0xa1,0x80,0x80,
0xc1,0xa2,0x9c,0x88,0x88,0x88,0x80,0x80,
0xbf,0x81,0x86,0x98,0xa0,0xbf,0x80,0x80,
0xbe,0xb0,0xb0,0xb0,0xb0,0xbe,0x80,0x80,
0x80,0xa0,0x90,0x88,0x84,0x82,0x80,0x80,
0xbe,0x86,0x86,0x86,0x86,0xbe,0x80,0x80,
0x8c,0x92,0xa1,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x80,0x80,0x80,0xff,0x80,
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
0x8c,0x8c,0x8c,0x8c,0x80,0x8c,0x80,0x80,
0xb3,0xb3,0xb3,0x80,0x80,0x80,0x80,0x80,
0x92,0xbf,0x92,0xbf,0x92,0x80,0x80,0x80,
0x8a,0x9f,0xa0,0x9e,0x81,0xbe,0x94,0x80,
0xb1,0xb2,0x84,0x88,0x93,0xa3,0x80,0x80,
0x98,0xa4,0x98,0xa5,0xa2,0x9d,0x80,0x80,
0x86,0x86,0x8c,0x80,0x80,0x80,0x80,0x80,
0x82,0x84,0x88,0x88,0x84,0x82,0x80,0x80,
0x90,0x88,0x84,0x84,0x88,0x90,0x80,0x80,
0x80,0x84,0x95,0x8e,0x95,0x84,0x80,0x80,
0x80,0x8c,0x8c,0xbf,0x8c,0x8c,0x80,0x80,
0x80,0x80,0x80,0x80,0x80,0x8c,0x8c,0x98,
0x80,0x80,0x80,0xbf,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x80,0x8c,0x8c,0x80,0x80,
0x80,0x82,0x84,0x88,0x90,0xa0,0x80,0x80,
0x9e,0x83,0xa5,0xa9,0xb1,0x9e,0x80,0x80,
0x84,0x8c,0x94,0x84,0x84,0x9f,0x80,0x80,
0x9e,0xa1,0x86,0x98,0xa0,0xbf,0x80,0x80,
0x9e,0xa1,0x8e,0x81,0xa1,0x9e,0x80,0x80,
0x82,0x86,0x8a,0x92,0xbf,0x82,0x80,0x80,
0xbf,0x80,0xbe,0x81,0xa1,0x9e,0x80,0x80,
0x9e,0xa0,0xbe,0xa1,0xa1,0x9e,0x80,0x80,
0xbf,0xa1,0x82,0x84,0x88,0x88,0x80,0x80,
0x9e,0xa1,0x9e,0xa1,0xa1,0x9e,0x80,0x80,
0x9e,0xa1,0x9f,0x81,0x82,0x9c,0x80,0x80,
0x80,0x8c,0x8c,0x80,0x8c,0x8c,0x80,0x80,
0x80,0x80,0x8c,0x8c,0x80,0x8c,0x8c,0x98,
0x80,0x83,0x8c,0xb0,0x8c,0x83,0x80,0x80,
0x80,0x80,0xbe,0x80,0xbe,0x80,0x80,0x80,
0x80,0xb0,0x8c,0x83,0x8c,0xb0,0x80,0x80,
0x9e,0xa1,0x86,0x88,0x80,0x88,0x80,0x80,
0x1e,0x21,0x2d,0x2e,0x20,0x1f,0x00,0x00,
0x0c,0x12,0x21,0x3f,0x21,0x21,0x00,0x00,
0x3e,0x01,0x1e,0x11,0x11,0x3e,0x00,0x00,
0x1e,0x21,0x20,0x20,0x21,0x1e,0x00,0x00,
0x3e,0x01,0x11,0x11,0x11,0x3e,0x00,0x00,
0x3f,0x00,0x3c,0x20,0x20,0x3f,0x00,0x00,
0x3f,0x00,0x3c,0x20,0x20,0x20,0x00,0x00,
0x1e,0x20,0x27,0x21,0x21,0x1e,0x00,0x00,
0x21,0x21,0x3f,0x21,0x21,0x21,0x00,0x00,
0x0e,0x04,0x04,0x04,0x04,0x0e,0x00,0x00,
0x07,0x02,0x02,0x02,0x22,0x1c,0x00,0x00,
0x22,0x24,0x38,0x24,0x22,0x21,0x00,0x00,
0x20,0x20,0x20,0x20,0x20,0x3f,0x00,0x00,
0x21,0x33,0x2d,0x2d,0x21,0x21,0x00,0x00,
0x21,0x31,0x29,0x25,0x23,0x21,0x00,0x00,
0x1e,0x01,0x21,0x21,0x21,0x1e,0x00,0x00,
0x3e,0x01,0x3e,0x20,0x20,0x20,0x00,0x00,
0x1e,0x01,0x21,0x25,0x22,0x1d,0x00,0x00,
0x3e,0x01,0x3e,0x24,0x22,0x21,0x00,0x00,
0x1e,0x20,0x1e,0x01,0x21,0x1e,0x00,0x00,
0x7f,0x08,0x08,0x08,0x08,0x08,0x00,0x00,
0x21,0x21,0x21,0x21,0x21,0x1e,0x00,0x00,
0x21,0x21,0x12,0x12,0x0c,0x0c,0x00,0x00,
0x21,0x21,0x2d,0x2d,0x33,0x21,0x00,0x00,
0x21,0x12,0x0c,0x12,0x21,0x21,0x00,0x00,
0x41,0x22,0x1c,0x08,0x08,0x08,0x00,0x00,
0x3f,0x01,0x06,0x18,0x20,0x3f,0x00,0x00,
0x3e,0x30,0x30,0x30,0x30,0x3e,0x00,0x00,
0x00,0x20,0x10,0x08,0x04,0x02,0x00,0x00,
0x3e,0x06,0x06,0x06,0x06,0x3e,0x00,0x00,
0x0c,0x12,0x21,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x0c,0x0c,0x0c,0x0c,0x00,0x0c,0x00,0x00,
0x33,0x33,0x33,0x00,0x00,0x00,0x00,0x00,
0x12,0x3f,0x12,0x3f,0x12,0x00,0x00,0x00,
0x0a,0x1f,0x20,0x1e,0x01,0x3e,0x14,0x00,
0x31,0x32,0x04,0x08,0x13,0x23,0x00,0x00,
0x18,0x24,0x18,0x25,0x22,0x1d,0x00,0x00,
0x06,0x06,0x0c,0x00,0x00,0x00,0x00,0x00,
0x02,0x04,0x08,0x08,0x04,0x02,0x00,0x00,
0x10,0x08,0x04,0x04,0x08,0x10,0x00,0x00,
0x00,0x04,0x15,0x0e,0x15,0x04,0x00,0x00,
0x00,0x0c,0x0c,0x3f,0x0c,0x0c,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x0c,0x0c,0x18,
0x00,0x00,0x00,0x3f,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x0c,0x0c,0x00,0x00,
0x00,0x02,0x04,0x08,0x10,0x20,0x00,0x00,
0x1e,0x03,0x25,0x29,0x31,0x1e,0x00,0x00,
0x04,0x0c,0x14,0x04,0x04,0x1f,0x00,0x00,
0x1e,0x21,0x06,0x18,0x20,0x3f,0x00,0x00,
0x1e,0x21,0x0e,0x01,0x21,0x1e,0x00,0x00,
0x02,0x06,0x0a,0x12,0x3f,0x02,0x00,0x00,
0x3f,0x00,0x3e,0x01,0x21,0x1e,0x00,0x00,
0x1e,0x20,0x3e,0x21,0x21,0x1e,0x00,0x00,
0x3f,0x21,0x02,0x04,0x08,0x08,0x00,0x00,
0x1e,0x21,0x1e,0x21,0x21,0x1e,0x00,0x00,
0x1e,0x21,0x1f,0x01,0x02,0x1c,0x00,0x00,
0x00,0x0c,0x0c,0x00,0x0c,0x0c,0x00,0x00,
0x00,0x00,0x0c,0x0c,0x00,0x0c,0x0c,0x18,
0x00,0x03,0x0c,0x30,0x0c,0x03,0x00,0x00,
0x00,0x00,0x3e,0x00,0x3e,0x00,0x00,0x00,
0x00,0x30,0x0c,0x03,0x0c,0x30,0x00,0x00,
0x1e,0x21,0x06,0x08,0x00,0x08,0x00,0x00,
0x9e,0xa1,0xad,0xae,0xa0,0x9f,0x80,0x80,
0x8c,0x92,0xa1,0xbf,0xa1,0xa1,0x80,0x80,
0xbe,0x81,0x9e,0x91,0x91,0xbe,0x80,0x80,
0x9e,0xa1,0xa0,0xa0,0xa1,0x9e,0x80,0x80,
0xbe,0x81,0x91,0x91,0x91,0xbe,0x80,0x80,
0xbf,0x80,0xbc,0xa0,0xa0,0xbf,0x80,0x80,
0xbf,0x80,0xbc,0xa0,0xa0,0xa0,0x80,0x80,
0x9e,0xa0,0xa7,0xa1,0xa1,0x9e,0x80,0x80,
0xa1,0xa1,0xbf,0xa1,0xa1,0xa1,0x80,0x80,
0x8e,0x84,0x84,0x84,0x84,0x8e,0x80,0x80,
0x87,0x82,0x82,0x82,0xa2,0x9c,0x80,0x80,
0xa2,0xa4,0xb8,0xa4,0xa2,0xa1,0x80,0x80,
0xa0,0xa0,0xa0,0xa0,0xa0,0xbf,0x80,0x80,
0xa1,0xb3,0xad,0xad,0xa1,0xa1,0x80,0x80,
0xa1,0xb1,0xa9,0xa5,0xa3,0xa1,0x80,0x80,
0x9e,0x81,0xa1,0xa1,0xa1,0x9e,0x80,0x80,
0xbe,0x81,0xbe,0xa0,0xa0,0xa0,0x80,0x80,
0x9e,0x81,0xa1,0xa5,0xa2,0x9d,0x80,0x80,
0xbe,0x81,0xbe,0xa4,0xa2,0xa1,0x80,0x80,
0x9e,0xa0,0x9e,0x81,0xa1,0x9e,0x80,0x80,
0xff,0x88,0x88,0x88,0x88,0x88,0x80,0x80,
0xa1,0xa1,0xa1,0xa1,0xa1,0x9e,0x80,0x80,
0xa1,0xa1,0x92,0x92,0x8c,0x8c,0x80,0x80,
0xa1,0xa1,0xad,0xad,0xb3,0xa1,0x80,0x80,
0xa1,0x92,0x8c,0x92,0xa1,0xa1,0x80,0x80,
0xc1,0xa2,0x9c,0x88,0x88,0x88,0x80,0x80,
0xbf,0x81,0x86,0x98,0xa0,0xbf,0x80,0x80,
0xbe,0xb0,0xb0,0xb0,0xb0,0xbe,0x80,0x80,
0x80,0xa0,0x90,0x88,0x84,0x82,0x80,0x80,
0xbe,0x86,0x86,0x86,0x86,0xbe,0x80,0x80,
0x8c,0x92,0xa1,0x80,0x80,0x80,0x80,0x80,
0x80,0x80,0x80,0x80,0x80,0x80,0xff,0x80,
0x88,0x84,0x82,0x80,0x80,0x80,0x80,0x80,
0x80,0x9c,0x82,0x9e,0xa2,0x9d,0x80,0x80,
0xa0,0xae,0xb1,0xa1,0xb1,0xae,0x80,0x80,
0x80,0x9e,0xa0,0xa0,0xa0,0x9e,0x80,0x80,
0x81,0x9d,0xa3,0xa1,0xa3,0x9d,0x80,0x80,
0x80,0x9e,0xa1,0xbf,0xa0,0x9f,0x80,0x80,
0x8e,0x90,0xbc,0x90,0x90,0x90,0x80,0x80,
0x80,0x9d,0xa3,0xa3,0x9d,0x81,0xa1,0x9e,
0xa0,0xae,0xb1,0xa1,0xa1,0xa1,0x80,0x80,
0x84,0x80,0x8c,0x84,0x84,0x8e,0x80,0x80,
0x82,0x80,0x86,0x82,0x82,0x82,0xa2,0x9c,
0xa0,0xa2,0xa4,0xa8,0xb4,0xa2,0x80,0x80,
0x8c,0x84,0x84,0x84,0x84,0x8e,0x80,0x80,
0x80,0xaa,0x95,0x95,0x95,0x95,0x80,0x80,
0x80,0xae,0x91,0x91,0x91,0x91,0x80,0x80,
0x80,0x9e,0xa1,0xa1,0xa1,0x9e,0x80,0x80,
0x80,0xae,0xb1,0xb1,0xae,0xa0,0xa0,0xa0,
0x80,0x9d,0xa3,0xa3,0x9d,0x81,0x81,0x81,
0x80,0xaf,0xb0,0xa0,0xa0,0xa0,0x80,0x80,
0x80,0x9e,0xa0,0x9e,0x81,0xbe,0x80,0x80,
0x90,0xbe,0x90,0x90,0x91,0x8e,0x80,0x80,
0x80,0xa2,0xa2,0xa2,0xa2,0x9c,0x80,0x80,
0x80,0xa1,0xa1,0xa1,0x92,0x8c,0x80,0x80,
0x80,0xa2,0xa2,0xaa,0xaa,0x94,0x80,0x80,
0x80,0xa1,0x92,0x8c,0x92,0xa1,0x80,0x80,
0x80,0xa1,0xa1,0xa3,0x9d,0x81,0xa1,0x9e,
0x80,0x9f,0x82,0x8c,0x90,0xbf,0x80,0x80,
0x8c,0x98,0xbc,0xf4,0xff,0xff,0xfb,0xbc,
0xe3,0xbe,0xaa,0xbe,0xeb,0xdd,0xc1,0xbe,
0x98,0x8c,0x9e,0x97,0xff,0xff,0xef,0x9e,
0xbe,0xc9,0xc9,0xbe,0x9c,0xc1,0xbe,0xc1,
0x84,0x88,0xb6,0xff,0xfc,0xfc,0xbe,0xb6,
]);
export default pigfont_charset;