Waiting routine in assembly
Moderator: Moderators
-
- Vic 20 Newbie
- Posts: 1
- Joined: Wed Apr 24, 2019 5:05 am
Waiting routine in assembly
I am stuck with a problem. In my game, which I write in assembler, I have to slow down the speed, which is also flexible. However, this routine sometimes interferes with the joystick query. How can I solve this without interrupt?
- J.E.E.K.
- Vic 20 Drifter
- Posts: 23
- Joined: Wed Jan 25, 2017 12:31 pm
- Website: http://klasek.at/8bit
- Location: AT
Re: Waiting routine in assembly
In case you are using a delay routine which only burns cpu cycles it might be better to put the joytick query into the loop, optional with a condition to temporarily leave the loop as soon as a joystick action is recognized (at least to store the joystick state for later movements) ... Simply to prevent some reaction lag for joystick movements during delay loops. Just an idea ...Programmer wrote: ↑Wed Apr 24, 2019 5:11 am I am stuck with a problem. In my game, which I write in assembler, I have to slow down the speed, which is also flexible. However, this routine sometimes interferes with the joystick query. How can I solve this without interrupt?
Re: Waiting routine in assembly
yes J.E.E.K, show the source code
Valid rule today as earlier: 1 Byte = 8 Bits
-._/classes instead of masses\_.-
-._/classes instead of masses\_.-
Re: Waiting routine in assembly
the most common way to do this is to set up an interrupt (synced to the screen refresh might be a good idea), and then have a frame counter. once you have that, you can use the frame counter to make things happen every Nth frame
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.