Strange colors on PowerMac Machine OsX

Bug #1399957 reported by luigiburdo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

Strange colors on PowerMac Machine OsX
if it used VmWare or Std i have strange color palette as result.
I had benn made a grab of screen here

http://i1249.photobucket.com/albums/hh511/tlosm/qyellow_zps1d2dfc18.jpg

My Machine is a PowerMac G5 Quad with Nvidia 7800Gtx 512mb

thankyou
Luigi

Revision history for this message
Peter Maydell (pmaydell) wrote : Re: [Qemu-devel] [Bug 1399957] [NEW] Strange colors on PowerMac Machine OsX

On 6 December 2014 at 17:15, luigiburdo <email address hidden> wrote:
> Public bug reported:
>
> Strange colors on PowerMac Machine OsX
> if it used VmWare or Std i have strange color palette as result.
> I had benn made a grab of screen here
>
> http://i1249.photobucket.com/albums/hh511/tlosm/qyellow_zps1d2dfc18.jpg
>
> My Machine is a PowerMac G5 Quad with Nvidia 7800Gtx 512mb

It would be interesting to know if this bug also manifests
on x86 MacOSX. (Unfortunately if it's a PPC-only bug you're
rather on your own, since there's not really active development
of PPC OSX host support any more. If you're able to write
and submit a patch I can review and apply it, though...)

-- PMM

Revision history for this message
luigiburdo (intermediadc) wrote :

I will check on my Macbook x86 if needed ...
i will first investigating why std mode on ppc have this issue with 32bit video modes on 16bit look like it is ok.
wmare have this isssue too. Not the cyrrus there everything is ok.
will ask some other guys to make test of qemu on other powermac machines and on linuxppc too.
About a patch ..not simple for my knowledge of coding but who know will see if some coders friend can help about.
In other way qemu on G5 is fast and usable .

Revision history for this message
luigiburdo (intermediadc) wrote :

PMM i found the problem it is because big endian sdl and was fixed in some other programams with this
like i write before on 8 bit std no problem when i swap to 16 bit and up i have wrong colors.

     /* The MacOS X port of SDL lies about it's default pixel format
      * for high-colour display. It's always R5G5B5. */

Here a code example :

#ifdef WORDS_BIGENDIAN
    if (fmt->BitsPerPixel == 24) {
 if (fmt->Rmask == 0x00FF0000 && fmt->Gmask == 0x0000FF00 && fmt->Bmask == 0x000000FF)
     return RGBFB_R8G8B8;
 if (fmt->Rmask == 0x000000FF && fmt->Gmask == 0x0000FF00 && fmt->Bmask == 0x00FF0000)
     return RGBFB_B8G8R8;
    } else if (fmt->BitsPerPixel == 32) {
 if (fmt->Rmask == 0xFF000000 && fmt->Gmask == 0x00FF0000 && fmt->Bmask == 0x0000FF00)
     return RGBFB_R8G8B8A8;
 if (fmt->Rmask == 0x00FF0000 && fmt->Gmask == 0x0000FF00 && fmt->Bmask == 0x000000FF)
     return RGBFB_A8R8G8B8;
 if (fmt->Bmask == 0x00FF0000 && fmt->Gmask == 0x0000FF00 && fmt->Rmask == 0x000000FF)
     return RGBFB_A8B8G8R8;
 if (fmt->Bmask == 0xFF000000 && fmt->Gmask == 0x00FF0000 && fmt->Rmask == 0x0000FF00)
     return RGBFB_B8G8R8A8;
    } else if (fmt->BitsPerPixel == 16) {
 if (get_sdlgfx_type () == SDLGFX_DRIVER_QUARTZ) {
     /* The MacOS X port of SDL lies about it's default pixel format
      * for high-colour display. It's always R5G5B5. */
     return RGBFB_R5G5B5;
 } else {
     if (fmt->Rmask == 0xf800 && fmt->Gmask == 0x07e0 && fmt->Bmask == 0x001f)
  return RGBFB_R5G6B5;
     if (fmt->Rmask == 0x7C00 && fmt->Gmask == 0x03e0 && fmt->Bmask == 0x001f)
  return RGBFB_R5G5B5;
 }
    } else if (fmt->BitsPerPixel == 15) {
 if (fmt->Rmask == 0x7C00 && fmt->Gmask == 0x03e0 && fmt->Bmask == 0x001f)
     return RGBFB_R5G5B5;
    }
#else
    if (fmt->BitsPerPixel == 24) {
 if (fmt->Rmask == 0x00FF0000 && fmt->Gmask == 0x0000FF00 && fmt->Bmask == 0x000000FF)
     return RGBFB_B8G8R8;
 if (fmt->Rmask == 0x000000FF && fmt->Gmask == 0x0000FF00 && fmt->Bmask == 0x00FF0000)
     return RGBFB_R8G8B8;
    } else if (fmt->BitsPerPixel == 32) {
 if (fmt->Rmask == 0xFF000000 && fmt->Gmask == 0x00FF0000 && fmt->Bmask == 0x0000FF00)
     return RGBFB_A8B8G8R8;
 if (fmt->Rmask == 0x00FF0000 && fmt->Gmask == 0x0000FF00 && fmt->Bmask == 0x000000FF)
     return RGBFB_B8G8R8A8;
 if (fmt->Bmask == 0x00FF0000 && fmt->Gmask == 0x0000FF00 && fmt->Rmask == 0x000000FF)
     return RGBFB_R8G8B8A8;
 if (fmt->Bmask == 0xFF000000 && fmt->Gmask == 0x00FF0000 && fmt->Rmask == 0x0000FF00)
     return RGBFB_A8R8G8B8;
    } else if (fmt->BitsPerPixel == 16) {
 if (fmt->Rmask == 0xf800 && fmt->Gmask == 0x07e0 && fmt->Bmask == 0x001f)
     return RGBFB_R5G6B5PC;
 if (fmt->Rmask == 0x7C00 && fmt->Gmask == 0x03e0 && fmt->Bmask == 0x001f)
     return RGBFB_R5G5B5PC;
    } else if (fmt->BitsPerPixel == 15) {
 if (fmt->Rmask == 0x7C00 && fmt->Gmask == 0x03e0 && fmt->Bmask == 0x001f)
     return RGBFB_R5G5B5PC;
    }
#endif

    return RGBFB_NONE;
}
#endif

Revision history for this message
Peter Maydell (pmaydell) wrote : Re: [Qemu-devel] [Bug 1399957] Re: Strange colors on PowerMac Machine OsX

On 7 December 2014 at 11:49, luigiburdo <email address hidden> wrote:
> PMM i found the problem it is because big endian sdl and was fixed in some other programams with this
> like i write before on 8 bit std no problem when i swap to 16 bit and up i have wrong colors.
>
> /* The MacOS X port of SDL lies about it's default pixel format
> * for high-colour display. It's always R5G5B5. */

Yuck. Thanks for tracking that down. This sounds like it should
be fixed in SDL, though.

-- PMM

Revision history for this message
luigiburdo (intermediadc) wrote :

Peter no problem , if you need the code where i had been found that code
ask i can share it without problem.

Changed in qemu:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.