9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: rog@vitanuova.com
To: 9fans@cse.psu.edu
Subject: Re: [9fans] VBE 1.2/2.0+ functions for Plan9
Date: Thu, 25 Nov 2004 17:13:26 +0000	[thread overview]
Message-ID: <74f32320e9b5042e0d79f57b4c38aeca@vitanuova.com> (raw)
In-Reply-To: <41A60BD8.7070409@sitetronics.com>

> I got some tips to look in Inferno code, since Roger Peppe had
> implemented a VESA driver there.  After looking through the Inferno
> source, it appears that any VESA code has been left out of the public
> source.

the code is here:

	http://www.vitanuova.com/dist/vesa.tgz

it was done for an earlier version of inferno, but should
still be applicable (probably with some changes - i haven't looked
at it for years).

at the time, most video cards i found did not implement VBE2.0
so there's some probe code taken off the net that probes the
card kind to see how to do bank swapping.
presumbly VBE2.0-compatible cards are more prevalent now,
which allow the portable setting of a linear framebuffer -
it would be nice to remove that dross

the main complexity is that the vid card setup must be done in
16 bit mode, so it has to be done in 16-bit assembler before
the main bootstrap runs. this is done in boot-pc/l16.s,
which presents a menu of possible video modes, allows the
user to select one and presents a test display to allow the user
to verify that the mode works.

most of the code is there (in l16.s) - other changed stuff deals
with bank swapping (mentioned above), passing the
video params through to the main kernel (this will probably have
changed), and stealing the SVGA font so that the bootstrap
knows how to print stuff (since the bootstrap code is entered
in graphics mode, not CGA mode, so we can't easily print chars).

life would have been much easier if i had been able to figure
a way of invoking 16-bit BIOS calls from 32-bit real mode,
but i failed. anyone know how? other systems seem to manage it.

my memory is very rusty, but email me if you want help figuring
out my crappy code!

  cheers,
    rog.



  reply	other threads:[~2004-11-25 17:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-25 16:44 Devon H. O'Dell
2004-11-25 17:13 ` rog [this message]
2004-11-25 18:57   ` Devon H. O'Dell
2004-11-29 20:21   ` Jack Johnson
2004-11-30 12:51     ` rog
2004-11-30 10:40   ` Devon H. O'Dell
2004-11-30 11:08     ` Tiit Lankots
2004-11-30 11:21       ` Devon H. O'Dell
2004-11-30 11:28         ` Tiit Lankots
2004-11-30 11:37           ` Devon H. O'Dell
2004-11-26  3:03 Fwd: " Bob Hartley
2004-11-26  3:04 ` boyd, rounin
2004-11-26  3:08 ` Russ Cox
2004-11-26  4:19   ` Bob Hartley
2004-11-26  5:52     ` Devon H. O'Dell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=74f32320e9b5042e0d79f57b4c38aeca@vitanuova.com \
    --to=rog@vitanuova.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).