Read from joypad

This commit is contained in:
Greg Shuflin 2022-06-15 11:30:27 -07:00
parent 8f947ae232
commit f1d3f2f6b6

View File

@ -85,6 +85,20 @@ start:
sta VMDATAL
stz VMDATAH
; Show bg1
lda #%00000001
sta TM
lda #$0f
sta INIDISP
lda #$01
sta NMITIMEN
mainloop:
lda JOY1H
bit #%00000100 ; Down button
beq down_not_pressed
; write tile 2 to position (4, 8)
TILE_X2= 4
TILE_Y2= 8
@ -93,14 +107,9 @@ start:
lda #$02
sta VMDATAL
stz VMDATAH
down_not_pressed:
; Show bg1
lda #%00000001
sta TM
lda #$0f
sta INIDISP
bra mainloop
busywait:
bra busywait