|
Atari coding BBS
Re: falcon double vbl bug |
Posted by: ggn
|
Jan,06.2013-20:56
|
Once I took apart twinsync.tos to see how the problem is fixed. It boiled down to changing the VBR (vector base register) to point to his own set of vectors in ram (i.e. not the usual $0-$140 address space). Every other vector except the VBL would simply jump at the original vector, except for the VBL where it would jump to the VBL routine every other time it is called.
That's the really system friendly and scientific approach about it! In your code you can just simply skip the vbl code one in two times.
I had an idea on how to detect this, but I didn't have the time to implement it. Quite simple really: grab the 200hz system clock ($4ba), wait for a few vertical blanks (let's say 10?), get the value of $4ba again, and divide their difference by 4. If the number you get is close to the number of vertical blanks then you don't have the twinsync problem, otherwise apply the method in the above paragraph. (disclaimer: I never tested this but it should work! Let me know what happens if you try it :))
|
[All messages in this thread] [Start new thread]
What's the anti-troll code? That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
|