log in | register | forums
Show:
Go:
Forums
Username:

Password:

User accounts
Register new account
Forgot password
Forum stats
List of members
Search the forums

Advanced search
Recent discussions
- Elsear brings super-fast Networking to Risc PC/A7000/A7000+ (News:)
- Latest hardware upgrade from RISCOSbits (News:)
- RISC OS London Show Report 2024 (News:1)
- Announcing the TIB 2024 Advent Calendar (News:1)
- Code GCC produces that makes you cry #12684 (Prog:39)
- RISCOSbits releases a new laptop solution (News:)
- Rougol November 2024 meeting on monday (News:)
- Drag'n'Drop 14i1 edition reviewed (News:)
- WROCC November 2024 talk o...ay - Andrew Rawnsley (ROD) (News:2)
- October 2024 News Summary (News:3)
Latest postings RSS Feeds
RSS 2.0 | 1.0 | 0.9
Atom 0.3
Misc RDF | CDF
 
View on Mastodon
@www.iconbar.com@rss-parrot.net
Site Search
 
Article archives
Acorn Arcade forums: Programming: Screen bank switching and VSync
 
  Screen bank switching and VSync
  Alan B (08:22 10/10/2005)
  tribbles (08:50 10/10/2005)
 
Alan Buckley Message #86424, posted by Alan B at 08:22, 10/10/2005
AA refugee
Posts: 8
I seem to have become confused about screen banking and waiting for VSync. The code I used to use waited for the VSync and then swapped the screens on the principle that the screen would be swapped during the retrace. This now seems to give a lot of flicker on my Iyonix.
Searching on Google groups seemed to imply I should be doing it the other way around as the screen memory pointers are swapped on the refresh (I think). There also seems to be a cache involved on RISC OS 4.
Can anyone give me the definative code to use that will work correctly for all versions of RISC OS from 3.5 onwards?
  ^[ Log in to reply ]
 
Jason Tribbeck Message #86425, posted by tribbles at 08:50, 10/10/2005, in reply to message #86424
tribbles
Captain Helix

Posts: 929
I always used to get confused by this.

Using OS_Byte 112/113 or OS_Word 22 (or is it 21?) sets the display for the /next/ vsync, so you should do it before doing the OS_Byte 19.

I do this on ArcCommand and Equinox (as well as some other things).

Not sure about the cache - although I have had a problem where it appears as though the write buffer when faced with two writes to the same word writes them in the wrong order. I say appears to - it's certainly the effect I'm seeing. I haven't isolated that problem yet (and it only seems to affect one person, or if I'm in debug mode [no screen bank switching]), so if anyone else has an idea, I'd be interested too!

[Edited by tribbles at 09:51, 10/10/2005]

  ^[ Log in to reply ]
 

Acorn Arcade forums: Programming: Screen bank switching and VSync