English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 16 May 2011, 20:29   #1
dalton
tulou
 
dalton's Avatar
 
Join Date: Jun 2006
Location: Gothenburg / Sweden
Posts: 88
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  
Old 16 May 2011, 21:37   #2
Kalms
Registered User
 
Join Date: Nov 2006
Location: Stockholm, Sweden
Posts: 237
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, 07:09   #3
dalton
tulou
 
dalton's Avatar
 
Join Date: Jun 2006
Location: Gothenburg / Sweden
Posts: 88
nice, thanks!
dalton is offline  
 


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

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

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 17:58.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.06359 seconds with 13 queries