Hi guys,
I've managed to build my first ROM, which is a 7 in 1 multi-cart menu. (I followed Nerdy Nights tutorial to get started).
So far, I have everything already implemented; the graphics are shown correctly and the indicator sprite moves up and down the correct amount of pixels when the corresponding button is pressed. I have one problem though; I want to add a delay so the sprite moves at a constant, controlled rate and not as quickly as it can (I hope I'm being clear), just as in the 64-in-1 cart and similar.
I tried maintaining a frame counter in memory so the sprite doesn't move if say, 4 frames have not passed since the last move... (I guess this is not the right way to do it). The sprite movement is delayed but the responsiveness is quite bad...
I have my controller polling routine in the NMI handler so it polls buttons once every frame.
Can you suggest me a better / optimal strategy to follow here?
Thanks in advance!
I've managed to build my first ROM, which is a 7 in 1 multi-cart menu. (I followed Nerdy Nights tutorial to get started).
So far, I have everything already implemented; the graphics are shown correctly and the indicator sprite moves up and down the correct amount of pixels when the corresponding button is pressed. I have one problem though; I want to add a delay so the sprite moves at a constant, controlled rate and not as quickly as it can (I hope I'm being clear), just as in the 64-in-1 cart and similar.
I tried maintaining a frame counter in memory so the sprite doesn't move if say, 4 frames have not passed since the last move... (I guess this is not the right way to do it). The sprite movement is delayed but the responsiveness is quite bad...
I have my controller polling routine in the NMI handler so it polls buttons once every frame.
Can you suggest me a better / optimal strategy to follow here?
Thanks in advance!