further work on new SCNKEY

This commit is contained in:
FeralChild64 committed 2019-10-14 18:37:46 +02:00
1 parent 183ac3ab87
commit 677e5452a6
11 files changed
+228 -87

No files matched your search

+26
View File
@@ -5,8 +5,17 @@
// - [CM64] Compute's Mapping the Commodore 64 - pages 220, 221
//
scnkey_set_keytab:
#if CONFIG_SCNKEY_TWW_CTR // routine not compatible with legacy SCNKEY
rts
#else
// Set initial KEYTAB value
lda #<kb_matrix
@@ -22,6 +31,16 @@ scnkey_set_keytab:
// Retrieve table offset
lda kb_matrix_lookup, x
cmp #$FF
bne scnkey_valid_offset
// $FF means we shouldn't decode anything, mark this by setting high byte
// of KEYTAB to 0 (I don't think anyone would put keyboard decoding table
// at zeropage)
lda #$00
beq !+ // branch always
scnkey_valid_offset:
// Add offset to the vector
clc
@@ -29,8 +48,15 @@ scnkey_set_keytab:
sta KEYTAB+0
lda #$00
adc KEYTAB+1
!:
sta KEYTAB+1
// FALLTROUGH
#endif // no CONFIG_SCNKEY_TWW_CTR
scnkey_toggle_if_needed: // entry for SCNKEY (TWW/CTR version)
// Check if we should toggle the character set