From: mlelstv@specklec.mpifr-bonn.mpg.de (Michael van Elst)
Subject: Re: Hardware/Amiga 1200.
Organization: Max-Planck-Institut f"ur Radioastronomie
Date: Sat, 12 Dec 1992 20:07:57 GMT

In <2097@lysator.liu.se> ronnie@lysator.liu.se (Ronnie Sahlberg) writes:
>(in fact, almost all PCgames doesnt hit the hardware, they run graphichs 
>through BIOS, which can be thought of as a POOR-MANS-graphics.library)
>((which also makes it possible to run the games on several DIFFERENT 
>graphics cards.))

Sorry, but this is rubbish. The only 'support' in the BIOS are routines to
select some standard graphics modes and do some _text_ output. Since some
of the faster display modes are not supported you even have to initialize
your cards by writing to the hardware registers. That's why most DOS programs
that do graphics have one or two _dozen_ different display drivers.

Windows on the other hand has an API for doing graphics.

>Most modern graphics today doesns use Bitplanes like amiga.
>Yes, bitplanes were great when introduced in 1984, they saved memory, but were
>VERY slow. Today, memory is dirt cheap, so this is not a problem any more.

Bitplanes are not generally slow. Writing single pixels or thin lines
to frame buffers which use bytes or words for pixels is of course
faster.

Most modern graphics use 1 byte per pixel because that is cheaper
to implement and easier to program.

>A normal PC with a normal graphics card, i.e. SVGAcard only needs to write ONE BYTE to do a WritePixel() on a 256 colors display.
>On modern PCs this corresponds to something like 2 clockcycles.
>(Write 1 byte to memory ~~ 2 cycles)

Draw a 20x30 pixel polygon and the bitplanes are about the same speed.
And they get faster when you don't need the full depth of the frame
buffer.

>On an amiga with, lets say 32 colors (5 bitplanes) one would need to do 
>something like (assuming a 68040 (RISC-influenced) processor)
>  1,   Read Word from GFXmem.        at least 2 cycles.
>  2,   Check if to set 0 or 1 in this bitplane.   at least 1 cycle.
>  3,   Conditional branch/Set bit in word.        at least 2 or 3 cycles.
>  4,   Write word to GFXmem.         at least 2 cycles.
>This adds up to at least 7 cycles per bitplane.
>=> at least 35 cycles for a 32 colors display.

Ever heard of XOR operations ?

>(remember a 256 colordisplay needs only 2 cycles nowadays)
>That is, normal PC graphics cards is at least 15 times faster than amiga
>graphics when running on same clock speed.

If your math were correct :)

>This is when doing a ReadPixel(), WritePixel() that is the most elementary
>operations to be performed on a raster display.

Matter of fact is that it is _not_ an elementary operation for most
things.

>Imagine how much faster things like textruremapping is on a 1Byte<=>1Pixel
>display compared to amigas bitplanes. texturemapping and other complex stuff
>like rotation/ scalinfg and such is EXTREMELY fast on displays like PCs SVGA, but very timeconsuming (and probably impossible to make smooth on bitplanes displays ) on the amiga.

Most real texture mapping routines would require calculations that take
more time than drawing the actual pixel.

>A complex operation like scaling up/down an image on SVGA displays is easilly 
>done by plainly duplicating/removing certain bytes in the source image.
>To do scaling on the amiga one needs to do bitmanipulations on every bitplane in the display.

Which is the same speed when using a table. With the table you can also
do arbitrary dither patterns with no overhead.

>By redesigning the hardware, it would be very possible if not certain to 
>improve graphics speed by at least a factor 10-20.

Not by going to chunky pixels.

>Who would then care if going through th OS might be only 50% of the speed
>compared to hitting the hardware directly. We would anyway have at least 5-10 
>times performance of ECS.

I think you are quite wrong in your conclusions.

Regards,
-- 
Michael van Elst
UUCP:     universe!local-cluster!milky-way!sol!earth!uunet!unido!mpirbn!p554mve
Internet: p554mve@mpirbn.mpifr-bonn.mpg.de
                                "A potential Snark may lurk in every tree."