initial support for Mega65 extra ROM

This commit is contained in:
FeralChild64 committed 2020-01-10 22:03:10 +01:00
1 parent 7539c6b072
commit 4d56864327
333 files changed
+1747 -289

No files matched your search

+4
View File
@@ -1,3 +1,4 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Keyboard part of the CHRIN routine
@@ -170,3 +171,6 @@ chrin_programmable_key:
bne !- // jumps always
#endif // CONFIG_PROGRAMMABLE_KEYS
#endif // ROM layout
@@ -1,3 +1,4 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Well-known Kernal routine, described in:
@@ -28,3 +29,6 @@ getin_keyboard: // XXX confirm that here is really a part of GETIN!
clc
rts
#endif // ROM layout
+7 -3
View File
@@ -1,16 +1,17 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Official Kernal routine, described in:
//
// - [RG64] C64 Programmer's Reference Guide - page 301
// - [CM64] Compute's Mapping the Commodore 64 - page 232
// - [RG64] C64 Programmers Reference Guide - page 301
// - [CM64] Computes Mapping the Commodore 64 - page 232
//
// CPU registers that has to be preserved (see [RG64]): .Y
//
STOP:
// Bit 7 of STKEY contains the state of the STOP key
// (Compute's Mapping the 64, p27)
// (Computes Mapping the 64, p27)
// BASIC checks carry flag to indicate STOP or not
lda STKEY
@@ -26,3 +27,6 @@ stop_pressed:
sec
lda #$00
rts
#endif // ROM layout
+6 -2
View File
@@ -1,9 +1,10 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Keyboard matrix, based on
//
// - [RG64] C64 Programmer's Reference Guide - pages 379-381
// - [CM64] Compute's Mapping the Commodore 64 - pages 38-39
// - [RG64] C64 Programmers Reference Guide - pages 379-381
// - [CM64] Computes Mapping the Commodore 64 - pages 38-39
// - http://commodore128.mirkosoft.sk/keyboard.html (C128 extension)
// - http://www.zimmers.net/cbmpics/cbm/c65/c65manual.txt
@@ -58,3 +59,6 @@ __kb_matrix_ctrl:
#endif
.byte $1C,$00,$1D,$00,$00,$1F,$1E,$00
.byte $90,$06,$00,$05,$00,$00,$11,$00
#endif // ROM layout
+5 -1
View File
@@ -1,8 +1,9 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Extended keyboard matrix for Commodore 128 keyboards, based on
//
// - [CM128] Compute's Mapping the Commodore 128 - page 290
// - [CM128] Computes Mapping the Commodore 128 - page 290
// - http://commodore128.mirkosoft.sk/keyboard.html
//
@@ -28,3 +29,6 @@ kb_matrix_128_bucky_filter:
#endif // CONFIG_KEYBOARD_C128 and no CONFIG_LEGACY_SCNKEY
#endif // ROM layout
+4
View File
@@ -1,3 +1,4 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Extended keyboard matrix for Commodore 65 keyboards, based on
@@ -19,3 +20,6 @@ kb_matrix_65_shifted:
#endif // CONFIG_KEYBOARD_C65 and no CONFIG_LEGACY_SCNKEY
#endif // ROM layout
+5 -1
View File
@@ -1,9 +1,10 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Matrix ids of keys which should be repeated regardless of RPTFLG
//
// Values based on:
// - [CM64] Compute's Mapping the Commodore 64 - page 58
// - [CM64] Computes Mapping the Commodore 64 - page 58
//
@@ -21,3 +22,6 @@ __kb_matrix_alwaysrepeat_end:
#endif // no CONFIG_LEGACY_SCNKEY and no CONFIG_KEY_REPEAT_ALWAYS
#endif // ROM layout
+6 -2
View File
@@ -1,10 +1,11 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Matrix for retrieving bucky key status on the C64 keyboard
//
// Values based on:
// - [CM64] Compute's Mapping the Commodore 64 - pages 58 (SHFLAG), 173 (matrix)
// - [CM128] Compute's Mapping the Commodore 128 - pages 212 (SHFLAG), 290 (matrix)
// - [CM64] Computes Mapping the Commodore 64 - pages 58 (SHFLAG), 173 (matrix)
// - [CM128] Computes Mapping the Commodore 128 - pages 212 (SHFLAG), 290 (matrix)
// - https://github.com/MEGA65/c65-specifications/blob/master/c65manualupdated.txt
//
@@ -83,3 +84,6 @@ kb_matrix_bucky_shflag: // mask to be ORed to SHFLAG to mark key status
#endif // no CONFIG_LEGACY_SCNKEY
#endif // ROM layout
+5 -1
View File
@@ -1,9 +1,10 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Matrix for filtering out bucky keys while scanning the C64 keyboard
//
// Values based on:
// - [CM64] Compute's Mapping the Commodore 64 - pags 58 (SHFLAG), 173 (matrix)
// - [CM64] Computes Mapping the Commodore 64 - pags 58 (SHFLAG), 173 (matrix)
//
@@ -25,3 +26,6 @@ kb_matrix_bucky_filter:
#endif // no CONFIG_LEGACY_SCNKEY
#endif // ROM layout
+4
View File
@@ -1,3 +1,4 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Matrix for retrieving C64 joystick status and inject is as keyboard event
@@ -36,3 +37,6 @@ kb_matrix_joy_keytab_hi:
.byte >__kb_matrix_normal // right
#endif
#endif // ROM layout
+4
View File
@@ -1,3 +1,4 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Helper table for determining keyboard matrix decoding table on the C64 keyboard
@@ -21,3 +22,6 @@ kb_matrix_lookup:
.byte $FF // %111 SHIFT+VENDOR+CTRL
#endif
#endif // ROM layout
@@ -1,3 +1,4 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Work out if normal, shifted, control or Vendor modified keyboard.
@@ -26,3 +27,6 @@ kb_matrix_lookup:
.byte $80 // Vendor + CTRL + SHIFT
#endif // CONFIG_LEGACY_SCNKEY
#endif // ROM layout
+5 -1
View File
@@ -1,9 +1,10 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Single row key codes for scanning the C64 keyboard
//
// Values based on:
// - [CM64] Compute's Mapping the Commodore 64 - pags 58 (SHFLAG), 173 (matrix)
// - [CM64] Computes Mapping the Commodore 64 - pags 58 (SHFLAG), 173 (matrix)
//
@@ -27,3 +28,6 @@ kb_matrix_row_keys:
#endif // no CONFIG_LEGACY_SCNKEY
#endif // ROM layout
@@ -1,3 +1,4 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Helper values to quickly determine row offset from the start of keyboard matrix
@@ -21,3 +22,6 @@ kb_matrix_row_offsets:
.byte 7*8
#endif // no CONFIG_LEGACY_SCNKEY
#endif // ROM layout
@@ -1,3 +1,4 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Helper routine - disconnects the keyboard from CIA1_PRB,
@@ -20,3 +21,6 @@ keyboard_disconnect:
#endif
#endif // ROM layout
@@ -1,3 +1,4 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
// Pop key out of keyboard buffer
// Disable interrupts while reading from keyboard buffer
@@ -20,3 +21,6 @@ pop_keyboard_buffer:
cli
rts
#endif // ROM layout
+4
View File
@@ -1,3 +1,4 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Command string definitions for programmable keys
@@ -123,3 +124,6 @@ programmable_keys_offsets:
#endif // CONFIG_PROGRAMMABLE_KEYS
#endif // ROM layout
+6 -2
View File
@@ -1,9 +1,10 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Official Kernal routine, described in:
//
// - [RG64] C64 Programmer's Reference Guide - page 295
// - [CM64] Compute's Mapping the Commodore 64 - page 220
// - [RG64] C64 Programmers Reference Guide - page 295
// - [CM64] Computes Mapping the Commodore 64 - page 220
//
// CPU registers that has to be preserved (see [RG64]): none
//
@@ -488,3 +489,6 @@ via_keylog:
#endif // no CONFIG_LEGACY_SCNKEY
#endif // ROM layout
+5 -1
View File
@@ -1,8 +1,9 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Keyboard scanning routine extension for C128 keyboards
//
// - [CM128] Compute's Mapping the Commodore 128 - pages 212 (SHFLAG), 290 (matrix)
// - [CM128] Computes Mapping the Commodore 128 - pages 212 (SHFLAG), 290 (matrix)
//
@@ -65,3 +66,6 @@ scnkey_128_no_keys:
#endif // CONFIG_KEYBOARD_C128 and no CONFIG_LEGACY_SCNKEY
#endif // ROM layout
+5 -1
View File
@@ -1,8 +1,9 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Keyboard scanning routine extension for C65 keyboards
//
// - [CM128] Compute's Mapping the Commodore 128 - pages 212 (SHFLAG)
// - [CM128] Computes Mapping the Commodore 128 - pages 212 (SHFLAG)
// - https://github.com/MEGA65/c65-specifications/blob/master/c65manualupdated.txt (matrix)
//
@@ -63,3 +64,6 @@ scnkey_65_done:
#endif // CONFIG_KEYBOARD_C65 and no CONFIG_LEGACY_SCNKEY
#endif // ROM layout
+6 -2
View File
@@ -1,9 +1,10 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Official Kernal routine, described in:
//
// - [RG64] C64 Programmer's Reference Guide - page 295
// - [CM64] Compute's Mapping the Commodore 64 - page 220
// - [RG64] C64 Programmers Reference Guide - page 295
// - [CM64] Computes Mapping the Commodore 64 - page 220
//
// CPU registers that has to be preserved (see [RG64]): none
//
@@ -527,3 +528,6 @@ KeyRepeatWait:
#endif // CONFIG_LEGACY_SCNKEY
#endif // ROM layout
+5 -1
View File
@@ -1,8 +1,9 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Well-known Kernal routine, described in:
//
// - [CM64] Compute's Mapping the Commodore 64 - pages 220, 221
// - [CM64] Computes Mapping the Commodore 64 - pages 220, 221
//
@@ -79,3 +80,6 @@ scnkey_toggle_if_needed: // entry for SCNKEY (TWW/CTR version)
sta VIC_YMCSB
!:
rts
#endif // ROM layout
+4
View File
@@ -1,3 +1,4 @@
#if ROM_LAYOUT_STD || (ROM_LAYOUT_M65 && SEGMENT_KERNAL_0)
//
// Keyboard part of the UDTIM routine, has to preserve .Y
@@ -48,3 +49,6 @@ udtim_keyboard:
// unable to, for example, read the space bar status.
rts
#endif // ROM layout