Subject: Re: Intvid Update
To: None <mrz5149@cs.rit.edu>
From: Taras Ivanenko <ivanenko@ctpa03.mit.edu>
List: port-mac68k
Date: 12/19/1996 14:29:22
> First of all, the value of videorowbytes passed in from MacOS makes
> no sense what-so-ever. For instance, say I boot into 8 bit color
> mode with my 640x480 VGA monitor. Rowbytes should categorically be
> 640 -> 0x280. 8 bits / pixel 640 pixels / row = 640 bytes /
> row. Strangely, the value of videorowbytes is *always* 2048 ->
> 0x800. Even stranger is the fact that when I try to "correct" this
> problem by changing videorowbytes to 0x280 the console draws tiny
> little lines as though 2048 were the proper rowbytes for 640x480!!!
> I've also noticed that ite.c has two kinds of rowbyte values:
> screenrowbytes and videorowbytes. What, exactly, is videorowbytes?!?

I must admit I do not know what all that values mean, but the book
"Designing cards and drivers for Macintosh ..." discusses for some
length the video controller. Although the internal video may be
different from NuBus card video, I hope the logic is close. If you do
not have access to this book, I have copied few pages from it.

As far as I can tell, videorowbytes is the offset to the next row, not
necessarily screen size. Some portion of video buffer is not mapped to
screen. There is also an offset to the next page hidden somewhere in
data structures. I saw very strange numbers in my collection of NuBus
video drivers.


> Could somebody with a working video card + colorkit kernel please run both
> of those programs and mail me a dump of stderr from those programs? I really
> would like to know what the information structures are supposed to
> contain.

Here is a printout from someone's card (Radius Color Display/20 -
Raduis Precision 8 color card) from my collection, I will send you the
data for my card when I get home. vpBounds field is the actual screen
rectangle. 

MinorBaseOS = 0x0
MinorLength = 0xFF600
Video Mode 0x80
VidParams: 42 bytes (42)
  vpBaseOffset = 0x480
  vpRowBytes = 144
  vpBounds.top = 0
  vpBounds.left = 0
  vpBounds.bottom = 870
  vpBounds.right = 1152
  vpVersion = 0
  vpPackType = 0
  vpPackSize = 0
  vpHRes = 5373952
  vpVRes = 5373952
  vpPixelType = 0
  vpPixelSize = 1
  vpCmpCount = 1
  vpCmpSize = 1
  vpPlaneBytes = 0x0
  Page Count: 1
  DevType: 0x0000
Video Mode 0x81
VidParams: 42 bytes (42)
  vpBaseOffset = 0x480
  vpRowBytes = 288
  vpBounds.top = 0
  vpBounds.left = 0
  vpBounds.bottom = 870
  vpBounds.right = 1152
  vpVersion = 0
  vpPackType = 0
  vpPackSize = 0
  vpHRes = 5373952
  vpVRes = 5373952
  vpPixelType = 0
  vpPixelSize = 2
  vpCmpCount = 1
  vpCmpSize = 2
  vpPlaneBytes = 0x0
  Page Count: 1
  DevType: 0x0000
Video Mode 0x82
VidParams: 42 bytes (42)
  vpBaseOffset = 0x480
  vpRowBytes = 576
  vpBounds.top = 0
  vpBounds.left = 0
  vpBounds.bottom = 870
  vpBounds.right = 1152
  vpVersion = 0
  vpPackType = 0
  vpPackSize = 0
  vpHRes = 5373952
  vpVRes = 5373952
  vpPixelType = 0
  vpPixelSize = 4
  vpCmpCount = 1
  vpCmpSize = 4
  vpPlaneBytes = 0x0
  Page Count: 1
  DevType: 0x0000
Video Mode 0x83
VidParams: 42 bytes (42)
  vpBaseOffset = 0x480
  vpRowBytes = 1152
  vpBounds.top = 0
  vpBounds.left = 0
  vpBounds.bottom = 870
  vpBounds.right = 1152
  vpVersion = 0
  vpPackType = 0
  vpPackSize = 0
  vpHRes = 5373952
  vpVRes = 5373952
  vpPixelType = 0
  vpPixelSize = 8
  vpCmpCount = 1
  vpCmpSize = 8
  vpPlaneBytes = 0x0
  Page Count: 1
  DevType: 0x0000



	Taras Ivanenko.