Changing resolution on-the-fly with DOS commands *SOLVED!*

General information and assistance with DOSBox.

Changing resolution on-the-fly with DOS commands *SOLVED!*

Postby EldritchNexus » 2019-7-07 @ 05:19

So I have something completely ambitious in the works: I've placed all the MS-DOS installments of ZeniMax Media's major franchises (Wolfenstein, Commander Keen, Doom, The Elder Scrolls, Heretic/Hexen, Quake, and Fallout) between 1981's Castle Wolfenstein and 1998's The Elder Scrolls Adventures: Redguard into a single DOSBox wrapper in Mac OS X, and set it up so that they can be selected from a batch file, swapping CD images when needed. So far, nearly all of the games are completely playable, but I have a bit of troubleshooting that I need to take care of.

I have the wrapper set at a resolution of 1024x640, so that most of the games will fill up the screen. However, this same ratio causes Battlespire's screen to be absolutely tiny compared to the others. In order for it to be at a proper 4:3 ratio, it needs to be at a smaller resolution such as 640x480. Is there a DOS command or program I can use to force the wrapper to change its resolution to fit Battlespire whenever I select it? I'd really hate to downgrade the resolution for the entire collection just to make one game (which isn't exactly on my top 5 list, either) fit the screen properly. If not, is it possible to make Battlespire change its own resolution?
Last edited by EldritchNexus on 2019-7-21 @ 04:21, edited 1 time in total.
EldritchNexus
Newbie
 
Posts: 37
Joined: 2018-7-13 @ 06:54

Re: Changing resolution on-the-fly with DOS commands

Postby Zup » 2019-7-07 @ 06:50

You can run DOSBox with the -conf switch. So you could make a copy of the default config file, change it to match your settings and then make a script/link to launch it with your new config file (i.e.: dosbox -conf battlespire.conf). Keep in mind that you can put a small "autoexec.bat" under the [autoexec] section of a DOSBox config file, so you can mount your drives, change to a directory and launch a game directly (so you don't have to do so in DOSBox command line).
I have traveled across the universe and through the years to find Her.
Sometimes going all the way is just a start...

I'm selling some stuff!
User avatar
Zup
Oldbie
 
Posts: 1288
Joined: 2003-10-04 @ 12:16

Re: Changing resolution on-the-fly with DOS commands

Postby EldritchNexus » 2019-7-07 @ 07:18

I didn't think my situation was necessarily exclusive to DOSBox. It just happens to be what I'm using. Besides, I can never figure what goes where on this site, due to the abstract naming convention. But I'll try doing what you're describing. If there are any other suggestions, please let me know.
EldritchNexus
Newbie
 
Posts: 37
Joined: 2018-7-13 @ 06:54

Re: Changing resolution on-the-fly with DOS commands

Postby Zup » 2019-7-07 @ 07:28

DOS games (usually) did not allow to change resolutions, they run at a fixed one. It does not matter what resolution had you previously, the game set it's own resolution when run and stick to it until it finishes.

In real DOS, you could use the MODE command to choose some resolutions (mostly changing between color/b&w 40 or 80 columns modes) and some video cards had commands to change to other modes (i.e: 132x60). But, when the game starts will change to its own resolution.

In your case, it's something misconfigured in DOSBox that makes your video output not to fill the entire screen and looks stretched. You should review your dosbox.conf to make dosbox scale properly the image.
I have traveled across the universe and through the years to find Her.
Sometimes going all the way is just a start...

I'm selling some stuff!
User avatar
Zup
Oldbie
 
Posts: 1288
Joined: 2003-10-04 @ 12:16

Re: Changing resolution on-the-fly with DOS commands

Postby EldritchNexus » 2019-7-07 @ 14:50

So I have the main DOSBox.conf file in the Resources directory. In Resources/Gamepack, I have gamepack.bat (which is the menu that I use to select the individual games) and all the folders for the games. In Resources/Gamepack/Batspire, I have Battlespire along with a separate DOSBox.conf specifically for Battlespire. Are there any commands I can add to Gamepack.bat so that I can switch from the DOSBox.conf in Resources to the DOSBox.conf in Resources/Gamepack/Batspire whenever I choose spire.bat in the Batspire directory, and then commands I can add to spire.bat to switch back to the original DOSBox.conf in Resources when I'm done?
EldritchNexus
Newbie
 
Posts: 37
Joined: 2018-7-13 @ 06:54

Re: Changing resolution on-the-fly with DOS commands

Postby EldritchNexus » 2019-7-09 @ 02:22

Or if there anything else I can try with these details in mind, could someone let me know?
EldritchNexus
Newbie
 
Posts: 37
Joined: 2018-7-13 @ 06:54

Re: Changing resolution on-the-fly with DOS commands

Postby jmarsh » 2019-7-09 @ 02:57

Have you tried just setting output=opengl (and aspect=true) so the picture is always scaled to fit?
jmarsh
Member
 
Posts: 316
Joined: 2014-1-04 @ 09:17

Re: Changing resolution on-the-fly with DOS commands

Postby EldritchNexus » 2019-7-09 @ 03:22

Tried it. Didn't work.
EldritchNexus
Newbie
 
Posts: 37
Joined: 2018-7-13 @ 06:54

Re: Changing resolution on-the-fly with DOS commands

Postby jmarsh » 2019-7-09 @ 03:37

Then your system must be broken somehow, because opengl always scales instead of putting black borders around the output.
jmarsh
Member
 
Posts: 316
Joined: 2014-1-04 @ 09:17

Re: Changing resolution on-the-fly with DOS commands

Postby EldritchNexus » 2019-7-09 @ 03:44

Here are my specs for [sdl] and [render]:

#
# Graphics output settings
#
[sdl]
# fullscreen -- Start dosbox directly in fullscreen.
fullscreen=true
# fulldouble -- Use double buffering in fullscreen.
fulldouble=false
# fullresolution -- What resolution to use for fullscreen: original or fixed size (e.g. 1024x640, 1280x854)
fullresolution=1024x640
# windowresolution -- Scale the window to this size IF the output device supports hardware scaling.
windowresolution=1024x640
# output -- What to use for output: surface,overlay,opengl,openglnb
output=opengl
# autolock -- Mouse will automatically lock, if you click on the screen.
autolock=true
# sensitiviy -- Mouse sensitivity.
sensitivity=100
# waitonerror -- Wait before closing the console if dosbox has an error.
waitonerror=true
# priority -- Priority levels for dosbox: lowest,lower,normal,higher,highest,pause (when not focussed)
# Second entry behind the comma is for when dosbox is not focused/minimized.
priority=higher,normal
# mapperfile -- File used to load/save the key/event mappings from.
mapperfile=mapper.txt
# usescancodes -- Avoid usage of symkeys, might not work on all operating systems.
usescancodes=true

#
# Render quality settings
#
[render]
# frameskip -- How many frames dosbox skips before drawing one. Use higher values on slower machines.
frameskip=1
# aspect -- Do aspect correction, if your output method doesn't support scaling this can slow things down!
aspect=true
# scaler -- Scaler used to enlarge/enhance low resolution modes.
# Supported are: none,normal2x,normal3x,advmame2x,advmame3x,hq2x,hq3x,2xsai,super2xsai,supereagle,
# advinterp2x,advinterp3x,tv2x,tv3x,rgb2x,rgb3x,scan2x,scan3x
# If forced is appended (like scaler=hq2x forced), the scaler will be used even if the result might not be desired.
scaler=normal2x


Any recommendations for what I should change?
EldritchNexus
Newbie
 
Posts: 37
Joined: 2018-7-13 @ 06:54

Re: Changing resolution on-the-fly with DOS commands

Postby EldritchNexus » 2019-7-17 @ 03:20

Please, I just want to know how I can make it so that Battlespire is at a resolution of 320x240 when I play it in the wrapper, yet keep every other game in that same wrapper at 1024x640 when I play them. There are more than two dozen games in this wrapper, but Battlespire is the only game that has this problem. I'm using Mac OS X, so I don't know how to do the dosbox -conf battlespire.conf thing with it.
EldritchNexus
Newbie
 
Posts: 37
Joined: 2018-7-13 @ 06:54

Re: Changing resolution on-the-fly with DOS commands

Postby EldritchNexus » 2019-7-17 @ 20:10

I'm moving this post here from the DOS forums, since I'm using DOSBox (Mac OS X, to be exact). I'm working on a DOSBox wrapper that can run every DOS installment of ZeniMax's major franchises: Wolfenstein, Commander Keen, Doom, The Elder Scrolls, Heretic/Hexen, Quake, and Fallout. Not only am I using official DOS installments, but also unofficial DOS ports created by third parties, such as Q2DOS, Hammer of Thyrion, and Doom 64 in Doom 2. I've linked these games together with batch files, even configuring said batch files to eject/mount drive D with the appropriate bin/cue files when needed. Here is a screenshot of the main batch menu which links these games together, so that you can see all the games in this wrapper.

Image

So far, all of these games work very well in this wrapper. Even Q2DOS, which was once the most unstable game of the bunch and prone to crashing every other minute in its own DOSBox wrapper, is running smoothly and without any crashes or other technical problems whatsoever.

However, I'm having problems getting Battlespire to run at the right resolution. I'm using 1024x640 for the wrapper, so that most of the games will fill up the entire screen on my Macbook. However, it causes Battlespire's screen to be tiny and have thick black bars on all sides. I don't know why it's like that, since Fallout has the same resolution as Battlespire, but is the right size in the wrapper and only has vertical black bars on the left and right. I would just like to know how I can make it so that Battlespire is at a resolution of 320x240 when I play it in the wrapper, yet keep every other game in that same wrapper at 1024x640 when I play them.

DOSBox.conf is in the directory Resources, and is configured to run gamepack.bat, which is the main batch file linking the games together in Resources/Gamepack. The Battlespire directory is Resources/Gamepack/Batspire, and gamepack.bat is configured to run spire.bat in the latter directory. With this in mind, is there anything I could try doing?
EldritchNexus
Newbie
 
Posts: 37
Joined: 2018-7-13 @ 06:54

Re: Changing resolution on-the-fly with DOS commands

Postby gdjacobs » 2019-7-17 @ 21:43

I suspect this is vid mode related. Most laptops only support a limited set of output resolutions which results in even less compatibility than desktop LCD displays. You can use scalers to filter the output from DOSBox so it's compatible with your laptop's native display mode.
https://www.dosbox.com/wiki/Scaler

If you want to completely avoid interpolation, use a DOSBox build that incorporates the pixel perfect patch such as YP80's ECE build. Note, however, that the DOSBox devs may not be able to assist with any issues that crop up with third party builds, as they won't necessarily be familiar or agree with changes introduced in out of tree patches. Always go to the release author (YP80 in the case of ECE) first.
User avatar
gdjacobs
l33t++
 
Posts: 6693
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Changing resolution on-the-fly with DOS commands

Postby EldritchNexus » 2019-7-17 @ 22:56

Here's the specs for my dosbox.conf file. Are there any changes you recommend making to it?

#
# Graphics output settings
#
[sdl]
# fullscreen -- Start dosbox directly in fullscreen.
fullscreen=true
# fulldouble -- Use double buffering in fullscreen.
fulldouble=false
# fullresolution -- What resolution to use for fullscreen: original or fixed size (e.g. 1024x640, 1280x854)
fullresolution=1024x640
# windowresolution -- Scale the window to this size IF the output device supports hardware scaling.
windowresolution=1024x640
# output -- What to use for output: surface,overlay,opengl,openglnb
output=opengl
# autolock -- Mouse will automatically lock, if you click on the screen.
autolock=true
# sensitiviy -- Mouse sensitivity.
sensitivity=100
# waitonerror -- Wait before closing the console if dosbox has an error.
waitonerror=true
# priority -- Priority levels for dosbox: lowest,lower,normal,higher,highest,pause (when not focussed)
# Second entry behind the comma is for when dosbox is not focused/minimized.
priority=higher,normal
# mapperfile -- File used to load/save the key/event mappings from.
mapperfile=mapper.txt
# usescancodes -- Avoid usage of symkeys, might not work on all operating systems.
usescancodes=true

#
# Render quality settings
#
[render]
# frameskip -- How many frames dosbox skips before drawing one. Use higher values on slower machines.
frameskip=1
# aspect -- Do aspect correction, if your output method doesn't support scaling this can slow things down!
aspect=false
# scaler -- Scaler used to enlarge/enhance low resolution modes.
# Supported are: none,normal2x,normal3x,advmame2x,advmame3x,hq2x,hq3x,2xsai,super2xsai,supereagle,
# advinterp2x,advinterp3x,tv2x,tv3x,rgb2x,rgb3x,scan2x,scan3x
# If forced is appended (like scaler=hq2x forced), the scaler will be used even if the result might not be desired.
scaler=normal2x

#
# System emulation settings
#
[dosbox]
# language -- Select another language file.
language=
# memsize -- Amount of memory dosbox has in megabytes.
memsize=64
# machine -- The type of machine tries to emulate: hercules,cga,tandy,pcjr,vga
machine=vga
# captures -- Directory where things like wave,midi,screenshot get captured.
captures=capture

#
# CPU tuning settings
#
[cpu]
# core -- CPU Core used in emulation: normal,simple,dynamic,auto (switches from normal to dynamic if appropriate)
core=auto
# cycles -- Amount of instructions dosbox tries to emulate each millisecond.
# Setting this value too high results in sound dropouts and lags. You can also let DOSBox guess the
# correct value by setting it to max. The default setting (auto) switches to max if appropriate.
cycles=max
# cycleup -- Amount of cycles to increase/decrease with keycombo.
cycleup=0
# cycledown Setting it lower than 100 will be a percentage.
cycledown=0

#
# Global audio settings
#
[mixer]
# nosound -- Enable silent mode, sound is still emulated though.
nosound=false
# rate -- Mixer sample rate, setting any devices higher than this will probably lower their sound quality.
rate=22050
# blocksize -- Mixer block size, larger blocks might help sound stuttering but sound will also be more lagged.
blocksize=2048
# prebuffer -- How many milliseconds of data to keep on top of the blocksize.
prebuffer=10

#
# Midi emulation settings
#
[midi]
# mpu401 -- Type of MPU-401 to emulate: none, uart or intelligent.
mpu401=intelligent
# device -- Device that will receive the MIDI data from MPU-401.
# This can be: default,alsa,oss,win32,coreaudio,none
device=coreaudio
# config -- Special configuration options for the device. In Windows put the id of the device you want to use.
# See README for details.
config=

#
# Digital soundcard settings
#
[sblaster]
# sbtype -- Type of sblaster to emulate: none,sb1,sb2,sbpro1,sbpro2,sb16
sbtype=sb16
# sbbase,irq,dma,hdma -- The IO/IRQ/DMA/High DMA address of the soundblaster.
sbbase=220
irq=7
dma=1
hdma=5
# mixer -- Allow the soundblaster mixer to modify the dosbox mixer.
mixer=true
# oplmode -- Type of OPL emulation: auto,cms,opl2,dualopl2,opl3
# On auto the mode is determined by sblaster type. All OPL modes are 'Adlib', except for CMS.
oplmode=auto
# oplrate -- Sample rate of OPL music emulation.
oplrate=22050

#
# Gravis Ultrasound emulation settings
#
[gus]
gus=false
gusrate=44100
gusbase=240
gusirq=5
gusdma=3
ultradir=C:\ULTRASND

#
# PC speaker emulation settings
#
[speaker]
# pcspeaker -- Enable PC-Speaker emulation.
pcspeaker=true
# pcrate -- Sample rate of the PC-Speaker sound generation.
pcrate=22050
# tandy -- Enable Tandy Sound System emulation (off,on,auto).
# For auto Tandysound emulation is present only if machine is set to tandy.
tandy=auto
# tandyrate -- Sample rate of the Tandy 3-Voice generation.
tandyrate=22050
# disney -- Enable Disney Sound Source emulation. Covox Voice Master and Speech Thing compatible.
disney=true

#
# Joystick emulation settings
#
[joystick]
# joysticktype -- Type of joystick to emulate: auto (default), none, 2axis (supports two joysticks), 4axis,
# fcs (Thrustmaster), ch (CH Flightstick).
# none disables joystick emulation.
# auto chooses emulation depending on real joystick(s).
joysticktype=none
# timed -- enable timed intervals for axis. (false is old style behaviour).
timed=true
# autofire -- continuously fires as long as you keep the button pressed.
autofire=false
# swap34 -- swap the 3rd and the 4th axis. can be useful for certain joysticks.
swap34=false
# buttonwrap -- enable button wrapping at the number of emulated buttons.
buttonwrap=true

#
# Serial port settings
#
[serial]
# serial1-4 -- set type of device connected to com port.
# Can be disabled, dummy, modem, nullmodem, directserial.
# Additional parameters must be in the same line in the form of
# parameter:value. Parameter for all types is irq.
# for directserial: realport (required), rxdelay (optional).
# for modem: listenport (optional).
# for nullmodem: server, rxdelay, txdelay, telnet, usedtr,
# transparent, port, inhsocket (all optional).
# Example: serial1=modem listenport:5000
serial1=dummy
serial2=dummy
serial3=disabled
serial4=disabled

#
# DOS and BIOS settings
#
[dos]
# xms -- Enable XMS support.
xms=true
# ems -- Enable EMS support.
ems=true
# umb -- Enable UMB support.
umb=true
# keyboardlayout -- Language code of the keyboard layout (or none).
keyboardlayout=none

#
# Novell's NetWare network settings
#
[ipx]
# ipx -- Enable ipx over UDP/IP emulation.
ipx=true

[autoexec]
@ECHO OFF
mount C "Resources/Gamepack" -freesize 1000
mount d Resources/
mount t Resources/Gamepack/Q2DOS/DOSLFN

t:
doslfn.com

c:
Gamepack.bat
Exit

EldritchNexus
Newbie
 
Posts: 37
Joined: 2018-7-13 @ 06:54

Re: Changing resolution on-the-fly with DOS commands

Postby gdjacobs » 2019-7-18 @ 02:56

Try output=overlay and aspect=true for starters.
User avatar
gdjacobs
l33t++
 
Posts: 6693
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Changing resolution on-the-fly with DOS commands

Postby EldritchNexus » 2019-7-18 @ 03:33

Nope. Still not working. Are there any commands I can add to the batch files?
EldritchNexus
Newbie
 
Posts: 37
Joined: 2018-7-13 @ 06:54

Re: Changing resolution on-the-fly with DOS commands

Postby gdjacobs » 2019-7-18 @ 04:25

What happens when you run it windowed?
User avatar
gdjacobs
l33t++
 
Posts: 6693
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Changing resolution on-the-fly with DOS commands

Postby EldritchNexus » 2019-7-18 @ 04:58

The screen changes size to fit the game. Also, the colors on Battlespire get really messed up in windowed mode. I prefer keeping it fullscreen anyway.
EldritchNexus
Newbie
 
Posts: 37
Joined: 2018-7-13 @ 06:54

Re: Changing resolution on-the-fly with DOS commands

Postby gdjacobs » 2019-7-18 @ 23:15

Question is, why isn't the scaler engaging? Try "scaler=normal2x forced".
User avatar
gdjacobs
l33t++
 
Posts: 6693
Joined: 2015-11-03 @ 05:51
Location: The Great White North

Re: Changing resolution on-the-fly with DOS commands

Postby EldritchNexus » 2019-7-18 @ 23:46

I tried that, but the wrapper crashes when I select Battlespire.
Last edited by EldritchNexus on 2019-7-20 @ 23:46, edited 2 times in total.
EldritchNexus
Newbie
 
Posts: 37
Joined: 2018-7-13 @ 06:54

Next

Return to DOSBox General

Who is online

Users browsing this forum: No registered users and 3 guests