From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IZvOO-0004xf-Qg for qemu-devel@nongnu.org; Mon, 24 Sep 2007 17:23:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IZvOO-0004xA-39 for qemu-devel@nongnu.org; Mon, 24 Sep 2007 17:23:00 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IZvON-0004x5-VR for qemu-devel@nongnu.org; Mon, 24 Sep 2007 17:23:00 -0400 Received: from sp604003mt.neufgp.fr ([84.96.92.56] helo=smTp.neuf.fr) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IZvON-0002Ic-KY for qemu-devel@nongnu.org; Mon, 24 Sep 2007 17:22:59 -0400 Received: from [86.73.70.210] by sp604003mt.gpm.neuf.ld (Sun Java System Messaging Server 6.2-5.05 (built Feb 16 2006)) with ESMTP id <0JOW00FX5628OQ80@sp604003mt.gpm.neuf.ld> for qemu-devel@nongnu.org; Mon, 24 Sep 2007 23:22:57 +0200 (CEST) Date: Mon, 24 Sep 2007 23:22:30 +0200 From: Fabrice Bellard Subject: Re: [Qemu-devel] [Bug][Patch] Cirrus-VGA for Malta In-reply-to: <46F7F9D6.30802@mail.berlios.de> Message-id: <46F82A96.1030804@bellard.org> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT References: <33328190.1174979798015.JavaMail.root@eastrmwml08.mgt.cox.net> <460AD667.8070608@mail.berlios.de> <20070402123257.GD24846@networkno.de> <461FA372.6060105@mail.berlios.de> <20070413163917.GB14303@networkno.de> <461FBD8E.9010202@weilnetz.de> <20070413182137.GC14303@networkno.de> <46F7F9D6.30802@mail.berlios.de> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org I realize that the other pixel formats are buggy too, so at least your patch is consistent with what is already coded ! I guess the problem is in the VGA memory handlers. Otherwise it means that there is a (Cirrus)VGA configuration register to change the endianness of the frame buffer. In such case, it must be emulated correctly. Regards, Fabrice. Stefan Weil wrote: > 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; > } >