Atari coding BBS
|Re: Screen addr update on Falcon|
Posted by: mikro
Just to update this old thread for future reference: when the video base address is updated, an immediate read will already show the new values. However those are applied, as mentioned on this and the linked thread, only after VBL ended.
What I wanted to add is that this value is not random, it is the exact vertical half-line specified by $FFFF82A8 (Vertical Display Begin). What, if you think about it, makes perfect sense.
joska's problem in the linked thread wasn't the fact that the video base address is applied immediately:
> I called Vsetscreen as soon as the frame was processed, and then waited for the VBL. If
> I switch this around my original code works perfectly fine, even when using Vsync().
As he also mentioned about his original method:
> VsetScreen(-1, logical, -1, -1);
> t = physical; physical = logical; logical = t;
> This works almost perfectly, but occasionally there are some glitches. Sometimes the
> screen will jump briefly, mostly vertically.
What I think was happening there was that he called VsetScreen (which writes to the video base address immediately, there is no wait for VBL) just in the moment when Videl was reloading the registers. So VsetScreen set the high byte ($ffff8201), reload at VDB line happened and then the rest (mid = $8203, low = $820d) was ignored. The next frame the address was set at a slightly different line so everything was OK again.
If you switch Vsync() and VsetScreen(), this can never happen because Vsync() will put the write to the video base address at the beginning of VBL, waaay before VDB happens.
[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.