Stuffing An NES Into An FPGA


When the developer of the µTorrent torrent client and the ScummVM  LucasArts adventure game interpreter gets bored, something cool is bound to happen. Luckily for us, [Ludde] was a bit listless over Christmas, and with more time than energy to burn, implemented a Nintendo Entertainment System on an FPGA dev board.

The NES was powered by a Ricoh 2A03 CPU, a chip nearly identical to the 6502 found in the Commodore 64s and Apple IIs of the early 1980s. There are a few differences between the two, though: the NES CPU includes an Audio Processing Unit on the chip and is connected to a very cool Picture Processing unit elsewhere on the NES. [Ludde] put all these chips in his Spartan-6 FPGA with a lot of Verilog code.

The rest of the system – the RAM, display output, and controller input comes from the peripherals attached to the FPGA dev board. [Ludde]’s specific board didn’t have a good digital to analog converter, so the composite output was traded for a VGA output. It’s not a completely accurate color pallet, but it’s still an amazing piece of work for someone who was simply bored.

18 thoughts on “Stuffing An NES Into An FPGA

  1. There’s another difference between the 2a03 and 6502 other than audio. The controller i/o is partially inside the 2a03. Also nintendo copied the entire 6502 die but they lasered off two transistors that would allow decimal mode to be activated for legal reasons. So you can’t use decimal mode (Even though its basically in there)

    1. “The Digilent USB Interface can also be used as a bidirectional communications channel between the FPGA and a program running on the PC. The only controllers I had were USB SNES controllers, so I hooked the controller up to the PC and have a small program that reads the joystick movements and sends these over the cable to the FPGA.”

    2. The SNES controller is basically an extended NES controller…and he probably only had a SNES one lying about. If you look into the details, you can see a very logical progression in the pinout and signalling from the NES controllers all the way to the Gamecube controller. It’s really quite easy to wire up a SNES controller to a NES and have it work…abet the buttons aren’t the logical layout (IIRC, I think the SNES B & Y map to the NES’s B & A, rather than the logical B & A on the SNES pad).

  2. Hey brian; 6510 != 6502

    While Commodore owned mos technology the company that designed and made the 6501, 6502 and 6510 processors as well as using the 6502 in its PET and Vic-20 computers they didn’t use it in the c64! The Commodore 64 used the improved 6510 which added a digital io port and a tri-state address bus. I realize you may be to young to remember and the c64 looks a lot like the vic-20 but would it hurt you to spend a few minutes fact checking your article? I know this is only a blog, but could we get some semblance of journalistic integrity? This site routinely posts descriptions containing glaring errors that could’ve been stopped by 5 minutes of googling or in some cases even just reading the original article you’re linking too. When you do this it shows you don’t care about the readers, your job or the people who do the original hacks you repost and gain advertising revenue from. I spent a lot more time on this comment then you did on your article and it shows.

      1. No actually ive been reading this site for a very long time and remember fondly how much better it was before it turned into a business, i know these guys will never put that kind of effort into it, but considering this site makes money off of reposting other peoples work and the descriptions are pretty much the only original content here, i really don’t think its too much to ask that the bloggers actually read what they’re reposting and double check what they wrote to make sure they aren’t talking out of their @ss.

        1. There are philosophical discussions to be had regarding the quality and depth of the education (primary, secondary, post-secondary) of the most recent generations… and what’s being observed here would certainly be a good jumping-off point for such discussions, though this is probably not the appropriate forum for a lengthy discussion of such.

          As a member of a more recent generation though, I have observed among myself and my peers a tendency toward rough accuracy without regard to deeper finesse. Whether this is a product of educational apathy (teachers or students) or technological reliance or some combination of both remains to be determined, however I’m happy to report that it’s certainly not willful (in most cases). Additional knowledge is always welcomed to fill in gaps and prevent future errors, however the sheer quantity of information seems to push us to focus on the short-term factual retention to the detriment of long-term pattern learning/avoidance. I think it has as much to do with educational style as it does with quality, but from a macro perspective I think it points to glaring issues with our educational system as a whole. The tradeoff is one of sheer information vs technical precision/specialization.

          One can only assume this isn’t the first time such differences in accuracy vs. scope have been oberved within the sciences. I certainly don’t think it will be the last. In the meantime though, HAD and other such forums exist both for instruction and correction, and if those of us in need of such are as eager to receive it as those of us who possess such are willing to provide it, then I think we’ll all continue to thrive.

  3. I’d just like to say that I too am “simply bored”, but you don’t see me writing an NES emulator on an FPGA. Granted, it’s not because I don’t want to, but because I can’t :P

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.