Subject: More Adventures in Internal Video
To: None <port-mac68k@NetBSD.ORG>
From: M.R. Zucca <mrz5149@cs.rit.edu>
List: port-mac68k
Date: 05/08/1996 16:05:26
I've taken a good, long, look into the IIvx video driver and I think it
can easily be dropped into the kernal with mrg support and a little bit
of fiddling.
The driver itself uses the following system calls (all of which must have
been implemented for the NuBus video cards to work):
SIntRemove
SIntInstall
DisposePtr
DisposeHandle
NewPtr
ReservMem
NewHandle
HLock
SlotManager (0x16, 0x6, 0x5)
In addtion, the driver messes with a certain bunch of hardware registers
that start at 0x0CEC (I call it IIvxVideoBase) and run to about
IIvxVideoBase+1A. The most important addresses seem to be:
0x0CEC
0x0CED - bit 3 seems to be involved in depth switching
0x0CEE - bit 6, when set high, seems to indicate that a VBL has completed
0x0CEF
0x0CEC+0x10 - The lower three bits have something to do with the current
bit depth. 3 bits = 8 combinations. Coincidentally,
there are 8 different modes over 1 bit.
The bit patterns 011 and 100 also seem to have some signifigance.
The top bit might be the direct/CLUT bit
0x0CEC+0x12 - Bottom 3 bits seem to serve a similar purpose to 0x0CEC+0x10.
1n000000...n seems to get disabled as a final step of
interrrupts off and enabled when interrupts are turned on.
0x0CEC+0x14 - I don't remember why I wrote this in my notes but it's
important for something :)
0x0CEC+0x16 - Bit 10 in this word seems to be related to bit 3 in 0x0CED
somehow
0x0CEC+0x1A - I think this may have to do with the gamma. More stuff in
the lower 3 bits. Especially bit 3.
I'm assuming that 0x0CEC is the base address for the DAC chip which does most
of the video work according to the IIvx block diagram from Apple.
So making a compatible grf driver is simply a matter of gluing in the ROM
driver with mrg and mapping in the DAC's control registers (I think).
Since the video setup for the IIvx, LC, IIsi, etc. are all pretty much the
same, the same should hold true to some degree. Find the driver name, wade
through the driver to find the control register addresses of the video
controller, and you're set.
I'd love to make a test kernel but I just don't have the disk space now to
even attempt it. Would anybody like to try my idea out? I'd be willing to
test it.
Thanks.
_______________________________________________________________________
Michael Zucca - mrz5149@rit.cs.rit.edu - http://www.rit.edu/~mrz5149/
"I will choose a path that's clear. I will choose Freewill. "
--Rush, Freewill
_______________________________________________________________________