C128 keyboard fixes, initial C65 keyboard support

This commit is contained in:
FeralChild64 committed 2019-10-26 13:05:55 +02:00
1 parent 28d0fa5ecf
commit 15c71dcdeb
17 files changed
+252 -53

No files matched your search

+5 -2
View File
@@ -145,13 +145,16 @@
// Check if keyboard options are correct
{
#if CONFIG_LEGACY_SCNKEY && (CONFIG_KEYBOARD_C128 || CONFIG_KEYBOARD_C128_CAPS_LOCK)
.error "CONFIG_LEGACY_SCNKEY and CONFIG_KEYBOARD_C128* are mutually exclusive"
#if CONFIG_LEGACY_SCNKEY && (CONFIG_KEYBOARD_C128 || CONFIG_KEYBOARD_C128_CAPS_LOCK || CONFIG_KEYBOARD_C65 || CONFIG_KEYBOARD_C65_CAPS_LOCK)
.error "CONFIG_LEGACY_SCNKEY and CONFIG_KEYBOARD_C128* / CONFIG_KEYBOARD_C65* are mutually exclusive"
#endif
#if (CONFIG_MB_MEGA_65 || CONFIG_MB_ULTIMATE_64) && (CONFIG_KEYBOARD_C128 || CONFIG_KEYBOARD_C128_CAPS_LOCK)
.error "Selected CONFIG_MB_* is not compatible with CONFIG_KEYBOARD_C128*"
#endif
#if CONFIG_MB_ULTIMATE_64 && (CONFIG_KEYBOARD_C65 || CONFIG_KEYBOARD_C65_CAPS_LOCK)
.error "Selected CONFIG_MB_* is not compatible with CONFIG_KEYBOARD_C65*"
#endif
}
+11
View File
@@ -17,6 +17,17 @@
}
//
// Trick to skip a 2-byte instruction
//
.pseudocommand skip_2_bytes_trash_nvz
{
.byte $2C
}
//
// Stack manipulation - some CPUs will leave .A unchanged, some will use it as temporary storage, so consider .A trashed
//
+23 -12
View File
@@ -16,10 +16,14 @@
.const KEY_FLAG_SHIFT = %00000001
.const KEY_FLAG_VENDOR = %00000010
.const KEY_FLAG_CTRL = %00000100
.const KEY_FLAG_ALT = %00001000 // C65 / C128
.const KEY_CAPS_LOCK = %00010000 // C65 / C128
.const KEY_FLAG_NO_SCRL = %00100000 // C65 / C128, Open ROMs unofficial
#if CONFIG_KEYBOARD_C128 || CONFIG_KEYBOARD_C65
.const KEY_FLAG_ALT = %00001000
#if CONFIG_KEYBOARD_C128_CAPS_LOCK || CONFIG_KEYBOARD_C65_CAPS_LOCK
.const KEY_CAPS_LOCK = %00010000
#endif
.const KEY_FLAG_NO_SCRL = %00100000 // Open ROMs unofficial
#endif
// Note - the following PETSCII codes are currently unassigned, can be used for further extensions:
//
@@ -38,8 +42,10 @@
// PETSCII codes for certain C128 and C65 functionalities XXX implement these
.const KEY_BELL = $07 // C65 / C128, no key
.const KEY_ESC = $1B // C65 / C128
#if CONFIG_KEYBOARD_C128 || CONFIG_KEYBOARD_C65
.const KEY_BELL = $07 // no key, originally CTRL+G
.const KEY_ESC = $1B
#endif
// PETSCII codes for programmable keys
@@ -56,14 +62,18 @@
.const KEY_F7 = $8B
.const KEY_F8 = $8C
.const KEY_F9 = $10 // C65
.const KEY_F10 = $15 // C65
.const KEY_F11 = $16 // C65
.const KEY_F12 = $17 // C65
.const KEY_F13 = $19 // C65
.const KEY_F14 = $1A // C65
#if CONFIG_KEYBOARD_C65
.const KEY_F9 = $10
.const KEY_F10 = $15
.const KEY_F11 = $16
.const KEY_F12 = $17
.const KEY_F13 = $19
.const KEY_F14 = $1A
#endif
.const KEY_HELP = $84 // C65, also used for our C128 support
#if CONFIG_KEYBOARD_C128 || CONFIG_KEYBOARD_C65
.const KEY_HELP = $84 // normally C65 only, also used for our C128 support
#endif
// PETSCII codes for cursor keys
@@ -151,4 +161,5 @@
.const KEY_GT = $3E
.const KEY_QUESTION = $3F
// XXX finish this: $4x, $5x, $6x, $7x, $Ax, $Bx, $Cx, $Dx, $Ex, $Fx