I always did like the few (too few, in retrospect) digital design courses I had to take in college. Simple as it was, I always got a kick out of making the little LEDs blink. Alas, I don't recall having to design anything much more complicated than LED blinkers using a hardware description language. The most significant thing we designed, a (very simple) RISC processor, was designed with schematic capture. Having been recently reminded that FPGAs still exist, having nothing better to do, and apparently being a glutton for frustration, I recently decided to renew my interest in logic design.
I forget where I got the idea, but at some point I decided I wanted to implement a NES on an FPGA, from scratch, in Verilog. I hated the VHDL I had to write in college and heard good things about Verilog. Writing a NES seemed like a simple enough project to be doable by one person (the NES is a well-understood piece of hardware at this point, and there's a lot of incredibly detailed information on how it works) but complicated enough to get a flavor for the language. My original idea was to write a NES in both languages for a proper comparison, but given how much time I've spent on the Verilog version so far, that may be an unrealistic goal. Maybe I'll write the SNES in VHDL :)So that's what I've spent almost all of my free time doing these past few months. So far I've written a working 6502 processor (minus binary coded decimal support, which the NES's CPU also lacks), an Audio Processing Unit minus the DMC channel (the channel which plays audio samples), most of a test suite generator for the CPU, and a module which lets me play NSF files so I can test the Audio Processing Unit. Below is a video of the model playing a song from Super Mario Bros. I realize the video is bad; that's what happens when you record the video with your laptop's built-in camera because you have no other device that can record digital video. Mostly it's there to show you the blinking LEDs in an attempt to convince you that the board's actually what's playing the audio. But really, if you're reading this you'd probably believe me without the audio/visual evidence.
Bits of the system that have yet to be done:
- Everything having to do with video
- The DMC channel for the Audio Processing Unit
- The controller interface
- If I want to be able to play downloaded games, I'll need to implement the various memory mappers and additional audio channels these games use (which are all independent of the NES itself). Otherwise I need to design some means to connect NES cartridges to my prototype board. Probably I'll end up doing the latter, then the former as needed.
- Probably other (minor) things I'm forgetting.
Perhaps later I'll discuss my opinion of Verilog, that being the original purpose of this project. Right now I'm too tired to give any sort of fair analysis.