Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uwmcsd1!ig!agate!ucbvax!CORY.BERKELEY.EDU!dillon From: dillon@CORY.BERKELEY.EDU (Matt Dillon) Newsgroups: comp.sys.amiga Subject: Re: EGA/VGA (was Re: Silver (was Re: Amiga 2000 has been swapped)) Message-ID: <8809242129.AA14456@cory.Berkeley.EDU> Date: 24 Sep 88 21:29:43 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 53 :In article, mp1u+@andrew.cmu.edu (Michael Portuesi) writes: :> The way the problem with VGA was explained to me, it is possible to memory map :> the *first* bitplane of display. Accessing any further bitplanes require the :> bogus gymnastics detailed . . . :> :> Michael Portuesi / Information Technology Center / Carnegie Mellon University : :Actually, in the 256 color modes (mode 0x13 in the IBMer, and several in the :better clone cards) the memory map is a 1-byte per pixel mode where I/O is :no longer necessary except to skip to other "pages" of video memory. The :paging is necessary because IBM only allocated 128K for video memory and :an 800x640 resolution 256-color mode requires 512K. As anyone familar with optimization in software/hardware designs, even the most trivial os special cases can cause massive amounts of overhead in implementation. 'paging' is *not* a trivial special case, but a huge cludgy special case. And while 1-byte per pixel (8 planes/byte) might appear at first to be quite nifty, it has more problems than you can shake a stick at. For instance, when you want to expand beyond 8 planes you have to change the format. Even worse, it takes the same number of memory accesses to deal with <8 planes than it takes to deal with 8 planes, whereas in the 'bit plane' method the # memory accesses depends on the # of planes: # accesses required to clear N bit planes in a 64x64 pixel rect. (other operations, such as XOR, JAM, etc... take the same relative amounts) N bit-planes-method byte/pixels-method 1 512 4096 2 1024 4096 3 1536 4096 4 2048 4096 5 2560 4096 6 3072 4096 7 3584 4096 8 4096 4096 9 4608 Can't do it. So, one might ask, why use the byte/pixel-method? Well, for operations such as line-draws (1 pixel thick lines) it will actually take FEWER memory accesses. Writing single pixels take fewer memory accesses too (1 vs N). This all assumes you want to jam a complete color for the line/pixel. My personal opinion is that the byte/pixel method leaves too much to be desired for such gains. -Matt