From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1J9Qs5-0006vm-W4 for mharc-grub-devel@gnu.org; Mon, 31 Dec 2007 15:04:26 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J9Qs4-0006t1-50 for grub-devel@gnu.org; Mon, 31 Dec 2007 15:04:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J9Qs2-0006pO-0T for grub-devel@gnu.org; Mon, 31 Dec 2007 15:04:23 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J9Qs1-0006pI-SG for grub-devel@gnu.org; Mon, 31 Dec 2007 15:04:21 -0500 Received: from pne-smtpout3-sn2.hy.skanova.net ([81.228.8.111]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J9Qs1-0001xH-AG for grub-devel@gnu.org; Mon, 31 Dec 2007 15:04:21 -0500 Received: from [127.0.0.1] (88.193.32.97) by pne-smtpout3-sn2.hy.skanova.net (7.3.129) id 471A5695003B47AC for grub-devel@gnu.org; Mon, 31 Dec 2007 21:03:36 +0100 Message-ID: <47794B47.60403@nic.fi> Date: Mon, 31 Dec 2007 22:04:23 +0200 From: =?ISO-8859-1?Q?Vesa_J=E4=E4skel=E4inen?= User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: The development of GRUB 2 References: <20071231152354.GA22762@thorin> In-Reply-To: <20071231152354.GA22762@thorin> X-Enigmail-Version: 0.95.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-kernel: by monty-python.gnu.org: Solaris 10 (beta) Subject: Re: Xbox vesa-like framebuffer X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2007 20:04:24 -0000 Robert Millan wrote: > It seems the Xbox (hacked) firmware, Cromwell, sets up a vesa-like framebuffer > with predefined 640x480x32 RGBX settings at addr *(0xfd600800) [1] > > I just gave a quick look at vbe.c to see how hard would it be to adapt it to > use default settings rather than BIOS calls. Can someone provide a bit of > advice on what those settings would be? In particular, I wonder about: > > `mode' (as returned by grub_vbe_get_video_mode_info()) > `active_mode_info.memory_model' (and in case of GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL, > do we have to setup vga palette?) > `framebuffer.bytes_per_scan_line' > `framebuffer.bytes_per_pixel' --> 4, right? > > Anything else I could have missed ? Also, is there an easy way to get debugging > output printed somewhere (before we have to care about font stuff) in the form > of raw pixels ? This thing doesn't seem to have a serial port or any other > simple debugging interface. > > [1] from http://www.xbox-linux.org/wiki/Porting_an_Operating_System_to_the_Xbox_HOWTO#Video_Driver > If you are just making a new video driver just use vbe*.c as advice and get specs from VideoSubsystem section on wiki :). You can most likely re-use software blitter code from vbe*.c codes. Most of the vbe specific information comes from VBE 3.0 specification. About grub_video_get_info: http://grub.enbug.org/VideoSubsystem#head-eecc170736caecf422b56260e1bacc5e5a7fb12a Basicly it just describes dimensions of the screen and color settings. bytes_per_pixel means how many bytes one pixel takes. Eg. how many times I have to multiply X to get correct X coordinate on screen. bytes_per_scan_line is same for Y coordinate. If you have larger scanline than visual width then this must match that. Eg. if you have display width of 1024 pixels and scanline width of 2048 pixels then you must multiply Y coordinate with 2048 pixels (* bytes_per_pixel). If you need some more info just ping me on IRC or on this list.