Wrong colors in 15/16/24-bit VESA modes (OS/X)

Developer's Forum, for discussion of bugs, code, and other developmental aspects of DOSBox.

Wrong colors in 15/16/24-bit VESA modes (OS/X)

Postby xjas » 2018-1-26 @ 23:34

When running stuff that uses a 15/16 or 24-bit mode, the colors go completely off. It's almost like the blue goes missing. This only happens on the display and does not appear in screenshots taken with crtl+f5. (I took the following screenshots using OS/X's desktop screen grabber.) It does occur regardless of whether you're running in a window or full-screen.

I'm using Dominus's SVN build from about two weeks ago.

Here's Scorcher (Zyrinx, 1996), in 640x400x256:
scor1.png


And in 640x400x16bit:
scor2.png


Incidentally the menu & splash screen in this game appears with a blue background, it's supposed to be black. I don't know what video mode this is in unfortunately:
scor3.png


Here's another example, Sunflower by Pulse (1997) - also 16bit:
sunflow1.png
sunflow2.png

(This is what it's supposed to look like)

I should probably have reported years ago since it's been in the code since at least since 2014 when I got my Macbook, maybe earlier. I've been running SVN versions the whole time and updating it every now & then.

Some (hopefully) relevant sections from my DOSBox.conf. Note that I'm using svga_s3 & opengl render:
Code: Select all
[sdl]
#       fullscreen: Start dosbox directly in fullscreen. (Press ALT-Enter to go back)
#       fulldouble: Use double buffering in fullscreen. It can reduce screen flickering, but it can also result in a slow DOSBox.
#   fullresolution: What resolution to use for fullscreen: original, desktop or a fixed size (e.g. 1024x768).
#                     Using your monitor's native resolution with aspect=true might give the best results.
#                     If you end up with small window on a large screen, try an output different from surface.
# windowresolution: Scale the window to this size IF the output device supports hardware scaling.
#                     (output=surface does not!)
#           output: What video system to use for output.
#                   Possible values: surface, overlay, opengl, openglnb.
#         autolock: Mouse will automatically lock, if you click on the screen. (Press CTRL-F10 to unlock)
#      sensitivity: Mouse sensitivity.
#      waitonerror: Wait before closing the console if dosbox has an error.
#         priority: Priority levels for dosbox. Second entry behind the comma is for when dosbox is not focused/minimized.
#                     pause is only valid for the second entry.
#                   Possible values: lowest, lower, normal, higher, highest, pause.
#       mapperfile: File used to load/save the key/event mappings from. Resetmapper only works with the default value.
#     usescancodes: Avoid usage of symkeys, might not work on all operating systems.

fullscreen=false
fulldouble=false
fullresolution=1280x800
windowresolution=original
output=opengl
autolock=true
sensitivity=100
waitonerror=true
priority=higher,normal
mapperfile=mapper-SVN.map
usescancodes=true

[dosbox]
# language: Select another language file.
#  machine: The type of machine DOSBox tries to emulate.
#           Possible values: hercules, cga, tandy, pcjr, ega, vgaonly, svga_s3, svga_et3000, svga_et4000, svga_paradise, vesa_nolfb, vesa_oldvbe.
# captures: Directory where things like wave, midi, screenshot get captured.
#  memsize: Amount of memory DOSBox has in megabytes.
#             This value is best left at its default to avoid problems with some games,
#             though few games might require a higher value.
#             There is generally no speed advantage when raising this value.

language=
machine=svga_s3
captures=~/dosbox_caps
memsize=30
User avatar
xjas
Oldbie
 
Posts: 1117
Joined: 2015-9-07 @ 02:29

Re: Wrong colors in 15/16/24-bit VESA modes (OS/X)

Postby xjas » 2018-1-26 @ 23:37

Here's SEA image viewer running in a 24-bit mode. Same thing.
24bit.png


Original image:
20121002.JPG


Note that I'm running OS/X 10.9.5. I can also confirm this happens on 10.8.x. I don't have a machine running any newer OS/X (& hopefully never will. :P)

Edit: to answer the obvious next question, the only other video device I can get these modes to work in is vesa_oldVBE and yes, it occurs in that as well.

Edit 2: this DOES NOT happen in Boxer (latest version) but I don't know what they're doing differently.
User avatar
xjas
Oldbie
 
Posts: 1117
Joined: 2015-9-07 @ 02:29

Re: Wrong colors in 15/16/24-bit VESA modes (OS/X)

Postby xjas » 2018-1-27 @ 00:22

Edit 3: also happens using the SURFACE & OVERLAY renderers.

ALSO, possibly related: in Surface, if I move the window from one monitor to the other, this happens. I don't see this in any other mode.
surface.png

Sorry for the infospam, I didn't look too hard into it previously so these are all new discoveries for me.
User avatar
xjas
Oldbie
 
Posts: 1117
Joined: 2015-9-07 @ 02:29

Re: Wrong colors in 15/16/24-bit VESA modes (OS/X)

Postby xjas » 2018-1-27 @ 00:34

FINAL UPDATE: It turns out this is a well known bug and I just somehow completely failed to find it when I searched. This thread can probably be deleted. Sorry about that. :(
User avatar
xjas
Oldbie
 
Posts: 1117
Joined: 2015-9-07 @ 02:29

Re: Wrong colors in 15/16/24-bit VESA modes (OS/X)

Postby Serious Callers Only » 2018-2-06 @ 11:59

Seems like it should be fixed in SDL2, does osx d0sbox have support for that?
Serious Callers Only
Member
 
Posts: 350
Joined: 2003-4-26 @ 21:34

Re: Wrong colors in 15/16/24-bit VESA modes (OS/X)

Postby Dominus » 2018-2-06 @ 12:03

There is an unofficial patch for SDL2 in the forum. And yes, well known bug and I have no idea why boxer doesn't have it but then boxer doesn't care about upstream.
User avatar
Dominus
DOSBox Moderator
 
Posts: 7444
Joined: 2002-10-03 @ 09:54
Location: Vienna


Return to DOSBox Development

Who is online

Users browsing this forum: No registered users and 1 guest