Received: from eggs.gnu.org ([2001:4830:134:3::10]:50337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8YNk-0002Y1-PS for qemu-devel@nongnu.org; Tue, 06 Jan 2015 12:57:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y8YNh-0000ZD-BB for qemu-devel@nongnu.org; Tue, 06 Jan 2015 12:57:28 -0500 Received: from mail-qg0-x22e.google.com ([2607:f8b0:400d:c04::22e]:65378) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y8YNg-0000Yu-VB for qemu-devel@nongnu.org; Tue, 06 Jan 2015 12:57:25 -0500 Received: by mail-qg0-f46.google.com with SMTP id q107so16848543qgd.5 for ; Tue, 06 Jan 2015 09:57:24 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/alternative; boundary=Apple-Mail-2--121789949 From: Programmingkid In-Reply-To: Date: Tue, 6 Jan 2015 12:57:21 -0500 Message-Id: <598BB643-4DCE-4964-9A9B-73A266E3E710@gmail.com> References: <3154DC97-3B67-4DBF-BD02-C64E4A9591E3@gmail.com> <77FFD738-1433-4B15-8522-C1EA965B774B@gmail.com> <122C8E58-48F5-4A54-B0AF-A826492D73B6@gmail.com> Subject: Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel qemu-devel --Apple-Mail-2--121789949 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Jan 6, 2015, at 12:30 PM, Peter Maydell wrote: > On 6 January 2015 at 17:19, Programmingkid = wrote: >> After investigating the TARGET_WORDS_BIGENDIAN code, I noticed >> that s->default_endian_fb was being set to true. So I undefined >> the macro and then ran QEMU. The i386 target showed no change >> in colors. The ppc target still had the same incorrect colors. >> Sorry, this doesn't fix the problem. >=20 > What macro? You don't want to undefine TARGET_WORDS_BIGENDIAN, > that will wreak all kinds of havoc. Just test with manually > setting default_endian_fb to false. >=20 > -- PMM Just tried that. It didn't fix the color problem. Here are the test I = have done so far: Experiment: Disable preprocessor code so that thebool byteswap =3D = !s->big_endian_fb code is used. Line 1440.=20 Result: No change in colors for Mac OS X guest. They are still = incorrect.=20 Experiment: Set the HOST_WORDS_BIGENDIAN macro at line 94.=20 Result: Did not change the colors. They are still messed up. It made all = the colors in the PC emulator look weird - like a Nintendo cartridge not = fully seated correctly. But it then changed back to the normal color = layout.=20 Experiment: undefine TARGET_WORDS_BIGENDIAN at line 2155 in vga.c.=20 Result: PC emulator shows no change in colors - good. Mac emulator shows = the same incorrect colors -bad.=20 Experiment: remove the ! from byteswap in vga.c:1495.=20 Result: The colors are still incorrect in qemu-system-ppc with a Mac OS = X guest. Colors are unaffected in the i386 target. Experiment: Just manually set default_endian_fb to false.=20 Result: Did not fix the problem. Colors still show up incorrectly in the = ppc emulator.=20 Sorry but I don't think this is a bug with QEMU. I think the pixel = format is suppose to be in the little endian format. IBM developed this = standard for this PCs which used little endian x86 processors. Why would = they want to spend the time and money on making their vga cards work on = non-pc/2 compatible computers? They simply had no reason to support the = big endian format.=20= --Apple-Mail-2--121789949 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
On 6 January 2015 at 17:19, Programmingkid <programmingkidx@gmail.com>= ; wrote:
After investigating the = TARGET_WORDS_BIGENDIAN code, I noticed
that s->default_endian_fb was being set to true. So I = undefined
the macro and then = ran QEMU. The i386 target showed no change
in colors. The ppc target still had the same incorrect = colors.
Sorry, this doesn't = fix the problem.

What macro? You don't want to = undefine TARGET_WORDS_BIGENDIAN,
that will wreak all kinds of havoc. = Just test with manually
setting default_endian_fb to false.

-- = PMM

Just tried that. It didn't fix = the color problem. Here are the test I have done so = far:

Experiment: Disable preprocessor = code so that thebool byteswap =3D !s->big_endian_fb code is used.  Line = 1440. 
Result: No change in colors for Mac OS X guest. = They are still incorrect. 

Result: Did not change the colors. They are = still messed up. It made all the colors in the PC emulator look weird - = like a Nintendo cartridge not fully seated correctly. But it then = changed back to the normal color layout. 

Experiment: undefine = TARGET_WORDS_BIGENDIAN at line 2155 in vga.c. 
Experiment: remove the ! from byteswap in = vga.c:1495. 
Result: The colors are still incorrect in = qemu-system-ppc with a Mac OS X guest. Colors are unaffected in the i386 = target.

Result: Did not fix the problem. Colors = still show up incorrectly in the ppc emulator. 
Sorry but I don't think this is a bug with = QEMU. I think the pixel format is suppose to be in the little endian = format. IBM developed this standard for this PCs which used little = endian x86 processors. Why would they want to spend the time and money = on making their vga cards work on non-pc/2 compatible computers? They = simply had no reason to support the big endian = format. 
= --Apple-Mail-2--121789949--