From 8d0d36e50bb694890d2ca7a69a0660e9058bd551 Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Sat, 16 May 2020 09:33:01 +0200 Subject: [PATCH] Added all Plus/4 IC's and I/O addresses. --- src/main/kc/include/c64.h | 2 +- src/main/kc/include/mos6523.h | 19 ++++++ src/main/kc/include/mos6529.h | 7 ++ src/main/kc/include/mos6551.h | 15 +++++ src/main/kc/include/mos7501.h | 18 ++++++ src/main/kc/include/plus4.h | 48 +++++++++++++- src/main/kc/lib/keyboard.c | 2 +- src/test/ref/c64dtv-gfxexplorer.asm | 2 +- src/test/ref/c64dtv-gfxexplorer.log | 6 +- src/test/ref/c64dtv-gfxmodes.asm | 2 +- src/test/ref/c64dtv-gfxmodes.log | 6 +- src/test/ref/complex/prebob/grid-bobs.asm | 2 +- src/test/ref/complex/prebob/grid-bobs.log | 6 +- src/test/ref/complex/prebob/vogel-bobs.asm | 2 +- src/test/ref/complex/prebob/vogel-bobs.log | 6 +- src/test/ref/complex/prebob/vogel-sprites.asm | 2 +- src/test/ref/complex/prebob/vogel-sprites.log | 6 +- src/test/ref/complex/tetris/tetris.asm | 2 +- src/test/ref/complex/tetris/tetris.log | 6 +- .../ref/examples/chargen/chargen-analysis.asm | 2 +- .../ref/examples/chargen/chargen-analysis.log | 6 +- src/test/ref/examples/plus4walk/plus4walk.asm | 4 +- src/test/ref/examples/plus4walk/plus4walk.log | 64 +++++++++++++++++-- src/test/ref/examples/plus4walk/plus4walk.sym | 14 ++++ src/test/ref/keyboard-glitch.asm | 2 +- src/test/ref/keyboard-glitch.log | 6 +- src/test/ref/semi-struct-2.asm | 2 +- src/test/ref/semi-struct-2.log | 6 +- src/test/ref/test-keyboard-space.asm | 2 +- src/test/ref/test-keyboard-space.log | 6 +- src/test/ref/test-keyboard.asm | 2 +- src/test/ref/test-keyboard.log | 6 +- 32 files changed, 224 insertions(+), 57 deletions(-) create mode 100644 src/main/kc/include/mos6523.h create mode 100644 src/main/kc/include/mos6529.h create mode 100644 src/main/kc/include/mos6551.h create mode 100644 src/main/kc/include/mos7501.h diff --git a/src/main/kc/include/c64.h b/src/main/kc/include/c64.h index b1519dca9..6fc97a579 100644 --- a/src/main/kc/include/c64.h +++ b/src/main/kc/include/c64.h @@ -32,7 +32,7 @@ char * const COLORRAM = 0xd800; char * const COLS = 0xd800; // Default address of screen character matrix -char * const DEFAULT_SCREEN = 0x0c00; +char * const DEFAULT_SCREEN = 0x0400; // The CIA#1: keyboard matrix, joystick #1/#2 struct MOS6526_CIA * const CIA1 = 0xdc00; diff --git a/src/main/kc/include/mos6523.h b/src/main/kc/include/mos6523.h new file mode 100644 index 000000000..54a8da7b8 --- /dev/null +++ b/src/main/kc/include/mos6523.h @@ -0,0 +1,19 @@ +// MOS 6523 TRI-PORT INTERFACE (TPI) +// It has three dedicated 8-bit I/O ports which provide 24 individually programmable I/O lines +// Used in the Commodore 1551 disk drive +// http://archive.6502.org/datasheets/mos_6523_tpi_preliminary_nov_1980.pdf + +struct MOS6523_TIA { + // Port A + char PORT_A; + // Port B + char PORT_B; + // Port C + char PORT_C; + // Port A data direction register. + char PORT_A_DDR; + // Port B data direction register. + char PORT_B_DDR; + // Port C data direction register. + char PORT_C_DDR; +} \ No newline at end of file diff --git a/src/main/kc/include/mos6529.h b/src/main/kc/include/mos6529.h new file mode 100644 index 000000000..5dec051ec --- /dev/null +++ b/src/main/kc/include/mos6529.h @@ -0,0 +1,7 @@ +// MOS 6529 Single Port Interface (SPI aka PIO) +// I/O controller providing a single 8-bit digital bidirectional parallel I/O port. +// http://archive.6502.org/datasheets/mos_6529_spi.pdf + +struct MOS6529_PIO { + char PORT; +}; \ No newline at end of file diff --git a/src/main/kc/include/mos6551.h b/src/main/kc/include/mos6551.h new file mode 100644 index 000000000..1852ed346 --- /dev/null +++ b/src/main/kc/include/mos6551.h @@ -0,0 +1,15 @@ +// MOS 6551 6551 ASYNCHRONOUS COMMUNICATION INTERFACE ADAPTER +// used for RS232 +// http://archive.6502.org/datasheets/mos_6551_acia.pdf +// https://en.wikipedia.org/wiki/MOS_Technology_6551 + +struct MOS6551_ACIA { + // DATA port + char DATA; + // STATUS port + char STATUS; + // COMMAND port + char COMMAND; + // CONTROL port + char CONTROL; +}; \ No newline at end of file diff --git a/src/main/kc/include/mos7501.h b/src/main/kc/include/mos7501.h new file mode 100644 index 000000000..d6b72d907 --- /dev/null +++ b/src/main/kc/include/mos7501.h @@ -0,0 +1,18 @@ +// MOS 7501/8501 MICROPROCESSOR +// https://en.wikipedia.org/wiki/MOS_Technology_6510 + +// The processor port of the MOS 7501 CPU +// http://hackjunk.com/2017/06/23/commodore-16-plus-4-8501-to-6510-cpu-conversion/ +struct MOS7501_PORT { + // The on-chip processor port + // P0: SER DAT OUT + // P1: SER CLK OUT / CASS WRT + // P2: SER ATN OUT + // P3: CASS MOTOR + // P4: CASS READ + // P6: SER CLK IN + // P7: SER DAT IN + char PORT; + // The data direction of the port + char DDR; +}; \ No newline at end of file diff --git a/src/main/kc/include/plus4.h b/src/main/kc/include/plus4.h index fa8a29164..ac6a6217c 100644 --- a/src/main/kc/include/plus4.h +++ b/src/main/kc/include/plus4.h @@ -1,8 +1,16 @@ // Plus/4 / Commodore 16 registers and memory layout +// http://zimmers.net/anonftp/pub/cbm/schematics/computers/plus4/264_Hardware_Spec.pdf +// http://www.zimmers.net/anonftp/pub/cbm/schematics/computers/plus4/Plus_4_Technical_Docs.pdf +// http://personalpages.tds.net/~rcarlsen/cbm/c16/C16_Service_Manual_314001-03_(1984_Oct).pdf +// https://www.floodgap.com/retrobits/ckb/secret/264memory.txt #include +#include +#include +#include -// The TED chip controlling video and sound on the Plus/4 and Commodore 16 -struct MOS7360_TED * const TED = 0xff00; +// The processor port +// Used for serial I/O and controlling the cassette +struct MOS7501_PORT * const PROCESSOR_PORT = 0x00; // Default address of screen luminance/color matrix char * const DEFAULT_COLORRAM = 0x0800; @@ -10,3 +18,39 @@ char * const DEFAULT_COLORRAM = 0x0800; // Default address of screen character matrix char * const DEFAULT_SCREEN = 0x0c00; +// The ACIA used for RS232 (only on the Plus/4) +struct MOS6551_ACIA * const ACIA = 0xfd00; + +// User Port PIO (P0-P7) +// Bit 2 (P2) is used to detect if play on cassette is pressed (CST sense) +struct MOS6529_PIO * const USER_PORT = 0xfd10; + +// Keyboard Port PIO (P0-P7) +// The input latch is part of the TED. +struct MOS6529_PIO * const KEYBOARD_PORT = 0xfd30; + +// ROM configuration for the machine, which normally has the BASIC and kernal ROMs enabled. +// The ROM configuration is adjusted by writing to the registers (the value is irrelevant). +// The upper portion of the kernal ROM at $FC00-$FCFF is always enabled no matter what the memory configuration, as are the I/O registers. +struct { + // $FDD0 enables or disables BASIC, + char BASIC; + // $FDD1 the low function ROM, + char FUNCTION_LOW; + // $FDD2 the low cartridge ROM, + char CARTRIDGE_LOW; + // $FDD3 is unused, + char UNUSED; + // $FDD4 the kernal, + char KERNAL; + // $FDD5 the high function ROM + char FUNCTION_HIGH; + // $FDD6 the high cartridge ROM. + char CARTRIDGE_HIGH; +} * const ROM_BANKING = 0xfdd0; + +// The TED chip controlling video and sound on the Plus/4 and Commodore 16 +struct MOS7360_TED * const TED = 0xff00; + + + diff --git a/src/main/kc/lib/keyboard.c b/src/main/kc/lib/keyboard.c index f918f6789..9462f5087 100644 --- a/src/main/kc/lib/keyboard.c +++ b/src/main/kc/lib/keyboard.c @@ -57,7 +57,7 @@ char keyboard_matrix_any(void) { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. char keyboard_matrix_read(char rowid) { CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid]; char row_pressed_bits = ~CIA1->PORT_B; diff --git a/src/test/ref/c64dtv-gfxexplorer.asm b/src/test/ref/c64dtv-gfxexplorer.asm index 3849200f8..243eb2e40 100644 --- a/src/test/ref/c64dtv-gfxexplorer.asm +++ b/src/test/ref/c64dtv-gfxexplorer.asm @@ -822,7 +822,7 @@ keyboard_event_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid] diff --git a/src/test/ref/c64dtv-gfxexplorer.log b/src/test/ref/c64dtv-gfxexplorer.log index e593e0bf7..292f7461f 100644 --- a/src/test/ref/c64dtv-gfxexplorer.log +++ b/src/test/ref/c64dtv-gfxexplorer.log @@ -14505,7 +14505,7 @@ keyboard_event_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte zp($ef) rowid) keyboard_matrix_read: { .label return = $102 @@ -21563,7 +21563,7 @@ keyboard_event_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { // [217] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuxx @@ -29401,7 +29401,7 @@ keyboard_event_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid] diff --git a/src/test/ref/c64dtv-gfxmodes.asm b/src/test/ref/c64dtv-gfxmodes.asm index 584ffc217..089ab9b8c 100644 --- a/src/test/ref/c64dtv-gfxmodes.asm +++ b/src/test/ref/c64dtv-gfxmodes.asm @@ -619,7 +619,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(Y) rowid) keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid] diff --git a/src/test/ref/c64dtv-gfxmodes.log b/src/test/ref/c64dtv-gfxmodes.log index baa29a8a8..2ff093bcb 100644 --- a/src/test/ref/c64dtv-gfxmodes.log +++ b/src/test/ref/c64dtv-gfxmodes.log @@ -13315,7 +13315,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte zp($ce) rowid) keyboard_matrix_read: { .label return = $d2 @@ -20087,7 +20087,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(Y) rowid) keyboard_matrix_read: { // [220] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuyy @@ -27042,7 +27042,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(Y) rowid) keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid] diff --git a/src/test/ref/complex/prebob/grid-bobs.asm b/src/test/ref/complex/prebob/grid-bobs.asm index 491da4f6a..f94c6b28e 100644 --- a/src/test/ref/complex/prebob/grid-bobs.asm +++ b/src/test/ref/complex/prebob/grid-bobs.asm @@ -238,7 +238,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid] lda keyboard_matrix_row_bitmask+keyboard_key_pressed.rowidx diff --git a/src/test/ref/complex/prebob/grid-bobs.log b/src/test/ref/complex/prebob/grid-bobs.log index 2c6259d8d..23adef584 100644 --- a/src/test/ref/complex/prebob/grid-bobs.log +++ b/src/test/ref/complex/prebob/grid-bobs.log @@ -5011,7 +5011,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { .label return = $47 .label return_1 = $44 @@ -7096,7 +7096,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { // [62] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) -- _deref_pbuc1=_deref_pbuc2 lda keyboard_matrix_row_bitmask+keyboard_key_pressed.rowidx @@ -9369,7 +9369,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid] // [62] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) -- _deref_pbuc1=_deref_pbuc2 diff --git a/src/test/ref/complex/prebob/vogel-bobs.asm b/src/test/ref/complex/prebob/vogel-bobs.asm index df2fec6fb..1e60e9147 100644 --- a/src/test/ref/complex/prebob/vogel-bobs.asm +++ b/src/test/ref/complex/prebob/vogel-bobs.asm @@ -215,7 +215,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid] lda keyboard_matrix_row_bitmask+keyboard_key_pressed.rowidx diff --git a/src/test/ref/complex/prebob/vogel-bobs.log b/src/test/ref/complex/prebob/vogel-bobs.log index 3f647ed80..caca80020 100644 --- a/src/test/ref/complex/prebob/vogel-bobs.log +++ b/src/test/ref/complex/prebob/vogel-bobs.log @@ -5358,7 +5358,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { .label return = $4f .label return_1 = $4c @@ -7796,7 +7796,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { // [67] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) -- _deref_pbuc1=_deref_pbuc2 lda keyboard_matrix_row_bitmask+keyboard_key_pressed.rowidx @@ -10270,7 +10270,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid] // [67] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) -- _deref_pbuc1=_deref_pbuc2 diff --git a/src/test/ref/complex/prebob/vogel-sprites.asm b/src/test/ref/complex/prebob/vogel-sprites.asm index 335ed7cf4..68d967366 100644 --- a/src/test/ref/complex/prebob/vogel-sprites.asm +++ b/src/test/ref/complex/prebob/vogel-sprites.asm @@ -96,7 +96,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid] lda keyboard_matrix_row_bitmask+keyboard_key_pressed.rowidx diff --git a/src/test/ref/complex/prebob/vogel-sprites.log b/src/test/ref/complex/prebob/vogel-sprites.log index 3d7c9185a..66e3f4fc5 100644 --- a/src/test/ref/complex/prebob/vogel-sprites.log +++ b/src/test/ref/complex/prebob/vogel-sprites.log @@ -3393,7 +3393,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { .label return = $2a .label return_1 = $27 @@ -5344,7 +5344,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { // [29] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) -- _deref_pbuc1=_deref_pbuc2 lda keyboard_matrix_row_bitmask+keyboard_key_pressed.rowidx @@ -7298,7 +7298,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid] // [29] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) -- _deref_pbuc1=_deref_pbuc2 diff --git a/src/test/ref/complex/tetris/tetris.asm b/src/test/ref/complex/tetris/tetris.asm index 7ce732854..50e0ea05f 100644 --- a/src/test/ref/complex/tetris/tetris.asm +++ b/src/test/ref/complex/tetris/tetris.asm @@ -1505,7 +1505,7 @@ keyboard_event_scan: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid] diff --git a/src/test/ref/complex/tetris/tetris.log b/src/test/ref/complex/tetris/tetris.log index 0a5aac63b..68023afff 100644 --- a/src/test/ref/complex/tetris/tetris.log +++ b/src/test/ref/complex/tetris/tetris.log @@ -14667,7 +14667,7 @@ keyboard_event_scan: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte zp($c4) rowid) keyboard_matrix_read: { .label return = $d3 @@ -19467,7 +19467,7 @@ keyboard_event_scan: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { // [444] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuxx @@ -24612,7 +24612,7 @@ keyboard_event_scan: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid] diff --git a/src/test/ref/examples/chargen/chargen-analysis.asm b/src/test/ref/examples/chargen/chargen-analysis.asm index 68277b671..57d96ad2f 100644 --- a/src/test/ref/examples/chargen/chargen-analysis.asm +++ b/src/test/ref/examples/chargen/chargen-analysis.asm @@ -399,7 +399,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid] diff --git a/src/test/ref/examples/chargen/chargen-analysis.log b/src/test/ref/examples/chargen/chargen-analysis.log index 8d118b55a..f81cba721 100644 --- a/src/test/ref/examples/chargen/chargen-analysis.log +++ b/src/test/ref/examples/chargen/chargen-analysis.log @@ -2778,7 +2778,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte zp($31) rowid) keyboard_matrix_read: { .label return = $35 @@ -3766,7 +3766,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { // [111] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuxx @@ -5008,7 +5008,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid] diff --git a/src/test/ref/examples/plus4walk/plus4walk.asm b/src/test/ref/examples/plus4walk/plus4walk.asm index 33001323f..e8c138e8a 100644 --- a/src/test/ref/examples/plus4walk/plus4walk.asm +++ b/src/test/ref/examples/plus4walk/plus4walk.asm @@ -12,12 +12,12 @@ .const OFFSET_STRUCT_MOS7360_TED_BG_COLOR = $15 .const OFFSET_STRUCT_MOS7360_TED_BORDER_COLOR = $19 .const OFFSET_STRUCT_MOS7360_TED_RASTER_LO = $1d - // The TED chip controlling video and sound on the Plus/4 and Commodore 16 - .label TED = $ff00 // Default address of screen luminance/color matrix .label DEFAULT_COLORRAM = $800 // Default address of screen character matrix .label DEFAULT_SCREEN = $c00 + // The TED chip controlling video and sound on the Plus/4 and Commodore 16 + .label TED = $ff00 // The random state variable .label rand_state = 3 .segment Code diff --git a/src/test/ref/examples/plus4walk/plus4walk.log b/src/test/ref/examples/plus4walk/plus4walk.log index 387aa6f34..180138efc 100644 --- a/src/test/ref/examples/plus4walk/plus4walk.log +++ b/src/test/ref/examples/plus4walk/plus4walk.log @@ -239,6 +239,13 @@ main::@return: scope:[main] from main::@1 @end: scope:[] from @3 SYMBOL TABLE SSA +(byte) $0::BASIC +(byte) $0::CARTRIDGE_HIGH +(byte) $0::CARTRIDGE_LOW +(byte) $0::FUNCTION_HIGH +(byte) $0::FUNCTION_LOW +(byte) $0::KERNAL +(byte) $0::UNUSED (label) @1 (label) @2 (label) @3 @@ -247,6 +254,11 @@ SYMBOL TABLE SSA (const nomodify byte*) DEFAULT_COLORRAM = (byte*)(number) $800 (const nomodify byte*) DEFAULT_SCREEN = (byte*)(number) $c00 (const byte*) FADE[(number) $10] = { (byte) 2, (byte) $12, (byte) $22, (byte) $32, (byte) $42, (byte) $52, (byte) $62, (byte) $72, (byte) $76, (byte) $66, (byte) $56, (byte) $46, (byte) $36, (byte) $26, (byte) $16, (byte) 6 } +(byte) MOS6529_PIO::PORT +(byte) MOS6551_ACIA::COMMAND +(byte) MOS6551_ACIA::CONTROL +(byte) MOS6551_ACIA::DATA +(byte) MOS6551_ACIA::STATUS (byte) MOS7360_TED::BG_COLOR (byte) MOS7360_TED::BG_COLOR1 (byte) MOS7360_TED::BG_COLOR2 @@ -279,6 +291,8 @@ SYMBOL TABLE SSA (byte) MOS7360_TED::SOUND_CONTROL (const byte*) MOS7360_TED::UNUSED[(number) $1d] = { fill( $1d, 0) } (byte) MOS7360_TED::VSCAN_POS +(byte) MOS7501_PORT::DDR +(byte) MOS7501_PORT::PORT (const byte) OFFSET_STRUCT_MOS7360_TED_BG_COLOR = (byte) $15 (const byte) OFFSET_STRUCT_MOS7360_TED_BORDER_COLOR = (byte) $19 (const byte) OFFSET_STRUCT_MOS7360_TED_RASTER_LO = (byte) $1d @@ -520,9 +534,9 @@ Inlining cast (byte) main::y#4 ← (unumber)(number) $18 Inlining cast (byte) main::x#3 ← (unumber)(number) 0 Inlining cast (byte) main::x#4 ← (unumber)(number) $27 Successful SSA optimization Pass2InlineCast -Simplifying constant pointer cast (struct MOS7360_TED*) 65280 Simplifying constant pointer cast (byte*) 2048 Simplifying constant pointer cast (byte*) 3072 +Simplifying constant pointer cast (struct MOS7360_TED*) 65280 Simplifying constant integer cast 0 Simplifying constant integer cast 7 Simplifying constant integer cast 9 @@ -918,6 +932,18 @@ memset::@3: scope:[memset] from memset::@2 VARIABLE REGISTER WEIGHTS +(byte) $0::BASIC +(byte) $0::CARTRIDGE_HIGH +(byte) $0::CARTRIDGE_LOW +(byte) $0::FUNCTION_HIGH +(byte) $0::FUNCTION_LOW +(byte) $0::KERNAL +(byte) $0::UNUSED +(byte) MOS6529_PIO::PORT +(byte) MOS6551_ACIA::COMMAND +(byte) MOS6551_ACIA::CONTROL +(byte) MOS6551_ACIA::DATA +(byte) MOS6551_ACIA::STATUS (byte) MOS7360_TED::BG_COLOR (byte) MOS7360_TED::BG_COLOR1 (byte) MOS7360_TED::BG_COLOR2 @@ -949,6 +975,8 @@ VARIABLE REGISTER WEIGHTS (byte) MOS7360_TED::ROM_SWITCH (byte) MOS7360_TED::SOUND_CONTROL (byte) MOS7360_TED::VSCAN_POS +(byte) MOS7501_PORT::DDR +(byte) MOS7501_PORT::PORT (void()) main() (word~) main::$10 202.0 (byte~) main::$12 202.0 @@ -1113,12 +1141,12 @@ Target platform is plus4 / MOS6502X .const OFFSET_STRUCT_MOS7360_TED_BG_COLOR = $15 .const OFFSET_STRUCT_MOS7360_TED_BORDER_COLOR = $19 .const OFFSET_STRUCT_MOS7360_TED_RASTER_LO = $1d - // The TED chip controlling video and sound on the Plus/4 and Commodore 16 - .label TED = $ff00 // Default address of screen luminance/color matrix .label DEFAULT_COLORRAM = $800 // Default address of screen character matrix .label DEFAULT_SCREEN = $c00 + // The TED chip controlling video and sound on the Plus/4 and Commodore 16 + .label TED = $ff00 // The random state variable .label rand_state = $27 // The random state variable @@ -1700,6 +1728,10 @@ Uplift Scope [rand] 2,002: zp[2]:37 [ rand::$0 ] 2,002: zp[2]:41 [ rand::$1 ] 2, Uplift Scope [memset] 3,572.33: zp[2]:9 [ memset::dst#2 memset::dst#4 memset::dst#1 ] 183.67: zp[2]:49 [ memset::end#0 ] 143: zp[1]:8 [ memset::c#5 ] 0: zp[2]:6 [ memset::str#4 ] Uplift Scope [] 1,501.5: zp[2]:39 [ rand_state#1 ] 1,501.5: zp[2]:43 [ rand_state#2 ] 325.72: zp[2]:4 [ rand_state#11 rand_state#3 ] Uplift Scope [MOS7360_TED] +Uplift Scope [MOS6551_ACIA] +Uplift Scope [MOS6529_PIO] +Uplift Scope [MOS7501_PORT] +Uplift Scope [$0] Uplift Scope [RADIX] Uplifting [main] best 8346 combination reg byte x [ main::x#11 main::x#10 main::x#2 main::x#1 ] zp[1]:2 [ main::y#11 main::y#10 main::y#2 main::y#1 ] zp[2]:21 [ main::$5 ] zp[2]:13 [ main::$29 ] zp[2]:15 [ main::$30 ] zp[2]:17 [ main::$3 ] zp[2]:23 [ main::$6 ] reg byte a [ main::$9 ] zp[2]:31 [ main::$10 ] reg byte a [ main::$12 ] reg byte a [ main::$13 ] zp[1]:36 [ main::$18 ] zp[2]:11 [ main::$24 ] zp[1]:33 [ main::rnd#0 ] zp[1]:25 [ main::cnt#0 ] zp[2]:26 [ main::$8 ] zp[2]:19 [ main::offset#0 ] @@ -1708,6 +1740,10 @@ Uplifting [rand] best 8346 combination zp[2]:37 [ rand::$0 ] zp[2]:41 [ rand::$1 Uplifting [memset] best 8327 combination zp[2]:9 [ memset::dst#2 memset::dst#4 memset::dst#1 ] zp[2]:49 [ memset::end#0 ] reg byte x [ memset::c#5 ] zp[2]:6 [ memset::str#4 ] Uplifting [] best 8327 combination zp[2]:39 [ rand_state#1 ] zp[2]:43 [ rand_state#2 ] zp[2]:4 [ rand_state#11 rand_state#3 ] Uplifting [MOS7360_TED] best 8327 combination +Uplifting [MOS6551_ACIA] best 8327 combination +Uplifting [MOS6529_PIO] best 8327 combination +Uplifting [MOS7501_PORT] best 8327 combination +Uplifting [$0] best 8327 combination Uplifting [RADIX] best 8327 combination Attempting to uplift remaining variables inzp[1]:2 [ main::y#11 main::y#10 main::y#2 main::y#1 ] Uplifting [main] best 8327 combination zp[1]:2 [ main::y#11 main::y#10 main::y#2 main::y#1 ] @@ -1756,12 +1792,12 @@ ASSEMBLER BEFORE OPTIMIZATION .const OFFSET_STRUCT_MOS7360_TED_BG_COLOR = $15 .const OFFSET_STRUCT_MOS7360_TED_BORDER_COLOR = $19 .const OFFSET_STRUCT_MOS7360_TED_RASTER_LO = $1d - // The TED chip controlling video and sound on the Plus/4 and Commodore 16 - .label TED = $ff00 // Default address of screen luminance/color matrix .label DEFAULT_COLORRAM = $800 // Default address of screen character matrix .label DEFAULT_SCREEN = $c00 + // The TED chip controlling video and sound on the Plus/4 and Commodore 16 + .label TED = $ff00 // The random state variable .label rand_state = 3 // @begin @@ -2295,12 +2331,24 @@ Removing unreachable instruction jmp __b6 Succesful ASM optimization Pass5UnreachableCodeElimination FINAL SYMBOL TABLE +(byte) $0::BASIC +(byte) $0::CARTRIDGE_HIGH +(byte) $0::CARTRIDGE_LOW +(byte) $0::FUNCTION_HIGH +(byte) $0::FUNCTION_LOW +(byte) $0::KERNAL +(byte) $0::UNUSED (label) @1 (label) @begin (label) @end (const nomodify byte*) DEFAULT_COLORRAM = (byte*) 2048 (const nomodify byte*) DEFAULT_SCREEN = (byte*) 3072 (const byte*) FADE[(number) $10] = { (byte) 2, (byte) $12, (byte) $22, (byte) $32, (byte) $42, (byte) $52, (byte) $62, (byte) $72, (byte) $76, (byte) $66, (byte) $56, (byte) $46, (byte) $36, (byte) $26, (byte) $16, (byte) 6 } +(byte) MOS6529_PIO::PORT +(byte) MOS6551_ACIA::COMMAND +(byte) MOS6551_ACIA::CONTROL +(byte) MOS6551_ACIA::DATA +(byte) MOS6551_ACIA::STATUS (byte) MOS7360_TED::BG_COLOR (byte) MOS7360_TED::BG_COLOR1 (byte) MOS7360_TED::BG_COLOR2 @@ -2333,6 +2381,8 @@ FINAL SYMBOL TABLE (byte) MOS7360_TED::SOUND_CONTROL (const byte*) MOS7360_TED::UNUSED[(number) $1d] = { fill( $1d, 0) } (byte) MOS7360_TED::VSCAN_POS +(byte) MOS7501_PORT::DDR +(byte) MOS7501_PORT::PORT (const byte) OFFSET_STRUCT_MOS7360_TED_BG_COLOR = (byte) $15 (const byte) OFFSET_STRUCT_MOS7360_TED_BORDER_COLOR = (byte) $19 (const byte) OFFSET_STRUCT_MOS7360_TED_RASTER_LO = (byte) $1d @@ -2459,12 +2509,12 @@ Score: 6721 .const OFFSET_STRUCT_MOS7360_TED_BG_COLOR = $15 .const OFFSET_STRUCT_MOS7360_TED_BORDER_COLOR = $19 .const OFFSET_STRUCT_MOS7360_TED_RASTER_LO = $1d - // The TED chip controlling video and sound on the Plus/4 and Commodore 16 - .label TED = $ff00 // Default address of screen luminance/color matrix .label DEFAULT_COLORRAM = $800 // Default address of screen character matrix .label DEFAULT_SCREEN = $c00 + // The TED chip controlling video and sound on the Plus/4 and Commodore 16 + .label TED = $ff00 // The random state variable .label rand_state = 3 // @begin diff --git a/src/test/ref/examples/plus4walk/plus4walk.sym b/src/test/ref/examples/plus4walk/plus4walk.sym index 0fd145978..364851033 100644 --- a/src/test/ref/examples/plus4walk/plus4walk.sym +++ b/src/test/ref/examples/plus4walk/plus4walk.sym @@ -1,9 +1,21 @@ +(byte) $0::BASIC +(byte) $0::CARTRIDGE_HIGH +(byte) $0::CARTRIDGE_LOW +(byte) $0::FUNCTION_HIGH +(byte) $0::FUNCTION_LOW +(byte) $0::KERNAL +(byte) $0::UNUSED (label) @1 (label) @begin (label) @end (const nomodify byte*) DEFAULT_COLORRAM = (byte*) 2048 (const nomodify byte*) DEFAULT_SCREEN = (byte*) 3072 (const byte*) FADE[(number) $10] = { (byte) 2, (byte) $12, (byte) $22, (byte) $32, (byte) $42, (byte) $52, (byte) $62, (byte) $72, (byte) $76, (byte) $66, (byte) $56, (byte) $46, (byte) $36, (byte) $26, (byte) $16, (byte) 6 } +(byte) MOS6529_PIO::PORT +(byte) MOS6551_ACIA::COMMAND +(byte) MOS6551_ACIA::CONTROL +(byte) MOS6551_ACIA::DATA +(byte) MOS6551_ACIA::STATUS (byte) MOS7360_TED::BG_COLOR (byte) MOS7360_TED::BG_COLOR1 (byte) MOS7360_TED::BG_COLOR2 @@ -36,6 +48,8 @@ (byte) MOS7360_TED::SOUND_CONTROL (const byte*) MOS7360_TED::UNUSED[(number) $1d] = { fill( $1d, 0) } (byte) MOS7360_TED::VSCAN_POS +(byte) MOS7501_PORT::DDR +(byte) MOS7501_PORT::PORT (const byte) OFFSET_STRUCT_MOS7360_TED_BG_COLOR = (byte) $15 (const byte) OFFSET_STRUCT_MOS7360_TED_BORDER_COLOR = (byte) $19 (const byte) OFFSET_STRUCT_MOS7360_TED_RASTER_LO = (byte) $1d diff --git a/src/test/ref/keyboard-glitch.asm b/src/test/ref/keyboard-glitch.asm index c67857f14..f7f343b10 100644 --- a/src/test/ref/keyboard-glitch.asm +++ b/src/test/ref/keyboard-glitch.asm @@ -102,7 +102,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid] diff --git a/src/test/ref/keyboard-glitch.log b/src/test/ref/keyboard-glitch.log index 11b1771b6..a8eaad04e 100644 --- a/src/test/ref/keyboard-glitch.log +++ b/src/test/ref/keyboard-glitch.log @@ -974,7 +974,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte zp($b) rowid) keyboard_matrix_read: { .label return = $f @@ -1293,7 +1293,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { // [40] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#0) -- _deref_pbuc1=pbuc2_derefidx_vbuxx @@ -1749,7 +1749,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid] diff --git a/src/test/ref/semi-struct-2.asm b/src/test/ref/semi-struct-2.asm index 0a30c688e..baae55d24 100644 --- a/src/test/ref/semi-struct-2.asm +++ b/src/test/ref/semi-struct-2.asm @@ -272,7 +272,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid] lda keyboard_matrix_row_bitmask+keyboard_key_pressed.rowidx diff --git a/src/test/ref/semi-struct-2.log b/src/test/ref/semi-struct-2.log index b995ab126..08140fe2e 100644 --- a/src/test/ref/semi-struct-2.log +++ b/src/test/ref/semi-struct-2.log @@ -5597,7 +5597,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { .label return = $2b .label return_1 = $28 @@ -7702,7 +7702,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { // [80] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) -- _deref_pbuc1=_deref_pbuc2 lda keyboard_matrix_row_bitmask+keyboard_key_pressed.rowidx @@ -10275,7 +10275,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid] // [80] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) -- _deref_pbuc1=_deref_pbuc2 diff --git a/src/test/ref/test-keyboard-space.asm b/src/test/ref/test-keyboard-space.asm index c721e7423..fc20a721b 100644 --- a/src/test/ref/test-keyboard-space.asm +++ b/src/test/ref/test-keyboard-space.asm @@ -54,7 +54,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid] lda keyboard_matrix_row_bitmask+keyboard_key_pressed.rowidx diff --git a/src/test/ref/test-keyboard-space.log b/src/test/ref/test-keyboard-space.log index 5cc489d12..7b90781f0 100644 --- a/src/test/ref/test-keyboard-space.log +++ b/src/test/ref/test-keyboard-space.log @@ -651,7 +651,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { .label return = 7 .label return_1 = 4 @@ -829,7 +829,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { // [20] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) -- _deref_pbuc1=_deref_pbuc2 lda keyboard_matrix_row_bitmask+keyboard_key_pressed.rowidx @@ -1128,7 +1128,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid] // [20] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask+(const byte) keyboard_key_pressed::rowidx#0) -- _deref_pbuc1=_deref_pbuc2 diff --git a/src/test/ref/test-keyboard.asm b/src/test/ref/test-keyboard.asm index 6ae5ccb86..986ff4719 100644 --- a/src/test/ref/test-keyboard.asm +++ b/src/test/ref/test-keyboard.asm @@ -234,7 +234,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid] diff --git a/src/test/ref/test-keyboard.log b/src/test/ref/test-keyboard.log index b6875e4c1..972aa8219 100644 --- a/src/test/ref/test-keyboard.log +++ b/src/test/ref/test-keyboard.log @@ -1545,7 +1545,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte zp($b) rowid) keyboard_matrix_read: { .label return = $1b @@ -2083,7 +2083,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { // [58] *((byte*)(const nomodify struct MOS6526_CIA*) CIA1) ← *((const byte*) keyboard_matrix_row_bitmask + (byte) keyboard_matrix_read::rowid#2) -- _deref_pbuc1=pbuc2_derefidx_vbuxx @@ -2825,7 +2825,7 @@ keyboard_key_pressed: { // The row ID (0-7) of the keyboard matrix row to read. See the C64 key matrix for row IDs. // Returns the keys pressed on the row as bits according to the C64 key matrix. // Notice: If the C64 normal interrupt is still running it will occasionally interrupt right between the read & write -// leading to erroneous readings. You must disable kill the normal interrupt or sei/cli around calls to the keyboard matrix reader. +// leading to erroneous readings. You must disable the normal interrupt or sei/cli around calls to the keyboard matrix reader. // keyboard_matrix_read(byte register(X) rowid) keyboard_matrix_read: { // CIA1->PORT_A = keyboard_matrix_row_bitmask[rowid]