diff --git a/js/canvas1.js b/js/canvas1.js index ebaa198..ddebeaa 100644 --- a/js/canvas1.js +++ b/js/canvas1.js @@ -43,7 +43,7 @@ export function TextPage() for (var row = 0; row < 24; row++) { _buffer[row] = []; for (var col = 0; col < 40; col++) { - _buffer[row][col] = 0x00; + _buffer[row][col] = col % 2 ? 0x00 : 0xff; } } _dirty = true; @@ -83,16 +83,11 @@ export function TextPage() _col = 0; _row++; } else { - if (val >= 0x20) { - if (val >= 0x60) { - val &= 0x5f; - } - _buffer[_row][_col] = val; - _col++; - if (_col > 39) { - _col = 0; - _row++; - } + _buffer[_row][_col] = val; + _col++; + if (_col > 39) { + _col = 0; + _row++; } } if (_row > 23) { @@ -113,11 +108,19 @@ export function TextPage() fore = _greenMode ? _green : _white; back = _black; - if (!val && !_blinking) { - fore = _black; + var char = 0; + + if (!val) { + if (_blinking) { + fore = _black; + } + } else { + char = val & 0x1f; + char |= val & 0x40 ? 0 : 0x20; } + for (var jdx = 0; jdx < 8; jdx++) { - var b = charset[(val & 0x3f) * 8 + jdx]; + var b = charset[char * 8 + jdx]; for (var idx = 0; idx < 7; idx += 1) { b <<= 1; color = (b & 0x80) ? fore : back; diff --git a/js/roms/apple1char.js b/js/roms/apple1char.js index f0b6f35..8e7327b 100644 --- a/js/roms/apple1char.js +++ b/js/roms/apple1char.js @@ -62,197 +62,5 @@ export var charset = [ 0x00,0x04,0x08,0x10,0x20,0x10,0x08,0x04, 0x00,0x00,0x00,0x3e,0x00,0x3e,0x00,0x00, 0x00,0x10,0x08,0x04,0x02,0x04,0x08,0x10, - 0x00,0x1c,0x22,0x04,0x08,0x08,0x00,0x08, - 0x80,0x9c,0xa2,0xaa,0xae,0xac,0xa0,0x9e, - 0x80,0x88,0x94,0xa2,0xa2,0xbe,0xa2,0xa2, - 0x80,0xbc,0xa2,0xa2,0xbc,0xa2,0xa2,0xbc, - 0x80,0x9c,0xa2,0xa0,0xa0,0xa0,0xa2,0x9c, - 0x80,0xbc,0xa2,0xa2,0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0xa2,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xbe, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x88,0x88,0x88,0x88,0x88,0x80,0x88, - 0x80,0x94,0x94,0x94,0x80,0x80,0x80,0x80, - 0x80,0x94,0x94,0xbe,0x94,0xbe,0x94,0x94, - 0x80,0x88,0x9e,0xa8,0x9c,0x8a,0xbc,0x88, - 0x80,0xb0,0xb2,0x84,0x88,0x90,0xa6,0x86, - 0x80,0x90,0xa8,0xa8,0x90,0xaa,0xa4,0x9a, - 0x80,0x88,0x88,0x88,0x80,0x80,0x80,0x80, - 0x80,0x88,0x90,0xa0,0xa0,0xa0,0x90,0x88, - 0x80,0x88,0x84,0x82,0x82,0x82,0x84,0x88, - 0x80,0x88,0xaa,0x9c,0x88,0x9c,0xaa,0x88, - 0x80,0x80,0x88,0x88,0xbe,0x88,0x88,0x80, - 0x80,0x80,0x80,0x80,0x80,0x88,0x88,0x90, - 0x80,0x80,0x80,0x80,0xbe,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x88, - 0x80,0x80,0x82,0x84,0x88,0x90,0xa0,0x80, - 0x80,0x9c,0xa2,0xa6,0xaa,0xb2,0xa2,0x9c, - 0x80,0x88,0x98,0x88,0x88,0x88,0x88,0x9c, - 0x80,0x9c,0xa2,0x82,0x8c,0x90,0xa0,0xbe, - 0x80,0xbe,0x82,0x84,0x8c,0x82,0xa2,0x9c, - 0x80,0x84,0x8c,0x94,0xa4,0xbe,0x84,0x84, - 0x80,0xbe,0xa0,0xbc,0x82,0x82,0xa2,0x9c, - 0x80,0x8e,0x90,0xa0,0xbc,0xa2,0xa2,0x9c, - 0x80,0xbe,0x82,0x84,0x88,0x90,0x90,0x90, - 0x80,0x9c,0xa2,0xa2,0x9c,0xa2,0xa2,0x9c, - 0x80,0x9c,0xa2,0xa2,0x9e,0x82,0x84,0xb8, - 0x80,0x80,0x80,0x88,0x80,0x88,0x80,0x80, - 0x80,0x80,0x80,0x88,0x80,0x88,0x88,0x90, - 0x80,0x84,0x88,0x90,0xa0,0x90,0x88,0x84, - 0x80,0x80,0x80,0xbe,0x80,0xbe,0x80,0x80, - 0x80,0x90,0x88,0x84,0x82,0x84,0x88,0x90, - 0x80,0x9c,0xa2,0x84,0x88,0x88,0x80,0x88, - 0x00,0x1c,0x22,0x2a,0x2e,0x2c,0x20,0x1e, - 0x00,0x08,0x14,0x22,0x22,0x3e,0x22,0x22, - 0x00,0x3c,0x22,0x22,0x3c,0x22,0x22,0x3c, - 0x00,0x1c,0x22,0x20,0x20,0x20,0x22,0x1c, - 0x00,0x3c,0x22,0x22,0x22,0x22,0x22,0x3c, - 0x00,0x3e,0x20,0x20,0x3c,0x20,0x20,0x3e, - 0x00,0x3e,0x20,0x20,0x3c,0x20,0x20,0x20, - 0x00,0x1e,0x20,0x20,0x20,0x26,0x22,0x1e, - 0x00,0x22,0x22,0x22,0x3e,0x22,0x22,0x22, - 0x00,0x1c,0x08,0x08,0x08,0x08,0x08,0x1c, - 0x00,0x02,0x02,0x02,0x02,0x02,0x22,0x1c, - 0x00,0x22,0x24,0x28,0x30,0x28,0x24,0x22, - 0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x3e, - 0x00,0x22,0x36,0x2a,0x2a,0x22,0x22,0x22, - 0x00,0x22,0x22,0x32,0x2a,0x26,0x22,0x22, - 0x00,0x1c,0x22,0x22,0x22,0x22,0x22,0x1c, - 0x00,0x3c,0x22,0x22,0x3c,0x20,0x20,0x20, - 0x00,0x1c,0x22,0x22,0x22,0x2a,0x24,0x1a, - 0x00,0x3c,0x22,0x22,0x3c,0x28,0x24,0x22, - 0x00,0x1c,0x22,0x20,0x1c,0x02,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,0x02,0x04,0x08,0x10,0x20,0x3e, - 0x00,0x3e,0x30,0x30,0x30,0x30,0x30,0x3e, - 0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x00, - 0x00,0x3e,0x06,0x06,0x06,0x06,0x06,0x3e, - 0x00,0x00,0x00,0x08,0x14,0x22,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e, - 0x00,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,0x1e,0x28,0x1c,0x0a,0x3c,0x08, - 0x00,0x30,0x32,0x04,0x08,0x10,0x26,0x06, - 0x00,0x10,0x28,0x28,0x10,0x2a,0x24,0x1a, - 0x00,0x08,0x08,0x08,0x00,0x00,0x00,0x00, - 0x00,0x08,0x10,0x20,0x20,0x20,0x10,0x08, - 0x00,0x08,0x04,0x02,0x02,0x02,0x04,0x08, - 0x00,0x08,0x2a,0x1c,0x08,0x1c,0x2a,0x08, - 0x00,0x00,0x08,0x08,0x3e,0x08,0x08,0x00, - 0x00,0x00,0x00,0x00,0x00,0x08,0x08,0x10, - 0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08, - 0x00,0x00,0x02,0x04,0x08,0x10,0x20,0x00, - 0x00,0x1c,0x22,0x26,0x2a,0x32,0x22,0x1c, - 0x00,0x08,0x18,0x08,0x08,0x08,0x08,0x1c, - 0x00,0x1c,0x22,0x02,0x0c,0x10,0x20,0x3e, - 0x00,0x3e,0x02,0x04,0x0c,0x02,0x22,0x1c, - 0x00,0x04,0x0c,0x14,0x24,0x3e,0x04,0x04, - 0x00,0x3e,0x20,0x3c,0x02,0x02,0x22,0x1c, - 0x00,0x0e,0x10,0x20,0x3c,0x22,0x22,0x1c, - 0x00,0x3e,0x02,0x04,0x08,0x10,0x10,0x10, - 0x00,0x1c,0x22,0x22,0x1c,0x22,0x22,0x1c, - 0x00,0x1c,0x22,0x22,0x1e,0x02,0x04,0x38, - 0x00,0x00,0x00,0x08,0x00,0x08,0x00,0x00, - 0x00,0x00,0x00,0x08,0x00,0x08,0x08,0x10, - 0x00,0x04,0x08,0x10,0x20,0x10,0x08,0x04, - 0x00,0x00,0x00,0x3e,0x00,0x3e,0x00,0x00, - 0x00,0x10,0x08,0x04,0x02,0x04,0x08,0x10, - 0x00,0x1c,0x22,0x04,0x08,0x08,0x00,0x08, - 0x80,0x9c,0xa2,0xaa,0xae,0xac,0xa0,0x9e, - 0x80,0x88,0x94,0xa2,0xa2,0xbe,0xa2,0xa2, - 0x80,0xbc,0xa2,0xa2,0xbc,0xa2,0xa2,0xbc, - 0x80,0x9c,0xa2,0xa0,0xa0,0xa0,0xa2,0x9c, - 0x80,0xbc,0xa2,0xa2,0xa2,0xa2,0xa2,0xbc, - 0x80,0xbe,0xa0,0xa0,0xbc,0xa0,0xa0,0xbe, - 0x80,0xbe,0xa0,0xa0,0xbc,0xa0,0xa0,0xa0, - 0x80,0x9e,0xa0,0xa0,0xa0,0xa6,0xa2,0x9e, - 0x80,0xa2,0xa2,0xa2,0xbe,0xa2,0xa2,0xa2, - 0x80,0x9c,0x88,0x88,0x88,0x88,0x88,0x9c, - 0x80,0x82,0x82,0x82,0x82,0x82,0xa2,0x9c, - 0x80,0xa2,0xa4,0xa8,0xb0,0xa8,0xa4,0xa2, - 0x80,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xbe, - 0x80,0xa2,0xb6,0xaa,0xaa,0xa2,0xa2,0xa2, - 0x80,0xa2,0xa2,0xb2,0xaa,0xa6,0xa2,0xa2, - 0x80,0x9c,0xa2,0xa2,0xa2,0xa2,0xa2,0x9c, - 0x80,0xbc,0xa2,0xa2,0xbc,0xa0,0xa0,0xa0, - 0x80,0x9c,0xa2,0xa2,0xa2,0xaa,0xa4,0x9a, - 0x80,0xbc,0xa2,0xa2,0xbc,0xa8,0xa4,0xa2, - 0x80,0x9c,0xa2,0xa0,0x9c,0x82,0xa2,0x9c, - 0x80,0xbe,0x88,0x88,0x88,0x88,0x88,0x88, - 0x80,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0x9c, - 0x80,0xa2,0xa2,0xa2,0xa2,0xa2,0x94,0x88, - 0x80,0xa2,0xa2,0xa2,0xaa,0xaa,0xb6,0xa2, - 0x80,0xa2,0xa2,0x94,0x88,0x94,0xa2,0xa2, - 0x80,0xa2,0xa2,0x94,0x88,0x88,0x88,0x88, - 0x80,0xbe,0x82,0x84,0x88,0x90,0xa0,0xbe, - 0x80,0xbe,0xb0,0xb0,0xb0,0xb0,0xb0,0xbe, - 0x80,0x80,0xa0,0x90,0x88,0x84,0x82,0x80, - 0x80,0xbe,0x86,0x86,0x86,0x86,0x86,0xbe, - 0x80,0x80,0x80,0x88,0x94,0xa2,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xbe, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80, - 0x80,0x88,0x88,0x88,0x88,0x88,0x80,0x88, - 0x80,0x94,0x94,0x94,0x80,0x80,0x80,0x80, - 0x80,0x94,0x94,0xbe,0x94,0xbe,0x94,0x94, - 0x80,0x88,0x9e,0xa8,0x9c,0x8a,0xbc,0x88, - 0x80,0xb0,0xb2,0x84,0x88,0x90,0xa6,0x86, - 0x80,0x90,0xa8,0xa8,0x90,0xaa,0xa4,0x9a, - 0x80,0x88,0x88,0x88,0x80,0x80,0x80,0x80, - 0x80,0x88,0x90,0xa0,0xa0,0xa0,0x90,0x88, - 0x80,0x88,0x84,0x82,0x82,0x82,0x84,0x88, - 0x80,0x88,0xaa,0x9c,0x88,0x9c,0xaa,0x88, - 0x80,0x80,0x88,0x88,0xbe,0x88,0x88,0x80, - 0x80,0x80,0x80,0x80,0x80,0x88,0x88,0x90, - 0x80,0x80,0x80,0x80,0xbe,0x80,0x80,0x80, - 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x88, - 0x80,0x80,0x82,0x84,0x88,0x90,0xa0,0x80, - 0x80,0x9c,0xa2,0xa6,0xaa,0xb2,0xa2,0x9c, - 0x80,0x88,0x98,0x88,0x88,0x88,0x88,0x9c, - 0x80,0x9c,0xa2,0x82,0x8c,0x90,0xa0,0xbe, - 0x80,0xbe,0x82,0x84,0x8c,0x82,0xa2,0x9c, - 0x80,0x84,0x8c,0x94,0xa4,0xbe,0x84,0x84, - 0x80,0xbe,0xa0,0xbc,0x82,0x82,0xa2,0x9c, - 0x80,0x8e,0x90,0xa0,0xbc,0xa2,0xa2,0x9c, - 0x80,0xbe,0x82,0x84,0x88,0x90,0x90,0x90, - 0x80,0x9c,0xa2,0xa2,0x9c,0xa2,0xa2,0x9c, - 0x80,0x9c,0xa2,0xa2,0x9e,0x82,0x84,0xb8, - 0x80,0x80,0x80,0x88,0x80,0x88,0x80,0x80, - 0x80,0x80,0x80,0x88,0x80,0x88,0x88,0x90, - 0x80,0x84,0x88,0x90,0xa0,0x90,0x88,0x84, - 0x80,0x80,0x80,0xbe,0x80,0xbe,0x80,0x80, - 0x80,0x90,0x88,0x84,0x82,0x84,0x88,0x90, - 0x80,0x9c,0xa2,0x84,0x88,0x88,0x80,0x88 + 0x00,0x1c,0x22,0x04,0x08,0x08,0x00,0x08 ];