How do you typically control the play speed of the main loop? I mean if you just put:
and then place your controller code to just move around a sprite or something it will go ridiculously fast. I've always used a 'timer' mechanism to control the speed of the game play:
In my main loop I have:
At the end of Main it resets Timer to equal 0.
In the NMI I have:
This effectively controls the play speed but is this the most common method or do you use something better?
Code:
Main:
; Some code
JMP Main
; Some code
JMP Main
and then place your controller code to just move around a sprite or something it will go ridiculously fast. I've always used a 'timer' mechanism to control the speed of the game play:
In my main loop I have:
Code:
LDA Timer
BEQ MainDone
BEQ MainDone
At the end of Main it resets Timer to equal 0.
In the NMI I have:
Code:
LDA #$01
STA Timer
STA Timer
This effectively controls the play speed but is this the most common method or do you use something better?