A little newbie question adout changing the banks: I get how to change it pressing buttons, but I confused making a loop for it. I mean, I don't know how to loop switching like first goes Bank 1 then Bank 2, next Bank 3 and all over again from Bank 1 without any pressing buttons.
ReadStart:
lda $4016
and #%00000001
beq ReadStartDone
lda #$01
jsr Bankswitch
ReadStartDone:
Bankswitch:
tax
sta Bankvalues, x
rts
Bankvalues:
.db $00,$01,$02,$03 ; Numbers of banks
The last thing which I reached is where I press the start button, I change bank number by jumping to subroutine.
Code:
ReadStart:
lda $4016
and #%00000001
beq ReadStartDone
lda #$01
jsr Bankswitch
ReadStartDone:
Bankswitch:
tax
sta Bankvalues, x
rts
Bankvalues:
.db $00,$01,$02,$03 ; Numbers of banks
The last thing which I reached is where I press the start button, I change bank number by jumping to subroutine.