Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!CORY.BERKELEY.EDU!dillon From: dillon@CORY.BERKELEY.EDU (Matt Dillon) Newsgroups: comp.sys.amiga Subject: Re: Rapid Stimulus Displaying on the Amiga Help. Solution Message-ID: <8704200221.AA03819@cory.Berkeley.EDU> Date: Sun, 19-Apr-87 21:21:03 EST Article-I.D.: cory.8704200221.AA03819 Posted: Sun Apr 19 21:21:03 1987 Date-Received: Sun, 19-Apr-87 23:46:00 EST Sender: daemon@ucbvax.BERKELEY.EDU Lines: 41 Use a two plane screen, then render bitmap A into plane 1, and bitmap B into plane 2 . The idea is that then all you need to do to switch bitmaps is set the color registers: plane: 2 1 color register 0 0 0 always background color 0 1 1 depends 1 0 2 depends 1 1 3 doesn't matter Step 1: Set all color registers to background color Step 2: Render bitmap A into plane 1 Render bitmap B into plane 2 (user still sees background color) Remember that when you do a SetRGB4(), the new colors don't take effect until the vertical retrace gets back to the top (and the Copper reloads the color registers). Step 3: WaitTOF(), set register 1 = COLOR, 2 = BACKGROUND (user still sees background since you missed the copper reload) Step 4: WaitTOF(), set register 1 = BACKGROUND, 2 = COLOR Here, the copper had just loaded 1 = COLOR, 2 = BACKGROUND, so the user sees plane 1. On the next retrace, the user will see plane 2. Step 5: WaitTOF(), set register 1 = COLOR, 2 = BACKGROUND Again, even though you're using SETRGB4() to set the color, it happens AFTER the copper has loaded the color registers. continue this way until done. The real neat thing about this method of doing things is that your process has an entire 1/60th of a second after the WaitTOF() returns to make the changes to the colormap with SetRGB4(). Needless to say, this means you can run the program without a Forbid()/Permit(). -Matt