No CRT Emulation? Why!?

Emulation of old PCs, PC hardware, or PC peripherals.

Re: No CRT Emulation? Why!?

Postby kixs » 2015-11-02 @ 17:30

I miss real CRT pictures to compare with emulation.
My Amibay: SALE | BUY - Updated on 2018-07-17
User avatar
kixs
l33t
 
Posts: 2038
Joined: 2013-1-31 @ 02:08
Location: Slovenia, EU

Re: No CRT Emulation? Why!?

Postby avx » 2015-11-02 @ 20:21

> So I recently tried out the DOSBox core in RetroArch 1.2.2, with the CRT Royale shader - and lo and behold! Convergence errors and bloom in DOSBox

It might now look like your average CRT but I believe there were CRT's that went further, where the effect should be such that eg. the text is fuzzy enough to a degree where the center of a pixel has higher contrast than the edges, but if there is a neighboring (even diagonally) pixel of similar intensity and color, it somehow bleeds a bit filling that void (but not overtly, just enough to fool you from normal viewing distance that there might be something where there isn't if you go closer). eg in that text "disabled", you can see in the "d" letter there is clear rectangular look to it - a vertical and horizontal line (vertical starting at row 3). Similarly in "x" in "Text", the x looks as if there's stair steps. Such should not be visible due to the round pixels bleeding into each other.

Now granted, it's possible majority of old CRT probably were not like this, as people generally wanted sharper image and that's where things evolved. Also the evidence for the above being true, well I can't vouch for it, because if someone takes a photo of a CRT, we don't know if the camera focus was matched to replicate how the CRT looked to your eyes when they were focused at typical viewing distance.

The supportive theory behind this is that small vga crt had larger pixel pitch and some had different shape (or even arrangement) of the dots being illuminated (eg the rgb not in a rectangular looking row) . When LCD pixel is magnified, they typically are rectangular. (Samsung pentile might be recent exception here atleast for the dot arrangement)

The implication is that developing the CRT emulation to look convincing is a bit like tuning some kind of musical instrument by ear with help of a reference (either ones memory of how it should look like or a CRT that actually doesn't have pixelated look when viewed from regular distance). To make that possible there should be easy way to tweak all the parameters of the "emulation" on the fly while running some test image that one either has a good idea how it should look like or can do side by side comparison to suitable CRT.

I might've posted this before here but here's an example of the usefulness of easy tweaking: https://www.youtube.com/watch?v=d1qEP2vMe-I (micro64 tv emulation, plenty of sliders with immediately visible effect)
avx
Newbie
 
Posts: 43
Joined: 2015-6-01 @ 00:14

Re: No CRT Emulation? Why!?

Postby avx » 2015-11-10 @ 09:37

Some interesting info here...
https://www.youtube.com/watch?v=W86eYfO2nac&t=300s

However he makes some statements I don't quite agree with. Like that all PC CRT are blocky with 320x200. In the end he does get into the dot pitch point (suggesting that perhaps his CRT is blocky due to that). There has been PC VGA monitors with various dot pitch from my research - it may well be that *most* of the 14" PC VGA CRT do look blocky indeed because that probably was preferable for non-gaming applications but photos from CRT in old mags that display games suggest not all had blocky graphics.

Beyond that, there's also the deep colors and contrast etc that make the games just look much better- similarly to the effect you see when going to a shop - the OLED screens stand out if the room is dark and the material is dark, so high DPI OLED and suitably tweaked CRT emulation should be able to reproduce that non-aliased look even for 320x200.
avx
Newbie
 
Posts: 43
Joined: 2015-6-01 @ 00:14

Re: No CRT Emulation? Why!?

Postby Mr_Blastman » 2016-2-06 @ 15:34

avx wrote:Here's a pretty up close video of Tandy CRT:

https://www.youtube.com/watch?v=hSaAZAYh1UI

Pay attention to lack of any rectangular pixels. There's a lot of fake youtube videos shot in dosbox, beware..


That's a CM-8 color monitor which was less common at the time, had a sharper picture, anti-glare coating on the screen and flatter color reproduction. The CM-5 rgb monitor was superior for games at the time due to the wider dot pitch (I think it was .66!), color bleed, phosphor glow and wait for it... phosphor ghosting!

Thexder, as I posted in other threads on here, looks nothing on emulation or even late 80s era VGA monitors like it did on the CM-5. It looks awesome on that old RGB monitor. Words can't describe how good it looks. It looks... magical. Even Rogue looks great. It takes the DOS ASCII set and adds charm to it. In Bard's Tale, when you win a battle and are shown the treasure, it really seems to sparkle and looks like true gold.
User avatar
Mr_Blastman
Newbie
 
Posts: 98
Joined: 2005-7-26 @ 02:53

Re: No CRT Emulation? Why!?

Postby leileilol » 2016-2-07 @ 02:13

Uh...one time I tried that old cgwg shader with some efx/sweetfx with PCem, and tried to get it to work as close to an IBM XT I remember. Had to manually force the shader to use 656x208 and edit the D3D output code to nearest filter.

Doesn't look authentic enough though. Needs more blue pollution.
Attachments
fakepcemxt.png
Voodoo2s aren't 100mhz stock
Geforce256 isn't released as a beta on New Years '99 under the Quadro brand
DOS gaming isn't a bilinear 320x200 16:10
DOS PCs aren't better than the Macintosh
DOSBox is not for running Windows 9x
SGL != Glide
User avatar
leileilol
l33t++
 
Posts: 9315
Joined: 2006-12-16 @ 18:03

Re: No CRT Emulation? Why!?

Postby RoyBatty » 2016-2-07 @ 02:17

Needs more beam drift (persistence) on the right side of pixels.
User avatar
RoyBatty
Member
 
Posts: 427
Joined: 2009-8-22 @ 11:37

Re: No CRT Emulation? Why!?

Postby Azarien » 2016-2-07 @ 10:54

Doesn't look authentic enough though.

Looks like very *bad* CRT.
A *good* CRT may be very hard to emulate, because the effect is much more subtle.
And realistic 60Hz flicker may be impossible to do on LCD.
Azarien
Oldbie
 
Posts: 542
Joined: 2015-5-14 @ 07:14

Re: No CRT Emulation? Why!?

Postby awgamer » 2016-2-07 @ 11:32

Do people really want to replicate harming their eyes with flicker?
awgamer
Member
 
Posts: 462
Joined: 2014-7-26 @ 07:42

Re: No CRT Emulation? Why!?

Postby leileilol » 2016-2-07 @ 13:40

I'm certain there's people who want that high frequency hum too
Voodoo2s aren't 100mhz stock
Geforce256 isn't released as a beta on New Years '99 under the Quadro brand
DOS gaming isn't a bilinear 320x200 16:10
DOS PCs aren't better than the Macintosh
DOSBox is not for running Windows 9x
SGL != Glide
User avatar
leileilol
l33t++
 
Posts: 9315
Joined: 2006-12-16 @ 18:03

Re: No CRT Emulation? Why!?

Postby Mr_Blastman » 2016-2-09 @ 16:44

leileilol wrote:I'm certain there's people who want that high frequency hum too


My Tandy CM-5 also starts to smell after it warms up. After a half hour of Rogue it has a distinct smell. I almost forgot about that "feature" of those old monitors.

Your picture of the IBM monitor emulation isn't bad.

Image

Image

The tricky part is certain eras had monitors with particular characteristics. The mid to late 80s monitors I find next to impossible to emulate (so far) in Dosbox. I'm still trying! The shots above approximate a early 90s VGA CRT. Note the monitor glow. It is very subtle around the edges.

Also, the 90s era CRTs didn't have noticeable scanlines. I've got a 93/94 VGA monitor and there are none. I wish I had one from 89. My Tandy CM-5 has unique pixelation

Unfortunately Daum is only DX9 which means I can't use the DX11 features of Sweetfx which would negate color bleed from dark sources (i.e. black). In DX 9 all colors bleed in the form of glow. We've come a long way though!

Multipass shaders like I have in Retroarch can take it further...

Image

But the CM-5 has a unique shadow mask. Here's a shot from Mame showing something close... You must fullscreen @ 1080p to see it clearly.

Image

But even then, it isn't super bright with all the color bleed and glow that the real monitor has. Here's the real monitor. I played with the exposure times but still couldn't capture the true brightness and color of the screen--cameras and refresh rate, etc. But you can at least pick out some of the finer details minus the glow and intensity.

The first one has no exposure settings. The colors are too washed out, however--but you can see intensified glow and ghosting.

Image

The rest use 1/30 exposure.

Image

Image

Here you can see ghosting... If you had superman eyes. It looks different in practice but the camera caught the delay...

Image

And here's one that is brighter.

Image

None of these have been altered. If you zoom in at full resolution 2592x1944 you can see something unique about CRT monitors. While Thexder was a 16-color game, you see color gradation between colors and borders. The RGB CRT gave the games pseudo anti-aliasing and color boost, dramatically increasing the visible palette. This part is hard to emulate without multipass and phosphor bleed.
I'm a mad hermit. My quest for perfect emulation is endless.
User avatar
Mr_Blastman
Newbie
 
Posts: 98
Joined: 2005-7-26 @ 02:53

Re: No CRT Emulation? Why!?

Postby Mr_Blastman » 2016-2-09 @ 16:58

leileilol wrote:Uh...one time I tried that old cgwg shader with some efx/sweetfx with PCem, and tried to get it to work as close to an IBM XT I remember. Had to manually force the shader to use 656x208 and edit the D3D output code to nearest filter.

Doesn't look authentic enough though. Needs more blue pollution.


Btw, how'd you get the cgwg shader etc. to work with PCem?
User avatar
Mr_Blastman
Newbie
 
Posts: 98
Joined: 2005-7-26 @ 02:53

Re: No CRT Emulation? Why!?

Postby Azarien » 2016-2-11 @ 00:40

leileilol wrote:I'm certain there's people who want that high frequency hum too

And that burning sensation in one's face after long hours of radiation exposure...
You won't get that from fancy shaders ;-)
Azarien
Oldbie
 
Posts: 542
Joined: 2015-5-14 @ 07:14

Re: No CRT Emulation? Why!?

Postby Mr_Blastman » 2016-10-31 @ 16:36

I have done something amazing I think. This is the closest I've ever come to a Tandy CM-5 RGB monitor with dosbox! There's some more tweaking left to do but I'm close, real close. The hardest problem for the longest time was the pixel grain. In my screenshots in a post above of a real Tandy monitor, you can see it. I never could get this in Dosbox... until now. Granted, the above screenshots aren't representative at all how the color saturation and brightness looks on a real CM-5, as I can't figure out how to get my camera to take a proper picture of it. Regardless, I'm close, real close. It looks nifty in non-RGB era games, too.

It is important to note that monitors did vary by era in a short period of time. A 1988 VGA monitor looked quite different from a 1993 one due to dot pitch, electron gun quality, phosphors, shadow mask and other bits inside of them. Likewise, a 1986 RGB monitor looked significantly different from a VGA monitor of any era, and did amazing things to 16-color graphics you couldn't achieve on a regular VGA monitor due to doublescan and general improvements to rendering accuracy. The earlier monitors had what we refer as today as "post processing" built into their hardware, even if it wasn't the manufacturer's intention. That's why old screens dramatically enhance old games.

So, this is where I'm at now. The second biggest problem was making the image bright enough, but I figure out how to fix that! I can now make eye-bleedingly bright graphics on a LCD monitor in dosbox. What do I need to figure out next? Ghosting. I have no idea how to achieve this, but... those older RGB monitors had tons of ghosting. That's the next thing I'm going after once I perfect the color balance. My only sadness is there isn't a dosbox capable of Direct X 11 yet. If there was, my modified SweetFX with gaussian transforms would allow me to eliminate darker color bleed.

First screenshot is with Amp signal overdrive set to 5.25 in SweetFX 2.0 preview 8 under the Pixelshader
// -- Amp signal --
#define PixelArtCRT_overdrive 5.25 //

Image

Following three are with Amp signal set to 3.25:

Image

Image

Image

How do I do this?

SVN Daum + CRT.D3D.br.fx

SweetFX + Reshade, 2.0 preview 8

Tweaks to CRT.D3D.br.fx
Modified SweetFX to re-include the old Gaussian filter for monitor glow, plus tons of tweaks to the configs, and using the Pixel Art CRT shader but NOT using the Advanced CRT shader (THIS IS IMPORTANT because Advanced CRT adds tons of shadow mask wire lines to the image)

I should probably share my settings sometime. I'm willing to bet some other folks here would love to give them a try, so... I've included an attachment. :) They're just the config files. The gaussian header file must go in the Sweetfx subfolder from the Dosbox root dir. The shader file goes in the obvious daum place, and the conf goes in the dosbox root directory. I would attach the particular version of reshade I'm using but I'm not sure we're allowed to do that here?

Enjoy.

If anyone tweaks it more than I have and thinks they have improved, please share. ;)

CRTgoodiesforvogons.zip
CRT Sweetfx/Reshade + daum shader + config settings for Dosbox
(23.43 KiB) Downloaded 63 times
User avatar
Mr_Blastman
Newbie
 
Posts: 98
Joined: 2005-7-26 @ 02:53

Re: No CRT Emulation? Why!?

Postby Kisai » 2016-11-01 @ 03:29

Mr_Blastman wrote:I have done something amazing I think. This is the closest I've ever come to a Tandy CM-5 RGB monitor with dosbox!


I think it's interesting that you're going through the effort to do this, but it's going to have the unfortunate problem of not being portable.

My personal opinion on CRT emulation is "don't bother", aside from correctly trying to emulate CGA, you would never actually want to play a game with these filters on for the same reason we were always told not to sit so close to the tv/computer screen, it gives you eyestrain, because it's not quite in focus.

They are interesting from the point of view of trying to illustrate what emulation doesn't actually emulate, but it always comes off as like "look at this wonderful VHS tape, even though I have it on DVD", such comparisons ignore the entire mastering process which comes out of much higher resolution sources or digital sources.

The thing I need to point out is that the original monitors dot pitch and shadow mask reflect the size of the monitor. So those old monitors were all 12-14", if you were to play a 640x480 game on a 21" CRT it looks more like a LCD, yet, if you were to use "TV out" that was available on many late 1990's PCI video cards to your 21"+ NTSC TV you would again see other problems like overscan and 640x480 was often unreadable on a TV (because you really get 480i and NTSC colorspace, not RGB)

So your experience with your monitor might not reflect other peoples experience with the CRT, and no two CRT's are identical due to age.

My suggestion here, at least if you want to try make it portable, is to see if you can port it to the OpenGL shaders. SweetFX won't be available on MacOSX or Linux. I often see SweetFX used on games to "make them look better" but most applications of it are way to subjective, and I find most of the time it makes images too bright or too dark.

Personally I'd prefer that the shaders be entirely self-contained shader programs so that they are portable.

avx wrote:The supportive theory behind this is that small vga crt had larger pixel pitch and some had different shape (or even arrangement) of the dots being illuminated (eg the rgb not in a rectangular looking row) . When LCD pixel is magnified, they typically are rectangular. (Samsung pentile might be recent exception here atleast for the dot arrangement)


IIRC the Tandy 1000 monitor we had might have been a Trinitron style (vertical stripes) which were considered superior. Then again we had two Sony TV's at the time and I might be mis-remembering those. Someone with the original Tandy monitors would need to take a magnifying glass and look.

This comes from a usernet posting https://groups.google.com/forum/#!topic ... EasA7Lb7eg :
CM-11 (25-1024/A/C) Specifications Faxback Doc. # 6012

CRT..................13" diagonal, 90' deflection, high contrast,
non-glare
picture tube, 0.42mm stripe pitch, P22 Phosphor

Input Signal.........Red, Green, Blue (RGB) video and intensity, vertical
and horizontal synchronization

Input Level..........Video TTL-positive, intensity TTL-positive, vertical
and horizontal synchronization, TTL-positive

Input Connector...........................9-pin Sub-D connector with cable

Scanning Frequency:
Horizontal.........................................15.701 Hz +/- 500 Hz
Vertical...............................................60 Hz +/- 1.0 Hz

Display Size............................................9 27/32 x 7 15/32"
Resolution............................................640 Dots x 225 Lines
Character Number..................Approx. 2000 (25 lines of 80 characters)
Cabinet Dimensions.............13 11/16 x 12 17/32 x 15 1/8 inches (WxHxD)
Weight.......................................................23 lbs. 2 oz.
Power Cord...................................................Approx. 6 ft.
Power Supply................................................120 VAC, 60 Hz
AC Input Current......................................................0.8A

The CM-11 has many advantages over other color monitors. These include:

* Thirteen-inch color display providing eye-pleasing graphics * Adjustable
picture controls that tailor brightness and contrast to suit
environmental lighting
* Unique, selective light transmission properties which reduce the effects

of ambient light while maintaining true color purity, even under harsh
lighting conditions
* Sharp, "flicker-free" image provided by non-interlaced circuitry * RGB
direct-drive signal system that provides 640 by 225 display for crisp
characters and vivid color graphics


Take note of "stripe pitch" and P22 Phosphor.

Like, it should be noted that a new CRT is much brighter than an old one. Monitors often had analog controls for the brightness and contrast, just like a television.
Kisai
Newbie
 
Posts: 98
Joined: 2010-5-05 @ 08:04

Re: No CRT Emulation? Why!?

Postby Mr_Blastman » 2017-2-26 @ 06:47

I have advanced to the next level. I have done the impossible. I have managed to run dosbox with not only a CRT bezel, but multipass shaders inside of Retroarch with full access to the keyboard (minus the escape key but I can probably fix that).

The only thing not working in libretro Dosbox is midi (no MT-32 or SC-55 :( ), at least, I haven't figured out how to make them working yet. Regardless, Dosbox with bezel support is a wonderful thing to behold. And I will demonstrate it with none other than Inner Worlds, one of the heavier games inside of Dosbox:

https://www.youtube.com/watch?v=FvRmog-NUVM


To make this possible, I had to modify a bezel I found in a CRT shader package--the .png file needed a .cfg file made in the /overlays subfolder, which was easy enough to do after I downloaded some other overlays and mimicked them. The hardest part was setting the x/y values inside the Retroarch.cfg so the image would center within the bezel and still allow it to display fullscreen. Once I got over this hurdle, I needed good shaders... no, great shaders. Because, why not?

This shader pack is AWESOME:
https://forums.libretro.com/t/analog-sh ... -here/5493

The shader I settled upon was Halation Soft. The VGA shader is pretty good, too, with subtle monitor glow and all the other bits that made VGA monitors look like they did, at least, as far as my eyes are concerned. But soft halation is sexy, in a crappy television kind of way. My second favorite is the 80s Arcade CRT shader which, well, is a sight to behold, especially if you remember gaming in arcades back in the day. It is best used with older games, of course, but works just fine in Dosbox--and looks pretty nice with stuff like Thexder.

Anyways, the trick is editing out all the keybinds inside the Retroarch.cfg file so the keyboard is accessible. The second trick is to realize the dosbox.cfg is basically useless, and instead, you must change the cycles and video modes inside the game submenu options when dosbox is running. I never realized you can do this, and it is what prevented me for the longest time from getting stuff like Wing Commander running.

Oh, one other problem--not sure how to get joystick working in Retroarch dosbox. Anyways, I can't complain, bezels + CRT emulation in Dosbox is awesome.
User avatar
Mr_Blastman
Newbie
 
Posts: 98
Joined: 2005-7-26 @ 02:53

Re: No CRT Emulation? Why!?

Postby Mr_Blastman » 2018-8-14 @ 06:33

My quest continues, and now I have hit power level 9000:

https://www.youtube.com/watch?v=D3AE2twxgEg

Details to follow. Needless to say, the process was a bit complex to decipher, but worth the effort so far. Still, not perfect, but getting closer.
User avatar
Mr_Blastman
Newbie
 
Posts: 98
Joined: 2005-7-26 @ 02:53

Re: No CRT Emulation? Why!?

Postby appiah4 » 2018-8-14 @ 06:52

CRT is a very wide range of things. My first CRT monitor was a Commodore 1084S and it was nothing like my next one, a B/W monitor for my 8086 PC Compatible. My first 14" VGA montir was also nothing like the first two either. The question is, what will you target? Flat CRTs or curved ones? A Sony Trinitron looks nothing like a Philips Brilliance - even for more modern CRTs, the appearance varies greatly.
1989:A500R6|+512K/RTC|ACA500+|HxC/df1:|C1084S
1992:HIPPO-VL+|DX2ODPR66|8M|GD5428|CT2290
1995:PCI597-1|P133|32M|Trio64|Voodoo1|CT3980/2M|DreamS2
1998:S1573S|K6-2/400|64M|RagePro|Voodoo2/SLI|CT4500/32M
2001:GA-6OXT|PIII-1200|512M|GF3Ti200|MX300
User avatar
appiah4
l33t
 
Posts: 2136
Joined: 2017-2-19 @ 07:36

Re: No CRT Emulation? Why!?

Postby Mr_Blastman » 2018-8-14 @ 14:29

Depends on my mood the day that I game. You're right, monitors varied widely. When I play mid to late 80s games, I expect them to be played on a Tandy RGB monitor, which had a vastly different picture than a early 90s VGA monitor, and that early 90s VGA monitor looked radically different than the late 80s VGA monitor, and that looked different than the IBM PS/2 MCGA screen(which had an awesome "crystallized" effect).

The shaders aren't mine, but I tweak them, and are a part of the Analog Shader Pack version 3, by solid12345. Amazing multipass shaders, they require Retroarch. I can do what I've accomplished here outside of Retroarch, using the latest Reshade plus the Retroarch shader .fx ports, but there's severe performance issues with SVN-Daum and ridiculous color banding outside the frame of the game image. Retroarch overcomes this limitation.

The downside with Retroarch is they haven't fixed the command line mixer settings yet, so I can independently adjust left and right volume levels for stuff like SB DAC audio, FM, PC speaker, etc., so in games such as Silpheed which use speaker for effects and Roland for music, or the PS/1 version which uses SB for effects, Roland for music, to prevent the effects from drowning out the music. I'd fix this if I knew how, but I'm not a coder.

I'm trying to figure out how I might distribute this in a zip file so someone who has Retroarch can easily install it, but part of the configuration process requires you to edit out all the hotkeys from the keyboard that Retroarch uses, and change around a couple others so you can use the keyboard properly in DOS. Easy to do, but for someone who's not familiar with the libretro setup, might be overwhelmed.
User avatar
Mr_Blastman
Newbie
 
Posts: 98
Joined: 2005-7-26 @ 02:53

Re: No CRT Emulation? Why!?

Postby leileilol » 2018-8-15 @ 00:34

You can also use Retroarch GLSL shaders and presets in PCem starting from v13 :)
I've tried to hack some of the RA GLSL shaders to adapt better for the higher guest resolutions and for 1080p with presets roughly mimicing a few CRTs.
no overlays though. as an artist I feel an overlay is too arcane of a concept to this and should rather be a handmade 3d model with the screen texture on a surface with shaders reflecting the image
we still don't have noises for floppies and hard drives and processed pc speaker EFX etc. for extra realism
Voodoo2s aren't 100mhz stock
Geforce256 isn't released as a beta on New Years '99 under the Quadro brand
DOS gaming isn't a bilinear 320x200 16:10
DOS PCs aren't better than the Macintosh
DOSBox is not for running Windows 9x
SGL != Glide
User avatar
leileilol
l33t++
 
Posts: 9315
Joined: 2006-12-16 @ 18:03

Re: No CRT Emulation? Why!?

Postby Mr_Blastman » 2018-8-15 @ 19:10

J. Kyle Pittman has done some nifty work with his CRT emulator that has a 3D model border with the reflections you speak of:

https://piratehearts.itch.io/supercrt

Neat tool. He incorporates the emulation in all the games he has made. The big downside to the tool though is you can't maximize the window to fullscreen due to how it captures the input space for processing and display in the output window. Maybe it works on a multi-monitor setup? I'm not sure. Still, what you speak of, 3d models of the PC and desk with reflections has long been a dream of mine, too.
User avatar
Mr_Blastman
Newbie
 
Posts: 98
Joined: 2005-7-26 @ 02:53

PreviousNext

Return to PC Emulation

Who is online

Users browsing this forum: No registered users and 2 guests