Skip to contentSkip to conversation

fix for winXP display corruption

Qemu-devel Luke Deller 2 participants 2 messages Jun 30, 2004

lore
Share & tools
lore
#0 lore raw

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

cirrus_vga_rop2.h +6 -0
diff -u -r1.3 cirrus_vga_rop2.h
@@ -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;
#1 lore raw
Quoted 4 lines · Luke Deller

Hi,

I've installed Windows XP on the latest CVS version of qemu (using -cirrusvga), but I got some rubbish / corruption on the screen.

Indeed your pathces fixes the post install screen graphics garbage.

Quoted 3 lines

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.

Weird, after your patch I can go up to 1024x768x32 bit colors and 1024x768x24 bit colors as well..

Fot those who try to install XP - the first graphical install part goes ok, reboots, it asks you if you want to expand the graphics mode, and after you answer you get "please wait" with the Windows XP logo..

A workaround would be to simply quit qemu and restart it. Works here like a charm (with network)..

I also seen the network problem that appears sometime with XP (no network even if slirp is enabled). I found that the problem appearing when installing XP without the -user-net parameter (I haven't find any workaround yet).

Thanks,
Hetz