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.

Achieving period-correct graphics in personal computer emulators

Rincewind

Magister
Patron
Joined
Feb 8, 2020
Messages
2,745
Location
down under
Codex+ Now Streaming!
The phosphor overlay is that mask thing right?
Yes.
I played with it with the ffmpeg version but never liked it, is it like a big requirement for the CRT look?
Yes again. But note what is *authenthic* might not necessarily be what you *like*.

Look, if you just want to do something that you like, this is cool. Does it look like a CRT? Well, kinda sorta... vaguely... but not really. What you've done is an exaggerated caricature of *some* aspects of CRTs.

If your only point of reference is how you *think* a CRT should look like, you're in a difficult spot to come up with something authentic. Only using a real CRT for prolonged periods of time is what really helps achieve that goal. It's very hard to create photos of CRTs that reflect the *actual* experience... and then you view those photos on modern flat screens that in many regards are *inferior* to CRTs. It's an impossible mission; you're recreating an impression of an imperfect copy on a medium that's not even capable of fully reproducing the original even in the best circumstances.

But if you just wanna have some fun and achieve something a bit more authentic, have a look at the examples in this mega-thread:
https://forums.libretro.com/t/new-crt-shader-from-guest-crt-guest-advanced-updates/

Most of these are generally very good, and the shader itself is state-of-the-art (I'm using a variant of this in WinUAE).

Good luck :)
 

solemgar

Educated
Patron
Joined
Aug 3, 2023
Messages
178
Location
Mechanus
Codex+ Now Streaming!
I barely remember how a real CRT looks like but somehow I keep trying to chase the feeling via shaders.


Damn you nostalgia
1000071944.gif
 
Last edited:

Jack Of Owls

Arcane
Joined
May 23, 2014
Messages
4,408
Location
Massachusettes
Saw dgVoodoo and its scaling features mentioned in this topic. I've been using dgVoodoo to get old DirectX8 (and earlier games) working smoothly under Windows 10+ and newer video cards, and for that it works superbly. However, I recently used it for its scaling features for the first time because I wanted larger, more readable fonts and UI in 4K for some of these old games. The good news is that it does an excellent job at that too. The bad news is that any movies or cut scenes the games have will be severely enlarged and cropped because you changed dgvoodoo's unforced resolution to 3840x2160 or whatever. Apparently there's no fix for this. If you want to play something like old Sea Dogs games in 4k with enlarged, readable UI using dgVoodoo's scaling feature and want to see the cutscenes and movies, you're shit out of luck.

I imagine something like Klingon Academy at 2160p (or higher) with dgvoodooo enlarged UI wouldn't be feasible because there's several hours of FMV and cutscenes, though I haven't tested this particular game. I saw one guy running KA at 8K but he wasn't able to scale the UI because he wasn't using dgvoodoo so all the messages, icons and general UI elements were the size of FDA warnings on the backs of miniature bottles of aspirin. In other words, USELESS. If any of you tech graphics gurus have alternatives to using dgvoodoo to scale old games to 4K with readable UIs and not effect movies/cutscenes please let me know
 

Nutmeg

Arcane
Vatnik Wumao
Joined
Jun 12, 2013
Messages
23,604
Location
Mahou Kingdom
The alternative of course is to use RA's WindowCast core and scale (in a way) though CRT emulation. It may add a frame of lag (or more, sporadically), which is annoying for action games, but for single player PC action games or other genres it's not a big deal at all. I am playing Akai Katana, which is a very input latency sensitive game, through the WindowCast core (downscaling 720p to 360p *chef's kiss* for that extra anti aliasing and an SD era look) and I can tolerate it.
 

Jack Of Owls

Arcane
Joined
May 23, 2014
Messages
4,408
Location
Massachusettes
The alternative of course is to use RA's WindowCast core and scale (in a way) though CRT emulation. It may add a frame of lag (or more, sporadically), which is annoying for action games, but for single player PC action games or other genres it's not a big deal at all. I am playing Akai Katana, which is a very input latency sensitive game, through the WindowCast core (downscaling 720p to 360p *chef's kiss* for that extra anti aliasing and an SD era look) and I can tolerate it.
I'm not familiar with WindowCast (have used RA with success, however) but it sounds like you use it to downscale. I bought a 4K OLED LG C2 display last year and try to play everything I can in 4K (I've had surprising success too, with the vast majority of the games I want to play - both old and recent - able to handle 2160p at 60-120 FPS on an Nvidia RTX 3070) so I want to upscale these old games to get glorious 4K but UI elements are typically just too small at these high resolutions on old games.
 

Rincewind

Magister
Patron
Joined
Feb 8, 2020
Messages
2,745
Location
down under
Codex+ Now Streaming!
Any chance of more blog posts? I really enjoyed your writings.
Cheers man. They're coming. I'm just busy with multiple projects, plus I also like to do other stuff than coding/writing from time to time, so everything goes slowly.

But it's not forgotten, neither abandoned, far from it. It's just a multi-year effort.
 
Last edited:

deama

Prophet
Joined
May 13, 2013
Messages
5,013
Location
UK
Ok so I made it work with videos and .gifs too now:
Sadly wasn't able to figure out an easy way to keep them RGBA, so it'll remove the transparency.

original:
gQIkQyF.gif


new:
OtrrUs2.gif



Here's the link if anyone is interested:
https://drive.google.com/file/d/1x7WcRZQFDuoDg_0q0XhGpvjWvgdeOLCo/view?usp=sharing

You can tweak the values in the scanlines.py at the end.

There's a req.txt for the packages to be installed, and you'll also need ffmpeg installed for video stuff.

So far it only works on 1 thread, so if the video stuff is still too slow, you could probably speed it up a lot by doing multithreading.
So I've made adjustments, I've added in a slight saturation because I found it to slightly dull the output image, it should be better now.

At any rate, I managed to make it several times faster, it's pretty viable to do it for videos now.
It's multi-processing now too, by default it's configured to use half of your max CPU core count, which for me on my 7950x3dv is faster than the video itself, if the original video was 480p.
It outputs the video as an av1 codec at 10000 bitrate, you can adjust this if it's too high or too low in the code.
I've also improved various parts of the code to make it much more performant in general. So in the end it's like 16x or so faster if you got a decent CPU.

https://drive.google.com/file/d/1emKmaz6lt7rsAr4VwX8wHc2ZFaLJYLOs/view?usp=sharing

I've been using it to convert the old storyteller episodes into more CRT based, I think it looks good.
I can now do full movies, they shouldn't take very long, haven't tested on videos at 1080p though.
 
Last edited:

deama

Prophet
Joined
May 13, 2013
Messages
5,013
Location
UK
I'm not sure if anyone knows of anything, but I'm looking for a CRT filter thingy (at least scanlines) for fallout 2 with sfall?
I know that in e.g. exodos they have fallout 1 there with Rincewind 's changes, but fallout 2 isn't on there.
Anyone know if something like this was done as an extension for sfall or some such?
 

deama

Prophet
Joined
May 13, 2013
Messages
5,013
Location
UK
Does anyone know any good reshade filters to achieve authentic scanlines? The ones I've seen only really just apply a scanline overlay.
 

Rincewind

Magister
Patron
Joined
Feb 8, 2020
Messages
2,745
Location
down under
Codex+ Now Streaming!
Does anyone know any good reshade filters to achieve authentic scanlines? The ones I've seen only really just apply a scanline overlay.
Someone did a ReShade conversion of the Guest Advanced, HD, and NTSC shaders.

Original forum thread with screenshots
https://forums.libretro.com/t/crt-guest-advanced-hd-and-ntsc-for-reshade/41880

Code
https://github.com/HelelSingh/CRT-Guest-ReShade

They work well enough, but you need to ensure the emulated scanlines line up correctly with the output image (that's just how post-processing filters like ReShade work). You also need to set the resolution manually as per the README.

I've been using a custom tweaked version of it with PCSX2 with good results (I think the HD variant).

I've also started working on Duckstation specific variants of them because DS has tight ReShade integration within the emulator, so I made resolution autoswitching and interlacing work, plus fixed a few bugs that were likely introduced during the ReShade conversion. I've only done the NTSC one so far, the other two are coming soon (this year):

https://github.com/johnnovak/CRT-Guest-ReShade/tree/duckstation/Shaders
 

deama

Prophet
Joined
May 13, 2013
Messages
5,013
Location
UK
Does anyone know any good reshade filters to achieve authentic scanlines? The ones I've seen only really just apply a scanline overlay.
Someone did a ReShade conversion of the Guest Advanced, HD, and NTSC shaders.

Original forum thread with screenshots
https://forums.libretro.com/t/crt-guest-advanced-hd-and-ntsc-for-reshade/41880

Code
https://github.com/HelelSingh/CRT-Guest-ReShade

They work well enough, but you need to ensure the emulated scanlines line up correctly with the output image (that's just how post-processing filters like ReShade work). You also need to set the resolution manually as per the README.

I've been using a custom tweaked version of it with PCSX2 with good results (I think the HD variant).

I've also started working on Duckstation specific variants of them because DS has tight ReShade integration within the emulator, so I made resolution autoswitching and interlacing work, plus fixed a few bugs that were likely introduced during the ReShade conversion. I've only done the NTSC one so far, the other two are coming soon (this year):

https://github.com/johnnovak/CRT-Guest-ReShade/tree/duckstation/Shaders
Does that mean it wouldn't work for desktop use where it's much harder to adjust the resolution, or how would you do that?
Assuming I'm playing e.g ddo at 4k resolution on my 4k monitor; would I have to reduce the game resolution to 1080p and then in the reshade set it to be 1080p so it upscales correctly to 4k?
 

Rincewind

Magister
Patron
Joined
Feb 8, 2020
Messages
2,745
Location
down under
Codex+ Now Streaming!
Does that mean it wouldn't work for desktop use where it's much harder to adjust the resolution, or how would you do that?
Assuming I'm playing e.g ddo at 4k resolution on my 4k monitor; would I have to reduce the game resolution to 1080p and then in the reshade set it to be 1080p so it upscales correctly to 4k?
You'll need to experiment with it to make sure the scanlines line up correctly. E.g., always use fullscreen mode in the emulator, the 4/3 image always filling the screen fully vertically, then do the math, etc.

Not too hard with fixed-res consoles, and on 4k the scanlines don't need to line up exactly. Then for 480p content it's best to switch scanline emulation off on 1080p. 1440p is the minimum where it starts to make sense (1440 x 480 = 3.0)

@Rincewind, do you have your presets in .slangp format for RetroArch use?
Nope, I don't use RetroArch.
 
Last edited:

deama

Prophet
Joined
May 13, 2013
Messages
5,013
Location
UK
Does that mean it wouldn't work for desktop use where it's much harder to adjust the resolution, or how would you do that?
Assuming I'm playing e.g ddo at 4k resolution on my 4k monitor; would I have to reduce the game resolution to 1080p and then in the reshade set it to be 1080p so it upscales correctly to 4k?
You'll need to experiment with it to make sure the scanlines line up correctly. E.g., always use fullscreen mode in the emulator, the 4/3 image always filling the screen fully vertically, then do the math, etc.

Not too hard with fixed-res consoles, and on 4k the scanlines don't need to line up exactly. Then for 480p content it's best to switch scanline emulation off on 1080p. 1440p is the minimum where it starts to make sense (1440 x 480 = 3.0)

@Rincewind, do you have your presets in .slangp format for RetroArch use?
Nope, I don't use RetroArch.
I tried messing with the alignment, but it just looks like an overlay instead of having the scanlines be inbetween the pixels:
6yyT2qd.jpeg
 

Rincewind

Magister
Patron
Joined
Feb 8, 2020
Messages
2,745
Location
down under
Codex+ Now Streaming!
I tried messing with the alignment, but it just looks like an overlay instead of having the scanlines be inbetween the pixels:
Of course. You put 3840 and 2160 into Resolution_X and Resolution_Y, respectively. That will never work.

You need to put the native resolution of the emulated console/computer there. So if the game is 320x200, you put that there, irrespective of your monitor's hardware resolution or the emulator window's/screen's output resolution.
 

Ezekiel

Arcane
Joined
May 3, 2017
Messages
6,688
If so many players know about this, why do none of the endless number of indie developers build the filters on top of the pixel graphics? Why do they not draw the pixels with the filter already on?
 

Ezekiel

Arcane
Joined
May 3, 2017
Messages
6,688
What is OndrejSc confused about? Devs who made their games on CRT monitors for CRT TVs saw in real time what the art would look like. Meaning that when a modern indie developer makes a game with pixel art, they should already have the filter that will be enabled for the player turned on in their workflow.
 

Rincewind

Magister
Patron
Joined
Feb 8, 2020
Messages
2,745
Location
down under
Codex+ Now Streaming!
If so many players know about this, why do none of the endless number of indie developers build the filters on top of the pixel graphics? Why do they not draw the pixels with the filter already on?
You kinda answered this in your question: they don't have any idea about this. For example, they are younger people who grew up with LCDs.

Then people who grew up with CRTs but only had a PC and VGA monitor are also largely unaware of this as VGA monitors were tack sharp compared to TVs and home computer monitors (which were small TVs sold as monitors). Also, *all* VGA cards hardware 2x integer upscale low-res content, so for 320x200 graphics (most common in DOS games), you get 640x400. Because of this, VGA low-res graphics look blocky. There is some CRT effect, but it's subtle.

Contrast this with home computers and consoles that output 240 content on SD TVs and home computer monitors—half the vertical resolution of a VGA monitor! (or less)

But some modern games do feature built-in CRT shaders, and some of them are quite good.
 
Last edited:

Jack Of Owls

Arcane
Joined
May 23, 2014
Messages
4,408
Location
Massachusettes
Happy to see this topic still going. Some valuable info here, mostly thanks to The Shader Man himself, Slim Shader, The ShaderMaster General, you know him, you love him - Boom Boom Rincewind! :P I'm more of a plug n play type myself that just slaps a shader onto something and hopes for the best that it looks good, and not one to fiddle with settings and configs, but if I need that kind of info, looks like this is the place to get it. Coincidentally, I have been recently looking for a good DuckStation (my newest emu obsession) shader and saw that Rincewind just happened to upload a couple here. Now if I can only figure out how to inject them into Duckstation using Reshade (which I only tried for the very first time with a recent game I was testing - My Time At Sandrock - that looked incredbly, unacceptably washed out but the Rehade preset completely fixed it. I'm beginning to think that shaders and reshade can cure cancer ;))
 

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