English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 16 May 2011, 21:29   #1
dalton
tulou
dalton's Avatar
 
Join Date: Jun 2006
Location: Gothenburg / Sweden
Posts: 64
flawless double buffering

When using a double buffered screen, you typically store the bitplane pointers in an intermediate buffer in memory and then copy them to the custom registers on vblank.

The problem with this approach is that sometimes vblank will occur while you are creating the intermediate buffer, so that it is inconsistent when copied to the custom regs causing the screen to flicker.

Is there some way of preventing vblank from occuring during a critical section of code? I dont think disabling it is an option, as that would cause the pointers not to be written. Ideally I would like to postpone it just a little
dalton is offline  
AdSense AdSense  
Old 16 May 2011, 22:37   #2
Kalms
Registered User
 
Join Date: Nov 2006
Location: Stockholm, Sweden
Posts: 163
You can accomplish this either by raising the IPL in SR, or by temporarily masking out the VERTB bit in INTENA.

If the vblank event occurs during this specific period of time, the VERTB bit will get set in INTREQ. Then, when you restore the IPL (or the VERTB bit in INTENA), the VERTB interrupt will immediately trigger.

So you won't miss any VERTB events by doing this. Note that if you have a custom level3 handler and support VERTB/BLIT/COPER, your lev3 handler should only acknowledge (clear) flags in INTREQ for exactly those handlers that you run. Don't always acknowledge VERTB|BLIT|COPER by default - then you will occasionally miss out on interrupts.
Kalms is offline  
Old 17 May 2011, 08:09   #3
dalton
tulou
dalton's Avatar
 
Join Date: Jun 2006
Location: Gothenburg / Sweden
Posts: 64
nice, thanks!
dalton is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
No-buffering display mode with zero screen tearing, the next step? Dr.Venom support.WinUAE 87 22 January 2012 19:08
Triple buffering atchoo support.WinUAE 29 30 November 2011 12:58
lha buffering source support.Apps 7 18 July 2011 17:53
AGA double buffering using ChangeScreenBuffer() NovaCoder Coders. General 1 03 November 2010 01:34
Double PAL / Double NTSC, oficially supported by WHDLoad... Shoonay project.WHDLoad 1 17 December 2005 18:05

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 21:20.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.12125 seconds with 12 queries