All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luke Deller <ldeller@xplantechnology.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] fix for winXP display corruption
Date: Wed, 30 Jun 2004 12:25:07 +1000	[thread overview]
Message-ID: <40E22483.5000004@xplantechnology.com> (raw)

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

             reply	other threads:[~2004-06-30  4:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-30  2:25 Luke Deller [this message]
2004-06-30 15:25 ` [Qemu-devel] fix for winXP display corruption Hetz Ben Hamo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40E22483.5000004@xplantechnology.com \
    --to=ldeller@xplantechnology.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.