new SCNKEY is now more configurable (size vs features)
This commit is contained in:
1 parent
3b69cd398b
commit
5c58af117a
16 files changed
+51
-37
No files matched your search
@@ -75,7 +75,7 @@ cint_brk: // entry for BRK and STOP+RESTORE - XXX, where should it start?
|
||||
|
||||
// Enable cursor repeat - XXX make it configurable
|
||||
|
||||
#if CONFIG_KEY_REPEAT
|
||||
#if CONFIG_KEY_REPEAT_DEFAULT && !CONFIG_KEY_REPEAT_ALWAYS
|
||||
|
||||
lda #$80
|
||||
sta RPTFLG
|
||||
@@ -84,7 +84,7 @@ cint_brk: // entry for BRK and STOP+RESTORE - XXX, where should it start?
|
||||
|
||||
// Set keyboard decode vector (Compute's Mapping the 64 p215)
|
||||
|
||||
#if CONFIG_SCNKEY_TWW_CTR
|
||||
#if CONFIG_LEGACY_SCNKEY
|
||||
|
||||
// Set initial variables for our improved keyboard scan routine
|
||||
lda #$FF
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
|
||||
#if !CONFIG_SCNKEY_TWW_CTR
|
||||
#if !CONFIG_LEGACY_SCNKEY && !CONFIG_KEY_REPEAT_ALWAYS
|
||||
|
||||
|
||||
kb_matrix_alwaysrepeat:
|
||||
@@ -20,4 +20,4 @@ kb_matrix_alwaysrepeat:
|
||||
__kb_matrix_alwaysrepeat_end:
|
||||
|
||||
|
||||
#endif // no CONFIG_SCNKEY_TWW_CTR
|
||||
#endif // no CONFIG_LEGACY_SCNKEY and no CONFIG_KEY_REPEAT_ALWAYS
|
||||
@@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
|
||||
#if !CONFIG_SCNKEY_TWW_CTR
|
||||
#if !CONFIG_LEGACY_SCNKEY
|
||||
|
||||
|
||||
kb_matrix_bucky_confmask: // values to be written to CIA1_PRA
|
||||
@@ -33,4 +33,4 @@ kb_matrix_bucky_shflag: // mask to be ORed to SHFLAG to mark key status
|
||||
.byte KEY_FLAG_CTRL
|
||||
|
||||
|
||||
#endif // no CONFIG_SCNKEY_TWW_CTR
|
||||
#endif // no CONFIG_LEGACY_SCNKEY
|
||||
@@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
|
||||
#if !CONFIG_SCNKEY_TWW_CTR
|
||||
#if !CONFIG_LEGACY_SCNKEY
|
||||
|
||||
|
||||
kb_matrix_bucky_filter:
|
||||
@@ -24,4 +24,4 @@ kb_matrix_bucky_filter:
|
||||
.byte %00100100 // VENDOR + CONTROL
|
||||
|
||||
|
||||
#endif // no CONFIG_SCNKEY_TWW_CTR
|
||||
#endif // no CONFIG_LEGACY_SCNKEY
|
||||
@@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
|
||||
#if !CONFIG_SCNKEY_TWW_CTR && (CONFIG_JOY1_CURSOR || CONFIG_JOY2_CURSOR)
|
||||
#if !CONFIG_LEGACY_SCNKEY && (CONFIG_JOY1_CURSOR || CONFIG_JOY2_CURSOR)
|
||||
|
||||
|
||||
kb_matrix_joy_status:
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
|
||||
#if !CONFIG_SCNKEY_TWW_CTR
|
||||
#if !CONFIG_LEGACY_SCNKEY
|
||||
|
||||
kb_matrix_lookup:
|
||||
|
||||
|
||||
+3
-3
@@ -12,9 +12,9 @@
|
||||
// This lookup table is used by TWW/CTR keyboard routine only!
|
||||
|
||||
|
||||
#if CONFIG_SCNKEY_TWW_CTR
|
||||
#if CONFIG_LEGACY_SCNKEY
|
||||
|
||||
kb_matrix_lookup_tww_ctr:
|
||||
kb_matrix_lookup:
|
||||
|
||||
.byte $00 // Normal
|
||||
.byte $40 // Shifted
|
||||
@@ -25,4 +25,4 @@ kb_matrix_lookup_tww_ctr:
|
||||
.byte $80 // Vendor + CTRL
|
||||
.byte $80 // Vendor + CTRL + SHIFT
|
||||
|
||||
#endif // CONFIG_SCNKEY_TWW_CTR
|
||||
#endif // CONFIG_LEGACY_SCNKEY
|
||||
@@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
|
||||
#if !CONFIG_SCNKEY_TWW_CTR
|
||||
#if !CONFIG_LEGACY_SCNKEY
|
||||
|
||||
|
||||
kb_matrix_row_keys:
|
||||
@@ -25,4 +25,4 @@ kb_matrix_row_keys:
|
||||
.byte %01111111
|
||||
|
||||
|
||||
#endif // no CONFIG_SCNKEY_TWW_CTR
|
||||
#endif // no CONFIG_LEGACY_SCNKEY
|
||||
@@ -4,7 +4,7 @@
|
||||
//
|
||||
|
||||
|
||||
#if !CONFIG_SCNKEY_TWW_CTR
|
||||
#if !CONFIG_LEGACY_SCNKEY
|
||||
|
||||
|
||||
kb_matrix_row_offsets:
|
||||
@@ -20,4 +20,4 @@ kb_matrix_row_offsets:
|
||||
.byte 6*8
|
||||
.byte 7*8
|
||||
|
||||
#endif // no CONFIG_SCNKEY_TWW_CTR
|
||||
#endif // no CONFIG_LEGACY_SCNKEY
|
||||
@@ -25,7 +25,7 @@
|
||||
// XXX add Commodore 65 keyboard support
|
||||
|
||||
|
||||
#if !CONFIG_SCNKEY_TWW_CTR
|
||||
#if !CONFIG_LEGACY_SCNKEY
|
||||
|
||||
// Routine takes some ideas from TWW/CTR proposal, see here:
|
||||
// - http://codebase64.org/doku.php?id=base:scanning_the_keyboard_the_correct_and_non_kernal_way
|
||||
@@ -44,7 +44,7 @@ SCNKEY:
|
||||
|
||||
// Check for any activity
|
||||
|
||||
#if !CONFIG_JOY2_CURSOR
|
||||
#if !CONFIG_JOY2_CURSOR && CONFIG_KEY_FAST_SCAN
|
||||
|
||||
ldx #$00
|
||||
stx CIA1_PRA // connect all the rows
|
||||
@@ -93,13 +93,17 @@ scnkey_bucky_loop:
|
||||
|
||||
bne scnkey_joystick_filtered
|
||||
|
||||
#if CONFIG_KEY_FAST_SCAN
|
||||
|
||||
inx // puts $00
|
||||
stx CIA1_PRA // connect all the rows
|
||||
dex // puts $FF
|
||||
cpx CIA1_PRB
|
||||
beq scnkey_no_keys
|
||||
|
||||
#endif
|
||||
#endif // CONFIG_KEY_FAST_SCAN
|
||||
|
||||
#endif // CONFIG_JOY2_CURSOR
|
||||
|
||||
// Check for control port 1 activity (can interfere with keyboard)
|
||||
|
||||
@@ -262,6 +266,8 @@ scnkey_done:
|
||||
|
||||
scnkey_try_repeat:
|
||||
|
||||
#if !CONFIG_KEY_REPEAT_ALWAYS
|
||||
|
||||
// Check whether we should repeat keys - first the flag, afterwards hardcoded list
|
||||
|
||||
lda RPTFLG
|
||||
@@ -278,6 +284,8 @@ scnkey_try_repeat:
|
||||
|
||||
scnkey_handle_repeat:
|
||||
|
||||
#endif // no CONFIG_KEY_REPEAT_ALWAYS
|
||||
|
||||
// Countdown before first repeat
|
||||
|
||||
lda DELAY
|
||||
@@ -309,4 +317,4 @@ via_keylog:
|
||||
jmp (KEYLOG)
|
||||
|
||||
|
||||
#endif // no CONFIG_SCNKEY_TWW_CTR
|
||||
#endif // no CONFIG_LEGACY_SCNKEY
|
||||
@@ -9,7 +9,7 @@
|
||||
//
|
||||
|
||||
|
||||
#if CONFIG_SCNKEY_TWW_CTR
|
||||
#if CONFIG_LEGACY_SCNKEY
|
||||
|
||||
|
||||
// Scan the keyboard..
|
||||
@@ -116,7 +116,7 @@ accept_key:
|
||||
tax
|
||||
pla
|
||||
and #$3f
|
||||
ora kb_matrix_lookup_tww_ctr,x
|
||||
ora kb_matrix_lookup,x
|
||||
tax
|
||||
lda kb_matrix,x
|
||||
// But don't insert $00 characters
|
||||
@@ -521,4 +521,4 @@ KeyRepeatWait:
|
||||
jmp ConsiderNextKey
|
||||
|
||||
|
||||
#endif // CONFIG_SCNKEY_TWW_CTR
|
||||
#endif // CONFIG_LEGACY_SCNKEY
|
||||
@@ -9,7 +9,7 @@
|
||||
scnkey_set_keytab:
|
||||
|
||||
|
||||
#if CONFIG_SCNKEY_TWW_CTR // routine not compatible with legacy SCNKEY
|
||||
#if CONFIG_LEGACY_SCNKEY // routine not compatible with legacy SCNKEY
|
||||
|
||||
rts
|
||||
|
||||
@@ -54,7 +54,7 @@ scnkey_valid_offset:
|
||||
// FALLTROUGH
|
||||
|
||||
|
||||
#endif // no CONFIG_SCNKEY_TWW_CTR
|
||||
#endif // no CONFIG_LEGACY_SCNKEY
|
||||
|
||||
|
||||
scnkey_toggle_if_needed: // entry for SCNKEY (TWW/CTR version)
|
||||
|
||||
Reference in new issue
Block a user