How the SNES Graphics System Works
fabiensanglard.netNand 2 Tetris (which gets posted on HN a lot, rightly) will give you a fundamental understanding of a lot of these low-level concepts https://www.nand2tetris.org/
A good exercise for the junior systems engineer, or someone who wants to fundamentally understand computers better than the REPL, is to build their own emulator.
There is likely a wealth of tutorials out there, but if there is not yet a canonical book on how to write an NES, Genesis, SNES, etc. emulator from scratch that can load real ROMs, I think this would really scratch an itch for the aspiring hardcore developer. It is a very illuminating exercise and given the performance of modern computers and the extensive number of graphics libraries for every semi-popular language in existence, I think a universal book could be written that pseudo-codes the concepts of emulation and enables developers of all stripes to build their own emulator.
I always upvote mentions of Nand2Tetris, this course helped me understand how computers REALLY work. I'm in the middle of writing a Typescript NES emulator. Even with the help of the excellent Mesen emulator, it's a challenging task! It amazes me how people could first write these emulators that worked so well in the 90s with such few resources.
Here is an interesting tidbit: the Japanese version of the SNES was called Super Famicom. There was a physical notch that prevented Japanese cartridges from being used in the North American SNES. But for people who knew, it was actually possible to just cut off the notch in the North American SNES, and then you could use Japanese cartridges. My cousin gave me a Japanese Star Fox cartridge back in the days and I could play it on the North American SNES.
What I really never understood is how the whole system dealt with the differences between PAL and NTSC. For starters, the Japanese system outputs in PAL, which is 625 horizontal scan lines at ~25 fps. The North American system outputs in NTSC, which is 525 horizontal scan lines at ~29.97 fps.
Does anybody understand how that worked?
As other commentors have pointed out, Japan uses NTSC. PAL is mostly a European thing.
As far as the SNES is concerned, PAL consoles simply letterbox the video and run the game 16.6% slower. Occasionally the game speed is modified to account for the decreased framerate. Super Metroid's engine was sped up so that gameplay was faster frame-by-frame and approximately as fast in wall clock time, but this introduced a number of bugs.
It wasn't until framebuffer based consoles like the Playstation where using the extra lines of PAL signal became common. Game speed was still a common issue until the Dreamcast and PS2 where game speed ceased to be an issue and optional 60Hz support was also common.
There's a few games on SNES of which the official PAL release draws an extra row of tiles on top/bottom, Super Mario World is one of these IIRC. Same goes for Sega Mega Drive / Genesis, and IIRC NES too.
It's not quite enough to fill the screen vertically on many PAL TVs (and especially not monitors which in general have less or no overscan at all), but even the PlayStation's and Saturn's (and PlayStation 2's!) PAL modes still have this problem, the framebuffer is just not big enough vertically.
Also the pixel aspect ratio is still distorted, because the 2D gfx assets haven't been redrawn. On later consoles, some (but not all) 3D titles do account for this, sometimes even the 2D assets (HUDs, menus, etc.) are drawn with a bit of vertical stretching, especially on PS2 where bilinear filtering is available.
Even on PS2 some games still have wrong timing in the official PAL release. Final Fantasy X comes to mind... music speed is correct, everything else runs slow (picture is vertically squished as well, Square just didn't care about doing proper PAL versions until later in the PS2 era).
This (and earlier and in general just better title availability) is why some people living in PAL countries always preferred to bypass the region locks (or just import NTSC hardware) and import NTSC releases.
I'm not sure if there are any console games by an European developer where the PAL version is actually the original or intended experience and better, but on old home computers (C64, Amiga, etc.) there definitely are.
Wipeout on the Playstation - by defunct developer Psygnosis in Liverpool, England - is well known for having good PAL versions.
> As far as the SNES is concerned, PAL consoles simply letterbox the video and run the game 16.6% slower.
Oh. That should make uncompensated PAL games easier, right? 17% more time to time e.g. jumps in Mario is alot.
For NES Tetris, playing on PAL is basically considered easy mode. Some of the top players have been doing it to train for difficult feats.
That's right. Sonic the Hedgehog on the Mega Drive is the goto example, where even the music runs slower.
Ye I got that one. Had this blue bar around the screen too. Even as a kid I noticed there was something off with the music and speed compared to Sonic 2 and which seemed to be a better port.
Yeah, but if you're timing a speedrun using a real world clock, then the PAL version may actually be harder because it runs slower.
I wouldn't be surprised if there are games out there with a visible in game timer which has been adjusted for PAL while the rest of the game is still slow as well...
edit: Oh yeah, I also just recalled that the PAL version of the PlayStation port of Doom was PAL fixed in a funny way:
The game timer still ticks at the same rate as in the NTSC version (so it's slightly too slow now in PAL), but the player's movement speed has been increased, so you can sometimes make jumps which just aren't possible on NTSC or the original PC version.
Durations for frames (states) of monsters and the player's weapons which are counted in game timer ticks have been adjusted inconsistently as well, which results in at least the shotgun being more powerful since it's faster relative to everything else in the gameworld.
I don't remember whether projectile speeds were adjusted. Monster projectiles now being slightly faster (relatively) would tip the scale a bit the other way.
So even a supposedly PAL fixed game be easier than the NTSC original, or it can just be different as well.
It's not alot. But it is a lot.
/pedantic
As other people have said, Japan used an NTSC-based system.
I’m in the UK but I ended up buying a Super Famicom to play SNES games* because I didn’t want to play the crappy slowed-down PAL versions and a good-condition SFC was significantly cheaper than a US SNES. The Japanese/European case design is also way cooler than the US one imo.
Funnily enough the Sega Mega Drive/Genesis power supply is a perfect match for connecting a Super Famicom to a UK power socket.
*I know US SNES carts are physically larger and won’t fit in an SFC without an adaptor, but I was using a flash cart with an SFC-sized shell. I had it connected to a CRT at the time so I wanted real hardware rather than emulation.
The only difference to handle PAL and NTSC is the master clock. The two consoles shipped with two different oscillator. I actually detailed how this works in last month article[1].
And as other have pointed out, Japan and USA both use NTSC.
[1] https://fabiensanglard.net/snes_video/#:~:text=totally%20use...
It's possible to add a pretty simple 50Hz/60Hz switch to any SNES or SFC console (just as on Mega Drive / Genesis, Saturn, Jaguar, and others), see eg. https://gamesx.com/importmod/snes5060.htm
I don't know if the timings will be EXACTLY* the same as on an actual console from the "other" region but should be pretty close, close enough to not really notice a difference in gameplay and make all the games I know about from the "other" region work correctly, assuming you bypass the lockout chip as well and aren't trying to play a game which detects a disabled lockout chip like the SA-1 games.
Often these 50/60Hz switch mods either don't switch the colour encoding at all (you get PAL60 which actually works on many, even older, European TVs and monitors, or NTSC50) or breaks it completely, but use RGB interconnects and that won't be a problem at all. IIRC a PAL SNES modified this way outputs PAL60, but it might have been just totally broken composite / s-video as well (which will show up as monochrome on any display).
(on Dreamcast, PS2, and later model PS1s hardware from all regions can actually do both colour encodings as well.)
On NES you really need to swap a couple of chips and a crystal to convert a PAL console to NTSC or vice versa, some other older systems as well.
*) I know that at least on the 1st PlayStation, a PAL console switched via software to 60Hz doesn't have exactly the same timings as a real NTSC console, also vice versa, but the difference is so minor that at least I never even noticed, just read about it years later on the Internet, IIRC it was either the shmups.system11.org forum or some Mednafen developer comments on their website where I saw this
(apologies if this is already touched upon on your site, haven't read those pages fully yet...)
Japan used NTSC-J, not PAL. Apparently it's close enough to American NTSC that they are basically compatible.
Europe runs PAL, here it was popular to hunt TV's that could run NTSC because of the higher framerate. This leads to less flicker. All TV's that can run NTSC can also run PAL so you can switch between the 50/60 Hz as you need on computers. Can't remember how it was with consoles, once I got a computer I never really touched a console again :-)
A lot of TVs sold in European countries since at least the late 1980s / early 1990s could sync to 60Hz just fine, so no need to import TVs or hunt very special ones, just the console hardware if modding it wasn't possible or you didn't want to do it for some reason.
Even many of the earlier sets can be made to sync to 60Hz by adjusting vertical hold. Sometimes this control was even available without opening the TV set. Vertical size of the picture may become an issue then, though... (can often be adjusted easily as well but needs opening the set, and then you can't properly watch PAL TV anymore)
If using composite video or s-video (Y/C), then NTSC colour encoding could be a problem until some years later, but RGB inputs (via SCART / Péritel) were also very common on European TVs and that bypasses colour encoding / decoding completely (and also gives the best picture quality in general).
(well looks like I wasn't going to be a SINGLE post anon after all...)
excellent SNES PPUs overview, also reading part 2: https://fabiensanglard.net/snes_ppus_why/
FWIW, this seems to get reposted a lot. I think this is the fourth submission in the past 10 days. Three recent submissions:
https://news.ycombinator.com/item?id=41207608 (147 points, 8 comments)
https://news.ycombinator.com/item?id=41210537 (18 points, 2 comments)
https://news.ycombinator.com/item?id=41207756 (2 points, 0 comments)
> I think this is the fourth submission in the past 10 days.
I just checked those submissions, and it turned out they were posted in a single day (August 10th) with an eleven-hour time frame! The first submission was at 05:48 AM, the second at 06:37 AM (within less than an hour from the first), and the third at 16:24 PM, which raises one of the weirdest behaviors of the HN system (at least for me): "How or why on earth some submissions got accepted as 'duplicates' where others did not? ". I encounter this a lot when I try to submit a story and it gets rejected because it was already submitted. Sometimes, even if the original story is a month old or more!!
> which raises one of the weirdest behaviors of the HN system (at least for me)
I second that. Two months ago I tried to submit what I found to be a quite interesting video from 2018 and it was immediately marked as duplicate:
https://news.ycombinator.com/item?id=40798566
Checking past submissions, I saw that the last time it had been submitted was a year ago:
https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...
But then, as you can see from that page, someone resubmitted the video a month ago and for some reason that one got through.
I don't mind reposts now and then, since the odds of two people independently finding the same link interesting over time are pretty good, given the way things tend to circulate on social media and other aggregate platforms.
I also worry that HN is slowly turning into a karma farm like Reddit did. The point of reposting on HN just to build Internet Points escapes me,. At least on Reddit there was a market for accounts with high karma, so I guess I could see the motivation there. But here?
I'd argue that people try it every now and then, only to realize that points on HN are worthless. It took me a good amount of years to get some points. I couldn’t care less, because I never saw the benefit.
Who knows? Maybe there is a hidden club somewhere where your HN karma will open doors.
You can just flag it as a dupe or email hn@ycombinator.com if you think it's misranked.