Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > CSDb Discussions > More accurate CRT emulation
2009-05-02 13:47
Oswald

Registered: Apr 2002
Posts: 5017
More accurate CRT emulation

http://www.bogost.com/games/a_television_simulator.shtml

someone please make this for Vice :)
2009-05-02 13:55
chatGPZ

Registered: Dec 2001
Posts: 11114
only one problem: most of these ideas have little to do with "accurate crt emulation" =P
2009-05-02 15:31
Angel of Death

Registered: Apr 2008
Posts: 210
hmmmm...
Right you are, Groepaz.
But then again:

CRT
PAL
NTSC
CBL
VBL
CTV
B/W
etc.etc...

It's just all soooooooooooo confusing!
:)
2009-05-02 16:22
Oswald

Registered: Apr 2002
Posts: 5017
Quote: only one problem: most of these ideas have little to do with "accurate crt emulation" =P

I think they are related 100%: afterglow, texture, noise, bleed, they are all there. You act like you havent seen a CRT in your life, but sure you did.
2009-05-02 16:48
chatGPZ

Registered: Dec 2001
Posts: 11114
no, a crt isnt "some blur plus scanlines". (and colorbleed isnt related to luminance at all like that page says, and RF doesnt actually add random noise either). there is no such thing as a pixelated "texture" in crt either. the only thing that page gets half right is the afterglow stuff - which is a minor effect on decent monitors. hell, none of the *actual* pal related effects (like dot creep or color shifting because of chrominance reusage every other line) is even handled by what they do.

Quote:
You act like you havent seen a CRT in your life, but sure you did.


infact thats what i always think of the people who come up with this halfassed attempts. they might vaguely remember how a crt looks like - but they dont have the slightest idea of how it actually *works* (and hence how it should be done in an accurate emulation).
2009-05-02 16:59
Oswald

Registered: Apr 2002
Posts: 5017
Quote: no, a crt isnt "some blur plus scanlines". (and colorbleed isnt related to luminance at all like that page says, and RF doesnt actually add random noise either). there is no such thing as a pixelated "texture" in crt either. the only thing that page gets half right is the afterglow stuff - which is a minor effect on decent monitors. hell, none of the *actual* pal related effects (like dot creep or color shifting because of chrominance reusage every other line) is even handled by what they do.

Quote:
You act like you havent seen a CRT in your life, but sure you did.


infact thats what i always think of the people who come up with this halfassed attempts. they might vaguely remember how a crt looks like - but they dont have the slightest idea of how it actually *works* (and hence how it should be done in an accurate emulation).


- colorbleed is there regardless how that page explains it
- RF definitly adds noise (and even more), guess why ppl prefer composite.
- there's definitly a texture, tho most of the time you dont really see this one. on our old TV fex. you could see the RGB phosphore, if you checked it real close.
- afterglow just like all the other issues depend a lot on CRT type.

- you are mixing up, exactly vice versa: PAL is picture decoding/encoding and has not much to do with *actual* CRT effects.
2009-05-02 17:18
chatGPZ

Registered: Dec 2001
Posts: 11114
Quote:
colorbleed is there regardless how that page explains it

but colorbleed isnt simple blur (like they have implemented it). its also accurately emulated by vice already.
Quote:
RF definitly adds noise (and even more), guess why ppl prefer composite.

mostly RF adds crosstalk and interference and limits the bandwidth. its not random noise (not when transmitted through a cable that isnt completely crap anyways)
Quote:
there's definitly a texture, tho most of the time you dont really see this one. on our old TV fex. you could see the RGB phosphore, if you checked it real close.

yes, but there is no single-pixel-checkerboard-aligned pixelated texture. not on any crt in existance. the dotmask works differently, and looks differently.
ofcourse i agree that the dotmask would be nice to have emulated - however not the way shown on that page, its utterly wrong.
Quote:
afterglow just like all the other issues depend a lot on CRT type.

yes, i already said that :) but its a rather minor effect too, and unless your monitor is completely crap its almost unnoticeable.
and ofcourse it'd be another "nice to have" thing - but unfortunately its rather computing intense in software, and the current vice architecture doesnt allow to add it easily at all.
Quote:
you are mixing up, exactly vice versa: PAL is picture decoding/encoding and has not much to do with *actual* CRT effects.

yes and no. some of the effects are actually related to PAL (like color bleed - its directly related to the limited bandwidth used for color encoding)

that said, i'd rather see the pal emu itself beeing more perfect (eg dot creep isnt there yet) before thinking about imperfect crt emulation. once the rendering pipeline is a bit more sane (which will take...a decade or two =P) then adding filters for the *actual* crt effects (which boils down to dotmask and afterglow) is rather easy :)
2009-05-02 18:15
enthusi

Registered: May 2004
Posts: 675
my naive opinion is:
of all yet non-emulated things, the effect that bright (especially white) pixels appear "larger" is the most noticable and even a BAD emulation (as in make those exceed the scanline slightly) might make it LOOK more like a real TV.
Just my opinion.
2009-05-02 19:05
Mace

Registered: May 2002
Posts: 1799
I don't get why you'd want to make the picture worse.
IMHO, emulation is all about what the computer does, not what your crappy screen looked like back then.
2009-05-02 19:13
Oswald

Registered: Apr 2002
Posts: 5017
Quote: I don't get why you'd want to make the picture worse.
IMHO, emulation is all about what the computer does, not what your crappy screen looked like back then.


so you use vice without PAL emulation all the time I suppose?
2009-05-02 20:52
chatGPZ

Registered: Dec 2001
Posts: 11114
Quote:
of all yet non-emulated things, the effect that bright (especially white) pixels appear "larger" is the most noticable and even a BAD emulation (as in make those exceed the scanline slightly) might make it LOOK more like a real TV.

this is one of the actual CRT effects - and caused by the dotmask. and as said the major problem is that the current architecture of the vice rendering pipeline does not allow to add the required fullframe filter. and once you have modified it so its possible you can just aswell implement it correctly :)

Quote:
I don't get why you'd want to make the picture worse.
IMHO, emulation is all about what the computer does, not what your crappy screen looked like back then.


many of the effects infact are about "what the computer does" (everything related to PAL emulation)

Quote:
so you use vice without PAL emulation all the time I suppose?


it's indeed shocking how many people do that (and for example advocate to not make pal emulation on per default)
2009-05-02 21:47
MagerValp

Registered: Dec 2001
Posts: 1055
I've been flaming the original author a bit here:

http://www.atariage.com/forums/index.php?s=&showtopic=142886&vi..

It is indeed a half-assed attempt, but apparently they intend to expand on it later.

I'm annoyed and disturbed that people seem to think that making the LCD image shittyer makes it look more like a CRT, completely ignoring the fact that the image is *better* on the CRT in every respect except sharpness - and I think most people agree that sharp square pixels look like shit for the C64. TFTs are less capable displays[*], and there's just no way you can give it the color gamut or black levels of a CRT. What's left is trying to give it a bit of CRT's natural anti-aliasing, from dot pitch and shadow mask discrepancies, phosphor glow, etc, but what bugs me is that they don't appear to have done much in the way of research. Ian says that's there's more to it than eyeballing, but considering their implementation I wonder what...

They also seem to have mixed up effects from the signal encoding (i.e. blur from limited luma bandwidth, color bleed, RF noise), and effects from the CRT display (afterglow, pixel pattern, bloom). VICE's PAL emulation does a pretty good job with the signal encoding stuff, Blargg's NTSC libraries also do a nice job, but it'd be interesting if someone tried to look more seriously at CRT effects. Maybe we could get some nice scaling out of it, that isn't locked to 2x and with proper pixel aspect ratios?


[*] at least if we're talking consumer displays and not expensive pro stuff
2009-05-03 00:59
A Life in Hell
Account closed

Registered: May 2002
Posts: 204
Quote: Quote:
of all yet non-emulated things, the effect that bright (especially white) pixels appear "larger" is the most noticable and even a BAD emulation (as in make those exceed the scanline slightly) might make it LOOK more like a real TV.

this is one of the actual CRT effects - and caused by the dotmask. and as said the major problem is that the current architecture of the vice rendering pipeline does not allow to add the required fullframe filter. and once you have modified it so its possible you can just aswell implement it correctly :)

Quote:
I don't get why you'd want to make the picture worse.
IMHO, emulation is all about what the computer does, not what your crappy screen looked like back then.


many of the effects infact are about "what the computer does" (everything related to PAL emulation)

Quote:
so you use vice without PAL emulation all the time I suppose?


it's indeed shocking how many people do that (and for example advocate to not make pal emulation on per default)


I can see why people don't use palemu though.... the default palemu also enables nassive blur, which, uhm, sucks - it's a bad TV effect, ironically, rather than a c64 efffect. Of cpuirse, turning off blur and scanlines on the pal controls makes it ninjasweet
2009-05-03 07:08
Angel of Death

Registered: Apr 2008
Posts: 210
However honorable and fascinating this: "let's for nostalgic sake emulate my parents leftover, crappy, cheap-Taiwan build television" discussion is. It has nothing to do with CRT emulation.
And if PAL emulation doesn't cover the load then I suggest we call it: MY NOStalgicly Emulated TeleVision or MYNOSETV for short.

But, then again, it would be a nice idea to include PAL emulation in the emulators for the VCS, COLECO, Philips, etc. systems but that is for another forum.

2009-05-03 07:52
MagerValp

Registered: Dec 2001
Posts: 1055
Quote: I can see why people don't use palemu though.... the default palemu also enables nassive blur, which, uhm, sucks - it's a bad TV effect, ironically, rather than a c64 efffect. Of cpuirse, turning off blur and scanlines on the pal controls makes it ninjasweet

Didn't they dial it down a little a few releases ago, so it defaults to S-Video quality instead of Composite quality? The scanlines are still a bit too prominent IMHO, but it still looks a lot better out of the box with PAL emulation on.
2009-05-03 08:34
Mace

Registered: May 2002
Posts: 1799
Indeed, I have PAL emu off almost all of the time.
Not because I don't like the effect, but I like it better without it :)
2009-05-03 12:28
chatGPZ

Registered: Dec 2001
Posts: 11114
Quote:
it'd be interesting if someone tried to look more seriously at CRT effects. Maybe we could get some nice scaling out of it, that isn't locked to 2x and with proper pixel aspect ratios?


i did :) however like said above, the vice rendering architecture doesnt allow to easily add fullscreen filters, which you would need for dotmask/blooming etc

Quote:
the default palemu also enables nassive blur, which, uhm, sucks - it's a bad TV effect, ironically, rather than a c64 efffect.


no, its a pal effect. (limited bandwidth for chroma, chroma is valid for ~4 pixels) the only "crt effect" implemented in vice are the scanlines.
2009-05-03 13:03
JackAsser

Registered: Jun 2002
Posts: 1989
Quote: Quote:
it'd be interesting if someone tried to look more seriously at CRT effects. Maybe we could get some nice scaling out of it, that isn't locked to 2x and with proper pixel aspect ratios?


i did :) however like said above, the vice rendering architecture doesnt allow to easily add fullscreen filters, which you would need for dotmask/blooming etc

Quote:
the default palemu also enables nassive blur, which, uhm, sucks - it's a bad TV effect, ironically, rather than a c64 efffect.


no, its a pal effect. (limited bandwidth for chroma, chroma is valid for ~4 pixels) the only "crt effect" implemented in vice are the scanlines.


Quote:
i did :) however like said above, the vice rendering architecture doesnt allow to easily add fullscreen filters, which you would need for dotmask/blooming etc


Hmms. There is an option to render directly onto the primary directx surface or not. If not, then it's double buffered, that alone (at least to me! :D) suggests that there are a complete buffer somewhere which is swapped in, hence a potential place to add filtering. But then again, I havn't checked the source and you have Groepaz.
2009-05-03 13:28
chatGPZ

Registered: Dec 2001
Posts: 11114
the problem lies before that in the rendering queue... vice spends enornmous effort on never updating a single pixel that didnt change from the previous frame (and that means, no, its not actually properly double buffered at all). this even makes the relativly simple pal filter rather tricky, because you cant easily look at pixels that have already been drawn (the pal emu must buffer the previous line internally). but to implement something like "blooming" you'd also have to *update* pixels that "have already been drawn" (brightness propagates to all neighbour pixels). to make that possible all that pointless caching must be eliminated first :)
2009-05-03 13:45
Mace

Registered: May 2002
Posts: 1799
I haven't got a clue about PC programming, but... if you'd add the PAL effect on top of the screen, as an overlay, you can add the filter to unchanged pixels.
Can't you?
2009-05-03 14:00
chatGPZ

Registered: Dec 2001
Posts: 11114
ofcourse, thats pretty much how it'd work - very simply said. :) but its much easier said than done =P
2009-05-03 14:05
Mace

Registered: May 2002
Posts: 1799
Quote: ofcourse, thats pretty much how it'd work - very simply said. :) but its much easier said than done =P

As coding is :)
2009-05-03 15:24
A Life in Hell
Account closed

Registered: May 2002
Posts: 204
Quote: Quote:
it'd be interesting if someone tried to look more seriously at CRT effects. Maybe we could get some nice scaling out of it, that isn't locked to 2x and with proper pixel aspect ratios?


i did :) however like said above, the vice rendering architecture doesnt allow to easily add fullscreen filters, which you would need for dotmask/blooming etc

Quote:
the default palemu also enables nassive blur, which, uhm, sucks - it's a bad TV effect, ironically, rather than a c64 efffect.


no, its a pal effect. (limited bandwidth for chroma, chroma is valid for ~4 pixels) the only "crt effect" implemented in vice are the scanlines.


except that the blurredness parameter seems to effect luma as well as chroma - i agree on chroma being correct!

(try a pure white box on a black background to test this... there should be 0 chroma in that image. play with the blurriness slider ;))
2009-05-03 16:27
chatGPZ

Registered: Dec 2001
Posts: 11114
thats also a PAL effect :) luma is "blurred" for ~1 pixel (black/white transitions arent perfectly sharp with pal either)
2016-11-23 16:05
Jammer

Registered: Nov 2002
Posts: 1289
http://zgredowo.blogspot.com/2012/10/crt-like-rendering-on-lcd-..



I strongly recommend getting acquainted with this ;)
2016-11-23 17:24
chatGPZ

Registered: Dec 2001
Posts: 11114
not really, its just another one that confuses random noise and blur with crt emulation :)
2016-11-23 17:38
Jammer

Registered: Nov 2002
Posts: 1289
If that code ranges somewhere between efficiency of current WinVice crt and fidelity of your own routine (as I learnt it's damn accurate but very demanding), that's a good compromise, I'd say. Provided I'm going to see properly displayed hires checkerboard, it's more than enough :P
2016-11-23 17:48
chatGPZ

Registered: Dec 2001
Posts: 11114
thing is, that routine will show none of the artefacts you know from c64 correctly :)

the closest (most accurate) you'll get atm is what micro64 implements - needs a half decent GPU though
2016-11-23 17:49
algorithm

Registered: May 2002
Posts: 702
@jammer That CRT emulation program on the link you supplied seems to have multiple shaders in the shader folder (badmagnets, pal, delay, ghosting, yuvgroup, glow etc) so it may be utilising most/all of these in the demo. Looks good. Micro64 one currently rules quite a fair bit however
2016-11-23 18:56
chatGPZ

Registered: Dec 2001
Posts: 11114
the one thing that sets micro64 apart from most other attempts i have seen is that it doesnt just apply some fancy post processing that may or may not look like a CRT - but actually does the processing in a way that resembles what actually happens - which makes it a whole lot more accurate in a bunch of situations.
2016-11-23 19:49
Hein

Registered: Apr 2004
Posts: 933
But what's more important: does it accurately emulate my memory of my Sharp TV?
2016-11-23 20:26
Mirage

Registered: Jan 2003
Posts: 113
If it has a bloom post process blit then no. Blurry is not Sharp.
2016-11-23 20:53
JackAsser

Registered: Jun 2002
Posts: 1989
Quote: the one thing that sets micro64 apart from most other attempts i have seen is that it doesnt just apply some fancy post processing that may or may not look like a CRT - but actually does the processing in a way that resembles what actually happens - which makes it a whole lot more accurate in a bunch of situations.

https://m.youtube.com/watch?v=d1qEP2vMe-I
2016-11-23 21:11
Oswald

Registered: Apr 2002
Posts: 5017
wtf

"Hyper64 is a working proof-of-concept of an experimental C64 emulator implementation without resorting to a conventional CPU emulation, but instead utilizing a realtime dynamic recompilation engine – which disassembles, analyzes and re-assembles the 6510 machine code as native 32-bit x86 code. "

I wonder how selfmod works this way.


"The same thing applies to the CIA emulation, whose accuracy is based on a VIC II line basis."

so already a cia timer based stable method will fail.
2016-11-23 21:17
algorithm

Registered: May 2002
Posts: 702
@Oswald. that one is one of Bero's other projects (Hyper64). Micro64 however is a totally different project (and very accurate). The Full PAL/CRT emulation options need a good GPU however. Ideally minimum specs would be something such as an I5 6200u with Intel HD 520/530 to get decent frame rates using the full emulation.
2016-11-23 21:20
Oswald

Registered: Apr 2002
Posts: 5017
I'd say its cool for viewing stuff, but when coding often you want to see the pixels accurately. thats why I hate that vice hid the pal emulation on off option in a far far away window.
2016-11-23 21:31
Peacemaker

Registered: Sep 2004
Posts: 243
for viewing demos etc micro64 is nearly perfect. i love to watch demos on it. althou my damn notebook only handles 40 or 60 hz -.- . in this case micro64 is even better with some useful options at the crt emulation.
2016-11-24 07:40
Perplex

Registered: Feb 2009
Posts: 254
Quoting Oswald
I hate that vice hid the pal emulation on off option in a far far away window.


Then use the SDL interface version, where every menu item can be remapped to a hotkey of your choice.
2016-12-09 23:24
White Flame

Registered: Sep 2002
Posts: 136
Instead of just PAL (or NTSC?) emulation, it would be an interesting target to emulate all the way through a specific 1702 or 1084, color/contrast/brightness knobs included.

On today's hi-res displays, you might even be able to represent the exact shadow mask from those displays, instead of just a rough assumptive pattern.
2016-12-09 23:39
Compyx

Registered: Jan 2005
Posts: 631
Just hook up your PC's video output to an actual CRT/TV: crooked/bent display, fucked up colors.
Done.
2016-12-09 23:58
chatGPZ

Registered: Dec 2001
Posts: 11114
Quote:
color/contrast/brightness knobs included

those "knobs" have been there for years....
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
eryngi
Guests online: 157
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Bromance  (9.6)
10 Memento Mori  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.8)
4 Acidchild  (9.7)
5 Starlight  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.106 sec.