Search site Dead Hackers Society
Other BBSes »

Sillyventure 2018
Demoscene   º   Coding   º   CT60   º   Buy/sell   º   Misc/crap   º   Alive magazine   º   SNDH/Tracking

Atari coding BBS
Benefits of tripple buffering
Posted by: Simon Sunnyboy / Paradize Jul,08.2010-19:25 

Hello together,

today I was thinking if tripple buffering graphics may have an advantage.
I think Paranoid and earx already suggested using so....(yeah i'm reinventing the wheel) but I would like to explore the backgrounds of the technique a bit.

The idea is to have 3 logical screens

1 screen of those is shown (physical screen)
1 of the 3 screens is selected as the logical screen to draw onto

<- NOTE: NOT synced with VBL here
draw background to logic screen
draw sprites and objects to logic screen
set physical screen to set by next VBL interrupt to the current logic screen
update logic screen pointer for next drawing cycle to the next out of 3
continue at MAINLOOP

The VBL ISR interupts the loop at any time and sets the screen address to the one given
in the step "physical screen". The old address is kept unless changed from within the loop.

In theory, if drawing takes 1,5VBLs, at one time I will happen to draw faster so that one of my frames will get shown 1 VBL long only because the next one is already ready and its address set.

I wonder if this gives any advantages or disadvantages?

Just thinkering, no special application or game planned ;)


[All messages in this thread]

Topic Posted by  Date 
Benefits of tripple buffering Simon Sunnyboy / Paradize Jul,08.2010-19:25
  Re: Benefits of tripple buffering mikro Jul,08.2010-22:25
    Re: Benefits of tripple buffering neutrino Jul,09.2010-08:30
      Re: Benefits of tripple buffering Gizmo Jul,09.2010-11:18
        Re: Benefits of tripple buffering Simon Sunnyboy / Paradize Jul,10.2010-09:40

Reply to this message
Human verification (enter the text of the ASCII-art below):

   _   _   _   _  _  _        _  
 _|_ _|_ _|_ _|_ (_)  ) |_|_ / \ 
  |   |   |   |  (_) /_   |  \_/

© 1994-2018 Dead Hackers Society Contact: Anders Eriksson