From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <74f32320e9b5042e0d79f57b4c38aeca@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 From: rog@vitanuova.com In-Reply-To: <41A60BD8.7070409@sitetronics.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 0caa41b8-eace-11e9-9e20-41e7f4b1d025 > 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.