Subject: Re: OFW video cards was:ACARD,6260 (Sonnet Tempo Ultra 66)
To: Xavier HUMBERT <xavier.humbert@xavhome.fr.eu.org>
From: Christopher Tribo <t1345@hopi.dtcc.edu>
List: port-macppc
Date: 02/05/2003 03:40:40
On Tue, 4 Feb 2003, Xavier HUMBERT wrote:

> daniell@trillian.beachbash.net (Daniel Lamblin) wrote :
> 
> > Other than that the console is slow.  Can't wscons potentially use my
> > voodoo3's text mode?  Have people tried a different console for macppc?
> 
> AFAIK, the console does not use the video card at all, but
> OpenFirmware's Framebuffer.

	OpenFirmware uses the fcode on the card to link open firmware to a 
 console. The quality of cards and drivers varies dramatically. 
Thus far the Voodoo 5 5500 has had the fastest OpenFirmware scrolling. 
Anyone have a Voodoo 5 6000 they want to sell?

> I never had any success with wscons on Macppc. No alternate console,
> nothing.

	wscons isn't a console driver in itself, it merly links the VGA 
driver on i386 to the console I/O devices (wscons, wsfont, wsmux, wsmouse, 
wskbd, etc) Any functions that wscons can do have to be supported on the 
underlying hardware through the VGA driver.

	Our problem is two-fold. OpenFirmware fcode on video cards was 
never intended to be used for a console device, only for debugging during 
developlment, which was probably done on a serial console mostly anyway. 
The VGA driver on i386 is easy because every video card ever made for 
i386 has a VGA ROM chip on the card that can run the card in any mode it 
supports, and draw, scroll, use colors, etc. 

	Cards for PowerMac's usually do not contain a VGA rom, only the 
OpenFirmware code, which is usually dismally slow. What is needed is a 
raster console driver. This is a daunting task with all the different 
video chips out there (Cirrus Logic, S3, ATI, nVidia, 3Dlabs, Apple's 
Valkyrie, 3dfx, to name a few). Ideally, if the newer cards (late model 
Rage 128's and later) have a VGA ROM on them that functions, we could 
theoretically link the VGA driver from i386 to these cards and come up 
with a working driver and wscons implementation on par with the i386 
offerings, that still leaves all the older chips who's open firmware 
drivers are either non-existant, too slow, or can't sync. The rcons driver 
from pmax might be a good place to start. We've tread these waters many 
times before, but getting something started is intimidating at best.

	Looking into Darwin's code and the MkLinux code would be a good 
start too. Once we get a working console driver, we can finally quiesce 
open firmware and make life a lot simpler. It also adds the ability to 
get a decent console on machines with no open firmware, if support is 
ever written for the 601.

	One should also consider things like DRI and XF86 <-> wscons.
Maybe the Sun folks have some insights too.

	For those folks in the know about mac video quirks: Is it possible 
to use the apple ROM code and the fcode in EEPROM to init the display in 
graphics mode reliably? Could we call it from within the OS during an X 
init to reset the card on an old world machine? I guess on a new world 
machine this wouldn't work, but hopefully those machines have video cards 
with a VGA ROM on them.

	Time to go learn and make myself less ignorant... please stand 
by...