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 1111 (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- >> Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- >> <TAbort- <MAbort- >SERR- <PERR- INTx- >> Region 0: Memory at 80000000 (32-bit, prefetchable) [size=16M] >> Region 2: Memory at 81000000 (32-bit, non-prefetchable) [size=4K] >> Expansion ROM at 81010000 [disabled] [size=64K] > > Yes. So this is "-vga std", not "-vga cirrus". In this case, it might > make sense to add a property to the VGA that forces an endianness over > the other, and then to specify that property in order to use Mac OS X. > > 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 only logical explanation is that you have more than one bug, and > they somehow cancel each other. The fix is to find and stomp all the > bugs, not to introduce an option for the cases that end up buggy.
I was told there is a frame buffer byte swap in Linux, that is why the colors appear correctly. But if that happened all the time, then Linux guest would have the color problem. Maybe we should all makes theories and guest where to look. Here is my theories so far: - Incorrect OpenBIOS settings - VGA isn't correctly supported in Mac OS X - Vague standards that didn't take endianness of processor into account - Some function of VGA not implemented or not implemented fully - Some assumption about writing to IO ports that is true on real Macs but not implemented on QEMU If anyone wants to add to the list, please do so. -Incorrect OpenBIOS settings If this is true, it wouldn't be the first time OpenBIOS issues have effected Mac OS X. - VGA isn't correctly supported in Mac OS X: If there is someone out there that has some early VGA PCI card, and a PowerMac that runs Mac OS X, it would help a lot to let us know if it displays colors correctly. I am pretty sure all such cards were made for PC's only, so this would probably not work. I'm surprised Apple implemented a generic VGA driver in the first place. - Vague standards that didn't take endianness of processor into account Never seen any mention of endianness of pixel data in the VGA standards. It was probably just assumed little endian. - Some function of VGA not implemented or not implemented fully This could be a possibility, but not sure about it. - Some assumption about writing to IO ports that is true on real Macs but not implemented on QEMU This is just a guess for now. It would take a lot of memory poking to prove this.