From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BXX6g-00071v-OL for qemu-devel@nongnu.org; Mon, 07 Jun 2004 23:16:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BXX6f-00071j-2J for qemu-devel@nongnu.org; Mon, 07 Jun 2004 23:16:58 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BXX6e-00071f-TV for qemu-devel@nongnu.org; Mon, 07 Jun 2004 23:16:57 -0400 Received: from [62.253.162.42] (helo=mta02-svc.ntlworld.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BXX5f-0003T4-SB for qemu-devel@nongnu.org; Mon, 07 Jun 2004 23:15:56 -0400 Received: from [10.10.10.100] ([81.107.87.144]) by mta02-svc.ntlworld.com (InterMail vM.4.01.03.37 201-229-121-137-20020806) with ESMTP id <20040608031357.CVTE8778.mta02-svc.ntlworld.com@[10.10.10.100]> for ; Tue, 8 Jun 2004 04:13:57 +0100 Subject: Re: [Qemu-devel] Purpose of Cirrus VGA BIOS From: Antony T Curtis In-Reply-To: <40C4F3ED.7050205@fabianowski.de> References: <40C4F3ED.7050205@fabianowski.de> Content-Type: text/plain Message-Id: <1086664499.13855.353.camel@pcgem.rdg.cyberkinetica.com> Mime-Version: 1.0 Date: Tue, 08 Jun 2004 04:14:59 +0100 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: qemu-devel@nongnu.org On Tue, 2004-06-08 at 00:02, Bartosz Fabianowski wrote: > Hi all > > I am trying to figure out how the new Cirrus emulation works. One thing > I am still not sure about is the purpose of the Cirrus BIOS. The > emulation coded inside QEMU seems to be trapping the graphics card > interrupt as well as port and memory accesses. It also performs lots of > operations and reacts to registers being changed or the interrupt being > invoked. So, what exactly is the purpose of the graphics card BIOS in > this scenario? What purpose does it serve? Obviously, a real Cirrus BIOS > contains lots of code that would control a real Cirrus graphics card and > that is totally unnecessary in QEMU. What other stuff does it contain > that can't be done in native C code? For starters, the real Cirrus BIOS would initialize the reserved scratchpad registers (they do have specific uses even if it is not fully documented). As an aside, looking at the ROP codes, I have worked out the relationship of what the bits mean... ROP[0] for bit 0 ROP[1] for bit 1 etc DST = ((ROP[0] & SRC) | ROP[1]) & ((ROP[2] & DST) | (ROP[3] & ~DST)) & ((ROP[4] & ~SRC) | ROP[5]) & ~((ROP[6] & ~DST) | (ROP[7] & DST)); -- Antony T Curtis