removed obsolete C65 keyboard support code
This commit is contained in:
1 parent
48aa05d575
commit
ea919a4129
21 files changed
+23
-253
No files matched your search
@@ -215,10 +215,6 @@ Allows to use CAPS LOCK key on the C128 keyboard, this is independent from `KEYB
|
||||
|
||||
Needs about 50 bytes more space in KERNAL segment. If unsure - disable.
|
||||
|
||||
### `KEYBOARD_C65`, `KEYBOARD_C65_CAPS_LOCK`
|
||||
|
||||
Similar, but for C65 keyboard. Please note - the C65 keyboard support is (as of yet) completely untested!
|
||||
|
||||
### `KEY_REPEAT_DEFAULT`
|
||||
|
||||
Enables key repetition by default during the startup (sets `RPTFLG`).
|
||||
|
||||
@@ -79,8 +79,6 @@
|
||||
;; #CONFIG# LEGACY_SCNKEY NO
|
||||
;; #CONFIG# KEYBOARD_C128 NO
|
||||
;; #CONFIG# KEYBOARD_C128_CAPS_LOCK NO
|
||||
;; #CONFIG# KEYBOARD_C65 NO ; untested
|
||||
;; #CONFIG# KEYBOARD_C65_CAPS_LOCK NO ; untested
|
||||
;; #CONFIG# KEY_REPEAT_DEFAULT NO
|
||||
;; #CONFIG# KEY_REPEAT_ALWAYS NO
|
||||
;; #CONFIG# KEY_FAST_SCAN YES
|
||||
@@ -102,13 +100,6 @@
|
||||
|
||||
;; #CONFIG# KEYCMD_HELP "LIST"
|
||||
|
||||
;; #CONFIG# KEYCMD_F9 NO
|
||||
;; #CONFIG# KEYCMD_F10 NO
|
||||
;; #CONFIG# KEYCMD_F11 NO
|
||||
;; #CONFIG# KEYCMD_F12 NO
|
||||
;; #CONFIG# KEYCMD_F13 NO
|
||||
;; #CONFIG# KEYCMD_F14 NO
|
||||
|
||||
|
||||
; --- Screen editor
|
||||
|
||||
|
||||
@@ -36,13 +36,6 @@
|
||||
|
||||
;; #CONFIG# KEYCMD_HELP NO
|
||||
|
||||
;; #CONFIG# KEYCMD_F9 NO
|
||||
;; #CONFIG# KEYCMD_F10 NO
|
||||
;; #CONFIG# KEYCMD_F11 NO
|
||||
;; #CONFIG# KEYCMD_F12 NO
|
||||
;; #CONFIG# KEYCMD_F13 NO
|
||||
;; #CONFIG# KEYCMD_F14 NO
|
||||
|
||||
|
||||
; --- Screen editor
|
||||
|
||||
|
||||
@@ -89,13 +89,6 @@
|
||||
|
||||
;; #CONFIG# KEYCMD_HELP "LIST"
|
||||
|
||||
;; #CONFIG# KEYCMD_F9 NO
|
||||
;; #CONFIG# KEYCMD_F10 NO
|
||||
;; #CONFIG# KEYCMD_F11 NO
|
||||
;; #CONFIG# KEYCMD_F12 NO
|
||||
;; #CONFIG# KEYCMD_F13 NO
|
||||
;; #CONFIG# KEYCMD_F14 NO
|
||||
|
||||
|
||||
; --- Screen editor
|
||||
|
||||
|
||||
@@ -91,13 +91,6 @@
|
||||
|
||||
;; #CONFIG# KEYCMD_HELP "LIST"
|
||||
|
||||
;; #CONFIG# KEYCMD_F9 NO
|
||||
;; #CONFIG# KEYCMD_F10 NO
|
||||
;; #CONFIG# KEYCMD_F11 NO
|
||||
;; #CONFIG# KEYCMD_F12 NO
|
||||
;; #CONFIG# KEYCMD_F13 NO
|
||||
;; #CONFIG# KEYCMD_F14 NO
|
||||
|
||||
|
||||
; --- Screen editor
|
||||
|
||||
|
||||
@@ -46,8 +46,6 @@
|
||||
; --- Keyboard settings
|
||||
|
||||
;; #CONFIG# LEGACY_SCNKEY NO
|
||||
;; #CONFIG# KEYBOARD_C65 NO ; does not work
|
||||
;; #CONFIG# KEYBOARD_C65_CAPS_LOCK NO ; does not work
|
||||
;; #CONFIG# KEY_REPEAT_DEFAULT NO
|
||||
;; #CONFIG# KEY_REPEAT_ALWAYS NO
|
||||
;; #CONFIG# KEY_FAST_SCAN YES
|
||||
|
||||
@@ -89,13 +89,6 @@
|
||||
|
||||
;; #CONFIG# KEYCMD_HELP "LIST"
|
||||
|
||||
;; #CONFIG# KEYCMD_F9 NO
|
||||
;; #CONFIG# KEYCMD_F10 NO
|
||||
;; #CONFIG# KEYCMD_F11 NO
|
||||
;; #CONFIG# KEYCMD_F12 NO
|
||||
;; #CONFIG# KEYCMD_F13 NO
|
||||
;; #CONFIG# KEYCMD_F14 NO
|
||||
|
||||
|
||||
; --- Screen editor
|
||||
|
||||
|
||||
@@ -79,13 +79,6 @@
|
||||
|
||||
;; #CONFIG# KEYCMD_HELP "LIST"
|
||||
|
||||
;; #CONFIG# KEYCMD_F9 NO
|
||||
;; #CONFIG# KEYCMD_F10 NO
|
||||
;; #CONFIG# KEYCMD_F11 NO
|
||||
;; #CONFIG# KEYCMD_F12 NO
|
||||
;; #CONFIG# KEYCMD_F13 NO
|
||||
;; #CONFIG# KEYCMD_F14 NO
|
||||
|
||||
|
||||
; --- Screen editor
|
||||
|
||||
|
||||
@@ -81,13 +81,6 @@
|
||||
|
||||
;; #CONFIG# KEYCMD_HELP "LIST"
|
||||
|
||||
;; #CONFIG# KEYCMD_F9 NO
|
||||
;; #CONFIG# KEYCMD_F10 NO
|
||||
;; #CONFIG# KEYCMD_F11 NO
|
||||
;; #CONFIG# KEYCMD_F12 NO
|
||||
;; #CONFIG# KEYCMD_F13 NO
|
||||
;; #CONFIG# KEYCMD_F14 NO
|
||||
|
||||
|
||||
; --- Screen editor
|
||||
|
||||
|
||||
@@ -233,8 +233,6 @@
|
||||
!ifdef CONFIG_TAPE_NORMAL { !error "CONFIG_LEGACY_SCNKEY is not compatible with CONFIG_TAPE_NORMAL" }
|
||||
!ifdef CONFIG_KEYBOARD_C128 { !error "CONFIG_LEGACY_SCNKEY is not compatible with CONFIG_KEYBOARD_C128" }
|
||||
!ifdef CONFIG_KEYBOARD_C128_CAPS_LOCK { !error "CONFIG_LEGACY_SCNKEY is not compatible with CONFIG_KEYBOARD_C128_CAPS_LOCK" }
|
||||
!ifdef CONFIG_KEYBOARD_C65 { !error "CONFIG_LEGACY_SCNKEY is not compatible with CONFIG_KEYBOARD_C65" }
|
||||
!ifdef CONFIG_KEYBOARD_C65_CAPS_LOCK { !error "CONFIG_LEGACY_SCNKEY is not compatible with CONFIG_KEYBOARD_C65_CAPS_LOCK" }
|
||||
}
|
||||
!ifdef CONFIG_MB_M65 {
|
||||
!ifdef CONFIG_KEYBOARD_C128 { !error "MEGA65 motherboard is not compatible with CONFIG_KEYBOARD_C128" }
|
||||
@@ -244,8 +242,6 @@
|
||||
!ifdef CONFIG_MB_U64 {
|
||||
!ifdef CONFIG_KEYBOARD_C128 { !error "Ultimate 64 motherboard is not compatible with CONFIG_KEYBOARD_C128" }
|
||||
!ifdef CONFIG_KEYBOARD_C128_CAPS_LOCK { !error "Ultimate 64 motherboard is not compatible with CONFIG_KEYBOARD_C128_CAPS_LOCK" }
|
||||
!ifdef CONFIG_KEYBOARD_C65 { !error "Ultimate 64 motherboard is not compatible with CONFIG_KEYBOARD_C65" }
|
||||
!ifdef CONFIG_KEYBOARD_C65_CAPS_LOCK { !error "Ultimate 64 motherboard is not compatible with CONFIG_KEYBOARD_C65_CAPS_LOCK" }
|
||||
}
|
||||
|
||||
|
||||
@@ -390,15 +386,6 @@
|
||||
|
||||
; Handle keyboard configuration
|
||||
|
||||
!ifdef CONFIG_KEYBOARD_C128 { !set CONFIG_KEYBOARD_C128_OR_C65 = 1 }
|
||||
!ifdef CONFIG_KEYBOARD_C65 { !set CONFIG_KEYBOARD_C128_OR_C65 = 1 }
|
||||
|
||||
!ifdef CONFIG_KEYBOARD_C65 { !set CONFIG_KEYBOARD_C65_OR_CAPS_LOCK = 1 }
|
||||
!ifdef CONFIG_KEYBOARD_C65_CAPS_LOCK { !set CONFIG_KEYBOARD_C65_OR_CAPS_LOCK = 1 }
|
||||
|
||||
!ifdef CONFIG_KEYBOARD_C128_CAPS_LOCK { !set CONFIG_KEYBOARD_CAPS_LOCK = 1 }
|
||||
!ifdef CONFIG_KEYBOARD_C65_CAPS_LOCK { !set CONFIG_KEYBOARD_CAPS_LOCK = 1 }
|
||||
|
||||
!ifdef CONFIG_JOY1_CURSOR { !set CONFIG_JOY1_OR_JOY2_CURSOR = 1 }
|
||||
!ifdef CONFIG_JOY2_CURSOR { !set CONFIG_JOY1_OR_JOY2_CURSOR = 1 }
|
||||
|
||||
|
||||
@@ -14,11 +14,8 @@
|
||||
|
||||
!ifdef CONFIG_KEYBOARD_C128 { !set _NEED_EXTENDED = 1 }
|
||||
!ifdef CONFIG_KEYBOARD_C128_CAPS_LOCK { !set _NEED_CAPS_LOCK = 1 }
|
||||
!ifdef CONFIG_KEYBOARD_C65 { !set _NEED_EXTENDED = 1 }
|
||||
!ifdef CONFIG_KEYBOARD_C65_CAPS_LOCK { !set _NEED_CAPS_LOCK = 1 }
|
||||
!ifdef CONFIG_MB_M65 { !set _NEED_CAPS_LOCK = 1 }
|
||||
!ifdef CONFIG_MB_M65 { !set _NEED_EXTENDED = 1 }
|
||||
!ifdef CONFIG_KEYBOARD_C65 { !set _NEED_C65KB = 1 }
|
||||
!ifdef CONFIG_MB_M65 { !set _NEED_C65KB = 1 }
|
||||
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ programmable_keys_codes:
|
||||
|
||||
!ifdef CONFIG_KEYCMD_HELP { !byte KEY_HELP }
|
||||
|
||||
} else ifdef CONFIG_KEYBOARD_C65 {
|
||||
} else ifdef CONFIG_MB_M65 {
|
||||
|
||||
!ifdef CONFIG_KEYCMD_HELP { !byte KEY_HELP }
|
||||
|
||||
@@ -76,7 +76,7 @@ __str_offset_F8: !ifdef CONFIG_KEYCMD_F8 { +CONFIG_KEYCMD_F8
|
||||
__str_offset_HELP: !ifdef CONFIG_KEYCMD_HELP { +CONFIG_KEYCMD_HELP
|
||||
!byte $00 }
|
||||
|
||||
} else ifdef CONFIG_KEYBOARD_C65 {
|
||||
} else ifdef CONFIG_MB_M65 {
|
||||
|
||||
__str_offset_HELP: !ifdef CONFIG_KEYCMD_HELP { +CONFIG_KEYCMD_HELP
|
||||
!byte $00 }
|
||||
@@ -123,7 +123,7 @@ programmable_keys_offsets:
|
||||
|
||||
!ifdef CONFIG_KEYCMD_HELP { !byte __str_offset_HELP - programmable_keys_strings }
|
||||
|
||||
} else ifdef CONFIG_KEYBOARD_C65 {
|
||||
} else ifdef CONFIG_MB_M65 {
|
||||
|
||||
!ifdef CONFIG_KEYCMD_HELP { !byte __str_offset_HELP - programmable_keys_strings }
|
||||
|
||||
|
||||
@@ -65,6 +65,11 @@ m65_mode65:
|
||||
|
||||
jsr m65_native_meminit
|
||||
|
||||
; Set C65 keybord handling - XXX check this before enabling
|
||||
|
||||
; lda #$02
|
||||
; sta C65_EXTKEYS_DDR ; output for most keys, input for CAPS LOCK bit
|
||||
|
||||
; Set screen mode to 80x50
|
||||
|
||||
lda #$02
|
||||
|
||||
@@ -148,12 +148,6 @@ IOINIT_skip_DOS:
|
||||
stx VIC_CLKRATE ; store $00
|
||||
}
|
||||
|
||||
!ifdef CONFIG_KEYBOARD_C65_OR_CAPS_LOCK {
|
||||
|
||||
lda #$02
|
||||
sta C65_EXTKEYS_DDR ; output for most keys, input for CAPS LOCK bit
|
||||
}
|
||||
|
||||
; Set DDR on CIA2 for IEC bus, VIC-II banking (see [CM64], $DDOO description on page 193)
|
||||
lda #$3F
|
||||
sta CIA2_DDRA ; $DD02
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 * #IGNORE
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
;
|
||||
; Extended keyboard matrix for Commodore 65 keyboards, based on
|
||||
;
|
||||
; - https://github.com/MEGA65/c65-specifications/blob/master/c65manualupdated.txt
|
||||
;
|
||||
|
||||
|
||||
!ifdef CONFIG_KEYBOARD_C65 { !ifndef CONFIG_LEGACY_SCNKEY {
|
||||
|
||||
|
||||
kb_matrix_65:
|
||||
|
||||
!byte $00, $00, $00, KEY_HELP, KEY_F9, KEY_F11, KEY_F13, KEY_ESC
|
||||
|
||||
kb_matrix_65_shifted:
|
||||
|
||||
!byte $00, $00, $00, KEY_HELP, KEY_F10, KEY_F12, KEY_F14, KEY_ESC
|
||||
|
||||
|
||||
} } ; CONFIG_KEYBOARD_C65 and no CONFIG_LEGACY_SCNKEY
|
||||
@@ -21,8 +21,8 @@ kb_matrix_bucky_confmask: ; values to be written to CIA1_PRA
|
||||
!byte %10111111 ; SHIFT (right)
|
||||
!byte %01111111 ; VENDOR
|
||||
!byte %01111111 ; CTRL
|
||||
!ifdef CONFIG_KEYBOARD_C128_OR_C65 {
|
||||
!byte %11111111 ; C128 / C65 extra keys
|
||||
!ifdef CONFIG_KEYBOARD_C128 {
|
||||
!byte %11111111 ; C128
|
||||
!byte %11111111
|
||||
}
|
||||
|
||||
@@ -42,19 +42,6 @@ kb_matrix_bucky_confmask_c128: ; values to be written to VIC_XSCAN
|
||||
!byte %11111011 ; NO_SCRL
|
||||
}
|
||||
|
||||
!ifdef CONFIG_KEYBOARD_C65 {
|
||||
|
||||
kb_matrix_bucky_confmask_c65: ; values to be written to C65_EXTKEYS_PR
|
||||
|
||||
!byte %11111111
|
||||
!byte %11111111
|
||||
!byte %11111111
|
||||
!byte %11111111
|
||||
|
||||
!byte %11111101 ; ALT
|
||||
!byte %11111101 ; NO_SCRL
|
||||
}
|
||||
|
||||
|
||||
kb_matrix_bucky_testmask: ; for AND with CIA1_PRB value
|
||||
|
||||
@@ -66,10 +53,6 @@ kb_matrix_bucky_testmask: ; for AND with CIA1_PRB value
|
||||
!byte %10000000 ; ALT
|
||||
!byte %00000001 ; NO_SCRL
|
||||
}
|
||||
!ifdef CONFIG_KEYBOARD_C65 {
|
||||
!byte %00000100 ; ALT
|
||||
!byte %00000001 ; NO_SCRL
|
||||
}
|
||||
|
||||
|
||||
kb_matrix_bucky_shflag: ; mask to be ORed to SHFLAG to mark key status
|
||||
@@ -82,7 +65,7 @@ kb_matrix_bucky_shflag: ; mask to be ORed to SHFLAG to mark key status
|
||||
!byte KEY_FLAG_ALT
|
||||
!byte KEY_FLAG_NO_SCRL
|
||||
!byte KEY_FLAG_CAPSL
|
||||
} else ifdef CONFIG_KEYBOARD_C128_OR_C65 {
|
||||
} else ifdef CONFIG_KEYBOARD_C128 {
|
||||
!byte KEY_FLAG_ALT
|
||||
!byte KEY_FLAG_NO_SCRL
|
||||
}
|
||||
|
||||
@@ -86,21 +86,6 @@ SCNKEY:
|
||||
stx VIC_XSCAN ; disconnect C128 keys if no C128 keyboard is supported
|
||||
} }
|
||||
|
||||
!ifdef CONFIG_KEYBOARD_C65_CAPS_LOCK {
|
||||
|
||||
lda C65_EXTKEYS_PR
|
||||
and #$01
|
||||
bne @2 ; branch if no CAPS LOCK
|
||||
|
||||
lda #KEY_FLAG_CAPSL
|
||||
sta SHFLAG
|
||||
@2:
|
||||
|
||||
!ifndef CONFIG_KEYBOARD_C65 {
|
||||
ldx #$FF
|
||||
stx C65_EXTKEYS_PR ; disconnect C65 keys if no C65 keyboard is supported
|
||||
} }
|
||||
|
||||
ldy #(__kb_matrix_bucky_confmask_end - kb_matrix_bucky_confmask - 1)
|
||||
scnkey_bucky_loop:
|
||||
lda kb_matrix_bucky_confmask, y
|
||||
@@ -108,10 +93,6 @@ scnkey_bucky_loop:
|
||||
!ifdef CONFIG_KEYBOARD_C128 {
|
||||
lda kb_matrix_bucky_confmask_c128, y
|
||||
sta VIC_XSCAN
|
||||
}
|
||||
!ifdef CONFIG_KEYBOARD_C65 {
|
||||
lda kb_matrix_bucky_confmask_c65, y
|
||||
sta C65_EXTKEYS_PR
|
||||
}
|
||||
lda kb_matrix_bucky_testmask, y
|
||||
and CIA1_PRB
|
||||
@@ -162,9 +143,6 @@ scnkey_keytab_set_done:
|
||||
stx CIA1_PRA ; connect all the rows
|
||||
!ifdef CONFIG_KEYBOARD_C128 {
|
||||
stx VIC_XSCAN
|
||||
}
|
||||
!ifdef CONFIG_KEYBOARD_C65 {
|
||||
stx C65_EXTKEYS_PR
|
||||
}
|
||||
dex ; puts $FF
|
||||
cpx CIA1_PRB
|
||||
@@ -194,9 +172,6 @@ scnkey_keytab_set_done:
|
||||
ldy #$FF ; offset in key matrix table, $FF for not found yet
|
||||
!ifdef CONFIG_KEYBOARD_C128 {
|
||||
jsr scnkey_128
|
||||
}
|
||||
!ifdef CONFIG_KEYBOARD_C65 {
|
||||
jsr scnkey_65
|
||||
}
|
||||
ldx #$07
|
||||
scnkey_matrix_loop:
|
||||
@@ -326,32 +301,12 @@ scnkey_output_key:
|
||||
|
||||
; Retrieve the PETSCII code
|
||||
|
||||
!ifdef CONFIG_KEYBOARD_C128_OR_C65 {
|
||||
!ifdef CONFIG_KEYBOARD_C128 {
|
||||
|
||||
cpy #$40
|
||||
bcc scnkey_output_get_keycode
|
||||
|
||||
!ifdef CONFIG_KEYBOARD_C128 {
|
||||
lda kb_matrix_128 - $41, y ; retrieve key code from C128 extended matrix
|
||||
} else ifdef CONFIG_KEYBOARD_C65 {
|
||||
|
||||
; Select key matrix (normal or shifted) for extended C65 keys
|
||||
|
||||
lda SHFLAG
|
||||
and #%00000111 ; KEY_FLAG_SHIFT + KEY_FLAG_VENDOR + KEY_FLAG_CTRL
|
||||
beq scnkey_output_65_no_shift
|
||||
cmp #KEY_FLAG_SHIFT
|
||||
; XXX how to behave on VENDOR/CTRL key? Harmonize this with clasic keys behavior
|
||||
bne scnkey_no_keys ; no scanning for this bucky key combination
|
||||
|
||||
lda kb_matrix_65_shifted - $41, y
|
||||
jmp scnkey_got_petscii
|
||||
|
||||
scnkey_output_65_no_shift:
|
||||
|
||||
lda kb_matrix_65 - $41, y
|
||||
}
|
||||
|
||||
jmp scnkey_got_petscii
|
||||
|
||||
; FALLTROUGH
|
||||
@@ -360,16 +315,16 @@ scnkey_output_get_keycode:
|
||||
|
||||
lda (KEYTAB), y ; retrieve key code from standard matrix
|
||||
|
||||
} ; CONFIG_KEYBOARD_C128 or CONFIG_KEYBOARD_C65
|
||||
} ; CONFIG_KEYBOARD_C128
|
||||
|
||||
!ifdef CONFIG_KEYBOARD_CAPS_LOCK {
|
||||
!ifdef CONFIG_KEYBOARD_C128_CAPS_LOCK {
|
||||
|
||||
; Check if we need special handling for a CAPS LOCK key
|
||||
; This is shorter than a separate set of tables
|
||||
|
||||
scnkey_handle_caps_lock:
|
||||
|
||||
!ifndef CONFIG_KEYBOARD_C128_OR_C65 {
|
||||
!ifndef CONFIG_KEYBOARD_C128 {
|
||||
lda (KEYTAB), y
|
||||
}
|
||||
tax
|
||||
@@ -390,9 +345,9 @@ scnkey_handle_caps_lock:
|
||||
@7:
|
||||
txa
|
||||
|
||||
} ; CONFIG_KEYBOARD_C128_CAPS_LOCK or CONFIG_KEYBOARD_C65_CAPS_LOCK
|
||||
} ; CONFIG_KEYBOARD_C128_CAPS_LOCK
|
||||
|
||||
!ifndef CONFIG_KEYBOARD_C128_OR_C65 { !ifndef CONFIG_KEYBOARD_CAPS_LOCK {
|
||||
!ifndef CONFIG_KEYBOARD_C128 { !ifndef CONFIG_KEYBOARD_C128_CAPS_LOCK {
|
||||
|
||||
lda (KEYTAB), y
|
||||
} }
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 * #IGNORE
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
;
|
||||
; Keyboard scanning routine extension for C65 keyboards
|
||||
;
|
||||
; - [CM128] Computes Mapping the Commodore 128 - pages 212 (SHFLAG)
|
||||
; - https://github.com/MEGA65/c65-specifications/blob/master/c65manualupdated.txt (matrix)
|
||||
;
|
||||
|
||||
|
||||
!ifdef CONFIG_KEYBOARD_C65 { !ifndef CONFIG_LEGACY_SCNKEY {
|
||||
|
||||
|
||||
; Inlining this within SCNKEY would both overcomplicate the implementation
|
||||
; and disrupt a lot of branches (they would cross the 127 bytes distance limit)
|
||||
|
||||
; .Y is now $FF - try to put there a key code from extended keyboard
|
||||
|
||||
scnkey_65:
|
||||
|
||||
sty CIA1_PRA ; disconnect classic keys
|
||||
|
||||
lda #$00
|
||||
sta C65_EXTKEYS_PR ; connect C65 keys
|
||||
|
||||
lda #%00000101 ; filter out bucky keys: ALT, NO_SCRL
|
||||
ora CIA1_PRB
|
||||
|
||||
cmp #$FF
|
||||
beq scnkey_65_done ; skip if no key pressed from this row
|
||||
|
||||
; At least one key is pressed - decode it
|
||||
ldy #$07
|
||||
scnkey_matrix_65_loop:
|
||||
cmp kb_matrix_row_keys, y
|
||||
bne @1 ; not this particular key
|
||||
tya ; now .A contains key offset within a row
|
||||
clc
|
||||
adc kb_matrix_row_offsets, x ; now .A contains key offset from the matrix start
|
||||
adc #$41 ; now .A contains offset after the standard matrix
|
||||
tay
|
||||
jmp scnkey_65_done
|
||||
@1:
|
||||
dey
|
||||
bpl scnkey_matrix_65_loop
|
||||
|
||||
; FALLTROUGH, multiple keys must have been pressed
|
||||
|
||||
scnkey_65_no_keys:
|
||||
|
||||
pla ; get rid of return address from the stack
|
||||
pla
|
||||
|
||||
jmp scnkey_no_keys ; pass controll to original routine
|
||||
|
||||
|
||||
scnkey_65_done:
|
||||
|
||||
ldx #$FF
|
||||
stx C65_EXTKEYS_PR ; connect C65 keys
|
||||
|
||||
rts
|
||||
|
||||
|
||||
} } ; CONFIG_KEYBOARD_C65 and no CONFIG_LEGACY_SCNKEY
|
||||
@@ -14,7 +14,7 @@ screen_scroll_up:
|
||||
|
||||
; First handle CTRL and NO_SCRL keys
|
||||
|
||||
!ifdef CONFIG_KEYBOARD_C128_OR_C65 {
|
||||
!ifdef CONFIG_KEYBOARD_C128 {
|
||||
|
||||
; Do not scroll if NO_SCRL is pressed and interrupts are enabled
|
||||
@1:
|
||||
|
||||
@@ -70,7 +70,7 @@ udtim_keyboard:
|
||||
; key press. But something as simple as this would have created warm restart
|
||||
; with M+N+SPACE+RESTORE due to ghosting - so the original ROM has to provide
|
||||
; some protection here. I do not know what the mechanism there exactly does,
|
||||
; but I hope the mechanism below will be compatible enough.
|
||||
; but I hope the code below will be compatible enough.
|
||||
|
||||
lda #$80
|
||||
sta CIA1_PRA ; select all the rows except the last one
|
||||
@@ -78,9 +78,9 @@ udtim_keyboard:
|
||||
ldx #$00
|
||||
stx VIC_XSCAN ; connect all the extra C128 keys
|
||||
}
|
||||
!ifdef CONFIG_KEYBOARD_C65 {
|
||||
!ifdef CONFIG_MB_M65 {
|
||||
ldx #$00
|
||||
stx C65_EXTKEYS_PR ; connect all the extra C65 keys
|
||||
stx C65_EXTKEYS_PR ; connect all the extra C65 keys XXX test this
|
||||
}
|
||||
|
||||
lda CIA1_PRB ; read the keys
|
||||
@@ -91,9 +91,9 @@ udtim_keyboard:
|
||||
dex ; puts $FF
|
||||
stx VIC_XSCAN ; disconnect the extra C128 keys
|
||||
}
|
||||
!ifdef CONFIG_KEYBOARD_C65 {
|
||||
!ifdef CONFIG_MB_M65 {
|
||||
dex ; puts $FF
|
||||
stx C65_EXTKEYS_PR ; disconnect the extra C65 keys
|
||||
stx C65_EXTKEYS_PR ; disconnect the extra C65 keys XXX test this
|
||||
}
|
||||
lda #$7F
|
||||
sta CIA1_PRA ; select the last row (bit to 0)
|
||||
|
||||
@@ -1223,7 +1223,6 @@ void DataSet::generateConfigDepStrings()
|
||||
// Keyboard support features
|
||||
|
||||
if (GLOBAL_ConfigOptions["KEYBOARD_C128"]) featureStr += "KBD 128\r";
|
||||
if (GLOBAL_ConfigOptions["KEYBOARD_C65"]) featureStr += "KBD 65\r";
|
||||
|
||||
// Add strings to appropriate list
|
||||
|
||||
|
||||
Reference in new issue
Block a user