Hacker News new | past | comments | ask | show | jobs | submit login
Transparency effects in SNES and Genesis games via composite video artifacts (nerdlypleasures.blogspot.com)
156 points by kibwen on March 6, 2017 | hide | past | favorite | 42 comments



I'm sorry to be the bad guy here and point this out, but ... this article is completely wrong :/

An emulator outputting 100% perfect RGB pixels onto an LCD screen is very different than running an analog RGB output to a CRT television.

I have a PVM-2530 CRT, and a hand-built Multi-AV to PVM-CMPTR adapter board ( http://i.imgur.com/EgCX2EJ.jpg ), and the colors still blend perfectly fine in his example of Kirby's Dream Land 3, as well as the more odious test case of Jurassic Park's translucent menus.

CRTs don't have an "official" horizontal resolution .. the number of RGB columns is dependent upon the tube and its size, and there's never an exact match against the analog nature of the RGB output from the SNES to the columns on a TV. So the colors naturally bleed together and produce the desired translucency. Maybe just a touch less severely than composite, but well more than enough to achieve the desired blending effects -- without all the horrific composite video artifacts.

Further, my SNES emulator simulates this effect as well, by choosing "Video Emulation -> Blurring." It doesn't quite work the same way as a CRT would, but it simulates the effect very nicely. It's not yet connected for my Genesis emulator, but that's only because it's very new and has more pressing issues to address, but it'll be there in time as well.

I can't speak for how these effects look on an XRGB-Mini (I haven't tested these types of translucency tricks on mine yet), but I would venture a guess that it would not even look close to as 'pristine' (striped) as the emulators output: it's still having to use an ADC on the RGB lines, and that's always going to be lossy to some degree.


> An emulator outputting 100% perfect RGB pixels onto an LCD screen is very different than running an analog RGB output to a CRT television.

I don't see the article suggesting otherwise. It suggests that some of the artefacts inherent to composite video encoding are not present in RGB.

I agree that the effect varies depending on the tube and the device, but in general I've found the blurring to be more pronounced in composite encoding, not to mention having a distinct quality.

Here are actual frame captures compared: http://www.chrismcovell.com/gotRGB/rgb_compare2.html


It looks like a lot of those effects are possible because when outputting to composite, the horizontal rows are well-defined, while the vertical columns are not and unlikely to precisely match/map the output. For instance, there are a lot of clean gradients from top to bottom (clean rows of color) which use dithering in the rgb output. Columnar gradients would have bleeding/blurry edges due to the unpredictable nature of the analog display. Am I understanding this correctly?


Note that byuu is the author of bsnes, and the subject of a few recent posts that hit HN: https://byuu.org/emulation/preservation/found-package/


Composite would get you a different amount of horizontal blur for different colors. In an analog sort of way, it's like resolution is reduced for each color component, but the red-green color axis is done differently from the blue-yellow color axis. For each 4 "pixels" (again, analog filtering) of brightness value you get 2 pixels worth of data for one color axis and just 1 pixel worth of data for the other color axis.

You also need to account for blooming, phosphor delay (different for each of red/green/blue), a "black" that is grey...

If you want faithful emulation, you need all these things. If you want performance, you want none. For the most attractive display, you need SOME of these things, and it varies from game to game. Probably some can be done in a GPU. You might want to let the user know if a real (not just MesaGL) GPU is available and able to handle something, if a GPU can do a half-good job, if something will just munch CPU time, etc.


> a "black" that is grey... I hear this a lot. Why is an incorrectly biased monitor's bad black levels so widely considered the way it is supposed to be?


There is nothing incorrect. It's just old technology. This is how things were, and full compatibility -- if you want it -- demands that you make things match. SNES and Genesis artwork was designed for the old hardware.

The monitors looked grey even without being plugged in.

To be clear, this is tube technology, which was widely used right up to the end of the last century. Screens were often thicker front-to-back than they were wide. They were really heavy too, with thick leaded glass (to stop X-rays) at the front and big copper magnet coils at the back. There was a fine-pitch metal grid inside the glass, and some phosphors printed on inside of the glass. That stuff wasn't black. In operation the situation got slightly worse, from stray electrons probably, but fundamentally the displays just couldn't ever be black. It's the same as printing on brown paper: don't blame the settings of the printer when you don't get any white.


Even the oldest CRT televisions have a "brightness" control, and it's supposed to be used to set the black level to black, not grey. The face of the tube has a grey color while it's off because that's how the surface of the tube looks - but that's not the result of emission from the tube, and even by the eighties tubes had dark anti-glare tinting for this. Unless you're shining a light on the tube, the black levels should be black.

Are we to say that the black level of an OLED display isn't black because external light can raise it through reflection?


Glad I wasn't the only one shouting in my own head while reading the article. 100% of the time I want perfect RGB and I'll run the source through the appropriate hardware (like the XRGB stuff) if I want to use a modern monitor.

I'm jealous of your PVM-2530...I tried for years to get these in the late 90s/early 2000s and they just weren't obtainable near me and now they're mostly priced out of orbit in good condition. There are some other options, but they're all reasonably expensive for what they are.

The situation for real arcade monitors is looking even worse with the commonly available new stuff mostly being shit. Soon to be unobtainium, it looks like, and to me that's sad.

For now I have to settle for this tiny old Atari ST monitor...but hey, it'll sync down to 15.7Hz!


My PVM-2530 was hell to get.

The first one shipped and had massive geometry and brightness problems. Every few minutes the entire screen would flicker -- like the image would zoom in by 5%, zoom out by 5%, repeat -- really disorienting. I took it to a local place that actually repaired them. Guy charged me $200 to replace some voltage regulators. It fixed the brightness but the image still flickered every few minutes. He wouldn't touch it again unless I paid him again.

Then I found a guy two states over selling two of them for local pick-up. Drove eight hours each way, got them loaded up and taken back. One of the two had the flyback transformer failing, and had a massive gauss problem at the top of the tube -- degauss only barely helped it, and it'd come right back every time. The other one seemed to be in good condition. I don't know how long it will last, and I always feel a bit guilty using it, knowing I'm wearing down its remaining life.

The 2530s set me back around $700 for all three plus the failed repair attempt.

I do also have a working 2030, and two 1390s. The 1390s are too small to be usable, but I can put them up on my plant ledge, so I'm keeping them for posterity.


If you have ample and cheap/free storage space, keep all three. The only thing not "easily" fixed (not easily, but no magic) is the phosphor on the inside. All other components can be upgraded and replaced by competent people. Don't let them be a drag on your soul and don't feel guilty. Use the third with joy!

If you don't have space, throw them away of course, no worldly possession is worth hassle in itself. But if you keep them, their value as cultural artifacts will continue to increase. Also with time, more people will be willing to pay the (high) cost of rebuilding them. I predict there will be at least one canonical company in the US which will spend many, many years rebuilding CRTs for collectors, enthusiasts and museums.


Believe it or not, I actually sold them to a museum.

I listed them on eBay as defective along with a detailed description of their issues, and they were both purchased by some sort of museum place in New York I forgot the name of. They sent a truck out to my place to pick both of them up.


Now that is a success story in my book.


I have one because my dad used to use it for our CCTV system at work. It's been gathering dust for a while but I can get it running again. Are they worth a lot?


Maybe not now, but they will be worth a lot. Not enough maybe to offset cost of storage if you have to pay for that kind of thing, but if you have "free" storage (which means your old electronics junk should not take a big chunk out of your other storage needs and life in general) it can definitely be worth saving stuff like that, even from a pure financial standpoint.


Analog = 'sine waves', not 'square waves'. So if you have the left side of the screen white and the right half black then there will be a point in the middle where the signal, no matter how the PAL or NTSC is encoded on a carrier wave, has to do 180 degree change. So this affects the signal and the 'aliasing'. It isn't a mismatch of dots in the horizontal only approximating defined rgb columns, it is all in the 'sine waves'.


It would be good if there were high red reference pics of these games on various NTSC and PAL CRTs, none of the emulations look as I remember.

With 4k resolution you could probably have a really nice CRT emulation with dots like the phosphor on CRT.


We have fairly decent CRT emulation via pixel shaders already. Scanlines, phosphor glow, barrel distortion (curvature), shadow masks/aperture grills, etc. And yeah, all of that at 4K can strain a top-end video card. That and using a shader like this adds an additional frame of latency.

The truly limiting quality issue is that the contrast of LCD monitors doesn't even come close to that of a CRT.

It's really quite amazing how much we acclimate to the inferior contrast of LCD displays. But if you ever run the output to both a CRT and LCD side-by-side ... it'll truly shock you what a difference there is.

I've yet to see an OLED PC monitor in person. Hopefully they're a lot closer.


This did not happen with all displays. I used an original Playstation with a Commodore 1084S monitor [1] connected via RGB with custom connector I built, using a LM1881 [2] to split the composite sync signal for the RGB mode's separate vertical and horizontal sync. This had excellent sharpness and dithering was always clearly visible. Both the Genesis and the SNES (non-mini versions) output RGB without modification and can be used with that same hardware.

In any case, it's unlikely that blurring was always intended. The article shows a screenshot from Chrono Trigger where a dithering-style checkerboard pattern is instead used to represent the keys of a typewriter. It would be difficult to tell what it was supposed to be if there was enough blur to hide dithering. Official artwork from NES-era Nintendo often showed characters drawn in a sharply pixelated style. And portable systems used LCD displays with no blurring, but dithering was still used extensively.

[1] https://www.c64-wiki.com/wiki/Commodore_1084

[2] http://www.ti.com/lit/ds/symlink/lm1881.pdf


On CRTs the pixels on PC monitors were arranged differently to TVs, which is why your Commodore screen was sharper than the typical console hook up.

From what I recall (it's been a long, long, time since I've studied this) PC monitors were a typical square grid layout, much like how LCDs are. Where as TVs had the odd and even lines offset by half a pixel - a bit like a hexagon grid.


Aperture grille CRTs had that layout, but the 1084 was just a regular shadow mask CRT.


In Europe and Japan a lot of TVs just had SCART with RGB pins so I don't think it was too unusual for people to have setups like this at the time. Not discounting what the author is saying, but I have to assume that designers planned for a lot of people using RGB or at least decided what their tradeoffs were going to be.


Also arcade games were very often RGB, so games with artwork from arcade games could have been designed for RGB.

But I have to say, I don't think "designers" back then thought much about hardware setups different from their own!

It was different times and stuff had to ship fast, fast fast.


The ability of a programmer to take advantage of an effect specifically found only on a quirk in hardware is an art skill that may be going the way of the dodo bird. Not having to port a game between varying resolutions like this article mentions means you can play visual tricks. The article demonstrates the curtain being revealed in the last comparison of Kirby games.


This is very similar to how CGA worked on the IBM PC.

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


Don't forget Apple ][ . Wozniac abused of NTSC artifacts to generate colors.


When "perfect" emulation (or pixel-perfect "better" displays) fall short of the real goal. Art. :-)


I like the sharpness of RGB though, composite looks a bit blurry. As someone who grew up with emulators and ports (J2ME, Nokia N-Gage…) I'm used to e.g. the vertical stripes on water in Sonic :D


Somewhat related to those that would like to know more...

Great efforts were made to extend the Atari 2600 emulator, Stella, to deal with the imperfections of CRT displays that games of yesteryear depended on. Ian Bogost, co-author of "Racing the Beam" (https://mitpress.mit.edu/books/racing-beam), lead a team to make a code contribution to Stella that attempted to emulate the visual qualities that CRTs exhibited.

"...In Spring 2009, I tasked a Georgia Tech Computer Science capstone group to modify Stella, adding settings to simulate the CRT behaviors described above. The group consisted of five committed and talented CS seniors: Edward Booth, Michael Cook, Justin Dobbs, Will Rowland, and Prince Yang..."

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


Raspberry PI can do 240p over composite now: https://github.com/raspberrypi/firmware/issues/683

The reasons portrayed in the article are exactly why I prefer this setup over RGB.


Yay! I have been waiting for this.


FYI, there's currently a fairly interesting related discussion going on under my comment on the "disappearing CRTs" article: https://news.ycombinator.com/item?id=13802917


I prefer the crisp output of RGB because it's how the better arcades looked to me in the late 80s and early 90s. High quality upscaling with scanline emulation is about as close as that as I can get at home.


TL;DR anti-aliasing filter and dithering


I think there are a few modern games out there that emulate this effect.


Does the 'blurred' version give anyone else a headache?


I dunno... look at the checkerboard-pattern background in the first set of screenshots from Sonic. (The one "behind" the falling water.) Why is that blurrier in the "RGB" version? That's just a pattern of squares, I'm not sure composite video artifacts or whatever are the reason the "RGB" one looks so blurry.


> Why is that blurrier in the "RGB" version?

You're asking the wrong question. It's not blurrier in the RGB version. The point is that the graphics were designed for a blurry display method, so by not being blurry, the RGB version has a worse result.


It is blurrier!


Everything looks pixel perfect to me in the RGB screenshots (the first one in each set). Is there something wrong with your monitor?


Obviously everything is indiscriminately more blurry, but the argument here is that the game was designed with the blurriness in mind and has effects that only work with it.


I dunno, I guess I just don't see it in the example I was talking about. Elsewhere, sure.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: