more work on MEGA65 native keyboard scanner

This commit is contained in:
FeralChild64 committed 2020-12-02 17:53:12 +01:00
1 parent ddc9f10f32
commit 8c822f4464
9 files changed
+128 -22

No files matched your search

@@ -1,18 +1,20 @@
;; #LAYOUT# M65 KERNAL_0 #TAKE-FLOAT
;; #LAYOUT# M65 KERNAL_1 #TAKE-FLOAT
;; #LAYOUT# M65 KERNAL_C #TAKE
;; #LAYOUT# * * #IGNORE
;
; Definitions for communication with MEGA65 segment KERNAL_C from KERNAL_0
; Definitions for communication with MEGA65 segment KERNAL_C from KERNAL_0 / KERNAL_1
;
!ifdef SEGMENT_KERNAL_0 {
!ifndef SEGMENT_KERNAL_C {
; Label definitions
!addr VKC__m65_cursor_blink = $C000 + 2 * 0
!addr VKC__m65_scnkey = $C000 + 2 * 1
!addr VKC__m65_scnkey_init_keylog = $C000 + 2 * 2
} else {
@@ -20,4 +22,5 @@
!word m65_cursor_blink
!word m65_scnkey
!word m65_scnkey_init_keylog
}
+1
View File
@@ -30,6 +30,7 @@
;; #ALIAS# screen_check_toggle_quote = KERNAL_0.screen_check_toggle_quote
;; #ALIAS# screen_code_to_petscii = KERNAL_0.screen_code_to_petscii
;; #ALIAS# m65_scnkey_init_pressed = KERNAL_0.m65_scnkey_init_pressed
;; #ALIAS# scnkey_set_keytab = KERNAL_0.scnkey_set_keytab
;; #ALIAS# setup_irq_timer = KERNAL_0.setup_irq_timer
;; #ALIAS# wait_x_bars = KERNAL_0.wait_x_bars
+4
View File
@@ -10,4 +10,8 @@
;; #ALIAS# m65_scnkey_init_pressed = KERNAL_0.m65_scnkey_init_pressed
;; #ALIAS# scnkey_buffer_full = KERNAL_0.scnkey_buffer_full
;; #ALIAS# scnkey_toggle_if_needed = KERNAL_0.scnkey_toggle_if_needed
;; #ALIAS# kb_matrix_bucky_shflag = KERNAL_0.kb_matrix_bucky_shflag
;; #ALIAS# kb_matrix_alwaysrepeat = KERNAL_0.kb_matrix_alwaysrepeat
;; #ALIAS# __kb_matrix_alwaysrepeat_end = KERNAL_0.__kb_matrix_alwaysrepeat_end
+7
View File
@@ -25,6 +25,13 @@ m65_mode64:
jsr viciv_shutdown
jsr vicii_init
; Restore KEYLOG
lda #<scnkey_set_keytab
sta KEYLOG+0
lda #>scnkey_set_keytab
sta KEYLOG+1
; Switch CPU speed to normal
lda #$40
@@ -8,6 +8,16 @@ m65_native_meminit:
jsr m65_scnkey_init_pressed
lda VIC_CTRLA
pha
ora #%00100000
sta VIC_CTRLA
jsr (VKC__m65_scnkey_init_keylog)
pla
sta VIC_CTRLA
; Prepare generic DMAgic list
jsr m65_dmagic_init