Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-09 Thread Gerd Hoffmann
On Do, 2015-01-08 at 12:07 -0500, Programmingkid wrote: On Jan 8, 2015, at 4:02 AM, Gerd Hoffmann wrote: Hi, VGA: Using shared surface for depth=32 swap=1 Ok, 32bpp. byteswapping needed. I guess the host is a intel macintosh then? Yes. So we have be guest @ le host. I

Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-09 Thread Programmingkid
On Jan 9, 2015, at 3:58 AM, Gerd Hoffmann wrote: On Do, 2015-01-08 at 12:07 -0500, Programmingkid wrote: On Jan 8, 2015, at 4:02 AM, Gerd Hoffmann wrote: Hi, VGA: Using shared surface for depth=32 swap=1 Ok, 32bpp. byteswapping needed. I guess the host is a intel macintosh then?

Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-08 Thread Gerd Hoffmann
Hi, VGA: Using shared surface for depth=32 swap=1 Ok, 32bpp. byteswapping needed. I guess the host is a intel macintosh then? Having a quick look at the cocoa code it seems it doesn't look at the color masks and shifts, only the color depth. So having the UI handle the byteswapping that

Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-08 Thread Programmingkid
On Jan 8, 2015, at 4:02 AM, Gerd Hoffmann wrote: Hi, VGA: Using shared surface for depth=32 swap=1 Ok, 32bpp. byteswapping needed. I guess the host is a intel macintosh then? Yes. I unfortunately don't have a fast enough PowerPC Mac to handle QEMU. It would be interesting to find

Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-07 Thread Paolo Bonzini
On 06/01/2015 22:33, G 3 wrote: 00:01.0 VGA compatible controller: Technical Corp. Device (rev 02) (prog-if 00 [VGA controller]) Subsystem: Qumranet, Inc. Device 1100 Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-

Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-07 Thread Gerd Hoffmann
Hi, However, you should specify it whatever the host endianness and the host OS is. If this is not the case, you're just exchanging a bug with another. If something a) works with Linux host but not with Mac OS X host b) and works with Linux guest but not with Mac OS X guest the

Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-07 Thread Programmingkid
On Jan 7, 2015, at 9:43 AM, Gerd Hoffmann wrote: Hi, However, you should specify it whatever the host endianness and the host OS is. If this is not the case, you're just exchanging a bug with another. If something a) works with Linux host but not with Mac OS X host b) and works

Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-07 Thread Programmingkid
On Jan 7, 2015, at 5:35 AM, Paolo Bonzini wrote: On 06/01/2015 22:33, G 3 wrote: 00:01.0 VGA compatible controller: Technical Corp. Device (rev 02) (prog-if 00 [VGA controller]) Subsystem: Qumranet, Inc. Device 1100 Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV-

Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-06 Thread Peter Maydell
On 6 January 2015 at 00:22, Programmingkid programmingk...@gmail.com wrote: http://virtuallyfun.superglobalmegacorp.com/?p=3197 This is how Mac OS X looks like in QEMU with a Mac OS X host. The colors are all wrong. Right, so that says there is a bug somewhere. But this patch isn't fixing a

Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-06 Thread Peter Maydell
On 6 January 2015 at 09:47, Peter Maydell peter.mayd...@linaro.org wrote: Yes, but it's basically making the user manually toggle a setting which we should be getting right ourselves. We should find out what QEMU's actually not doing correctly and fix that. First step to find out what's

Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-06 Thread Programmingkid
On Jan 6, 2015, at 5:04 AM, Peter Maydell wrote: On 6 January 2015 at 09:47, Peter Maydell peter.mayd...@linaro.org wrote: Yes, but it's basically making the user manually toggle a setting which we should be getting right ourselves. We should find out what QEMU's actually not doing correctly

Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-06 Thread Paolo Bonzini
On 06/01/2015 19:07, Programmingkid wrote: http://www.mcamafia.de/pdf/ibm_vgaxga_trm2.pdf This file is the specifications to the VGA standard. It makes no mention of pixel endian format. There is no mention of bit order in the specifications. It's probably assumed to be little endian. The

Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-06 Thread Programmingkid
Just curious, if someone installed a cirrus vga video card into a PowerMac with Mac OS 10.2 installed, and it had the same color issue that QEMU has, would you be convinced that this problem is an issue with Mac OS X?

Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-06 Thread G 3
I start the guest like this: qemu-system-ppc -hdd ~/machd.img -boot c -prom-env boot-args=-v Hope this is what you wanted: 00:00.0 Host bridge: Motorola MPC106 [Grackle] (prog-if 01) Subsystem: Qumranet, Inc. Device 1100 Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-

Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-06 Thread Paolo Bonzini
On 07/01/2015 00:57, Programmingkid wrote: Just curious, if someone installed a cirrus vga video card into a PowerMac with Mac OS 10.2 installed, and it had the same color issue that QEMU has, would you be convinced that this problem is an issue with Mac OS X? G 3 replied that he's not

Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-06 Thread Peter Maydell
On 6 January 2015 at 17:19, Programmingkid programmingk...@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

Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-06 Thread Programmingkid
On Jan 6, 2015, at 12:30 PM, Peter Maydell wrote: On 6 January 2015 at 17:19, Programmingkid programmingk...@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

Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-06 Thread Programmingkid
https://opensource.apple.com/source/IOGraphics/IOGraphics-45.3/IOGraphicsFamily/IOBootFramebuffer.cpp This file is used for the frame buffer in Mac OS 10.2. There is no mention of the endian format for the pixels. That seems to indicate an oversight on Apple's part.

Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-06 Thread Programmingkid
On Jan 6, 2015, at 11:46 AM, Peter Maydell wrote: On 6 January 2015 at 16:30, Programmingkid programmingk...@gmail.com wrote: I was doing some searching and thought I should show you this: file: vga.c This indicates that all operations are expected to be in the little endian format.

Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-05 Thread Peter Maydell
On 5 January 2015 at 21:27, Programmingkid programmingk...@gmail.com wrote: This patches does the following: - Allows user to select endian format of video display. This allows Mac OS X to be used as a guest and show all its colors correctly. Just add -display-endian-big to the command line

[Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-05 Thread Programmingkid
This patches does the following: - Allows user to select endian format of video display. This allows Mac OS X to be used as a guest and show all its colors correctly. Just add -display-endian-big to the command line to use this feature. - Removes unneeded #ifdefs in drawRect: method. Correct

Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.

2015-01-05 Thread Programmingkid
On Jan 5, 2015, at 5:06 PM, Peter Maydell wrote: On 5 January 2015 at 21:27, Programmingkid programmingk...@gmail.com wrote: This patches does the following: - Allows user to select endian format of video display. This allows Mac OS X to be used as a guest and show all its colors