small optimization in keyboard code
This commit is contained in:
1 parent
4185eaf827
commit
8580a918e2
1 file changed
+7
-4
@@ -21,8 +21,8 @@ m65_scnkey:
|
|||||||
|
|
||||||
m65_scnkey_loop:
|
m65_scnkey_loop:
|
||||||
|
|
||||||
stx KBSCN_SELECT
|
stx $D614
|
||||||
lda KBSCN_PEEK
|
lda $D613
|
||||||
eor #$FF ; let bit 1 mean 'pressed', not the otherwise
|
eor #$FF ; let bit 1 mean 'pressed', not the otherwise
|
||||||
sta M65_KB_COLSCAN, x
|
sta M65_KB_COLSCAN, x
|
||||||
ora M65_KB_COLSUM
|
ora M65_KB_COLSUM
|
||||||
@@ -116,8 +116,7 @@ m65_scnkey_loop_2:
|
|||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
clc
|
adc M65_KB_PRESSED+0 ; Carry already cleared by ASL
|
||||||
adc M65_KB_PRESSED+0
|
|
||||||
sta M65_KB_PRESSED+0
|
sta M65_KB_PRESSED+0
|
||||||
|
|
||||||
bra m65_scnkey_loop_2
|
bra m65_scnkey_loop_2
|
||||||
@@ -184,3 +183,7 @@ m65_scnkey_no_key:
|
|||||||
; XXX
|
; XXX
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
m65_scnkey_is_new:
|
||||||
Reference in new issue
Block a user