Subject: Re: Portrait mono display
To: None <port-mac68k@netbsd.org>
From: Andy Ball <ball@cyberspace.org>
List: port-mac68k
Date: 03/07/2002 13:13:37
Hello Iggy,

  ES> Monitor size: 640 * 480
    > Number of pixels: 640 * 480 = 307,200
    > So you need a minimum of 37,5 KB of VRAM to get Black and White
    > video (307,200 / 8) / 1,024 = 37,5

That looks about right.  At one bit per pixel you get eight pixels per
byte.  The portrait display that we've been discussing is usually used
in a 640 x 870 mode (I'm not sure of the resolution, I'll have to
measure the picture).
640 x 870 = 556800 pixels.
556800 pixels / 8 pixels per byte = 69600 bytes: just under 68 Kb.
At two bits per pixel (four greys)........................~136 Kb
At four bits per pixel (sixteen greys.....................~272 Kb

  ES> If you want 8 bits video (256 colors)
    > (307,200 / 8) * 8 / 1,024 = 300
    > You need a minimum of 300 KB of VRAM to get 256 colors video

Yes, I figure 300 Kb for 256 colours (or grey scales) in the 640x480
mode that you're describing.  For the portrait monochrome display it
would be just under 544 Kb (probably more than my Quadra 700 has).

  ES> If you want 16 bits video (256 colors)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
I think that would give thousands of colours (32,768 or 65,535
depending on how Apple do things).

  ES> (307,200 / 8) * 16 / 1,024 = 600
    > You need a minimum of 600 KB of VRAM to get 256 colors video

600 Kb for 16 bit colour at 640x480 *1
Over 1 Mb for 16 bit colour at 640x870 (did Apple ever make a portrait
colour monitor?)

24 bit colour is probably where things start to get quirky, at least
on the Quadra.  It should provide about 16.8 million colours.

  ES> If you want 32 bits video (256 colors)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
I think many machines in 32-bit modes use 24 bits for colour, and 8
bits for alpha, or 'depth' information.  Again, this would be about
16.8 million colours.

  ES> (307,200 / 8) * 32 / 1,024
    > = 1,200  You need a minimum of 1,200 KB of VRAM to get
    > 16,000,000 colors video

I think that's true on the Quadra, although I would normally expect to
get 24 bit colour (millions) at 640 x 480 in just 900 Kb:
640 x 480 = 307200 pixels.
307200 pixels x 3 bytes (24 bits) per pixel = 921600 bytes: 900 Kb.

If Apple did a portrait colour display at 640 x 870, 32 bits per pixel
would need over 2Mb.

  ES> Of course, if your monitor is larger, you need more and more
    > video RAM.

Oops!  I should have read this far before I started my reply! ;-)

  ES> On your 8 bits screen, you can use a small part of it to display
    > a 16 bits image ... using 16 bits to display the image. BUT, the
    > other part of the screen must use less bit depth. I think I saw
    > QuickTime doing that (but I'm not sure).  Also, I do not have
    > any idea on how this is possible (as a programmer's point of
    > view), but 'on the paper' it is doable: use the same amount of
    > VRAM (globally), but the VRAM buffer is not used as a 8 bit
    > buffer, but instead a variable bit depth VRAM buffer. I hope
    > this time it is more clear (not sure...)

That sounds very hardware dependant.

Regards,
  - Andy Ball.