Path: utzoo!attcan!uunet!microsoft!brianw From: brianw@microsoft.UUCP (Brian Willoughby) Newsgroups: comp.sys.apple Subject: Re: Page flipping Summary: II+ software page flip & Mega speed Message-ID: <12375@microsoft.UUCP> Date: 19 Mar 89 02:04:56 GMT References: <8903141654.aa28044@SMOKE.BRL.MIL> Organization: Microsoft Corp., Redmond WA Lines: 50 In article <8903141654.aa28044@SMOKE.BRL.MIL>, PGOETZ@LOYVAX.BITNET writes: > Page flipping helps, but on the ][+ it can cause the undesirable split > effect when you flip while the raster beam is in the vertical middle of your > character. Only on the ][e (and presumable ][c, ][gs) can you do page- > flipping right, since it provides you with information on when the electron > gun is doing a vertical blank (going back to start at the top again). > > Phil Goetz That may seem to be true from the hardware viewpoint, but if you check in the _Enhancing Your Apple Vol. II_ (which is often on bargain shelves in bookstores), there is a software method that will work on all Apple IIs. Because of the way video shares memory with the 6502 by reading between each processor access, you can look back at the video bus by reading an unused I/O location. This software trick (used very well in the game 'Karateka') stores id values in the unused areas of the HiRes screen. You remember the 8 byte groups that follow the last third of the graphics scan lines? These aren't displayed, but they are read by the video generator to guarantee RAM refresh. By accessing an unused address from $C000-$C07F, you can actually read the byte last fetched by the video. Then you look for the signature id bytes which indicate that you are in verticle blanking. If you want to know this technique, then try reading that book! On a related note. Many netters have asked why the GS must slow down to access the graphics memory. Some suspect that the Mega chip must run at the original Apple's 1 MHz. Actually, the constricting factor is that the video display fetches bytes at a rate of 1 MHz in all screen modes. To keep these same screen modes, a GS must access video memory between these fetches. On the original II, the RAM was actually being accessed at 2 MHz! I don't think that the GS suffers too much from the slowdown, since every other computer on the market must slow down to access video memory. The Amiga and original Mac only have one bank of memory, so all accesses to this bank must be slowed to squeeze between the video updates. The Mac SE improves this with 32 bit memory, making 3 processor accesses per video access. The Mac II's and Mac SE/30 have multiple RAM areas so that program memory accesses don't have to be slowed down. This is similar to the accelerated II computers. But even the Mac II has to slow down when accessing video memory because it is stored across thet NuBus, which isn't as fast as direct 68000 bus memory. The Amiga can be expanded with program only RAM off the side 68000 bus port, but few people take advantage of the higher speed this offers. I don't even want to start on the subject of how the many PC video boards can really slow down the clone machines' accesses to video RAM. You have to pay a high price for the faster PC video boards. Most 20 MHz PCs are not created equal when you compare the amount of time waiting for video updates. Comments welcome, Brian Willoughby microsoft!brianw@uunet.UU.NET or uw-beaver!microsoft!brianw or just microsoft!brianw