Ask Slashdot: Understanding the SNES?
An anonymous reader writes "As a product of the 90s I grew up loving the classics that kids today know about from Wikipedia and pop-culture references. Games like Super Bomberman, Zelda: A Link to the Past, Donkey Kong Country I and III (II was a sellout, come on) are the foundations of my childhood memories. Now, though, as a fourth-year electrical engineering major, I find myself increasingly impressed by the level of technical difficulty embedded in that 16-bit console. I am trying, now, to find a resource that will take me through the technical design of the SNES (memory layout, processor information, cartridge pin layouts/documentation) to get a better understanding of what I naively enjoyed 15 some years ago. I am reaching out to the vast resources available from the minds of the Slashdot community. Any guide/blog series that you know of that walks through some of the technical aspects of the, preferably, SNES (alternatively, NES/Nintendo 64) console would be much appreciated."
http://wiki.superfamicom.org/ has pretty comprehensive technical documentation of the Super NES.
you're a 4th year EE student, why not just take one apart?
http://byuu.org/articles/
Byuu is the guy who wrote bsnes, which is a 100% accurate SNES emulator written specifically to emulate it as close to the hardware layer as possible for the sake of preserving the system.
Zophar.net has an AMAZING series of documents on the workings of the SNES on the hardware level. Look specifically for the doucmentation written up by Yoshi! and anything from the various Emulator Teams. (The Dumper, zsKnight, _Demo_, Byuu, Marcus C., etc)
Zophars Domain has been my emulation resources, and the starting point for all of my console research since at least 1999.
Plenty of free resources, and emulators aren't that complicated. I wrote an NES emulator just for fun, and to learn the same way you did.
The source code to a very good SNES emulator is available here: http://snes9x.ipherswipsite.com/
Slashdot's first reaction to VMware
Just trust me on this. Once you're done programming a NES game in 6502 assembly you should know all you need to know.
http://nesdev.com/ Formerly nesdev.parodius.com This and Zophar are the who main places to go.
Even aims for cycle accuracy.
http://byuu.org/bsnes/
Careful with names containing L slashdot.org/~AiphaWolf_HK slashdot.org/~AlphaWoif_HK slashdot.org/~AiphaWoif_HK
Especially interesting is the special circuitry that eliminated the need to blow air into the cartridges that plagued the original NES.
>> SNES
Gesundheit
Try it. Warez sites tend to crush useful stuff from the results.
Nothing useful to add here, except that Donkey Kong Country II was the best in the series.
I went to eat some animal crackers and the box said, "Do not eat if seal is broken." I opened the box and sure enough..
It's not an article. It's ASK SLASHDOT, which you jokers never seem to get through your skulls - it's NOT NEWS.
at the age of 5...
Of all systems I looked into, I found the gameboy the easiest to understand. The underlying CPU is quite simple. The LCD display is quite simple to understand, there are not a huge amount of complex registers to understand, and it's not that timing critical. (Unlike the NES, which depends a lot on instruction timing)
console that I had ever experience in my lifetime. It tried to do the impossible possible at the time. Created pseduo 3-D with mode 7. Created real 3-D polygon games using the FX chip (where the FX2 chip 21 MHz, was 7x faster than the actual cpu!). Created some of the most beloved and classic RPGs and series of the time. Star Ocean, Bahamut Lagoon, Tales of Phantasia (all not released in the US unfortunately) and more. Last gen SNES looked more amazing than most first gen PS1 game, sometimes by a wide margin. 1 or 2 Last gen SNES cartridges were as big as N64 cartridges memory wise. Also can't forget DK that uses "ACM" techniques to create those models in the game.
So I take it that you have easily come across the information he was seeking and you just want to be a jerk about it, or did you not even check before spouting out bullshit?
I have programmed an assembler and written my own games for the SNES. I use this manual quite often:
http://www.romhacking.net/documents/226
It's a leaked dev manual. It doesn't have everything, but it's a great resource.
If you're interested in the process for the craic of the engineering rather than just being a NES fanboy, you could learn a lot from learning the history of the game "Elite" which pushed hardware and software boundaries phenomenally. In fact I'd be curious if anyone could come up with a more impressive game on that front. The best account I've read is in the book Backroom Boys (abridged but good version of the Elite chapter in the link) which I can heartily recommend not just for the chapter on elite but the rest is fascinating too.
Because of things like this. Sometimes it's good to have a current, real-time discussion with a range of knowledgable people, rather than searching the entire fucking WWW and figuring out for yourself who got what right and wrong.
Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
The information you seek is also quite useful for SNES emulators.
Try going to the snes9x, zsnes, bsnes, and other such sites and lurking.
is where all us console hackers hang out. If you aren't a total douchebag this is the best place to ask questions.
Not exactly what you asked for but snes-sdk is a tinycc-based C compiler and SDK for the SNES. Pretty cool if you want to write your own games and don't want t write everything in assembly.
http://code.google.com/p/snes-sdk/
Packt Publishing has a great book called "Understanding the SNES". It got a great review here on Slashdot a few months ago.
Your first step in reverse engineering aka total mastery of a device should be something a little simpler, like a 2600 or a PDP-8 or if you "demand" something modern, perhaps a very small (pun intended) microcontroller like the pic 10F family. You don't mention any previous experience with reverse engineering so I assume you have none.
Because they scale non-linearily, reverse engineering something simple and something hard doesn't take 200% as long as just reverse engineering something hard, it takes more like 100.1% longer, so the tiny extra investment isn't going to slow down the overall project too much. However the experience you gain figuring out the simpler thing Might dramatically reduce the time taken to figure out the hard thing.
The standard /. car analogy is you probably should start with learning how to change the oil before you try to rebuild the engine.
Its not a hazing thing or making fun of noobs, its just good practical educational advice. Trying something way beyond your level at best results in frustration, at worst in a sorcerers apprentice disaster.
"Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
On the NES, only blinking was a result of CIC handshake failure. PRG or CHR connection failure could also cause a game not to boot despite a successful CIC handshake, though CHR connection failure was more likely just to cause vertical lines or a scrambled mess of 8x8 pixel tiles. The Super NES, on the other hand, didn't have the blinking, nor did it have the separate CHR address. Instead, it just held the video chip in reset, and end users couldn't distinguish PRG connection failures (bad instruction) from CIC handshake failures because both resulted in a solid black screen.
I just wasted 2 hours in peaceful memory bliss playing through Secret of Mana again.. on this PC using the snes9xw emulator.
This doesn't much help you now, but I've been told that the MIT Press Platform Studies series, which looks at both technical and cultural/artistic aspects of gaming platforms, and how those aspects impact each other, has an SNES book in the pipeline. May want to look for it later. They just came out with one on the Amiga that was pretty interesting, so hopefully the SNES one will be good, too.
10 PRINT CHR$(205.5+RND(1)); : GOTO 10
In North America? You should be spending more time figuring out how you will find work. Yes you're having fun now in school but it's harsh out there.
I have 3 I picked up on ebay for cheap. I just kept low bidding until I won as many as I needed. If you're in a hurry you can just bid $60 and get it with controllers and power supply. Most GC/N64 video cables work in the SNES, so don't worry too much about finding that if it doesn't come with one. In a pinch there are a lot of after-market replacement parts on Amazon and ebay for fixing them up.
“Common sense is not so common.” — Voltaire
You can't really say that the SNES was pushed that hard when it used chips contained in the cartridges for the really impressive stuff.
Not much for internals but if you're interested in the I/O ports (Controller, AV, Cart Port, etc) and protocols GameSX is a great site.
This might make a good addition to whatever you can glean from an emulation discussion since emulators don't typically deal with the external connections.
Collector's Edition
Bible Adventures and other Color Dreams games on the NES used a charge pump circuit to send negative voltage pulses through the CIC's data pins until the CIC froze. Nintendo had improved the input protection on the Super NES version of the CIC, making it harder to defeat by reversing the polarity. So Super Noah's Ark 3D had a connector on the top like a Game Genie so it could pass the CIC signals through to an authentic game.
Gesundheit. What else is there to know?
It must have been something you assimilated. . . .
Your snark would be more compelling if THIS VERY DISCUSSION weren't a top five result for the search in question.
I thought that's what the SNES even more impressive that it could use co-processors while keeping the price the same as other games and no add-ons to the actual system. It gave the system a bit more freedom in pushing software and hardware specs around to achieve what the developers had in mind at the time. For example the developers of Star Ocean used the S-DD1 from wiki: http://en.wikipedia.org/wiki/Star_Ocean_(video_game)#Development "S-DD1 chip to to aid in compression of almost all graphics and map data" Even though it was using the 2nd largest cartridge of the time 48 megabits. (There's Metal Slader Glory which I believe is even larger) In fact SNES games were still being develop long after the SNES life has ended in the US and the PS1 and N64 came out until late 2000. http://en.wikipedia.org/wiki/Metal_Slader_Glory Here's a pretty solid list of impressive games that were developed SNES during it's life cycle. http://www.racketboy.com/retro/super-nintendo-snes-games-that-pushed-the-limits-graphics-soun
*I wish slash had a edit button that lasted for 2 mins after the post like in stackoverflow*
I thought that's what made the SNES*
any the most "just fucking google it" responses I've seen in equally long... WTF?
APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
Up next, Archie tells Meathead to get off his chair and get a real job.
Also I forgot this one little detail (hopefully last) is that without the SNES, the PS would have *probably* never have existed. Sony and Nintendo developed an add-on to the SNES called SNES-CD http://en.wikipedia.org/wiki/SNES-CD.
In fact Sony was going to release a system called the "Play Station" (not the playstation) to be compatible with the SNES-CD. As everyone know, because of the disagreement between Sony and Nintendo, we now have our current consoles we have today.
(Fun fact, Sony created the audio system for the SNES and created some SNES games back in the day!)
vsync might be nice for the user experience, and I'll be the first to admit that bsnes does not have all of the little user conveniences that some older (faster, less accurate) emulators have.
I personally prefer to still use a many-years-old version of ZSNES for actually playing emulated games.
But in terms of accuracy in its emulation of the SNES hardware, BSNES is unbeatable. Byuu-san was always disgruntled about the lazy approach that other emulator authors were taking, towards accuracy--using known-inaccurate techniques and lots of game-specific hacks to cover up any problems--but several years ago he decided to do something about it, and since then he has emerged as one of the most dedicated and careful (and innovative) of the small group of world-class developers reverse-engineering the behaviour of the SNES. Byuu has made literally dozens of unique findings about tiny, obscure behaviours of the SNES hardware--in many cases even things that *no known game even depends on*, but he spent the time and effort to devise theories and write tests and do experiments in order to get a deeper understanding of what was going on. And then incorporating those findings into BSNES in the clearest and most accurate way possible.
The result of this years of super-human effort, is an emulator (BSNES) that is a lot slower than certain other emulators, but also much more accurate in the precise details. It can run every known SNES game (thousands of them) very accurately, with absolutely NO game-specific hacks in it. Which is an amazing accomplishment, and a valuable resource for others to learn about SNES programming (either emulators or games), and I am positive that someday, BSNES will be a key piece of efforts to preserve the history of SNES games so that future generations can learn about them and play them.
vsync might be nice for the user experience
Even if your emulator generates an accurate sequence of bitmap images representing consecutive frames of PPU output, it is not very accurate to send half of one frame and half of another frame to the monitor.
I never was a massive Sonic fan, but playing it again now - on a real Megatrive, at that - I'm amazed at how smooth and fast it is.
You might be tempted to attribute this to some mystical "Blast Processing" capability of the Mega Drive/Genesis chipset. But Blast Processing is just Sega's term for DMA-assisted copies to VRAM during vertical blanking time. The NES doesn't have it. Sega's marketing department made a big deal about the Genesis having it, but the Super NES has it as well.
I'm sure there's a torrent available at Demon... Oh wait.
"Wait. Something's happening. It's opening up! My God, it's full of apricots!"
I mean, seriously... Companies in general, and corporate giants in particular, aren't too willing to share information, much less potentially confidential documentation. But I've never heard of any company refusing a wide range of information when called by a student introducing himself as such -- especially on obsolete products. Heck, if activists can make it into poultry farms when presenting themselves as agriculture students, surely you can wiggle yourself into finding a few proud engineers at Nintendo who can recount whatever you want to know first hand. Eg "Hi, I'm compiling data on XYZ as part of my school curriculum and I was wondering if you could forward me to someone in the tech department who could give me the information I could be looking for." Seriously... Try it. People get so much email nowadays that they're more than happy to answer a phone call for a change.
The SNES had eight HDMA channels, each of which could feed data from a table into a specific display hardware register on every scan line. The first thing I programmed on the SNES was a company logo sequence that used seven HDMA channels (which you can see in the first 12 seconds of this video if you care.
When I later moved on to the GBA, I was aghast to see that the HDMA channels were gone from the hardware. To me, that was a big step down. :(
By the way, though the SNES is a 16-bit machine, it actually does 24-bit address resolution. You can test this for yourself by setting the bank register to $7F and doing an indexed load from say, $FF80,X where X > $80. It will read from bank $80 and not wrap around within bank $7F
His senior design project revolved around hacking NES
http://www.infiniteneslives.com/support.php
Lots of interesting stuff to read!
ThinkGeek has the answer for those who want a new system. http://www.thinkgeek.com/product/b76e
http://nesdev.com/ this is the source for all knowledge of NES/SNES.
One of the better documents I've found is this:
http://www.romhacking.net/documents/226/
This is apparently an official development manual for the SNES. It has technical information on the SNES itself, as well as various add-on chips (like the Super FX, etc.). 800+ pages of this stuff.
Have you looked at the "design your own video game console" XGameStation http://www.xgamestation.com by the popular game software author Andre Lamothe?
Vsync is definitely a requirement for more than just accuracy. There are lots of games out there that used audio cues, and a the older systems had a much tighter audio/video latency. These days it's normal to see up to 200ms of latency between audio and video, which is well within human perception. Those older consoles sat around 20ms of latency between audio/video, which is just at the edge of human perception.
Without Vsync you wind up having the video cycle much faster than the audio. Every round the video runs faster you gain a bit of delay on the audio appending the latency in the pattern of "Latency + Cumulative Delay". That cumulative delay does not go away until certain conditions are met that usually happen during blank screens where games load the next map/level or an opaque menu. For games where the sounds are merely cosmetic that's no problem, but games that use audio cues it becomes noticeable during an ordinary play session, for example the tone in the factory of Chrono Trigger (gets so far off that you have mere milliseconds to respond, instead of the intended second or two).
There is also a matter of visual artifacts that arise in modern monitors that don't have really good response times. I've seen a lot of monitors have a sort of silhouette around the trailing edge of moving stuff in NES and SNES emulators that didn't implement Vsync (optional or not).
AC:
Actually yeah, I did easily come across the information he was looking for, by searching for "SNES hardware specifications" and clicking on the top search result, and reading. It took me to this forum where people are actively discussing SNES hardware specifications and posting links to the information he requested. Here is an excerpt from the first post on the page google linked me to:
Here's is a new decoument with SNES hardware specs,
http://nocash.emubase.de/fullsnes.htm
http://nocash.emubase.de/fullsnes.txt
it should be the most complete SNES specs ever released (unless I've missed something important), covering both the console (based on Anomie's docs), and all existing add-ons, controllers, coprocessors (based on my own research & info found on various webpages; including the nesdev forum)... I hope the doc will be of some use.
Sootman:
I agree with you that its good to have a current, real-time discussion with a range of knowledgeable people. Where we differ is he could easily have searched for "SNES hardware forum" or "SNES hardware disccusion" or even "SNES hardware specifications" and found a better place to ask this question, or even found that it was asked already and answered.
I searched for "SNES hardware specifications" and the number 1 search result took me to a SNES hardware discussion forum that appears to be pretty active. The article at the top of the page says this:
Here's is a new decoument with SNES hardware specs,
http://nocash.emubase.de/fullsnes.htm
http://nocash.emubase.de/fullsnes.txt
it should be the most complete SNES specs ever released (unless I've missed something important), covering both the console (based on Anomie's docs), and all existing add-ons, controllers, coprocessors (based on my own research & info found on various webpages; including the nesdev forum)... I hope the doc will be of some use.
And there are lots of entries after that I glanced over that look like more posting of more information. Anyway, going straight to an interest group in the topic you claim to be interested in seems to me like a better way to get an answer. Just posting to Slashdot and basically saying "hey I have this hobby I want to start, can you do my research for me" reeks of helplessness or laziness to me.
AC:
Ok, you are right about it being Ask Slashdot and not a proper article. I just don't see why you would use Ask Slashdot to replicate the same answers that could be found in a discussion board for SNES hardware, a discussion board that could easily be found by searching for it on a search engine.
I can understand it if there weren't any resources for the question readily available, but there are a lot of people out there that are interested in SNES hardware and SNES hardware emulation. These discussion boards and forums and resources readily exist and have for some time. As others have mentioned there is even an emulator out there that aims at 100% hardware emulation down to recreating strange glitches and artifacts.
psx or gtfo.
I've spent the past 45 minutes reading technical hardware details about the SNES of my past that I likely wouldn't have thought to look into if this post didn't exist, and enjoyed every minute of it. Personally, I'm happy that the OP brought up this question since I learned something.
You could also argue that resampling the audio to get smooth audio+video at the same time is not accurate, and you'd be right. Except for the fact that perfect video+audio sync without doing that is impossible on modern hardware.
That and the fact that resampling audio to a different sample rate is much better understood (and in fact provably reversible according to Nyquist) than resampling video to a different frame rate. I may be a pedant, but I'm also a pragmatist who recognizes that the lesser of two evils is the often the best available. So if your video card runs at 58.7 to 61.5 Hz, then resampling the audio is probably the least inaccurate way to keep them in sync.
I don't see how anyone capable of understanding the technical aspects of a video game console would need to ask such a question on Slashdot.
When I wanted to know how these consoles worked, I Googled it, and I learned everything I needed to know. All of the earlier Nintendo consoles have been heavily documented by fans. I never had to ask anyone anything, and was eventually able to make my own ROMs for NES, SNES, GB, and GBA. I later took this knowledge further and made my own NES Flash cartridge, albeit only supporting NROM and UNROM games, and planned out some elaborate NES hardware mods on paper but never finished the physical construction (too many wires!).
In other words, if someone like myself with limited skills, equipment, and no formal education in any of these subjects can accomplish this much with just Google, I can't imagine why someone with four years of technical education is asking Slashdot for help.
Reversing the polarity is alright but don't cross the streams!