Pavel Klinkovský | 30 Dec 2011 12:18
Picon

How to configure the graphic device?

Hi all,


I am trying to test the native Inferno on my old PC (x86 architecture).

I was able to install the Inferno successfuly.
The text mode works fine, commands are executed, the network is able to work.

However I would like to use wm/wm...
I tried all the graphic cards I have, including s3 family, ATI, NVidia.
I checked in the source code the drivers should support such cards according the VendorId/DeviceId pair.

I am using the following sequence to setup the graphic driver:
; echo type <drivername> >/dev/vgactl
; echo drawinit >/dev/vgactl

Real example:
; echo type mach64xx >/dev/vgactl
; echo drawinit >/dev/vgactl

After the last command the shell is frozen forever... :(

Please, can you help me to understand how to setup the graphic driver?
Thanks in advance.

Best regards,

Pavel Klinkovsky

blstuart | 30 Dec 2011 21:27

Re: How to configure the graphic device?

> However I would like to use wm/wm...
> I tried all the graphic cards I have, including s3 family, ATI, NVidia.
> I checked in the source code the drivers should support such cards
> according the VendorId/DeviceId pair.
> 
> I am using the following sequence to setup the graphic driver:
> ; echo type <drivername> >/dev/vgactl
> ; echo drawinit >/dev/vgactl
> 
> Real example:
> ; echo type mach64xx >/dev/vgactl
> ; echo drawinit >/dev/vgactl
> 
> After the last command the shell is frozen forever... :(
> 
> Please, can you help me to understand how to setup the graphic driver?

The current state of affairs for native graphics on PC hardware
is pretty limited.  There are several ways this can be approached
and have been in the Plan 9/Inferno world.  The most common
current method used in Plan 9 is to use the VESA support on the
graphics cards.  That requires some mechanism for executing
real-mode 16-bit x86 code.  The best way to do that these days
seems to be to include a 16-bit x86 emulator, often in the kernel.
However, unless it appeared when I wasn't looking, I'm pretty
sure there's not one currently in Inferno.  Prior to that, aux/vga
in Plan 9 had a lot of knowledge about how to initialize
different types of cards, but as you can imagine keeping that up
to date straddles the border between insane and impossible.
However, the vga drivers in os/pc came from that time frame.

A year or so ago I had some motivation to do a driver for the
original generic VGA (640x480x4 max).  It's pretty useless
for color, but doesn't do bad for greyscale, and it works on
pretty much any hardware.  You can pull a tarball with it
from
http://code.google.com/p/inferno-bls/downloads/detail?name=vga.tgz&can=2&q=
For that matter, I was working on an Inferno Live CD a little
while back that used it, but that project has gotten stalled.
(I have a bad habit of pushing current projects down on the
stack when new projects come up.  The big problem is that
new projects come up fast enough that things rarely get popped
off.)

So as far as I can tell, your options are to settle for 640x480x4,
recreate aux/vga, or port the 16-bit support and vgavesa.c
from Plan 9.

Hope this helps,
BLS

Ethan Grammatikidis | 31 Dec 2011 18:34

Re: How to configure the graphic device?

> So as far as I can tell, your options are to settle for 640x480x4,
> recreate aux/vga, or port the 16-bit support and vgavesa.c
> from Plan 9.

I would describe vgavesa.c as already obsolete, it doesn't work nicely
with a lot of vesa cards. I would grab realemu from cinap_lenrek's
contrib.

Pavel Klinkovský | 1 Jan 2012 16:33
Picon

Re: How to configure the graphic device?

Thanks for explanation of the VGA situation...

My application does not need the graphic at all (text output is enough).
On the other hand I do not want to "tune" the source code in "ed" instead of "acme"... :(

Pavel
Brian L. Stuart | 3 Jan 2012 23:51

Re: How to configure the graphic device?

--- On Sun, 1/1/12, Pavel Klinkovský <pavel.klinkovsky@...> wrote
> Thanks for explanation of the VGA situation...
>
> My application does not need the graphic at all (text output
> is enough).On the other hand I do not want to "tune" the source
> code in "ed" instead of "acme"... :(

In that case, since you have networking going, I'd suggest
importing the native system's file system into a hosted
instance on another machine and use acme there.

BLS

Pavel Klinkovský | 4 Jan 2012 09:27
Picon

Re: How to configure the graphic device?


> My application does not need the graphic at all (text output
> is enough).On the other hand I do not want to "tune" the source
> code in "ed" instead of "acme"... :(

In that case, since you have networking going, I'd suggest
importing the native system's file system into a hosted
instance on another machine and use acme there.

That was my result of this discussion too, in fact.
You must read my thoughts... ;)

It is OK for the development phase.
In the in-field tests I will use "ed" for the source code tuning.

Thanks a lot.

Pavel

Gmane