From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.22) id 19s4tm-00044E-SW for qemu-devel@nongnu.org; Wed, 27 Aug 2003 14:20:02 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.22) id 19s4qO-0002KO-O1 for qemu-devel@nongnu.org; Wed, 27 Aug 2003 14:16:33 -0400 Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.22) id 19s4lq-0000MZ-2X for qemu-devel@nongnu.org; Wed, 27 Aug 2003 14:11:50 -0400 Received: from [193.252.22.27] (helo=mwinf0405.wanadoo.fr) by mx20.gnu.org with esmtp (Exim 4.22) id 19s4lC-00024k-Gc for qemu-devel@nongnu.org; Wed, 27 Aug 2003 14:11:10 -0400 Received: from mwinf0402.wanadoo.fr (mwinf0402 [172.22.135.24]) by mwinf0405.wanadoo.fr (SMTP Server) with ESMTP id 4A51E14008857 for ; Wed, 27 Aug 2003 19:37:25 +0200 (CEST) Message-ID: <3F4CECC3.2090507@free.fr> Date: Wed, 27 Aug 2003 19:39:15 +0200 From: Fabrice Bellard MIME-Version: 1.0 Subject: Re: [Qemu-devel] qemu vga.c References: <20030826171508.66a60b9e.jrydberg@night.trouble.net> <3F4BB2FB.8070007@free.fr> <20030827190358.5c241b61.jrydberg@night.trouble.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Johan Rydberg Cc: qemu-devel@nongnu.org Johan Rydberg wrote: > Fabrice Bellard wrote: > > : It is currently fast enough to have a usable PC emulator. Many DOS games > : are usable. It should be faster than the bochs emulation but slightly > : slower than the dosemu one. This VGA emulation code is more accurate > : than either bochs or dosemu (all VGA modes, including non standard ones > : (i.e. the ones not supported by int $0x10) should work), but of course > : more testing is needed. > > Sounds great. Maybe you could show us deadly being some nice screenshots? If I have the time, the next release will really support VGA emulation so that you can actually try it. I'll try to put screenshots. > : There are some optimisations pending (VGA memory accesses could be > : faster, but I wanted first to have a simple code). The S3 specific code > : the SVGA emulation is not finished. It will be mainly used to launch X11 > : or Windows in high resolution modes. I also have to modify the LGPL'ed > : vga bios to add S3 VESA support. > > I saw that you trap all writings to the graphics memory. Is this a > must, or can't you just store the data in a buffer and process it according > to the current mode when the display should be updated? Correct vga emulation requires that you trap all memory writes and read as in planar mode complex binary operations can be performed by the VGA card on the 4 planes simultaneously (when writing or reading one byte, the VGA card writes or reads 4 bytes simultaneously). Even in "chain4" mode which is the simplest memory mapping (linear VGA memory access), writes to some memory planes can be disabled. My upcoming optimizations will consist in using specialized memory access functions for each case, and by mapping memory directly when possible (it is possible only if chain4 mode is activated and if all 4 VGA planes are enabled). Fabrice.