From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BUtEJ-0001Vh-1Q for qemu-devel@nongnu.org; Mon, 31 May 2004 16:17:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BUtEG-0001Tw-I4 for qemu-devel@nongnu.org; Mon, 31 May 2004 16:17:53 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BUtEG-0001TH-6P for qemu-devel@nongnu.org; Mon, 31 May 2004 16:17:52 -0400 Received: from [81.209.184.159] (helo=dd2718.kasserver.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BUtDo-0003W1-TQ for qemu-devel@nongnu.org; Mon, 31 May 2004 16:17:25 -0400 Message-ID: <40BB92D1.6040508@fabianowski.de> Date: Mon, 31 May 2004 22:17:21 +0200 From: Bartosz Fabianowski MIME-Version: 1.0 Subject: Re: Subject: Re: [Qemu-devel] VGA BIOS source code References: <200405312200.03734.bobb@absamail.co.za> In-Reply-To: <200405312200.03734.bobb@absamail.co.za> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: bobb@absamail.co.za, qemu-devel@nongnu.org Alright, after digging into QEMU's graphics card emulation and into the VGA BIOS source, I came to a few conclusions: a) SDD 6.53 is doing something utterly wrong. It switches the graphics card into a banked graphics mode (it specifically requests banked and not LFB) and then simply "forgets" to switch banks. I checked and double-checked, there is simply no call to the bank switching function. I guess this also means the problem with SDD 6.53 can't be fixed by tinkering with QEMU and/or the BIOS. c) The fact that SDD does something wrong doesn't mean that only SDD is at fault if graphics modes don't work as advertised. The entire VESA VBE implementation is rather broken, shaky and incomplete. b) The way the graphics card is emulated by QEMU (and Bochs and plex86 for that matter) is totally inefficient, error-prone and overly complicated. The card's logic is split between a few C files (vl.c, hw/vga.c) that get compiled and executed natively and a bunch of C files containing heaps of x86 assembly that get compiled into a VGA BIOS. The host emulator and the BIOS work together in a very complicated way and it is never obvious why a certain function is implemented in the BIOS or on the host. d) Finally, as a conclusion from a) to c), I believe it would be best to ditch the entire VGA BIOS and implement all functions of the graphics card in C, natively, inside QEMU. This will be more efficient and less error prone. Now, I haven't seen the patches mentioned by Fabrice that emulate a CLGD54xx. But I certainly hope it is all native and not a half-native half-emulated solution like the current one. - Bartosz