Major headaches using SwitchRes with DOSBox on a VGA

Man oh man. When it comes to playing DOS games on my VGA I like to keep it simple. Most games just run in 320x200@70(140) Hz and that’s that. No need to involve SwitchRes to get those gloriously (un)intended scanlines. But there comes a time in every man’s life when he tries to play a game that switches between 640x350@70 and 320x200@70. It feels like I’ve tried everything, I swear to Pazuzu.

What I need to have happen is the following: the game starts off by rendering at 640x350@70, SwitchRes gives me whatever multiple of 640 (or unscaled?), 350 vertical lines and either 70 or 140 hz. I don’t mind either way, as long as it switches correctly and jells with the next prerequisite: correctly going to 320x200@140, and only 140. I’ve toyed with enough .ini files and .cfgs to go crosseyed by now!

Please tell me there’s a surefire way to go about this. @Alphanu, do you have any idea?

1 Like

Hi mate,

I assume you are using a PC monitor here? If, not what I am going to say wont be relevant. although as your talking 70 - 140hz its a good assumption.

The answer you searching for is over at the GA GitLab site.

You need to setup your switres.ini with the correct monitor profile. in your case you want to use pc_70_120 try this first before moving to custom ranges.

Monitor                  pc_70_120 

This will give you a range of

crt_range0  30000-70000, 100-130, 2.201, 0.275, 4.678, 0.063, 0.032, 0.633, 0, 0, 192, 320, 0, 0 
crt_range1  30000-70000, 50-65, 2.201, 0.275, 4.678, 0.063, 0.032, 0.633, 0, 0, 400, 1024, 0, 0

If you need to hit hz and frequencies below or above this range you need to make a few changes. Using custom ranges make your ini look as below and start adjusting some of the options

Monitor                  custom   

crt_range0  30000-70000, 100-130, 2.201, 0.275, 4.678, 0.063, 0.032, 0.633, 0, 0, 192, 320, 0, 0 
crt_range1  30000-70000, 50-65, 2.201, 0.275, 4.678, 0.063, 0.032, 0.633, 0, 0, 400, 1024, 0, 0

Range Value Description

  • HfreqMin - Minimum Horizontal Frequency in Hz
  • HfreqMax - Maximum Horizontal Frequency in Hz
  • VfreqMin - Minimum Vertical Frequency in Hz
  • VfreqMax - Maximum Vertical Frequency in Hz
  • HFrontPorch - Horizontal Front Porch in μs
  • HSyncPulse - Horizontal Sync Pulse in μs
  • HBackPorch - Horizontal Back Porch in μs
  • VfrontPorch - Vertical Front Porch in μs
  • VSyncPulse - Vertical Sync Pulse in μs
  • BackPorch - Vertical Back Porch in μs
  • HSyncPol - Horizontal Sync Polarity
  • VSyncPol - Vertical Sync Polarity
  • ProgressiveLinesMin - Minimum Number of Progressive Lines
  • ProgressiveLinesMax - Maximum Number of Progressive Lines
  • InterlacedLinesMin - Minimum Number of Interlaced Lines
  • InterlacedLinesMax - Maximum Number of Interlaced Lines

For example to hit 140, change the range as follows.

crt_range0 30000-75000, 100-140, 2.201, 0.275, 4.678, 0.063, 0.032, 0.633, 0, 0, 192, 350, 0, 0 crt_range1 30000-70000, 50-65, 2.201, 0.275, 4.678, 0.063, 0.032, 0.633, 0, 0, 400, 1024, 0, 0

Probably take a bit of tweaking, but you will be on the right track.

Check out the full monitor profile guide here

I hope this helps.

2 Likes

So I fiddled with this a couple days back, but tired after a while. Having had some time off, I’m now trying to properly wrap my head around this. One stumbling block for me was and still is that CRU gives porch values etc. in pixels and lines instead of μs. You wouldn’t happen to know the conversion formula for these?

Hi Mate,

If you compile SwitchRes standalone for Windows. You can request a resolution calculation based of your switchres.ini. Just need to run the below. Put the ini in the same folder as switchres.exe

switchres -c 320 240 60

https://github.com/antonioginer/switchres

Quick look on what it will output for you.

swmsys

To make it easier, I have compiles a 64bit version for you.

SwitchRes Standalone 64 bit

1 Like