Slashdot Mirror


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."

37 of 157 comments (clear)

  1. superfamicom.org by tepples · · Score: 5, Informative

    http://wiki.superfamicom.org/ has pretty comprehensive technical documentation of the Super NES.

  2. take one apart? by jehan60188 · · Score: 5, Informative

    you're a 4th year EE student, why not just take one apart?

    1. Re:take one apart? by JDG1980 · · Score: 5, Insightful

      you're a 4th year EE student, why not just take one apart?

      The SNES uses custom chips for most of its functionality. Unless he has access to decapping facilities, taking one apart will provide only limited information.

    2. Re:take one apart? by jehan60188 · · Score: 2

      you're a 4th year EE student, why not just take one apart?

      The SNES uses custom chips for most of its functionality. Unless he has access to decapping facilities, taking one apart will provide only limited information.

      I'm an ME, so I don't know much about reverse engineering electronics.
      maybe this will help?
      http://s3cu14r.wordpress.com/2010/07/15/boiling-chips-in-tree-sap/

    3. Re:take one apart? by mk1004 · · Score: 3, Interesting

      I'm an ME, so I don't know much about reverse engineering electronics. maybe this will help? http://s3cu14r.wordpress.com/2010/07/15/boiling-chips-in-tree-sap/

      I use to occasionally decap 'plastic' ICs, which are typically molded using an epoxy based compound. We always used fuming nitric to open those. We used a dropper to put the heated nitric on the top of the package, the goal being to have the pins intact and the device functional afterwards. Not real safe unless you have the proper equipment and know what you are doing. Later we had commercial equipment that did pretty much the same thing.

      I suspect the rosin used in the link only works on some types of non-epoxy based plastics.

      --
      I can mend the break of day, heal a broken heart, and provide temporary relief to nymphomaniacs.
    4. Re:take one apart? by AdamHaun · · Score: 5, Insightful

      you're a 4th year EE student, why not just take one apart?

      Unfortunately, EE is not like ME. What happens in an electrical circuit is almost always invisible to the naked eye. Monitoring high-speed digital signals takes special (expensive) test equipment, which even a university lab might not have lying around for open use. Even figuring out a schematic can be hard if you're dealing with multi-layer circuit boards and custom integrated circuits. The ICs in a SNES are all surface mount, which means even more specialized equipment and skill to remove them with no easy way to work with them afterward. Do a Google Image search for "SNES mainboard" and you'll see what I mean.

      Also, simply being a fourth-year student doesn't necessarily qualify him to reverse engineer a console. Digital electronic systems are orders of magnitude more complex than mechanical ones, and EE coursework tends to focus more on theory than practice. I'm not saying it's impossible, I'm just saying that going solo is probably not the best idea for his first foray.

      --
      Visit the
    5. Re:take one apart? by cpu6502 · · Score: 4, Insightful

      If you guys keep disassembling Super Nintendos (and PS1s and Atari 2600s and N64s) pretty soon there won't be any left for us to play. It will end-up like the Japanese Zero airplane (only two left). It saddens me to see people destroying an item that is no longer being made & therefore becoming more-and-more rare with each passing day.

      --
      My AC stalker: " I personally agree with your posts most of the time, but that won't keep me from modding you troll"
    6. Re:take one apart? by TheRaven64 · · Score: 2

      A final-year student here produced an implementation of the NES (sadly, except for the sound chip) in Bluespec last year. It runs on an Altera FPGA and is cycle-accurate including the CPU, input, and video. Even with all of the documentation available, this was not a trivial project, and for the SNES or N64 it's even harder. I'm hoping that someone will take the project to implement the sound support this year - it's almost as hard as the whole of the rest of the project, but could be fun...

      --
      I am TheRaven on Soylent News
    7. Re:take one apart? by Annymouse+Cowherd · · Score: 2

      Monitoring high-speed digital signals takes special (expensive) test equipment, which even a university lab might not have lying around for open use.

      The SNES does not have high-speed digital signals. The whole thing is clocked at 3.58MHz. This isn't like trying to probe a SATA connection.

    8. Re:take one apart? by Anonymous Coward · · Score: 3, Insightful

      3.58Mhz might seem slow compared to modern electronics, but I'm pretty sure that "3.58 million signals per second" is still considered high-speed. Sometimes these terms are relative to the kind of electronics you could feasibly put together on your own (say for a physics class lab) rather than whatever whiz-bang tech is on the market (read: engineered for years by professionals).

    9. Re:take one apart? by AdamHaun · · Score: 4, Informative

      The SNES does not have high-speed digital signals. The whole thing is clocked at 3.58MHz. This isn't like trying to probe a SATA connection.

      Sorry, poor choice of words. Regardless, he'll need a logic analyzer, and those are a lot less common than oscilloscopes. He could probably find a cheaper one on eBay if he really wants to reverse-engineer the hardware.

      --
      Visit the
  3. Check out Byuu's stuff from BSNES. by Anonymous Coward · · Score: 5, Informative

    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.

    1. Re:Check out Byuu's stuff from BSNES. by MtHuurne · · Score: 5, Informative
    2. Re:Check out Byuu's stuff from BSNES. by byuu · · Score: 5, Interesting

      The default key binding for fullscreen is F11. You're right that it's not a 'true' fullscreen, which I don't do because mode setting changes take forever and only reliably work on Windows. That and they break the UI (you can't display windows, menubars, etc anymore.) However, Vsync works just fine so long as you turn off the garbage Windows compositor (it does not move the Vsync time like OS X, so using it basically guarantees tearing as the compositor and D3D/OGL app fight for who blits first.)

    3. Re:Check out Byuu's stuff from BSNES. by byuu · · Score: 2

      MESS is great for the obscure systems, but not very good for the popular ones. I suppose that much is obvious. A great site I found for this was http://nonmess.retrogames.com/ ... its author compares MESS against other emulators and documents whether or not MESS is the superior option.

  4. SNES9x source code should help by Jon+Abbott · · Score: 3, Informative

    The source code to a very good SNES emulator is available here: http://snes9x.ipherswipsite.com/

  5. NesDev by L1mewater · · Score: 2

    http://nesdev.com/ Formerly nesdev.parodius.com This and Zophar are the who main places to go.

  6. bsnes, the only 100% accurate emulator by AlphaWolf_HK · · Score: 4, Informative

    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
  7. It's a great design by Quiet_Desperation · · Score: 4, Funny

    Especially interesting is the special circuitry that eliminated the need to blow air into the cartridges that plagued the original NES.

    1. Re:It's a great design by JDG1980 · · Score: 5, Interesting

      Especially interesting is the special circuitry that eliminated the need to blow air into the cartridges that plagued the original NES.

      The need to blow air into cartridges on the original NES was a result of DRM.

      No, seriously.

      The NES console contained a chip called the CIC, which had to perform a handshake with a corresponding CIC on the cartridge, or else the system wouldn't boot (and you'd get that blinking red power LED). The purpose of this was to ensure that no one could manufacture NES cartridges without the approval of Nintendo of America. Unfortunately, it also made the boot process far more finicky; even the slightest amount of dirt would cause the handshake to fail and the system to repeatedly reset. (The fact that Nintendo used a weird ZIF-style connector rather than a standard card edge connector didn't help, either. This was done because they didn't want the NES to look like a standard game console, which had a bad reputation after the 1983 crash.)

    2. Re:It's a great design by L1mewater · · Score: 2

      The need to blow air into cartridges on the original NES was a result of DRM.

      No, seriously.

      That's a bit of a stretch. The ZIF connector and dusty contacts are the primary culprits in the "need" to blow on NES carts. Sure, the CIC chip causes problems on occasion, but it's not nearly the culprit people make it out to be. You can't blame the CIC, for example, when you get vertical lines on the edges of all of the on-screen sprites, and most of the blinking-light errors just turn into solid light errors once you disable the lockout chip. I have two NES systems, one with a disabled lockout chip and one without. The primary difference I notice is that disabling the lockout chip meant I no longer have to pull tricks with the reset button to get my pirate famicom multicart to work.

    3. Re:It's a great design by Hatta · · Score: 4, Informative

      If anyone has an NES with the blinkies, you can disable the CIC by snipping one pin.

      --
      Give me Classic Slashdot or give me death!
  8. Re:Zophar.net by JDG1980 · · Score: 5, Informative

    Be careful. A lot of that stuff at Zophar's Domain is way out of date. Much of it is based on speculation or trial-and-error emulator testing or is flatly incorrect.

  9. Start out with the Gameboy. by daid303 · · Score: 4, Informative

    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)

    1. Re:Start out with the Gameboy. by The+MAZZTer · · Score: 2

      This might be useful.

  10. I would say SNES was the most technically pushed by nhat11 · · Score: 3, Insightful

    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.

  11. Dev manual by Anonymous Coward · · Score: 2, Informative

    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.

  12. Re:The Ultimate Resource for SNES Development by sootman · · Score: 5, Insightful

    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.
  13. First steps in reverse engineering by vlm · · Score: 4, Insightful

    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
  14. Re:I would say SNES was the most technically pushe by BenoitRen · · Score: 2

    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.

  15. How Color Dreams reversed the polarity by tepples · · Score: 2

    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.

    1. Re:How Color Dreams reversed the polarity by jalefkowit · · Score: 3, Funny

      Nintendo had improved the input protection on the Super NES version of the CIC, making it harder to defeat by reversing the polarity

      That'll show everyone who laughed at Nintendo when they hired Geordi LaForge to work on the SNES...

  16. Re:I would say SNES was the most technically pushe by nhat11 · · Score: 3, Insightful

    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

  17. vsync is NOT a "needed part of accurate emulation" by Anonymous Coward · · Score: 4, Informative

    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.

  18. Half and half frame != accurate by tepples · · Score: 2

    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.

  19. Re:CIC failure vs. PRG failure by _133MHz · · Score: 3, Interesting

    I was able to distinguish between the game not booting and the system reset being held low by the CIC back in the day, apparently no sync is generated during reset or something along those lines because even though you get a black screen you can see it "free-running" and getting torn up horizontally, and newer TVs just blank out the video entirely like an invalid signal. I was even able to hear the difference by 'feeling' if the horizontal oscillator on the TV was free-running or locked. With a successful CIC handshake but bad program execution you get a black screen with proper sync which overrides video blanking on newer TV sets.

  20. Re:Zophar.net by Anonymous Coward · · Score: 2, Informative

    Correct - at least one document on Zophar's is wildly inaccurate (I know because I wrote it!)