Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Dosbox setup with CRT emulation

Tomatohead

Learned
Joined
Jul 15, 2017
Messages
212
Location
Matsuyama Castle
Not sure if this is the right place for this thread or if there is any need for this. If not, please transfer or nuke the thread.

I'd like to share info on how to setup Dosbox with CRT emulation to make all those old DOS games look nice and crisp. The default branch of Dosbox doesn't support any kind of shaders and it's development has been stopped slowed down so we will need to use different branch for our needs. I assume we are on Windows now but setting it up on any Unix-like system shouldn't be that much different.

Download the latest version from here:
https://github.com/aqualung99/dosbox-0.74-ES/blob/master/dosbox-0.74-ES_Windows_041617.zip

By default it will use a config file located at %appdata%\local\DOSBox\dosbox-0.74-ES but we are using different way to make our own config files for each game. As you remember some games need different configurations be it memory or sound devices etc. The basic idea is to have Dosbox installed in it's own directory which in our case is D:\Vidya\Dosbox and games are in separate directories under D:\Vidya\* (for example D:\Vidya\Wizardry 7\ etc). For each game we'll do a separate config file and use a shortcut to launch the game.

Here's basic config for Dosbox-ES which has been setup to run in 922p window which will fit to your 1080p screen nicely. When it's fullscreen it runs in normal 1920x1080 resolution. There's also couple of lines for the pixel shader as well. Dosbox-ES is using Timothy Lotte's shader which is pretty nice. If you need to edit the shader parameters you'll need to edit the .ps file itself.

Save this file for example as Wizardry7.conf into your Dosbox-ES directory:

[sdl]
fullscreen=false
fullresolution=1920x1080
windowresolution=1280x922
output=opengles
autolock=true
sensitivity=200
waitonerror=true
priority=higher,normal
mapperfile=mapper-0.74-ES.map
vertex_shader=.\Shaders\DosBoxMain.vs
pixel_shader=.\Shaders\DosBoxMain_Lottes2.ps
pixel_shader_no_palette=.\Shaders\DosBoxNoPal.ps
vertex_shader_pass2=.\Shaders\fb.vs
pixel_shader_pass2=.\Shaders\fb.ps
perform_2pass=false
use_16bit_textures=false
show_perf_counters=false

[dosbox]
language=
machine=svga_s3
captures=capture
memsize=16

[render]
frameskip=0

[cpu]
#cycles = fixed %NUMBER or max or auto
core=auto
cputype=auto
cycles=fixed 10000
cycleup=10
cycledown=20

[mixer]
nosound=false
rate=48000
blocksize=2048
prebuffer=80

[midi]
mpu401=intelligent
mididevice=default
midiconfig=1

[sblaster]
sbtype=sb16
sbbase=220
irq=7
dma=1
hdma=5
sbmixer=true
oplmode=auto
oplemu=default
oplrate=48000

[speaker]
pcspeaker=true
pcrate=44100
tandy=auto
tandyrate=44100
disney=true

[joystick]
joysticktype=none
timed=true
autofire=false
swap34=false
buttonwrap=false

[serial]
serial1=dummy
serial2=dummy
serial3=disabled
serial4=disabled

[dos]
xms=true
ems=true
umb=true
keyboardlayout=auto

[autoexec]
# Lines in this section will be run at startup.
# You can put your MOUNT lines here.
mount c "D:\Vidya\Wizardry 7"
c:
DS.EXE
#RUN.BAT
#install.exe

At the end of the config file are the actual mount commands which you need to set to point to the game directory in question and depending what you need to run first. Usually you'll want to run setup or install first and after that the game executable.

And you can make a shortcut for the game like this:
D:\Vidya\DOSBOX\dosbox.exe -conf Wizardry7.conf -noconsole

This way it's easy to store everything inside Dosbox directory and make configuration for each game separately.

BTExweO.jpg

AZ2V01P.jpg

7Z4DWZ4.jpg
 
Last edited:

Tomatohead

Learned
Joined
Jul 15, 2017
Messages
212
Location
Matsuyama Castle
It depends of the game. Especially on MAME it really works well as it has fancier things going on like emulating the phosphor glow via trailing and stuff and arcade games had real scanlines unlike computer screens.
 

Falkner

Thread Decliner
Patron
Joined
Mar 25, 2011
Messages
658
Wasteland 2
Looks great, but my Laptop can't seem to handle it (Intel N3530).
 

Tomatohead

Learned
Joined
Jul 15, 2017
Messages
212
Location
Matsuyama Castle
Thing about SVN-Daum are compatibility issues. For example World of Xeen didn't work at all on SVN-Daum, I couldn't get past the intro animation it was always crashing. I was using Daum before settling to -EN branch as that's still being improved upon unlike Daum where the last version came out couple of years ago. Besides you still need to make a separate config file for different games. But anyway, apples and oranges. Whatever rocks your boat.
 
Last edited:
Joined
Aug 10, 2012
Messages
5,866
I recently finished a complete playthrough of World of Xeen with the Daum build. Just make sure to run it with "LH" before the executable. so, "LH Xeen.exe"
 

Tomatohead

Learned
Joined
Jul 15, 2017
Messages
212
Location
Matsuyama Castle
Ahh that was probably it. I really tried numerous things but it always ended up crashing. I understood it was memory allocation related but no cigar. Then I decided to try to find more up-to-date branch with shader support. Best way to play would still be to have an old beige PC for dos games.
 

newtmonkey

Arcane
Joined
Aug 22, 2013
Messages
1,725
Location
Goblin Lair
Scanline emulation looks very nice on SVN-Daum, but I recommend disabling the filtering. I have an old CRT monitor I sometimes use to play DOS games via DOSBOX at native res, and while you do have noticeable scanlines (not nearly as noticeable as on a TV tho), it is extremely clear and sharp.
The filtering in CRT shaders is meant to emulate plugging your NES into a CRT over composite video, not playing computer games on a VGA monitor.
 

Tomatohead

Learned
Joined
Jul 15, 2017
Messages
212
Location
Matsuyama Castle
Yeah that makes sense. I always remember the image being very sharp on computer screen. To be honest, it's been now well over 10 years since I last used or even saw CRT in action, at least that. It's crazy when you think about
getting old.
 

Boleskine

Arcane
Joined
Sep 12, 2013
Messages
4,045
Here is another CRT emulation modification for DOSBox.

https://mattiasgustavsson.itch.io/dosbox-crt

https://www.pcgamer.com/this-dos-em...-to-having-a-chunky-crt-monitor-on-your-desk/

This DOS emulator is the next best thing to having a chunky CRT monitor on your desk
By Andy Kelly 4 hours ago

Simulate the authentic 1990s PC gaming experience.

m7DVjvAxJW3XvCkKj6vNZ3-320-80.jpg

(Image credit: LucasArts)

I love crisp pixel art, but when you're playing a DOS game on a modern 4K monitor and it looks perfectly sharp, you aren't getting the authentic experience. Old PC games were designed to be played on CRT monitors—y'know, those giant beige things that used to take up half your desk. The image on these displays had a very particular look, which artists of the time took into consideration when they created the art for their games. Check out my new favourite Twitter account, CRT Pixels, and you'll see what I mean.

CRT filters have been around for years, but this one, created by Mattias Gustavsson, is the first really good one I've seen for DOSBox. Better yet, Gustavsson has hacked his filter into a modified version of DOSBox, meaning you don't have to mess around with any settings; you can just download it and play. It comes bundled with a few DOS game demos to show off the filter, but you can hit Ctrl+X to bring up a prompt and run your own games.

TBs89kfCwLVd68nFxBv5mS-970-80.jpg

(Image credit: Midway)

"This is just a slightly modified version of the standard DOSBox emulator," writes Gustavsson. "I have just hacked in my own shader which emulates some aspects of old CRT monitors, as I prefer to play emulated games with such a filter, and the built-in DOSBox filters are not to my taste." The filter adds scanlines, subtle chromatic aberration, and a slight curve to the image, which does a very good job of simulating the look of an old PC monitor.

The filter also includes the bezel of a period-appropriate monitor, which is a nice touch, although I would like the option to switch this off and on. Alas, Gustavsson doesn't seem to be interested in updating or expanding the tool. "I made this because I wanted it myself, but since I have it I thought I'd share it," he writes. "There's probably lots of things which could be done better, but it's good enough for my needs right now, so leaving it like this for now."

I'm a fan of purposefully lo-fi visuals, whether it's CRT filters like this, the PlayStation revival scene, or games like Loop Hero and Alien: Isolation, which incorporate these scuzzy, analogue visual elements into their aesthetic. It's partly nostalgia, because I grew up with this technology. But also, it just looks really cool. Emulating games shouldn't be about blowing games up to modern resolutions they were never meant to be viewed at; it should be about recreating the original experience as closely as possible.

JtBJUsAWfP9LP26X9yNYvC-970-80.jpg

(Image credit: Blizzard)

A filter will never be as good as an actual CRT display, of course. But for those of us who either can't afford one, or live in tiny apartments where they're impractical to own, this does the job—and does it very well. You can download DOSBox-CRT for free here and see for yourself.
 

newtmonkey

Arcane
Joined
Aug 22, 2013
Messages
1,725
Location
Goblin Lair
PC Gamer at this point does not even know what old PC games look like lol.

DOS games played on a VGA monitor look nothing like this. VGA mode13h "double scans" every horizontal line, so you don't get as pronounced a "scanline effect" as you'd get on, say, a SNES plugged into a TV. Also, even the cheapest VGA monitors are razor sharp, so I dunno why this guy is blurring the screen as though he's playing Warcraft through a composite video cable plugged into a dying TV.

"A filter will never be as good as an actual CRT display, of course. But for those of us who either can't afford one, or live in tiny apartments where they're impractical to own, this does the job"
Actually, just running DOSBOX normally with aspect ratio correction applied looks closer to actual hardware connected to a VGA monitor than this blurry, bloomy mess lol.
 
Last edited:

Rincewind

Magister
Patron
Joined
Feb 8, 2020
Messages
2,415
Location
down under
Codex+ Now Streaming!
Yeah, that's not how PC CRT monitors look like. These screenshots kind of mimic arcade (15 kHz) monitors and small TVs.

The next release of DOSBox Staging (final coming out next week, release candidate downloadable now) will contain authentic PC CRT monitor emulation, from Hercules to SVGA. The best of all, it's *zero-config* out of the box; the emulator dynamically switches shaders based on the emulated video mode and your viewport resolution (different shaders need to be used for the same 320x200 VGA content on 1080p screens, 4K screens, then there's fullscreen vs windowed, and anything in-between... it's fully automatic).

More info (scroll a bit down for screenshots):

https://dosbox-staging.github.io/releases/release-notes/0.81.0-rc/#authentic-adaptive-crt-emulation
 
Joined
Aug 10, 2012
Messages
5,866
Yeah, that's not how PC CRT monitors look like. These screenshots kind of mimic arcade (15 kHz) monitors and small TVs.

The next release of DOSBox Staging (final coming out next week, release candidate downloadable now) will contain authentic PC CRT monitor emulation, from Hercules to SVGA. The best of all, it's *zero-config* out of the box; the emulator dynamically switches shaders based on the emulated video mode and your viewport resolution (different shaders need to be used for the same 320x200 VGA content on 1080p screens, 4K screens, then there's fullscreen vs windowed, and anything in-between... it's fully automatic).

More info (scroll a bit down for screenshots):

https://dosbox-staging.github.io/releases/release-notes/0.81.0-rc/#authentic-adaptive-crt-emulation
Hey Rincewind, I downloaded 0.81.0-RC and generated a new config file. However, crt-auto doesn't seem to be doing anything.

glshader = crt-auto

in the .ini file, right?
 

Rincewind

Magister
Patron
Joined
Feb 8, 2020
Messages
2,415
Location
down under
Codex+ Now Streaming!
Yeah, that's not how PC CRT monitors look like. These screenshots kind of mimic arcade (15 kHz) monitors and small TVs.

The next release of DOSBox Staging (final coming out next week, release candidate downloadable now) will contain authentic PC CRT monitor emulation, from Hercules to SVGA. The best of all, it's *zero-config* out of the box; the emulator dynamically switches shaders based on the emulated video mode and your viewport resolution (different shaders need to be used for the same 320x200 VGA content on 1080p screens, 4K screens, then there's fullscreen vs windowed, and anything in-between... it's fully automatic).

More info (scroll a bit down for screenshots):

https://dosbox-staging.github.io/releases/release-notes/0.81.0-rc/#authentic-adaptive-crt-emulation
Hey Rincewind, I downloaded 0.81.0-RC and generated a new config file. However, crt-auto doesn't seem to be doing anything.

glshader = crt-auto

in the .ini file, right?
That's right. You must have an old Staging config in your user folder that has `glshader` set to something else, hence you're not getting the new `crt-auto` default.

Check out the upgrade instructions here:
https://dosbox-staging.github.io/re...81.0-rc/#upgrading-your-primary-configuration

But essentially, yes, all you need is set `glshader = crt-auto` in your .conf file.

You also might wanna look into the layered configuration approach I'm recommending in the Getting Started guide:
https://dosbox-staging.github.io/getting-started/passport-to-adventure/#layered-configurations

But for VGA games on 1080p, you won't see a huge difference. VGA really needs 1440p at least.
 
Joined
Aug 10, 2012
Messages
5,866
I made sure to delete the user folder (together with all my old configs) and generated new ones. I also unzipped the RC into a fresh folder.

And I have a 4k screen. Oh well, I'll go back to using crt-fakelottes-tweaked.
 

Rincewind

Magister
Patron
Joined
Feb 8, 2020
Messages
2,415
Location
down under
Codex+ Now Streaming!
I made sure to delete the user folder (together with all my old configs) and generated new ones. I also unzipped the RC into a fresh folder.

And I have a 4k screen. Oh well, I'll go back to using crt-fakelottes-tweaked.
Well, if you're experiencing an issue, it would be good to understand what it is so we can fix it. This is the first time someone has reported the auto shaders don't work at all out-of-the-box using the stock config. eXoDOS also uses them, so we'd be swamped with bug reports if it was so flaky :) I'm sure it's something simple; the shaders work fine even on 10+ year old Macs with bottom-of-the-barrel crap integrated Intel GPUs and other ancient hardware... So your issue must be something simple.

What OS are you on? Could you upload the logs somewhere and post a link? A screenshot would help too.

Alternatively, please raise an issue ticket in our GitHub issue tracker with all relevant detail.
 
Last edited:

Rincewind

Magister
Patron
Joined
Feb 8, 2020
Messages
2,415
Location
down under
Codex+ Now Streaming!
I'm on Windows 11 Enterprise, v. 22H2.

My video card is an RTX 3070. Here are a couple of captures of the status window. Apparently it's not finding the shader file.

It's defaulting to the 'none' shader.


config file is default, reset according to the site's instructions.
Did you download the portable 0.81.0-RC2 ZIP file from here?
https://dosbox-staging.github.io/releases/windows/#0810-release-candidate

Then just unpacked it to "D:\emu\dosbox_staging\" which was a brand new empty folder?

If so, you must have the correct shaders; I've just double checked the ZIP file.

It seems to me that you've managed to mix an old installation with the 0.81.0-RC2. According to the logs, those are the shader files from the *previous* version. So just reinstall from scratch, unzip the ZIP into a brand new empty folder.
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom