Proper coding for Vsync or similar functionality
Posted: Thu Feb 13, 2020 8:27 pm
For my small assembler demo "bouncing lines" I need a Vsync or similar functionality to slow down the loop and get stable redraw of the screen.
I tried the described solution brought by https://www.chibiakumas.com/68000/sinclairql.php:
It works with Qemulator (however very notchy).
With a real QL it does not work at all regardless the ROM version (tested with Minerva and MGG).
What is the best way to solve it? How do/did this the guys in the games/demos (as a part of "game/demo loop")?
I tried the described solution brought by https://www.chibiakumas.com/68000/sinclairql.php:
Code: Select all
waitVBlank
move.b #%11111111,$18021 ;Clear interrupt bits
waitVBlankAgain
move.b $18021,d0 ;Read in interrupt state
tst.b d0 ;Wait for an interrupt
beq waitVBlankAgain
rts
With a real QL it does not work at all regardless the ROM version (tested with Minerva and MGG).
What is the best way to solve it? How do/did this the guys in the games/demos (as a part of "game/demo loop")?