VOGONS

Common searches


First post, by tiben

User metadata
Rank Newbie
Rank
Newbie

Hi,
I try to configure xorg/dosbox to get native fullscreen resolution on Linux.

I get pretty good results by adding Modelines for common VGA resolutions in my xorg.conf

VGA 320x200 70Hz -> Modeline at 640x400 70Hz scaled 2x because my lcd doesn't not support 320x200 70Hz
VGA 320x240 60Hz -> Modeline at 320x240 60Hz, supported by my lcd.
VGA 640x480 60Hz -> No modeline required, is detected and available by default
(i use $ cvt <with> <height> <rate> to generate modelines)

The issue i have, is dosbox doesn't choice the best modeline/frequency if all modelines are set at the same time in xorg.conf.

For tests purposes i use theses 3 games:

- Cadaver: 320x200 70Hz
- Jazz JackRabbit: 320x240 60Hz
- Syndicate: menu in 320x??? and game in 640x480Hz

Executing Cadaver, the chosen modeline is 320x240 60Hz which is wrong, it should be 640x400 70Hz
Executing JazzJack Rabbit, the chosen modeline is correct: 320x240 60Hz
Executing Syndicate: Menu seems correct (in dont know what native resolution it is), but in game is wrong, choosen is 640x480 75Hz, not 60Hz. (60Hz, 75Hz and 59.94Hz are available by default on my system).

If i set only one modeline at a time in my xorg, this modeline is obviously choosen when i execute a game matching this modeline. (Not true for 640x480 frequencies because i have not found any way to remove 75Hz and 59.94Hz default modeline to force dosbox to choose 60Hz. I think this is because they are detected by EDID or something like that).

After searching a little, i think the issue is that SDL 1.2 offers no way to specify the frequency rate in "SDL_SetVideoMode". It simply chooses the nearest higher resolution available and, If many frequency rates are available for the resolution, choosen frequency seems totally random.

The described use case above is a little simple, my concrete setup is more complex because i have another 640x400 50Hz modeline for Hatari (Atari St emulator), which clashes with 640x400 70Hz for dosbox.

Can someone confirm me there is no simple way to fix this ? or i am missing something ?
Its annoying having to change xorg.conf/reboot each time i want to change a game/emulator. I tried to set modelines at runtime with xrandr but this way they are not detected by dosbox. They are detected by Hatari though (at least with last version 2.0.0, sdl 2).

Thanks.