Subject: Re: Wscons. Any substitute?
To: Michael <macallan18@earthlink.net>
From: Bill Studenmund <wrstuden@netbsd.org>
List: port-macppc
Date: 12/07/2005 15:43:11
--/9DWx/yDrRhgMJTb
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Dec 06, 2005 at 07:58:27AM -0500, Michael wrote:
> Hello,
>=20
> > but I'll mail Yun Young to know more on this framebuffer.
>=20
> He didn't touch machfb for a while ( and I wrote the acceleration code )
> To get this supported we need:

Actually, I don't think this is what we strictly need for this feature. We=
=20
may be very sad without it, but it's not _needed_.

> - some changes in macppc's console handling to allow other drivers at
>   all. Has been done but it's sort of a hack, currently the kernel is
>   hardwired to start up ofb very early, before probing any PCI bus.
> - some guy who writes the driver. I can't do it since I don't have any=20
>   Rage 128 that would work in any of my Macs ( there's a PCish AGP R128=
=20
>   sitting here but that won't help since we need OF console support and=
=20
>   I don't have an AGP Mac anyway. If for some reason a PCI R128 with Mac
>   firmware would suddenly materialise on my doorstep that would be a
>   different story and we'd probably have a driver a few days later )
> - you could do it yourself. For macppc you can ignore all the mode
>   switching stuff since OF will set up some graphics mode, usually in
>   8bit ( with newer firmware it also supports 24bit ) and tells us
>   exactly where we find the framebuffer and what it looks like, so all
>   you'd have to  do is map the registers, probably map the whole
>   framebuffer ( OF would map only what it needs to display the console
>   ), write some basic functions to identify and set up the chip, copy or
>   fill rectangles, probably one to draw characters using the blitter and
>   steal the virtual console code from some other driver ( since many
>   drivers use very similar code here it should probably be moved out )
>   and that's more or less it.

We already have access to the graphics console. What you describe will=20
help performance, but is not the core functionality that's needed.

What we need for multiple console support a la wscons's Ctl-Alt-Fx is a=20
way for wscons to keep a cell array in memory of the characters at each=20
location. As lines scroll, etc, the cell array is manipulated as well as=20
the screen. Whenever we switch consoles, we just redraw a different cell=20
array. When activity happens off-screen, we only update the cell array.

Take care,

Bill

--/9DWx/yDrRhgMJTb
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFDl3OPWz+3JHUci9cRAj6yAJ0acdO933e9PX++wbok1N7zAGTRTACcCbjm
kO49U07au5iqbomg9KYs1sI=
=M7b7
-----END PGP SIGNATURE-----

--/9DWx/yDrRhgMJTb--