6 ms·
Understanding the design of the the Super Nintendo video system
- aidenn0 2y agoI think TFA has a typo; it suggests the aspect ratio is 8:6 which would be the same as 4:3, my math says 8:7
- Bluecobra 2y agoYou're right, the aspect ratio internally is 8:7. Emulators like Snes9x default to this. This effectively is rendered on a CRT display at 4:3 due to how CRT's work and mangle perfect square pixels to rectangles. At least that is my understanding.
- fabiensanglard 2y agoThank you, I fixed the TFA.
- bombcar 2y agoTFA here, of course, being The Fabien Article. ;)
- rf15 2y ago> European TVs, especially those in France, came with SCART connectors This is, as far as I can tell, an understatement - almost all TVs in europe offered SCART ports, the standard just originated from france.
- ZFH 2y agoYes, SCART was for all of Europe. Mass adoption was kind of slow though, low end TV models often lacked the port well into the early 90s.
- actionfromafar 2y agoOlder TVs did obviously not have SCART, and it took a while after 1976 when SCART was created for it to be widespread. Also, a lot of cheaper TVs had only RF in, and a lot of smaller TVs had RF only or RF + composite input only, even in Europe.
- meindnoch 2y agoI've never seen anyone use the SCART port on their TV. Component video or S-Video was much more widespread.
- BlaDeKke 2y agoHere in Belgium almost everyone used scart cables for game consoles, vcr and dvd players. We had 2 scart input but 3 scart devices. PSX vcr and dvd. So we had to switch from time to time. There were even scart switches, but they all sucked.
- rvnx 2y agoAh least with a switch you wouldn't get electric shock while plugging-in the scart cable (which was a major issue for me, and not just static electricity).
- HeckFeck 2y agoGrowing up in the UK, everyone I knew used it for VCRs, DVD players and digiboxes. It always made a notable improvement over the RCA jacks, and I longed to get the SCART cable for my PS2 (never did). Famously bulky and stubborn with their wires joining the connectors at an aggressive 45° angle; I never had one go bad on me. I've read that it could even do HDTV in theory because it had YPbPr lines, but this was was never seriously attempted/rare in practice.
- MBCook 2y agoAs an American I never knew about it until it was mentioned one day on a forum on the internet I was reading. Other than the crazy size of the cable, seems like quite a big improvement over our random assortment of cables we went through over the years with composite -> s-video -> component.
- HeckFeck 2y agoIt remains fascinating to me that even today if we boarded flights to each other's countries, there are still many small things that would need explained. I would first be shocked to see the smaller two-pronged electrical plugs in the flesh. Then I might be in trouble with the law if I walk across a road. And finally lose my mind over the fact that asking for 'tea' gives me something else entirely!
- deleted 2y ago[deleted]
- Aissen 2y ago[flagged]
- deleted 2y ago[deleted]
- amelius 2y agoWhy does the SCART connection use capacitors in the RGB lines? (last picture) Doesn't that block low frequency signals (e.g. an all-blue screen)?
- userbinator 2y agoThere's still horizontal and vertical blanking intervals.
- amelius 2y agoYes, but are the RGB signals required to be zero there?
- MisterTea 2y agoThey appear to be there for high pass filtering but the 220uF value appears to be incorrect and is likely 220pF.
- deleted 2y ago[deleted]
- RetroSpark 2y ago220uF is correct. Along with the 75Ω terminating resistor inside the TV, that forms a high-pass filter with a cutoff frequency of ~10Hz.
- crtasm 2y agoMeanwhile I was using the RF output and a switch box to pick between SNES and TV antenna.
- mrandish 2y agoOh my! The only way to get even worse video quality (and extra noise) was to add a two-wire UHF screw terminal adapter between the RF switch box and the TV. So of course that's what I had as kid on my 1970s knock-off Pong game console (we couldn't afford the real Atari). Later in life, video engineer me could laugh about this. I'm just glad that at the time kid me had no idea how awful it was. :-)
- criddell 2y agoI haven’t seen carving used like this before. Is it a common usage?
- jihadjihad 2y agoAuthor is French; the French word for "carve" could translate to something like "sculpting/tailoring" in English, maybe that is what he meant? Tailoring the video system to the proper settings/resolution, or something?
- fabiensanglard 2y agoYes, that is what I meant. 20 years in the country and still not fluent :!. Anyway, I changed the title to "Designing the SNES video system".
- account42 2y agoNot a native english speaker but I liked carve better since to me it has more of an implication of having to stay within the bounds of the available medium with the connotation of this being a more artistic than purely scientific craft.
- Terr_ 2y agoSpeaking from an English perspective: Carving - Suggests that material is only being removed, with excess being thrown away. Tailoring - Suggests a mix of removal, addition, and general re-shaping, to fit a unique set of constraints for a customer.
- url00 2y agoFor what it's worth, when I as a native speaker read the title, my brain thought it said "Craving" which had a slightly different implication haha. :)
- deleted 2y ago[deleted]
- anthk 2y ago>game running slower Eh, jus try Super Mario World with an emulator on PAL settings with an NTSC ROM. The counter and music will go much faster.
- rand0mfacts 2y agoThe power grid in Japan runs at 50hz in half the country and 60hz in the other half.
- soapdog 2y ago[flagged]
- rand0mfacts 2y agoi'm real. I just wanted to make a point that "59.94Hz is such a weird number. Isn't the power grid running at 30Hz and TVs used to double it?" They don't double it, it was in fact running at 60hz or 50hz depending where you lived.
- s1artibartfast 2y agoCurious why you thought it looked like a bot
- djbusby 2y agoUsername checks out.
- dang 2y ago"Please don't post insinuations about astroturfing, shilling, bots, brigading, foreign agents and the like. It degrades discussion and is usually mistaken. If you're worried about abuse, email hn@ycombinator.com and we'll look at the data." https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html https://hn.algolia.com/?sort=byDate&dateRange=all&type=comment&storyText=false&prefix=true&page=0&query=by:dang%20astroturf https://hn.algolia.com/?sort=byDate&dateRange=all&type=comme...
- bluedino 2y ago> They probably did not pick that number at random. 224 is a number evenly divisible by 16 (224/16 = 14) which means it plays nicely with the graphic rendering pipeline tilemaps. This was something that took a bit to figure out, but made so much sense to me after I had been playing around with trying to learn game programming when I was a kid. CGA/EGA/VGA all had popular 320x200 modes. The NES was 256x224, as was the SNES (although it did have higher resolution modes), and that was really a TV limitation. Meanwhile, Pac-man was 288x224 in the arcade. So none of the Pacman clones on the PC would ever look 'right', and even the Pacman games on the NES that were made by Namco didn't look right either. There were always hacks like giant characters because the tiles for the map were smaller, or you'd get a scrolling world (Gameboy, Tengen versions), other kinds of distortion, non-original maps...it was all just weird and frustrating when you're trying to play the 'arcade' game at home. But after learning the details of the machines, how sprites worked (and then coming to the conclusion that they just didn't have any other choice), was such a huge 'a-ha!' moment for me. Let's not even get into the fact that pixels aren't square on those resolutions on the PC. And then it became almost an instant reaction when I'd see a Pacman port or clone, and try to figure out what size the world was, what size the tiles were, what size the sprites were....
- NobodyNada 2y agoThe NES was actually 256x240, using all 240 lines of an NTSC field, but many TVs would cut off part of the picture on the top and bottom -- thus, 256x224 was the "usable" space that was safe on most TVs. But this overscan was inconsistent from one TV to another, and modern TVs and emulators will usually show you all 240 lines. The SNES's vertical resolution was configurable to either 224 or 240 lines, as the article mentions. Most games stuck with 224, as the longer vertical blanking interval gives you more time to transfer graphics to the PPU.
- mrandish 2y ago> 256x224 was the "usable" space that was safe on most TVs Adding further complication, although most arcade cabinet games also used 15Khz CRTs similar to de-cased televisions, since all the cabinets were being assembled by the manufacturer using CRTs they specified, designers could take some liberties with varying the resolution, frame rate, scan lines and scanning frequency of the video signal generated by their game's hardware circuit board. Being analog devices, CRTs of this era were generally tolerant of such variations within specified ranges since they had to sync up with inputs from disparate over-the-air television channels, cable boxes, VCRs or even live cameras. This allowed arcade hardware designers to optimize their circuits either for slightly better resolution and frame rates or alternatively reduce them somewhat in cases where their hardware wasn't quite able to generate enough pixels in real-time. For example, the Mortal Kombat 1, 2 and 3 cabinets displayed video at 54 Hz (instead of NTSC-standard 59.94 Hz) enabling higher horizontal resolution. They could also optionally choose to use the entire overscan safe area for active game pixels since they knew the CRT's width and height adjustments could be dialed on the cabinet manufacturing line to ensure the entire active picture area was visible inside the bezels - whereas few consumer TVs exposed all of these adjustments externally to users. All this subtle variation in classic arcade hardware makes clock-for-clock, line-for-line accurate emulation especially challenging. Fortunately, the emulation community has solved this thorny set of problems with a special version of MAME called GroovyMAME which is designed specifically to generate precisely accurate emulated output signals so these emulated classic arcade games can be perfectly displayed on analog CRTs. This requires using one of the many PC graphics cards with native analog RGB output, which was most graphics cards made up to 2015 - but sadly none since. GroovyMAME works with specially modified Windows graphics card drivers to generate correct signal ranges from the analog output hardware of most off-the-shelf, pre-2015 Radeon and NVidia cards - which are still widely available on eBay ($10-$50). For arcade preservationists and retro gaming purists, the resulting output to a CRT is sublime perfection, identical to the original cabinet hardware circuit boards, many of which are now dead or dying. This enables creating an emulation arcade cabinet either using a period-correct CRT matching the traits of a certain series of original cabinets, or alternatively, using a special tri-sync or quad-sync analog RGB CRT which is able to display a wide variety of signals in the 15Khz, 25Khz, 31Khz and 38Khz ranges. This is what I have in my dedicated analog CRT cabinet and using GroovyMAME along with a 2015 Radeon GPU it can precisely emulate 99+% of raster CRT arcade cabinets released from 1975 up to the early 2000s accurately (and automatically) recreating hundreds of different native resolutions, frame rates, pixel aspect ratios and scanning frequencies on my cabinet's 25-inch CRT. For more info on GroovyMAME and accurate CRT emulation visit this forum: http://forum.arcadecontrols.com/index.php/board,52.0.html http://forum.arcadecontrols.com/index.php/board,52.0.html.
- theandrewbailey 2y ago> 59.94Hz is such a weird number. Isn't the power grid running at 30Hz and TVs used to double it? No power grid I know of runs at 30Hz. North America (where NTSC was designed) and a few other places[0] run at 60Hz. [0] https://en.wikipedia.org/wiki/Mains_electricity_by_country https://en.wikipedia.org/wiki/Mains_electricity_by_country
- fabiensanglard 2y agoOops :)! Thank you (fixed now).
- ibobev 2y agoHi Fabien, A bit unrelated, but the links to your books at your website are no longer working. I tried to connect to you via email for this issue. Is this intentional or you will fix them? Best regards, Ivan Bobev
- beefok 2y agoI love all of your projects, Fabien! This SNES video analysis one is incredible. I've always had all of this stuff running around in my head for how to explain how weirdly cool video generation for NTSC is, and you have done an incredible job finding a way to do so. There is yet another reason for the weird frame and horizontal scan rate. When NTSC was originally introduced as a broadcast standard over a single RF modulated signal, the sound carrier and signals were also embedded in the signal as well. [1] Actually, I just found that Wikipedia does a good job of describing this on the NTSC page [2]: When a transmitter broadcasts an NTSC signal, it amplitude-modulates a radio-frequency carrier with the NTSC signal just described, while it frequency-modulates a carrier 4.5 MHz higher with the audio signal. If non-linear distortion happens to the broadcast signal, the 3.579545 MHz color carrier may beat with the sound carrier to produce a dot pattern on the screen. To make the resulting pattern less noticeable, designers adjusted the original 15,750 Hz scanline rate down by a factor of 1.001 (0.1%) to match the audio carrier frequency divided by the factor 286, resulting in a field rate of approximately 59.94 Hz. So yes, yet another difficulty with NTSC -- sound actually splattered visual noise on the screen as well! [1] https://upload.wikimedia.org/wikipedia/commons/f/fd/Ntsc_channel.svg https://upload.wikimedia.org/wikipedia/commons/f/fd/Ntsc_cha... The combined spectrum of video, sync, and audio all on a single RF broadcast signal. [2] Search for 'sound carrier' in https://en.wikipedia.org/wiki/NTSC#Color_encoding https://en.wikipedia.org/wiki/NTSC#Color_encoding
- masfoobar 2y ago> Trivia: Besides the annoying black band, the game code was also rarely revised to account for the VSYNC which occurred at 50.00697891Hz instead of 60.098Hz. This resulted in game running 17% slower than intended. European gaming was a real dumpster fire. But luckily without the internet we did not know about it. This one hits home. Although my examples are not specific to the Super Nintendo, it reminded me of the first time I played/watch Sonic the Hedgehog on the Mega Drive (Genesis) I wasnt impressed with the game. It looked clunky and just felt slower compared to the Master System version. It wasn't until the rise of youtube I realised the difference in speed between the NTSC and PAL is huge. Its not just the speed of the game, but the Music. It sounds horrible on PAL! Don't get me wrong - I knew about the PAL during the 16-bit, and the need for the "black box" but I didn't realise how much of a difference it was. I am sure the console magazines at the time would say the difference is minor in most games. One of the exception (honesty) was DooM on the SNES. The NTSC version had a bigger screen. I remember being good at Punch-Out when I was a kid on the NES. I could beat Mr. Dream (or Mike Tyson) in the first round. Of course, I was playing the PAL version. If there was some kind of competition in the USA, I would have been destroyed in the first round! I would have been convinced I was framed! Past times, right?
- badgersnake 2y agoWow, that sounds like it might explain why my timing is always off playing SNES games on emulators. I grew up playing the PAL versions. I always put it down to lag on modern TVs. Be
- bobim 2y agoThis is raising the question if emulators are using PAL timings for EU roms. And do we know if the snes mini is giving the NTSC or PAL experience?
- NobodyNada 2y agoIt depends on the system and the emulator. The file format most commonly used for NES ROMs does not include region information, so most NES emulators require the user to manually select NTSC or PAL timing to match their ROMs. I think SNES emulators should automatically use the correct framerate though, as the SNES ROM header does include a region field. The NES/SNES minis always use the NTSC versions of the game, regardless of region.
- roflchoppa 2y agoI wonder how long it takes Fabien to write these up. So many details, so clean.
- fabiensanglard 2y agoIt took roughly a whole Sunday from 9am to 9pm.
- roflchoppa 2y agoDamn dude you didn’t have to speed run it. :)
- butz 2y agoHires mode games list is incomplete. I wonder, if it would be possible to quickly detect if game has a CPU instruction to toggle hires mode on?
- NobodyNada 2y agoIt's not a dedicated CPU instruction, but rather a write to an MMIO register with a certain bit set. And many games will follow patterns like computing the register value during game logic, saving it in RAM, and copying the value from RAM to the register later during vertical blanking, or they might have code path to enable hires mode that is present but not used if the code came from a library or engine. So in general, the problem is undecidable; and limited to SNES games, probably not very realistic. The most reliable thing to do is probably to play through the entire game in an emulator (maybe from a TAS movie) and record whether it actually enables high-res mode or not.
- Masterjun 2y agoDoesn't this miss the part where the 256x224 (8:7) output resolution gets stretched into a ~4:3 (actually 64:49) image? The SNES has a dot rate of ~5.37 MHz which is slower than the square pixel rate defined by the ATSC standards of ~6.13 MHz. It's exactly 8/7 slower, so pixels are stretched horizontally by 8/7, causing the 8:7 resolution to be stretched to (8/7)*(8/7)=64/49, which is close to 64:48 = 4:3. > Result in an aspect ratio close to 4:3. This would mean 224*(4/3) = 298 visible dots. If you consider what I mentioned, the factor would be (4/3)/(8/7) = 7/6, so they would have to choose something closer to 224*(7/6) = 261.33... visible dots. Which is much closer to what they chose with 256.
- JoshTriplett 2y agoHow much of the SNES resolution is hard-coded in the console hardware, versus being something the cartridge could drive? Could a cartridge that didn't need to load sprites (e.g. because it had its own coprocessor), and had its own onboard clock, theoretically drive more than 256 horizontal pixels per line?
- MBCook 2y agoIt’s all fixed in the PPU, I think. So with a coprocessor you can render your own frames and put them in memory where the next line’s tiles are going to be pulled from. That is what the SuperFX did, I think. But in the end you’re still stuck with the limitations of the PPU actually drawing it in pixels and number of colors and such.
- JoshTriplett 2y agoSo there's no bypass giving the cartridge access to the video out lines?
- fabiensanglard 2y agoNope
- Dwedit 2y agoAlso check out Rodrigo Copetti's article about SNES architecture. https://www.copetti.org/writings/consoles/super-nintendo/ https://www.copetti.org/writings/consoles/super-nintendo/
- gary_0 2y agoAre there any emulators that accurately simulate the CRT appearance instead of just drawing the pixels straight to the window? This could be done performantly with a GPU shader. (I recall some emulators having an aesthetic scanline effect you can enable, but that's not the same thing.)
- rimunroe 2y agoThe last time I looked there were several shaders available for this. CRT-Royale[1] was excellent when I tried it. [1] https://emulation.gametechwiki.com/index.php/CRT-Royale https://emulation.gametechwiki.com/index.php/CRT-Royale
- gary_0 2y agoYeah, that's it! And wow, that photo-real screenshot of Super Metroid briefly teleported me back in time 27 years. It was a painful experience! I don't recommend it.
- rminla 2y agoI was hoping there'd be some insight on how this led to the design of such amazingly iconic games :) I LOVED SNES and was unfortunately never able to convince my immigrant parents to buy me one Thank you for the writeup. Super interesting
- Lammy 2y agoThe 8:7 artwork aspect ratio is visible in a few SFC/SNES ports to other platforms, like ROCKMANX3 / Mega Man X3. The PSX/Saturn/PC versions of that game retain the original art unstretched and instead add stage-appropriate pillarbars to pad the 8:7 out to 4:3. Very distracting to play since I'm used to the original ver. Check out some screenshots of the Saturn ver here and you can see it — everything is slightly too skinny: https://segaretro.org/Mega_Man_X3 https://segaretro.org/Mega_Man_X3
- Waterluvian 2y agoWow. I had no clue that an input device actually had any sort of control over the drawing of a CRT. I thought you just throw out signal at a certain timing and that’s it. Also this article was wonderful in the way that it didn’t waste a word. Very concise.
- jzer0cool 2y ago"Don't sit too close, move back a bit". Any truth whether sitting too close makes for bad eye sight? Wondering of any effects (e.g. leakage) that goes past the target screen area.