apple2js/js/roms/character/apple2e_char.ts

521 lines
23 KiB
TypeScript
Raw Normal View History

import { ReadonlyUint8Array } from '../../types';
/* exported apple2e_charset */
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-08 04:50:50 +00:00
const apple2e_charset = new Uint8Array([
2016-11-22 05:17:34 +00:00
0x1c,0x22,0x2a,0x3a,0x1a,0x02,0x3c,0x00,
0x08,0x14,0x22,0x22,0x3e,0x22,0x22,0x00,
0x1e,0x22,0x22,0x1e,0x22,0x22,0x1e,0x00,
0x1c,0x22,0x02,0x02,0x02,0x22,0x1c,0x00,
0x1e,0x22,0x22,0x22,0x22,0x22,0x1e,0x00,
0x3e,0x02,0x02,0x1e,0x02,0x02,0x3e,0x00,
0x3e,0x02,0x02,0x1e,0x02,0x02,0x02,0x00,
0x3c,0x02,0x02,0x02,0x32,0x22,0x3c,0x00,
0x22,0x22,0x22,0x3e,0x22,0x22,0x22,0x00,
0x1c,0x08,0x08,0x08,0x08,0x08,0x1c,0x00,
0x20,0x20,0x20,0x20,0x20,0x22,0x1c,0x00,
0x22,0x12,0x0a,0x06,0x0a,0x12,0x22,0x00,
0x02,0x02,0x02,0x02,0x02,0x02,0x3e,0x00,
0x22,0x36,0x2a,0x2a,0x22,0x22,0x22,0x00,
0x22,0x22,0x26,0x2a,0x32,0x22,0x22,0x00,
0x1c,0x22,0x22,0x22,0x22,0x22,0x1c,0x00,
0x1e,0x22,0x22,0x1e,0x02,0x02,0x02,0x00,
0x1c,0x22,0x22,0x22,0x2a,0x12,0x2c,0x00,
0x1e,0x22,0x22,0x1e,0x0a,0x12,0x22,0x00,
0x1c,0x22,0x02,0x1c,0x20,0x22,0x1c,0x00,
0x3e,0x08,0x08,0x08,0x08,0x08,0x08,0x00,
0x22,0x22,0x22,0x22,0x22,0x22,0x1c,0x00,
0x22,0x22,0x22,0x22,0x22,0x14,0x08,0x00,
0x22,0x22,0x22,0x2a,0x2a,0x36,0x22,0x00,
0x22,0x22,0x14,0x08,0x14,0x22,0x22,0x00,
0x22,0x22,0x14,0x08,0x08,0x08,0x08,0x00,
0x3e,0x20,0x10,0x08,0x04,0x02,0x3e,0x00,
0x3e,0x06,0x06,0x06,0x06,0x06,0x3e,0x00,
0x00,0x02,0x04,0x08,0x10,0x20,0x00,0x00,
0x3e,0x30,0x30,0x30,0x30,0x30,0x3e,0x00,
0x00,0x00,0x08,0x14,0x22,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x08,0x08,0x08,0x08,0x08,0x00,0x08,0x00,
0x14,0x14,0x14,0x00,0x00,0x00,0x00,0x00,
0x14,0x14,0x3e,0x14,0x3e,0x14,0x14,0x00,
0x08,0x3c,0x0a,0x1c,0x28,0x1e,0x08,0x00,
0x06,0x26,0x10,0x08,0x04,0x32,0x30,0x00,
0x04,0x0a,0x0a,0x04,0x2a,0x12,0x2c,0x00,
0x08,0x08,0x08,0x00,0x00,0x00,0x00,0x00,
0x08,0x04,0x02,0x02,0x02,0x04,0x08,0x00,
0x08,0x10,0x20,0x20,0x20,0x10,0x08,0x00,
0x08,0x2a,0x1c,0x08,0x1c,0x2a,0x08,0x00,
0x00,0x08,0x08,0x3e,0x08,0x08,0x00,0x00,
0x00,0x00,0x00,0x00,0x08,0x08,0x04,0x00,
0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,
0x00,0x20,0x10,0x08,0x04,0x02,0x00,0x00,
0x1c,0x22,0x32,0x2a,0x26,0x22,0x1c,0x00,
0x08,0x0c,0x08,0x08,0x08,0x08,0x1c,0x00,
0x1c,0x22,0x20,0x18,0x04,0x02,0x3e,0x00,
0x3e,0x20,0x10,0x18,0x20,0x22,0x1c,0x00,
0x10,0x18,0x14,0x12,0x3e,0x10,0x10,0x00,
0x3e,0x02,0x1e,0x20,0x20,0x22,0x1c,0x00,
0x38,0x04,0x02,0x1e,0x22,0x22,0x1c,0x00,
0x3e,0x20,0x10,0x08,0x04,0x04,0x04,0x00,
0x1c,0x22,0x22,0x1c,0x22,0x22,0x1c,0x00,
0x1c,0x22,0x22,0x3c,0x20,0x10,0x0e,0x00,
0x00,0x00,0x08,0x00,0x08,0x00,0x00,0x00,
0x00,0x00,0x08,0x00,0x08,0x08,0x04,0x00,
0x10,0x08,0x04,0x02,0x04,0x08,0x10,0x00,
0x00,0x00,0x3e,0x00,0x3e,0x00,0x00,0x00,
0x04,0x08,0x10,0x20,0x10,0x08,0x04,0x00,
0x1c,0x22,0x10,0x08,0x08,0x00,0x08,0x00,
2021-05-09 20:21:15 +00:00
0x1c,0x22,0x2a,0x3a,0x1a,0x02,0x3c,0x00,
0x08,0x14,0x22,0x22,0x3e,0x22,0x22,0x00,
0x1e,0x22,0x22,0x1e,0x22,0x22,0x1e,0x00,
0x1c,0x22,0x02,0x02,0x02,0x22,0x1c,0x00,
0x1e,0x22,0x22,0x22,0x22,0x22,0x1e,0x00,
0x3e,0x02,0x02,0x1e,0x02,0x02,0x3e,0x00,
0x3e,0x02,0x02,0x1e,0x02,0x02,0x02,0x00,
0x3c,0x02,0x02,0x02,0x32,0x22,0x3c,0x00,
0x22,0x22,0x22,0x3e,0x22,0x22,0x22,0x00,
0x1c,0x08,0x08,0x08,0x08,0x08,0x1c,0x00,
0x20,0x20,0x20,0x20,0x20,0x22,0x1c,0x00,
0x22,0x12,0x0a,0x06,0x0a,0x12,0x22,0x00,
0x02,0x02,0x02,0x02,0x02,0x02,0x3e,0x00,
0x22,0x36,0x2a,0x2a,0x22,0x22,0x22,0x00,
0x22,0x22,0x26,0x2a,0x32,0x22,0x22,0x00,
0x1c,0x22,0x22,0x22,0x22,0x22,0x1c,0x00,
0x1e,0x22,0x22,0x1e,0x02,0x02,0x02,0x00,
0x1c,0x22,0x22,0x22,0x2a,0x12,0x2c,0x00,
0x1e,0x22,0x22,0x1e,0x0a,0x12,0x22,0x00,
0x1c,0x22,0x02,0x1c,0x20,0x22,0x1c,0x00,
0x3e,0x08,0x08,0x08,0x08,0x08,0x08,0x00,
0x22,0x22,0x22,0x22,0x22,0x22,0x1c,0x00,
0x22,0x22,0x22,0x22,0x22,0x14,0x08,0x00,
0x22,0x22,0x22,0x2a,0x2a,0x36,0x22,0x00,
0x22,0x22,0x14,0x08,0x14,0x22,0x22,0x00,
0x22,0x22,0x14,0x08,0x08,0x08,0x08,0x00,
0x3e,0x20,0x10,0x08,0x04,0x02,0x3e,0x00,
0x3e,0x06,0x06,0x06,0x06,0x06,0x3e,0x00,
0x00,0x02,0x04,0x08,0x10,0x20,0x00,0x00,
0x3e,0x30,0x30,0x30,0x30,0x30,0x3e,0x00,
0x00,0x00,0x08,0x14,0x22,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7f,
2016-11-22 05:17:34 +00:00
0x04,0x08,0x10,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x1c,0x20,0x3c,0x22,0x3c,0x00,
0x02,0x02,0x1e,0x22,0x22,0x22,0x1e,0x00,
0x00,0x00,0x3c,0x02,0x02,0x02,0x3c,0x00,
0x20,0x20,0x3c,0x22,0x22,0x22,0x3c,0x00,
0x00,0x00,0x1c,0x22,0x3e,0x02,0x3c,0x00,
0x18,0x24,0x04,0x1e,0x04,0x04,0x04,0x00,
0x00,0x00,0x1c,0x22,0x22,0x3c,0x20,0x1c,
0x02,0x02,0x1e,0x22,0x22,0x22,0x22,0x00,
0x08,0x00,0x0c,0x08,0x08,0x08,0x1c,0x00,
0x10,0x00,0x18,0x10,0x10,0x10,0x12,0x0c,
0x02,0x02,0x22,0x12,0x0e,0x12,0x22,0x00,
0x0c,0x08,0x08,0x08,0x08,0x08,0x1c,0x00,
0x00,0x00,0x36,0x2a,0x2a,0x2a,0x22,0x00,
0x00,0x00,0x1e,0x22,0x22,0x22,0x22,0x00,
0x00,0x00,0x1c,0x22,0x22,0x22,0x1c,0x00,
0x00,0x00,0x1e,0x22,0x22,0x1e,0x02,0x02,
0x00,0x00,0x3c,0x22,0x22,0x3c,0x20,0x20,
0x00,0x00,0x3a,0x06,0x02,0x02,0x02,0x00,
0x00,0x00,0x3c,0x02,0x1c,0x20,0x1e,0x00,
0x04,0x04,0x1e,0x04,0x04,0x24,0x18,0x00,
0x00,0x00,0x22,0x22,0x22,0x32,0x2c,0x00,
0x00,0x00,0x22,0x22,0x22,0x14,0x08,0x00,
0x00,0x00,0x22,0x22,0x2a,0x2a,0x36,0x00,
0x00,0x00,0x22,0x14,0x08,0x14,0x22,0x00,
0x00,0x00,0x22,0x22,0x22,0x3c,0x20,0x1c,
0x00,0x00,0x3e,0x10,0x08,0x04,0x3e,0x00,
0x38,0x0c,0x0c,0x06,0x0c,0x0c,0x38,0x00,
0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08,
0x0e,0x18,0x18,0x30,0x18,0x18,0x0e,0x00,
0x2c,0x1a,0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0xab,0xab,0xbb,0xee,0xab,0xab,0xaa,0xaa,
0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,
0xa9,0xa9,0x99,0x66,0xa9,0xa9,0xaa,0xaa,
0xa8,0xa8,0x88,0x22,0xa8,0xa8,0xaa,0xaa,
0xa7,0xa7,0x77,0xdd,0xa7,0xa7,0xaa,0xaa,
0xa6,0xa6,0x66,0x99,0xa6,0xa6,0xaa,0xaa,
0xa5,0xa5,0x55,0x55,0xa5,0xa5,0xaa,0xaa,
0xa4,0xa4,0x44,0x11,0xa4,0xa4,0xaa,0xaa,
0xa3,0xa3,0x33,0xcc,0xa3,0xa3,0xaa,0xaa,
0xa2,0xa2,0x22,0x88,0xa2,0xa2,0xaa,0xaa,
0xa1,0xa1,0x11,0x44,0xa1,0xa1,0xaa,0xaa,
0xa0,0xa0,0x00,0x00,0xa0,0xa0,0xaa,0xaa,
0x9f,0x9f,0xff,0xff,0x9f,0x9f,0x99,0x66,
0x9e,0x9e,0xee,0xbb,0x9e,0x9e,0x99,0x66,
0x9d,0x9d,0xdd,0x77,0x9d,0x9d,0x99,0x66,
0x9c,0x9c,0xcc,0x33,0x9c,0x9c,0x99,0x66,
0x9b,0x9b,0xbb,0xee,0x9b,0x9b,0x99,0x66,
0x9a,0x9a,0xaa,0xaa,0x9a,0x9a,0x99,0x66,
0x99,0x99,0x99,0x66,0x99,0x99,0x99,0x66,
0x98,0x98,0x88,0x22,0x98,0x98,0x99,0x66,
0x97,0x97,0x77,0xdd,0x97,0x97,0x99,0x66,
0x96,0x96,0x66,0x99,0x96,0x96,0x99,0x66,
0x95,0x95,0x55,0x55,0x95,0x95,0x99,0x66,
0x94,0x94,0x44,0x11,0x94,0x94,0x99,0x66,
0x93,0x93,0x33,0xcc,0x93,0x93,0x99,0x66,
0x92,0x92,0x22,0x88,0x92,0x92,0x99,0x66,
0x91,0x91,0x11,0x44,0x91,0x91,0x99,0x66,
0x90,0x90,0x00,0x00,0x90,0x90,0x99,0x66,
0x8f,0x8f,0xff,0xff,0x8f,0x8f,0x88,0x22,
0x8e,0x8e,0xee,0xbb,0x8e,0x8e,0x88,0x22,
0x8d,0x8d,0xdd,0x77,0x8d,0x8d,0x88,0x22,
0x8c,0x8c,0xcc,0x33,0x8c,0x8c,0x88,0x22,
0x8b,0x8b,0xbb,0xee,0x8b,0x8b,0x88,0x22,
0x8a,0x8a,0xaa,0xaa,0x8a,0x8a,0x88,0x22,
0x89,0x89,0x99,0x66,0x89,0x89,0x88,0x22,
0x88,0x88,0x88,0x22,0x88,0x88,0x88,0x22,
0x87,0x87,0x77,0xdd,0x87,0x87,0x88,0x22,
0x86,0x86,0x66,0x99,0x86,0x86,0x88,0x22,
0x85,0x85,0x55,0x55,0x85,0x85,0x88,0x22,
0x84,0x84,0x44,0x11,0x84,0x84,0x88,0x22,
0x83,0x83,0x33,0xcc,0x83,0x83,0x88,0x22,
0x82,0x82,0x22,0x88,0x82,0x82,0x88,0x22,
0x81,0x81,0x11,0x44,0x81,0x81,0x88,0x22,
0x80,0x80,0x00,0x00,0x80,0x80,0x88,0x22,
0xff,0xff,0xff,0xff,0xff,0xff,0x77,0xdd,
0xfe,0xfe,0xee,0xbb,0xfe,0xfe,0x77,0xdd,
0xfd,0xfd,0xdd,0x77,0xfd,0xfd,0x77,0xdd,
0xfc,0xfc,0xcc,0x33,0xfc,0xfc,0x77,0xdd,
0xfb,0xfb,0xbb,0xee,0xfb,0xfb,0x77,0xdd,
0xfa,0xfa,0xaa,0xaa,0xfa,0xfa,0x77,0xdd,
0xf9,0xf9,0x99,0x66,0xf9,0xf9,0x77,0xdd,
0xf8,0xf8,0x88,0x22,0xf8,0xf8,0x77,0xdd,
0xf7,0xf7,0x77,0xdd,0xf7,0xf7,0x77,0xdd,
0xf6,0xf6,0x66,0x99,0xf6,0xf6,0x77,0xdd,
0xf5,0xf5,0x55,0x55,0xf5,0xf5,0x77,0xdd,
0xf4,0xf4,0x44,0x11,0xf4,0xf4,0x77,0xdd,
0xf3,0xf3,0x33,0xcc,0xf3,0xf3,0x77,0xdd,
0xf2,0xf2,0x22,0x88,0xf2,0xf2,0x77,0xdd,
0xf1,0xf1,0x11,0x44,0xf1,0xf1,0x77,0xdd,
0xf0,0xf0,0x00,0x00,0xf0,0xf0,0x77,0xdd,
0xef,0xef,0xff,0xff,0xef,0xef,0x66,0x99,
0xee,0xee,0xee,0xbb,0xee,0xee,0x66,0x99,
0xed,0xed,0xdd,0x77,0xed,0xed,0x66,0x99,
0xec,0xec,0xcc,0x33,0xec,0xec,0x66,0x99,
0xeb,0xeb,0xbb,0xee,0xeb,0xeb,0x66,0x99,
0xea,0xea,0xaa,0xaa,0xea,0xea,0x66,0x99,
0xe9,0xe9,0x99,0x66,0xe9,0xe9,0x66,0x99,
0xe8,0xe8,0x88,0x22,0xe8,0xe8,0x66,0x99,
0xe7,0xe7,0x77,0xdd,0xe7,0xe7,0x66,0x99,
0xe6,0xe6,0x66,0x99,0xe6,0xe6,0x66,0x99,
0xe5,0xe5,0x55,0x55,0xe5,0xe5,0x66,0x99,
0xe4,0xe4,0x44,0x11,0xe4,0xe4,0x66,0x99,
0xe3,0xe3,0x33,0xcc,0xe3,0xe3,0x66,0x99,
0xe2,0xe2,0x22,0x88,0xe2,0xe2,0x66,0x99,
0xe1,0xe1,0x11,0x44,0xe1,0xe1,0x66,0x99,
0xe0,0xe0,0x00,0x00,0xe0,0xe0,0x66,0x99,
0xdf,0xdf,0xff,0xff,0xdf,0xdf,0x55,0x55,
0xde,0xde,0xee,0xbb,0xde,0xde,0x55,0x55,
0xdd,0xdd,0xdd,0x77,0xdd,0xdd,0x55,0x55,
0xdc,0xdc,0xcc,0x33,0xdc,0xdc,0x55,0x55,
0xdb,0xdb,0xbb,0xee,0xdb,0xdb,0x55,0x55,
0xda,0xda,0xaa,0xaa,0xda,0xda,0x55,0x55,
0xd9,0xd9,0x99,0x66,0xd9,0xd9,0x55,0x55,
0xd8,0xd8,0x88,0x22,0xd8,0xd8,0x55,0x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0x33,0xbc,0xbc,0x33,0xcc,
0xbb,0xbb,0xbb,0xee,0xbb,0xbb,0x33,0xcc,
0xba,0xba,0xaa,0xaa,0xba,0xba,0x33,0xcc,
0xb9,0xb9,0x99,0x66,0xb9,0xb9,0x33,0xcc,
0xb8,0xb8,0x88,0x22,0xb8,0xb8,0x33,0xcc,
0xb7,0xb7,0x77,0xdd,0xb7,0xb7,0x33,0xcc,
0xb6,0xb6,0x66,0x99,0xb6,0xb6,0x33,0xcc,
0xb5,0xb5,0x55,0x55,0xb5,0xb5,0x33,0xcc,
0xb4,0xb4,0x44,0x11,0xb4,0xb4,0x33,0xcc,
0xb3,0xb3,0x33,0xcc,0xb3,0xb3,0x33,0xcc,
0xb2,0xb2,0x22,0x88,0xb2,0xb2,0x33,0xcc,
0xb1,0xb1,0x11,0x44,0xb1,0xb1,0x33,0xcc,
0xb0,0xb0,0x00,0x00,0xb0,0xb0,0x33,0xcc,
0xaf,0xaf,0xff,0xff,0xaf,0xaf,0x22,0x88,
0xae,0xae,0xee,0xbb,0xae,0xae,0x22,0x88,
0xad,0xad,0xdd,0x77,0xad,0xad,0x22,0x88,
0xac,0xac,0xcc,0x33,0xac,0xac,0x22,0x88,
0xab,0xab,0xbb,0xee,0xab,0xab,0x22,0x88,
0xaa,0xaa,0xaa,0xaa,0xaa,0xaa,0x22,0x88,
0xa9,0xa9,0x99,0x66,0xa9,0xa9,0x22,0x88,
0xa8,0xa8,0x88,0x22,0xa8,0xa8,0x22,0x88,
0xa7,0xa7,0x77,0xdd,0xa7,0xa7,0x22,0x88,
0xa6,0xa6,0x66,0x99,0xa6,0xa6,0x22,0x88,
0xa5,0xa5,0x55,0x55,0xa5,0xa5,0x22,0x88,
0xa4,0xa4,0x44,0x11,0xa4,0xa4,0x22,0x88,
0xa3,0xa3,0x33,0xcc,0xa3,0xa3,0x22,0x88,
0xa2,0xa2,0x22,0x88,0xa2,0xa2,0x22,0x88,
0xa1,0xa1,0x11,0x44,0xa1,0xa1,0x22,0x88,
0xa0,0xa0,0x00,0x00,0xa0,0xa0,0x22,0x88,
0x9f,0x9f,0xff,0xff,0x9f,0x9f,0x11,0x44,
0x9e,0x9e,0xee,0xbb,0x9e,0x9e,0x11,0x44,
0x9d,0x9d,0xdd,0x77,0x9d,0x9d,0x11,0x44,
0x9c,0x9c,0xcc,0x33,0x9c,0x9c,0x11,0x44,
0x9b,0x9b,0xbb,0xee,0x9b,0x9b,0x11,0x44,
0x9a,0x9a,0xaa,0xaa,0x9a,0x9a,0x11,0x44,
0x99,0x99,0x99,0x66,0x99,0x99,0x11,0x44,
0x98,0x98,0x88,0x22,0x98,0x98,0x11,0x44,
0x97,0x97,0x77,0xdd,0x97,0x97,0x11,0x44,
0x96,0x96,0x66,0x99,0x96,0x96,0x11,0x44,
0x95,0x95,0x55,0x55,0x95,0x95,0x11,0x44,
0x94,0x94,0x44,0x11,0x94,0x94,0x11,0x44,
0x93,0x93,0x33,0xcc,0x93,0x93,0x11,0x44,
0x92,0x92,0x22,0x88,0x92,0x92,0x11,0x44,
0x91,0x91,0x11,0x44,0x91,0x91,0x11,0x44,
0x90,0x90,0x00,0x00,0x90,0x90,0x11,0x44,
0x8f,0x8f,0xff,0xff,0x8f,0x8f,0x00,0x00,
0x8e,0x8e,0xee,0xbb,0x8e,0x8e,0x00,0x00,
0x8d,0x8d,0xdd,0x77,0x8d,0x8d,0x00,0x00,
0x8c,0x8c,0xcc,0x33,0x8c,0x8c,0x00,0x00,
0x8b,0x8b,0xbb,0xee,0x8b,0x8b,0x00,0x00,
0x8a,0x8a,0xaa,0xaa,0x8a,0x8a,0x00,0x00,
0x89,0x89,0x99,0x66,0x89,0x89,0x00,0x00,
0x88,0x88,0x88,0x22,0x88,0x88,0x00,0x00,
0x87,0x87,0x77,0xdd,0x87,0x87,0x00,0x00,
0x86,0x86,0x66,0x99,0x86,0x86,0x00,0x00,
0x85,0x85,0x55,0x55,0x85,0x85,0x00,0x00,
0x84,0x84,0x44,0x11,0x84,0x84,0x00,0x00,
0x83,0x83,0x33,0xcc,0x83,0x83,0x00,0x00,
0x82,0x82,0x22,0x88,0x82,0x82,0x00,0x00,
0x81,0x81,0x11,0x44,0x81,0x81,0x00,0x00,
0x80,0x80,0x00,0x00,0x80,0x80,0x00,0x00
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-08 04:50:50 +00:00
]) as ReadonlyUint8Array;
2019-03-01 05:21:18 +00:00
export default apple2e_charset;