Page 2 of 2

Re: Proper coding for Vsync or similar functionality

Posted: Fri Feb 14, 2020 7:22 am
by tofro
In case the code still doesn't sync, you're probably trying to do too much (or rather, spend too much time) in the blanking.

Tobias

Re: Proper coding for Vsync or similar functionality

Posted: Fri Feb 14, 2020 7:44 pm
by grafvonb
Hi guys, many thanks, my code with interrupts off and correct vsync (and after "no beer" review :lol:) works as expected!

Re: Proper coding for Vsync or similar functionality

Posted: Fri Feb 14, 2020 8:26 pm
by tofro
M68008 wrote:
Yes, this disables the interrupts. It's a good way to get all the processor time for your program.
With your vsync mechanism, this also prevents the OS from intercepting and clearing the interrupt before you detect it.

Avoid Minerva and use the MGG you have. It doesn't matter for now since you disable the OS, but it can cause problems if later you decide to call the OS for sound or reading the keyboard. See https://qemulator.blogspot.com/2013/04/ ... games.html.
The main problem I had with Minerva was that it doesn't like to talk to the IPC with interrupts disabled. It works for a while, then behaves erratically and dies - In the end, I stole the MT.IPCOM trap from SMSQ/E sources - that works fine.

Tobias