Dead Hackers Society
Other BBSes »
 
 
Demoscene  Coding  CT60  Buy/sell

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]

Topic Posted by  Date 
falcon double vbl bug Orion_ Jan,06.2013-16:37
  Re: falcon double vbl bug ggn Jan,06.2013-20:56
    Re: falcon double vbl bug Orion_ Jan,06.2013-22:48
      Re: falcon double vbl bug Thadoss Jan,08.2013-01:47
        Re: falcon double vbl bug AdamK Jan,08.2013-09:47
        Re: falcon double vbl bug evil Jan,08.2013-16:20
          Re: falcon double vbl bug ggn Jan,08.2013-18:34
            Re: falcon double vbl bug Orion_ Jan,09.2013-18:51
              Re: falcon double vbl bug evil Jan,09.2013-19:58


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

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.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson