VOGONS


First post, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie

When DOSBox displays text screens (and maybe some graphic screens?) in full-screen mode, the actual DOS window is inside a "frame" that is entirely black.

I've tried to figure out how to change that frame to a specific color, but I can't find the place in the code where I could do this. I'll be very grateful if anyone can tell me either (1) where the full-screen "frame" is specified as black or (2) what code I would have to add to specify a color.

My guess is that this seems to be set in sdl_gui.cpp, but I don't have enough knowledge to figure out exactly where or how.

I am NOT asking about setting the background color for the DOS screen itself (in the way that ansi.sys sets the background color) - I am asking ONLY about the black frame that appears when DOSBox is running in full-screen mode, the frame that extends from the outer edges of a DOS window to the margins of the actual physical screen on the host.

Thanks for any help with this. What I hope to do is add a config setting to my custom build that would let the user specify the background color with RGB numbers or something similar, but first I hope to figure out how to hard-code this color, if that is possible at all.

Reply 2 of 9, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie
bloodbat wrote:

I don't think you can change the colors of the pillarbox....

That may explain why I can't find the setting in the code...! Thank you.

And at least I learned that it's called the pillarbox, and that's something...

Reply 4 of 9, by emendelson

User metadata
Rank Oldbie
Rank
Oldbie
gulikoza wrote:

It depends on the output selected. Probably the easiest to change would be OpenGL: change glClearColor (0.0, 0.0, 0.0, 1.0); in sdlmain.cpp.

Thank you - I will try this as soon as I get back the machine where I build DOSBox.

Last edited by emendelson on 2014-06-03, 02:27. Edited 1 time in total.

Reply 5 of 9, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

Couldn't you extend this to implement a CGA/EGA/VGA border color like functionality in full screen with non-active display bars on two or four sides of the screen? If an EGA program sets the border to light cyan (Commander Keen 4), can't DOSBox instruct SDL to set the non-active portion of the display to light cyan? It likely would not be a perfect solution, but for programs that use the border to indicate status (Crystal Caves, Secret Agent), it would be helpful.

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 6 of 9, by NewRisingSun

User metadata
Rank Oldbie
Rank
Oldbie

Basically that would be a variation of the overscan border patch, with all of its pitfalls. There could be five overscan choices; here is how they would look on a 16:9 widescreen display

  1. no overscan at all, which is what DosBox currently does
    0-noOverscan.png
    Filename
    0-noOverscan.png
    File size
    227.72 KiB
    Views
    1280 views
    File license
    Fair use/fair dealing exception
  2. full 4:3 overscan, as much as the emulated video card generates, calculated on CGA by subtracting Horizontal/Vertical Displayed from (Horizontal/Vertical Total minus Sync), slightly more complicated on EGA/VGA
    Filename
    1-full43overscan.png
    File size
    230.46 KiB
    Downloads
    No downloads
    File license
    Fair use/fair dealing exception
  3. cropped 4:3 overscan, only display part of the overscan that the emulated card generates and cut off the rest, as a 15 kHz monitor would. Makes only a difference with CGA/EGA cards and their thick border, would be meaningless with VGA.
    Filename
    2-cropped43overscan.png
    File size
    228.54 KiB
    Downloads
    No downloads
    File license
    Fair use/fair dealing exception
  4. cropped widescreen overscan, only visible in the direction in which the host's monitor exceeds 4:3, as thick as the emulated video card generates
    3-croppedWSoverscan.png
    Filename
    3-croppedWSoverscan.png
    File size
    226.75 KiB
    Views
    1280 views
    File license
    Fair use/fair dealing exception
  5. full widescreen overscan, only visible in the direction in which the host's monitor exceeds 4:3, but filling the whole non-4:3 area.
    4-fullWSoverscan.png
    Filename
    4-fullWSoverscan.png
    File size
    226.79 KiB
    Views
    1280 views
    File license
    Fair use/fair dealing exception

Reply 7 of 9, by Great Hierophant

User metadata
Rank l33t
Rank
l33t

On my 1920x1200 16:10 widescreen LCD monitor, number 5 would ideally look exactly like this :

Filename
Untitled.png
File size
26.39 KiB
Downloads
No downloads
File license
Fair use/fair dealing exception

I think it is almost as close to perfection as you can get with an ideal screen ratio. It is not quite perfect, since on real monitors there would be borders above and below the image when trying to maintain a reasonable aspect ratio. However, on a real CGA monitor, the horizontal borders are pretty wide and the horizontal width of the image cannot easily be adjusted, while the vertical size can using a knob on the monitor.

http://nerdlypleasures.blogspot.com/ - Nerdly Pleasures - My Retro Gaming, Computing & Tech Blog

Reply 8 of 9, by gulikoza

User metadata
Rank Oldbie
Rank
Oldbie

The problem is however, that this would depend on the dosbox settings (fullresolution, ...), the user's monitor and work only in fullscreen (unless the window mode would also be extended). Not that user friendly 😀

http://www.si-gamer.net/gulikoza

Reply 9 of 9, by digistorm

User metadata
Rank Member
Rank
Member

I would say: go for option 2 with a slider to adjust the "over / under scan" just as you could do with a real analog monitor. It would be an additional option to extend the border to the display aspect ratio. C64 emulators also emulate the border and nobody has opposed to that (but on a C64 the border actually can be used to display sprites). I understand that very few games use a border color but it adds to the feel one had when playing the original, I think.