[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [Bug][Patch] Cirrus-VGA for Malta
From: |
Stefan Weil |
Subject: |
[Qemu-devel] [Bug][Patch] Cirrus-VGA for Malta |
Date: |
Mon, 24 Sep 2007 19:54:30 +0200 |
User-agent: |
IceDove 1.5.0.12 (X11/20070607) |
Hello,
here is a patch which makes VGA usable for Malta MIPS32 in big endian
mode. I don't know whether other big endian emulations need a
patch for VGA, too.
Regards
Stefan
Index: hw/vga_template.h
===================================================================
RCS file: /sources/qemu/qemu/hw/vga_template.h,v
retrieving revision 1.13
diff -u -b -B -r1.13 vga_template.h
--- hw/vga_template.h 11 May 2006 21:54:44 -0000 1.13
+++ hw/vga_template.h 14 Jun 2007 20:10:25 -0000
@@ -327,6 +327,16 @@
palette = s1->last_palette;
width >>= 3;
for(x = 0; x < width; x++) {
+#if defined(TARGET_WORDS_BIGENDIAN)
+ ((PIXEL_TYPE *)d)[3] = palette[s[0]];
+ ((PIXEL_TYPE *)d)[2] = palette[s[1]];
+ ((PIXEL_TYPE *)d)[1] = palette[s[2]];
+ ((PIXEL_TYPE *)d)[0] = palette[s[3]];
+ ((PIXEL_TYPE *)d)[7] = palette[s[4]];
+ ((PIXEL_TYPE *)d)[6] = palette[s[5]];
+ ((PIXEL_TYPE *)d)[5] = palette[s[6]];
+ ((PIXEL_TYPE *)d)[4] = palette[s[7]];
+#else
((PIXEL_TYPE *)d)[0] = palette[s[0]];
((PIXEL_TYPE *)d)[1] = palette[s[1]];
((PIXEL_TYPE *)d)[2] = palette[s[2]];
@@ -335,6 +345,7 @@
((PIXEL_TYPE *)d)[5] = palette[s[5]];
((PIXEL_TYPE *)d)[6] = palette[s[6]];
((PIXEL_TYPE *)d)[7] = palette[s[7]];
+#endif
d += BPP * 8;
s += 8;
}
- [Qemu-devel] [Bug][Patch] Cirrus-VGA for Malta,
Stefan Weil <=