Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yellow screen in highcolor and truecolor modes on macOS #1431

Open
degaart opened this issue Mar 4, 2020 · 5 comments
Open

Yellow screen in highcolor and truecolor modes on macOS #1431

degaart opened this issue Mar 4, 2020 · 5 comments

Comments

@degaart
Copy link

degaart commented Mar 4, 2020

Describe the bug
15-bit, 16-bit, 24-bit and 32-bit color VBE applications give corrupted yellowish output on macOS.

To Reproduce
Steps to reproduce the behavior:

  1. Download univbe
  2. Run vbetest.exe
  3. Choose interactive visual compliance tests
  4. Choose a high-color or true-color mode
  5. Output lacks blue component and is tinted yellow

Expected behavior
Correct output

Screenshots

Environment (please complete the following information):

  • macOS 10.14.6
  • DOSBox-X release version 0.83 SDL2
  • machine=svga_s3

Additional context
Looks like issue #614

Attached screenshot and debug log

Screen Shot 2020-03-04 at 11 22 53

dosbox-x-0.83-sdl2.log

@msikma
Copy link
Contributor

msikma commented May 31, 2020

Just wanted to note that this goes for every VGA/SVGA machine. CGA, EGA and many others work just fine and show a normal screenshot with blue channel in it. So there's something specific to the VGA code that's causing this.

I recall vanilla DOSBox having a similar bug that only occurred on high color depth, like for example when playing Archimedean Dynasty.

@msikma
Copy link
Contributor

msikma commented May 31, 2020

Maybe the same bug as #727 even though that one's specifically about SDL1 and this is about SDL2.

@brunocastello
Copy link

This issue is still present with the SDL2 build as of 0.83.10

@brunocastello
Copy link

This issue is still persistent with the SDL2 build 0.83.24.

Anyone know how can we fix it? It'd be quite important because apparently the SDL2 build is more stable than SDL1, which I had been using for years because of this bug in particular...

@myon98
Copy link
Contributor

myon98 commented Apr 24, 2022

I've experienced this too, and from a quick glance through the codebase I think it just assumes the pixel format of the SDL_Surface returned from SDL_GetWindowSurface without checking. And on MacOS it seems like it is BGRA on SDL1 while ARGB on SDL2.

It seems that some places check if defined(MACOSX) && !defined(C_SDL2) but others only check if defined(MACOSX), causing it to incorrectly apply the correction to SDL2 as well.

I've tried to search for such places and added SDL2 checks to them, and the problem seems to be fixed. I'll make a pull request later, although I can't test them very thoroughly except for making sure that the Windows 3.1 doesn't look yellow in the particular video mode I'm using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants