Slashdot videos: Now with more Slashdot!

View

Discuss

Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

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

Probably difficulty of finding one. In my area we have a lovely chain called "Slackers" that sells old consoles, and you might be able to get an SNES for about $40 if they have one in stock. However, stock is very limited and between more and more of the older consoles dying and collectors, the stock is becoming more and more limited. Could be in their area, that the difficulty of finding one makes the chances of finding one to disassemble highly unlikely, especially if they wanted one that was in workin

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.

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.

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.

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

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.

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

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.

I sort of agree with you (though I took apart a 2600 for a college project in the early 90s), though at least for the "for us to play" part, some of the backward compatibility helps there.

I don't have a Wii, but their online game store for older games is very intriguing to me (even though I never had a NES or SNES, though played some of the latter on friends' machines). Maybe after the Wii U comes out, even more people will dump Wiis so they'll be really cheap. (It's not like I don't have the money, but I

I would rather use the Wii store since it's a legit way of getting the games(*). $5-$9 (using low-high end for NES & SNES games, listed on the wikipedia page for Wii Points) seems reasonable to me, esp since I didn't have the games originally.

(*) If I could buy legit arcade ROMs to use in a MAME machine, I'd probably do that too.

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.

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.

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.

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

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/ [retrogames.com]... its author compares MESS against other emulators and documents whether or not MESS is the superior option.

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.

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 [nesdev.com], 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.)

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

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 C

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.

If your NES's power LED blinks when you put in a cartridge, it's a problem with the 10NES copy-protection chip - if the chip doesn't handshake, it continually resets the CPU. If it's not blinking, you've just got a bad connection and your problem is likely with the cartridge connector.

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 a

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.

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 [wikipedia.org] "S-DD1 chip to to aid in compression of almost all graphics and map dat

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 [guardian.co.uk] (abridged but good version of the Elite chapter in the link) which I can heartily recommend not just for the chapter on elite but th

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. No, actually, amazed isn't the right word. I don't notice how smooth and fast it is. It's just smooth, and fast. The gameplay is so slick and transparent, with no horrible juddery slowdowns.

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.

The only lag I ever experienced: Sonic 1, Labyrinth Zone, badnicks + water + winging spike balls + lost rings actually gummed up the works nicely.

That reminds me of something I noticed with the NES game Gradius II - that stage with the ice crystals that break when you shoot them... having the Vic Viper, 4 option shadowing, all of those shooting a ripple laser and twin missiles ON TOP OF enemy ships flying and shooting at you AND the ice crystal things moving around and splitting when you shoot them....

I agree that Elite is a technical tour de force, but perhaps a more impressive game is Exile, also on the BBC computer. It could run in 32K RAM and used a procedurally generated landscape, had a decent physics engine, a "realistic" form of AI for the creatures and was absolutely huge.

The most amazing thing (to me) is that problems in the game were solved not by following some pre-programmed rule (put "key A" into "door C"), but by manipulating the environment. So "key A" did fit "door C", but you could also

Be careful though from drawing conclusions about how the hardware works from emulators: some emulators try to mimic the hardware as closely as is practical, while others only implement the behavior necessary to make the popular games run.

The accurate emulators are more likely to implement the actual hardware behavior, as the behavior-based approach quickly falls apart with a big software library: if you add a hack to fix the behavior of one game, you often break another, while if you emulate the hardware re

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.

Must have been pre ASVAB. I still remember taking that test before enlisting and being able to answer the questions, but being mystified as to why I'm answering questions about labeling parts of a turbocharger and which way to turn the wrench to loosen the bolt and given 9 gears in a geartrain complete with a locked differential in the middle, if you rotate gear 2 clockwise which direction does gear 6 rotate? The electronics too... Reminded me of my ham radio general license written, although I was way be

The ASVAB is a placement test. Depending on your scores in various areas, it makes it easier for them to place you based on your answers for mechanical, electrical, language ability, math skills, etc...

This doesn't much help you now, but I've been told that the MIT Press Platform Studies [platformstudies.com] 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 [amazon.com] that was pretty interesting, so hopefully the SNES one will be good, too.

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

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 [youtube.com] 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.:(

What are you talking about?The GBA does support hblank DMA, which lets you write new values for each background layer's scrolling and control registers. I use it all the time.It's just not specifically called "HDMA" anymore, it's rolled up into regular DMA instead. Use incrementing source, and incrementing+reset destination, write the first value during vblank time, and you have HDMA.Because many registers are adjacent in IO memory, you can get multiple effects with a single DMA transfer.

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 o

Because of things like this. [slashdot.org] 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.

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 acti

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:

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 boa