home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!utcsri!geac!censor!comspec!nsq!entity
- From: entity@nsq.uucp (cybernetworx)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Double buffering and flicker..
- Keywords: WaitBOVP() and WaitTOF()...
- Message-ID: <303@nsq.uucp>
- Date: 28 Aug 92 21:08:00 GMT
- References: <mcuddy.714894318@fensende>
- Organization: NSQ
- Lines: 33
-
- In article <mcuddy.714894318@fensende>, mcuddy@fensende.Rational.COM (Mike Cuddy) writes:
- > I've got some double buffer routines that I'm putting the final touches
- > on, but I can't seem to grok what's wrong with the page-flip routine:
- > In short, I'm using 'view-swapping' (i.e.: two copper lists, one view, and
- > LoadView()), and just before I do the LoadView(), I do a WaitTOF().
- > Unfortunately, when I do this, the double buffering flickers like mad!
- > (The graphics can't be seen while they're being drawn, so I know I'm
- > drawing on the right page...)
- >
- > The catch is, when I use WaitBOVP() with the last ViewPort in my view,
- > everything works fine. But, according to the RKM, WaitBOVP() busy waits,
- > and that's bad. (I'm trying to be system friendly!)
-
- I think what's happening is that the WaitTOF() signals your task at the top of
- the frame and when you stuff in the copperlist it's already started the
- original one. Maybe a simple strobe of the copjmp1 register when you install
- your copperlist might work. Then again, perhaps LoadView() already does
- this.. doesn't hurt to try though.
-
- Alternatively you can get the effect of WaitBOVP() WITHOUT it's stupid busy
- wait. What you do is set up a wait at scanline $f4 or whatever in your
- copperlist and follow this with setting the copper interrupt bit.
-
- Then you can have a level 3 interrupt going which checks to see if a copper
- interrupt was generated and sets the copperlist directly here. I don't know
- if you can execute LoadView() from an interrupt. Assuming you can't then you
- could a) set the copperlist yourself [not so nice] or b) signal your task
- which will then wake up and do the LoadView(). Since this happens BEFORE the
- TOF, the proper list will execute the following frame.
-
- MAKE SURE YOU CHECK WHAT INTERRUPT REQUEST WAS COMING THROUGH IN YOUR LEVEL 3
- INTERRUPT CODE!!! (since it can be generated by VB, copper or blitter!) Also
- make sure you clear the request so that it doesn't keep popping back in.
-