Duke4.net Forums: CRT screen imitation in DOSBox - Duke4.net Forums

Jump to content

Hide message Show message
Welcome to the Duke4.net Forums!

Register an account now to get access to all board features. After you've registered and logged in, you'll be able to create topics, post replies, send and receive private messages, disable the viewing of ads and more!

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

CRT screen imitation in DOSBox

User is offline   MrFlibble 

  • 642

#1

Here's a little something I found while playing around with shaders that are bundled with DOSBox SVN Daum. There's a shader called CRT-geom-curved.fx which creates an imitation of a CRT screen, complete with the curved surface effect:
Posted Image

Some Googling revealed that originally this shader was written for console emulators to make the games appear as close to how they'd look like on a CRT TV screen as possible. It also turns out that the shader is very customizable - a very detailed description can be found here, although not everything is applicable to the DOSBox version.

To set up DOSBox SVN Daum with this shader (Gulikoza's build should also work though), the following lines need to be changed in dosbox.conf:

Quote

[sdl]
output=direct3d
pixelshader=CRT-geom-curved.fx

[render]
aspect=true
scaler=hardware2x

To modify the various settings of the shader itself, you'll need to edit the shader file. Thus to entirely disable the screen curvature imitation,comment out (with a double slash) the following line:

Quote

// Enable screen curvature.
//#define CURVATURE

It is also possible to make the screen less curved but not entirely flat, by editing the following parts of the shader file:

Quote

// aspect ratio
float2 aspect = { 0.5, 0.5 };

and

Quote

// size of curved corners
float cornersize = 0.02;

Unllike the built-in DOSBox scalers that only enhance 320x200 resolution output, the shader modifies all screen output in DOSBox and will work with higher resolutions as well:
Posted Image
The same scene in 640x480:
Posted Image


This post has been edited by MrFlibble: 27 April 2014 - 04:07 AM

3

User is offline   Frederik Schreiber 

  • Slipgate Studios
  • 1,138

#2

Thats pretty damn awesome ;)
I always play emulated games with Scanline Filters to make them appear as "Close" to their original release as possible.
I will definitely try this out.

Thanks for the tip!
1

User is offline   High Treason 

  • 1,093

#3

I still use CRT screens, this effect looks nothing like one. At least, not a monitor. It does resemble a TV a little though.

My Youtube - My Let's Plays - SoundCloud - My Website - My FTP - Forum

You have got to let the rhythm move you, move you. You have got to let the rhythm move your body to the beat.

This post has been edited by High Treason: 27 April 2014 - 03:51 AM

1

User is offline   MrFlibble 

  • 642

#4

View PostHigh Treason, on 27 April 2014 - 03:50 AM, said:

I still use CRT screens, this effect looks nothing like one. At least, not a monitor. It does resemble a TV a little though.

Well, not everyone has the luxury of accessible CRT monitors these days. Admittedly this is not a 100% accurate CRT monitor representation but at least it's closer to one than scalers or shaders that just add scanlines.

Perhaps a more sophisticated shader that produces screen output which is more true to an authentic CRT monitor experience may be developed for DOSBox someday.


This post has been edited by MrFlibble: 27 April 2014 - 03:56 AM

0

User is offline   High Treason 

  • 1,093

#5

Maybe. It's still a pretty neat effect in it's own right anyway and I'll probably make use of it at some point.

My Youtube - My Let's Plays - SoundCloud - My Website - My FTP - Forum

You have got to let the rhythm move you, move you. You have got to let the rhythm move your body to the beat.
1

User is offline   Cage 

  • 565

#6

Yeah, I'm always using those filters if the emulator supports them, close enough for me. ;)

Authentic experience is great, but if one really wants an authentic experience, the best way to go is to just buy an old console and a tv (or an complete old PC), for which you might not have the room or funds for.

The filters are awesome for all those who want a little more nostalgia and can't be bothered with a CRT screen. I wouldn't bother setting one up even if I had one, to be honest.

Posted Image
1

User is offline   MrBlackCat 

  • 390

#7

I don't own any other technology but standard Glass Tube CRTs... even my console gaming is enjoyed on a Widescreen Glass Tube. (Sony WEGA - Trinitron) I have tried a couple of LCD monitors for gaming, but gave them away. Meh...
No other current technology switches as fast as good ole phosphorus on glass. That is what I notice when gaming. Is getting better for sure though... I saw a large screen at a relatives house (2013) and it was tolerable for sure... for desktop gaming use I have not seen anything yet that I liked as much as CRT though.

The idea that someone made this shows an appreciation of preservation of original stuff for sure. I know it isn't perfect, but it is far better than without it. ;) I still have maybe 6 old monitors working, but they are getting harder to find for sure. I paid less than $20 for most of them.

I really like this idea though. :D

MrBlackCat

Posted Image
1

User is offline   MrFlibble 

  • 642

#8

I've asked around the experts at VOGONS, and leilei suggested CRT.D3D.br.fx, which indeed looks quite well in fullscreen - I made the mistake of making screenshots in windowed 640x480 mode, which does not do justice to the shaders' capabilities.

Here's a small comparison of CRT-geom-curved.fx, CRT.D3D.fx and CRT.D3D.br.fx in fullscreen mode (1600x900).
0

User is offline   MrFlibble 

  • 642

#9

Apparently the normal2x scaler produces a better result compared to hardware2x. Here's a comparison of all three CRT imitation shaders:

CRT-geom-curved (hardware2x)
CRT-geom-curved (normal2x)
CRT.D3D (hardware2x)
CRT.D3D (normal2x)
CRT.D3D.br (hardware2x)
CRT.D3D.br (normal2x)
0

User is offline   Mr.Deviance 

  • 241

#10

View PostFrederik Schreiber, on 27 April 2014 - 03:47 AM, said:

Thats pretty damn awesome :lol:
I always play emulated games with Scanline Filters to make them appear as "Close" to their original release as possible.
I will definitely try this out.

Thanks for the tip!

If I would have been naive, I would have expected you to already know about this from your own tinkering and experimenting.
Especially taking into account that you seem to picture yourself as a classic gamer, interested in classic oldschool games with an emphasis on fps games in particular.
It's weird that you never found the time to properly explore dosbox that is such a well known app to a lot of classic games fans.
Though, the fact that you didn't know about this feature already doesn't really surprise me after I've seen you overly excited in a youtube video, when you found out about TeamViewer less than a year ago...

This post has been edited by Mr.Deviance: 30 April 2014 - 05:43 PM

0

User is offline   Lunick 

  • Snazzy Ex Tazzy
  • 4,654

#11

View PostMr.Deviance, on 30 April 2014 - 05:42 PM, said:

<post>


You should really change your signature to "I hunt Danish people as a hobby"

LeoTCK - EDIT: Jimmy, Blow it out your ass!
http://duke3dmaps.tumblr.com/
Posted Image
0

User is offline   Hendricks266 

  • Sperge Overlord
  • 6,318

  #12

I can do one better.
0

User is offline   Person of Color 

  • Senior Unpaid Intern at Viceland
  • 2,888

#13

>Using DOSBox
>Not building your own Pentium box
>Not handpicking SoundBlaster 16's for actual OPL3 synth chips
>No old computer whine from mechanical hard drive bearings
>Not feeling the lovely progressive click of an ISA card sliding into it's warm, moist hole
>Not running Hover! off a REAL Windows 95 OSR2.1 disc
>Not installing a Quantum Bigfoot for the lulz
>EMULATING A CRT

Posted Image

Posted Image
There is no race, only racists.
Proud trigendered babysexual pan-Korean anarcho-transhumanist
Muslims are peaceful people oppressed by cis white males! Hillary for presidynt!
WE WILL NOT BE SILENCED BY DONALD TRUMP'S VIOLENCE!

This post has been edited by Protected by Viper: 01 May 2014 - 03:01 PM

1

User is offline   MusicallyInspired 

  • 3,262

#14

I have a 6.4 GB Bigfoot in my 486. With a CT3900 AWE32. Two, actually. It's nice not to have the stuck MIDI note problem with that model. Though, I blew the Line In on one...

Roland SC-55 Music Packs
Latest release: Heretic SC-55 Music Pack (12/12/18)
*new* Buy the Mage's Initiation Original Soundtrack on Bandcamp by me!
Buy the P&C Adventure/RPG game Mage's Initiation on Steam, GOG, and Humble
0

User is offline   Mr.Deviance 

  • 241

#15

View PostLunick, on 30 April 2014 - 05:46 PM, said:

You should really change your signature to "I hunt Danish people as a hobby"

What? I'm not biased against danish people.
Which other Danish people did I hunt other than Fresch?
I make no distinction of where he comes from.
I honestly didn't even remember that he was Danish until you told me.
Also something tells me that very few people from his country would be willing to categorize him as a role model of their own nation.
So I have yet to think bad of all danish people just because of him.

This post has been edited by Mr.Deviance: 01 May 2014 - 08:48 PM

0

User is offline   MrFlibble 

  • 642

#16

So I found this (yet another) thread about the correct aspect ratio of DOS and Amiga games, and one post contains comparisons of what an image from Monkey Island looks on a real CRT display and on an LCD display (using various methods of achieving correct aspect ratio). While apparently it was not the author's original intent, this comparison makes it very obvious that 90s era video game graphics displayed on modern LCD monitors look nothing like they did on CRT displays something that I personally almost forgot I have to admit.

With this I revisited the original VOGONS topic, and apparently there is now an even more sophisticated (and supposedly accurate) CRT emulation shader called CRT-Royale. This is available in RetroArch but apparently it's not easy to run DOSBox via RetroArch with this shader as suggested here (not sure how up to date this info is though).

A bit later in the same VOGONS thread there are videos by a user who succeeded in configuring DOSBox with RetroArch to use CRT shaders, but I think this is not CRT-ROyale but another shader (?):


I wonder if this kind of shader could be included with source ports like EDuke32?

UPD: Someone ported several more modern shaders to be used with DOSBox SVN Daum, available here and here.


This post has been edited by MrFlibble: 23 December 2018 - 08:55 AM

0

User is offline   leilei 

  • 525

#17

I ended up hacking CRT-Easymode with more VGA-related hackery (altering scanlines for different refresh rates by checking resolution, as well as reducing them if the res is too high and close to the host res) while having a preset that also has some bits of VGA signal loss for use with PCem v13+ where a CRT shader would act far more convincing, as that emulates video cards' VGA out themselves with whatever the BIOS puts out, and no scaler trickery is necessary... The only thing I'm really missing here is emulation of overscan regions (not a shader area, and a couple of video cards emulated do it (Plantronics)) and the ye old IBM monitor isn't blurry enough..


Daum sucks. It's hopelessly broken, limited (no shader chains, HLSL only) and way far behind the SVN to the point many of the recent forum issue reports tend to admit they're using Daum, often issues already fixed in mainline.

Attached thumbnail(s)

  • Attached Image: telend2.jpg
  • Attached Image: aseroid.png
  • Attached Image: bigdrive.jpg
  • Attached Image: cheat.png
  • Attached Image: jace.png


Posted Image

This post has been edited by leilei: 23 December 2018 - 03:59 PM

2

User is offline   NightFright 

  • The Truth is in here
  • 904

#18

Fascinating how we were all impressed when we had better monitors, sound cards and other hardware, while now we strife to relive classic experiences as detailed as possible. Under certain circumstances at least. :P
1

User is offline   MusicallyInspired 

  • 3,262

#19

It's a lot like my drive to make SC-55 music packs. It's not just that it's classic hardware, but in many cases the graphics were designed with that hardware and thus look best in it. Pixelated images don't look near as pixelated on a CRT because of the phosphor bleed and all that. It just looks normal because a CRT can't display as much detail. Modern displays are fantastic for displaying higher resolutions because that's what they were made for. Sharp and crisp pixels to the finest detail. CRTs never were.

However, I'm still against the blur effect an LCD causes when displaying low resolution images at full screen. That's not the same! :P

I'll be keeping an eye on CRT-Royale. I've been using a CRT shader in DOSBox DAUM for a while.

Roland SC-55 Music Packs
Latest release: Heretic SC-55 Music Pack (12/12/18)
*new* Buy the Mage's Initiation Original Soundtrack on Bandcamp by me!
Buy the P&C Adventure/RPG game Mage's Initiation on Steam, GOG, and Humble
1

User is offline   leilei 

  • 525

#20

It's not just CRT phosphors. Video cards back then also didn't have the best DACs on the block and a sharp VGA signal tends to be exclusive to Matrox hardware for the longest time until ~1999. Many of these older video cards look terrible on modern displays, especially S3 cards where they get a brightness issue.

Posted Image

This post has been edited by leilei: 24 December 2018 - 08:25 PM

1

User is offline   MrFlibble 

  • 642

#21

View PostNightFright, on 24 December 2018 - 05:12 AM, said:

Fascinating how we were all impressed when we had better monitors, sound cards and other hardware, while now we strife to relive classic experiences as detailed as possible.

I have to admit that I did not realise for a long time that a very drastic difference existed between CRT and LCD displays, or actually I think I subconsciously shrugged it off on the assumption that new (=LCD) is simply better.

Thinking of this, now I vaguely remember how when you opened the shutdown menu in Windows 98, the desktop would darken. When I replaced my CRT monitor with an LCD one, it became apparent that the darkening effect was accomplished by a mesh of black pixels in a checkerboard pattern imposed on the desktop. Similarly, colour dithering effects on some Windows icons fell apart for the same reason. However I did not realise back then that this was not an "improvement" towards clearer pixels, but actually a transition to a different medium with its own rules and idiosyncrasies.

View PostMusicallyInspired, on 24 December 2018 - 11:28 AM, said:

IIt's not just that it's classic hardware, but in many cases the graphics were designed with that hardware and thus look best in it.

That. It occurred to me that becoming used to how VGA graphics look on a modern LCD display is kinda sorta similar to how today we're used to a complete lack of paint on statues from classical Antiquity, and unless specifically informed, people won't even realise that originally they were painted. Even more so, from the Renaissance on, new statues inspired by Classical Antiquity were not painted either (and not created with a paint job in mind), one could compare this to modern indie games with big pixels and whatnot.

But the difference is that the transition from CRT to LCD happened within a generation.
1

User is offline   MusicallyInspired 

  • 3,262

#22

I still have a Matrox Mystique card. :D

Roland SC-55 Music Packs
Latest release: Heretic SC-55 Music Pack (12/12/18)
*new* Buy the Mage's Initiation Original Soundtrack on Bandcamp by me!
Buy the P&C Adventure/RPG game Mage's Initiation on Steam, GOG, and Humble
0

User is offline   MrFlibble 

  • 642

#23

As I said above, it's cool that people still have old hardware. Recently I came across this video and I love it:


However it's not like retro hardware will be ever produced in the future, and if a good level of CRT emulation is attained that will probably be much better for the users' health compared to real CRTs (I guess).

I think that a reasonable question to explore here is what actually makes video game art of the 90s era what it really is, and how to properly reproduce it on modern hardware. Drawing another parallel with traditional forms of art, for example a reproduction of a painting in an art album is supposedly faithful to the original, even though presented on a different medium and lacking some of the original's qualities (e.g. the brush strokes might not be visible at all, the image is entirely flat yet bends with the album's page). On the other hand, I think we will all agree that if you take "raw" output like a DOSBox screenshot of a VGA game (e.g. what MobyGames uses) this won't be an accurate representation of what the game in question was supposed to look like (but they did look like that, stretched to 640x400, on LCD displays of early laptops).

If you run DOSBox with normal scaling and aspect ratio correction (or run a VGA game on a 4:3 LCD display), this is supposedly accurate but not really identical to what would be seen on a CRT screen. It has been observed and argued that LCD displays make the imperfections of low-resolution graphics more obvious, while a CRT image produces a different effect that is more smooth. I wonder if there is a way -- at least in theory -- to achieve similar level of quality without having to emulate all aspects of a CRT display.

For example, as far as I can tell there is no single opinion on scalers that smooth a pixellated image for larger displays. Apparently many people don't find this acceptable (older scalers don't really do a good job anyway), but at the same time scaling filters were used back in the 90s for ports of DOS games to systems like Macintosh. Many scalers also fail to properly render lines at odd angles, and features such as dithering do not translate well into larger images when handled in such a straightforward manner.

Another issue is the colour because colours definitely look different on an LCD monitor compared to a CRT one.
0

User is offline   leilei 

  • 525

#24

Regarding color issues, there's more than just LCD.... and then you'll run into the response issue.

There's also the pixel density issue, as you'd really need a >1080p high res but at a smaller size like <27" for all the pixel density to make foolproof scanline+shadowmask effects, and that's very hard to come by...

and finally the 60hz-is-not-enough issue for most, relevant as a large majority of VGA DOS games ran at 70hz.

Posted Image

This post has been edited by leilei: 26 December 2018 - 07:36 AM

1

User is offline   MusicallyInspired 

  • 3,262

#25

Is 4k enough? Maybe some advanced shader could have an option to enter your physical monitor size and adjust its display accordingly or something.

Roland SC-55 Music Packs
Latest release: Heretic SC-55 Music Pack (12/12/18)
*new* Buy the Mage's Initiation Original Soundtrack on Bandcamp by me!
Buy the P&C Adventure/RPG game Mage's Initiation on Steam, GOG, and Humble
0

User is offline   leilei 

  • 525

#26

I did try something like that in my easymode shader hack (variables to specify target host/guest monitor sizes) but it's more of a silly quick little math hack than anything else and would probably be appropriate with a fixed-size normal-mapped reflecting-screen-buffer image overlay shader to blend over at the last pass for that to be convincing.

Posted Image

This post has been edited by leilei: 26 December 2018 - 05:23 PM

0

User is offline   Person of Color 

  • Senior Unpaid Intern at Viceland
  • 2,888

#27

View Postleilei, on 24 December 2018 - 08:22 PM, said:

It's not just CRT phosphors. Video cards back then also didn't have the best DACs on the block and a sharp VGA signal tends to be exclusive to Matrox hardware for the longest time until ~1999. Many of these older video cards look terrible on modern displays, especially S3 cards where they get a brightness issue.


I have yet to try my Diamond S3 Savage4 Xtreme on an LCD but fuck me does that card look pretty with a CRT. Gorgeous, blisteringly fast 2D. I got a whole bunch of Number 9 Savage4 Xtreme cards with SGRAM and DVI out, I hold on to those in case I ever need LCD output.

I love S3. When it comes to DOS they just work.

Posted Image
There is no race, only racists.
Proud trigendered babysexual pan-Korean anarcho-transhumanist
Muslims are peaceful people oppressed by cis white males! Hillary for presidynt!
WE WILL NOT BE SILENCED BY DONALD TRUMP'S VIOLENCE!
0

User is offline   leilei 

  • 525

#28

My S3 Trio and Virge cards looked fine on a CRT too and are indeed compatible as hell - it's just on LCDs they look like Quake3 just crashed as gray becomes white. Only recently in this decade there was research and work done to disable the gain.

Posted Image

This post has been edited by leilei: 30 December 2018 - 04:03 AM

1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks are property of their respective owners. Instead of reading this text, you could be playing Ion Maiden! ;) © 2018 Voidpoint, LLC

Enter your sign in name and password


Sign in options