From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BfWq1-0005Uv-Te for qemu-devel@nongnu.org; Wed, 30 Jun 2004 00:36:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BfWpz-0005TR-L7 for qemu-devel@nongnu.org; Wed, 30 Jun 2004 00:36:48 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BfWmo-0003xe-Ea for qemu-devel@nongnu.org; Wed, 30 Jun 2004 00:33:30 -0400 Received: from [202.7.88.37] (helo=gateway.xden.xplantechnology.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BfUng-0000an-Uw for qemu-devel@nongnu.org; Tue, 29 Jun 2004 22:26:19 -0400 Received: from [10.11.12.32] (sor.xden.xplantechnology.com [10.11.12.32]) by gateway.xden.xplantechnology.com (Postfix) with ESMTP id DD00636A38 for ; Wed, 30 Jun 2004 12:26:09 +1000 (EST) Message-ID: <40E22483.5000004@xplantechnology.com> Date: Wed, 30 Jun 2004 12:25:07 +1000 From: Luke Deller MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010602090904070901010008" Subject: [Qemu-devel] fix for winXP display corruption 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 This is a multi-part message in MIME format. --------------010602090904070901010008 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi, I've installed Windows XP on the latest CVS version of qemu (using -cirrusvga), but I got some rubbish / corruption on the screen. Attached is a small patch which corrects this problem for me. (Some bitblt code in hw/cirrus_vga_rop2.h was missing a case for 24-bit colour depths. BTW that whole file looks like it assumes a little-endian host?). Another problem is that when I try to increase the resolution above 640x480, the resolution doesn't actually change. I haven't tracked this problem down yet. Regards, Luke. --------------010602090904070901010008 Content-Type: text/x-patch; name="cirrus_24bpp.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cirrus_24bpp.diff" Index: hw/cirrus_vga_rop2.h =================================================================== RCS file: /cvsroot/qemu/qemu/hw/cirrus_vga_rop2.h,v retrieving revision 1.3 diff -u -r1.3 cirrus_vga_rop2.h --- hw/cirrus_vga_rop2.h 9 Jun 2004 23:12:09 -0000 1.3 +++ hw/cirrus_vga_rop2.h 30 Jun 2004 02:14:41 -0000 @@ -52,6 +52,8 @@ pattern_pitch = 8; #elif DEPTH == 16 pattern_pitch = 16; +#elif DEPTH == 24 + pattern_pitch = 24; #else pattern_pitch = 32; #endif @@ -67,6 +69,10 @@ #elif DEPTH == 16 col = ((uint16_t *)(src1 + pattern_x))[0]; pattern_x = (pattern_x + 2) & 15; +#elif DEPTH == 24 + col = ((uint16_t *)(src1 + pattern_x))[0]; + col |= src1[pattern_x + 2] << 16; + pattern_x = (pattern_x + 3) % 24; #else col = ((uint32_t *)(src1 + pattern_x))[0]; pattern_x = (pattern_x + 4) & 31; --------------010602090904070901010008--