qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] fix for winXP display corruption


From: Luke Deller
Subject: [Qemu-devel] fix for winXP display corruption
Date: Wed, 30 Jun 2004 12:25:07 +1000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7) Gecko/20040611

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.
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;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]