more C128 keyboard support tweaks
This commit is contained in:
1 parent
6e38c8a4b9
commit
58daf2a553
4 files changed
+17
-8
No files matched your search
@@ -123,9 +123,9 @@ Needs about 130 bytes more space in KERNAL segment. If unsure - disable.
|
||||
|
||||
### `CONFIG_KEYBOARD_C128_CAPS_LOCK`
|
||||
|
||||
If C128 keyboard support is selected, allows to additionally support it's CAPS LOCK keys. Support is C64-safe (there is a protection against false-positive reading on the C64).
|
||||
Allows to use CAPS LOCK key on the C128 keyboard, this is independent from `CONFIG_KEYBOARD_C128`. Support is C64-safe (there is a protection against false-positive reading on the C64).
|
||||
|
||||
Needs about 47 bytes more space in KERNAL segment.
|
||||
Needs about 50 bytes more space in KERNAL segment. If unsure - disable.
|
||||
|
||||
### `CONFIG_KEY_REPEAT_DEFAULT`
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
// #define CONFIG_LEGACY_SCNKEY
|
||||
#define CONFIG_KEYBOARD_C128
|
||||
// #define CONFIG_KEYBOARD_C128_CAPS_LOCK
|
||||
#define CONFIG_KEYBOARD_C128_CAPS_LOCK
|
||||
// #define CONFIG_KEY_REPEAT_DEFAULT
|
||||
#define CONFIG_KEY_REPEAT_ALWAYS
|
||||
#define CONFIG_KEY_FAST_SCAN
|
||||
|
||||
@@ -121,9 +121,6 @@
|
||||
#if CONFIG_LEGACY_SCNKEY && CONFIG_KEYBOARD_C128
|
||||
.error "CONFIG_LEGACY_SCNKEY and CONFIG_KEYBOARD_C128 are mutually exclusive"
|
||||
#endif
|
||||
#if CONFIG_KEYBOARD_C128_CAPS_LOCK && !CONFIG_KEYBOARD_C128
|
||||
.error "CONFIG_KEYBOARD_C128_CAPS_LOCK requires CONFIG_KEYBOARD_C128"
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -58,6 +58,9 @@ SCNKEY:
|
||||
|
||||
// First check if this is really a C128 - to avoid false positive
|
||||
lda #$00
|
||||
#if !CONFIG_KEYBOARD_C128
|
||||
tax
|
||||
#endif
|
||||
sta VIC_XSCAN
|
||||
lda #$FF
|
||||
cmp VIC_XSCAN
|
||||
@@ -71,6 +74,10 @@ SCNKEY:
|
||||
sta SHFLAG
|
||||
!:
|
||||
|
||||
#if !CONFIG_KEYBOARD_C128
|
||||
stx VIC_XSCAN // disconnect C128 keys if no C128 keyboard is supported
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
ldy #(__kb_matrix_bucky_confmask_end - kb_matrix_bucky_confmask - 1)
|
||||
@@ -297,6 +304,8 @@ scnkey_output_key:
|
||||
// !:
|
||||
// lda KEY_TAB_BW // bne scnkey_got_petscii if CAPS LOCK is handled
|
||||
|
||||
#endif // CONFIG_KEYBOARD_C128_CAPS_LOCK
|
||||
|
||||
#if CONFIG_KEYBOARD_C128_CAPS_LOCK
|
||||
|
||||
// Check if we need special handling for a CAPS LOCK key
|
||||
@@ -304,7 +313,10 @@ scnkey_output_key:
|
||||
|
||||
scnkey_handle_caps_lock:
|
||||
|
||||
tax
|
||||
#if !CONFIG_KEYBOARD_C128
|
||||
lda (KEYTAB), y
|
||||
#endif
|
||||
tax
|
||||
lda SHFLAG
|
||||
and #(%00000111 + KEY_CAPS_LOCK)
|
||||
cmp #KEY_CAPS_LOCK
|
||||
@@ -324,7 +336,7 @@ scnkey_handle_caps_lock:
|
||||
|
||||
#endif // CONFIG_KEYBOARD_C128_CAPS_LOCK
|
||||
|
||||
#else
|
||||
#if !CONFIG_KEYBOARD_C128 && !CONFIG_KEYBOARD_C128_CAPS_LOCK
|
||||
|
||||
lda (KEYTAB), y
|
||||
|
||||
|
||||
Reference in new issue
Block a user