We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae72c50 commit 95c9e40Copy full SHA for 95c9e40
src/nmi/pollkeyboard.asm
@@ -39,6 +39,12 @@
39
40
; Note that Family BASIC never writes to $4016 with bit 2 clear, there is no need to disable the keyboard matrix.
41
42
+kbReadWait:
43
+ ldy #$09
44
+@avoidParasiticCapacitance: ; wait approx 50 cycles after advancing rows
45
+ dey
46
+ bne @avoidParasiticCapacitance
47
+ rts
48
49
pollKeyboard:
50
ldx #$00
@@ -49,15 +55,13 @@ pollKeyboard:
55
@rowLoop:
56
lda #KB_COL_0
51
57
sta JOY1
52
- ldy #$0A
53
-@avoidParasiticCapacitance: ; wait approx 50 cycles after advancing rows
54
- dey
- bne @avoidParasiticCapacitance
58
+ jsr kbReadWait
59
lda JOY2_APUFC
60
and #KB_MASK
61
sta generalCounter
62
lda #KB_COL_1
63
64
65
66
67
lsr
0 commit comments