qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] fix for winXP display corruption
@ 2004-06-30  2:25 Luke Deller
  2004-06-30 15:25 ` Hetz Ben Hamo
  0 siblings, 1 reply; 2+ messages in thread
From: Luke Deller @ 2004-06-30  2:25 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 534 bytes --]

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.

[-- Attachment #2: cirrus_24bpp.diff --]
[-- Type: text/x-patch, Size: 901 bytes --]

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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-06-30 14:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-30  2:25 [Qemu-devel] fix for winXP display corruption Luke Deller
2004-06-30 15:25 ` Hetz Ben Hamo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).