Code: Select all
label:
clr.l d0
Code: Select all
label:
clr.l d0
Well, the question would be "how exactly do you wait for vsyncs?". I guess if you use the "proper" method to do that (a polling task), it should behave identical on Q-Emulator and the real box.t0nyt wrote: Thu Feb 22, 2024 11:17 am I've been testing animating a character and using vsync waits to slow it down (else what should be a walking pace turns into Usain Bolt)
In the emulator (Q-emuLator both Mac/Windows) if I wait for 5 vsyncs to happen before each animation update I get the kind of animation speed I'm looking for
But when I then run the same binary on a BBQL the animation goes like the clappers
Is this expected behaviour with an Emulator vs Real Iron please?
Many thanks
No, unfortunately not. You need to link in a polling task, which will then be called from the systems internal interrupt service routine. MT.LPOLL is the trap to look for. Some people on the internet seem to be recommending other methods (like fiddling with the polling task list directly, starting from SV_PLIST, or even more obscure methods...), but that's definitely not the proper way to do it.Derek_Stewart wrote: Thu Feb 22, 2024 12:03 pm HI,
I am sure there is a System Variable to detect when the display raster scan has passed the display file and is lopping back to the top of the display memory.
I will have a look at some books I have, maybe the Advanced QL User Guide, QL Technical Manual, QDOS Companion.
Code: Select all
WAITVSYNC:
move.b #%11111111,$18021
WAITVSYNC2:
move.b $18021,d4
tst.b d4
beq.s WAITVSYNC2
rts
Yes, it does. All manager traps (MT.xxxx) with the exception of $4, $5, $8, $9, $a, $b (these call back into the scheduler) are guaranteed to work in SV mode. But as you only have to call MT.LPOLL once you can very well do this before you enter SV mode, so it's a bit irrelevant.t0nyt wrote: Thu Feb 22, 2024 12:22 pm A quick question though, does MT.LPOLL work in supervisor mode please?
I'm not using Supervisor mode yet, and maybe won't, but it's why I've been avoiding Traps etc.
Many thanks
Ok, many thankstofro wrote: Thu Feb 22, 2024 12:32 pmYes, it does. All manager traps (MT.xxxx) with the exception of $4, $5, $8, $9, $a, $b (these call back into the scheduler) are guaranteed to work in SV mode. But as you only have to call MT.LPOLL once you can very well do this before you enter SV mode, so it's a bit irrelevant.t0nyt wrote: Thu Feb 22, 2024 12:22 pm A quick question though, does MT.LPOLL work in supervisor mode please?
I'm not using Supervisor mode yet, and maybe won't, but it's why I've been avoiding Traps etc.
Many thanks