home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / amiga / programm / 12851 < prev    next >
Encoding:
Internet Message Format  |  1992-08-29  |  2.3 KB

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