I finally bit the bullet and “packaged” up my Java-based NES and Commodore 64 Emulator.
The delay has been for multiple reasons:
- Laziness – I knew that I couldn’t just tar it up and send it out, but needed to do some cleanup, take out some files, etc. I had some time on my hands, so figured why not.
- Fear – I don’t think it’s just me, but it’s kind of scary to let other people see the code you’ve written when you know that it’s not perfect and poetic and all that. However, it does in fact work so I figured that was a plus. I don’t believe the code is monumentally horendous either. There is a diagram of of the architecture available on my wiki.
- Potential Uselessness – There are a lot of other emulators out there at have been in development for a lot longer and are open source. I did this purely out of curiosity to see if I could, so don’t download this expecting to pop in any ROM and go with it. Some work, many don’t. There’s also no sound. Nestopia is the emulator I used when I wanted to see how a game was supposed to look/work. I don’t know if it’s open source or not however.
I’ve finally overcome those and just decided to get it out there.
I’ve decided on the BSD software license. What this means is that you can take this and basically do whatever you want with it, but if you release something based on it, you have to include my license with it. I initially planned on going with GPL, but it felt too restrictive in this case. In my dream world, people will download this, fix bugs and contribute them back. That would also be highly unexpected.
It is my hope that the architecture is simple enough that a person could at least use this to see how they might go about creating an emulator (especially 6502/6510-based ones such as the Apple II). It would suck if it serves as a way to _not_ make an emulator, but I can accept that too. It’s fairly object oriented in structure, but in my testing (I modified it so that the instructions were executed as methods rather than objects) this did not prove to be a major performance issue. That said, it just barely runs at full speed on my machine and it doesn’t have any timing code in it. So clearly there are some inefficiencies in it.
As I’ve mentioned previously, the greatest moment of development (which also represented the end for the most part) was when my wife actually sat and played Super Mario Brothers 3 for 4 hours straight on it. The idea that kept me going after I had it “working” was that for her, SMB3 was what it meant to have a Nintendo. Unfortunately, at that time I didn’t have the gamepad adapter so she had to use the keyboard. By the time I got game controller stuff working, she and I were basically over it. Such is life.
Anyhow, you can download it here.
Note that to use it easily, you should have Ant installed, but it’s not required. Please put any comments here if you do download it and have questions about usage, why it sucks, why it’s cool, or literally anything at all.
I just want to encourage you here. It just so happens that NES and C64 are two of the coolest game systems ever!
Comment by Greg — December 22, 2007 @ 7:08 pm
I was browsing for NES emulator source (Java preferably) and came across your site. I’ve downloaded your code and have it running.
Thank you for making it available.
Comment by Bill — February 26, 2009 @ 2:10 am
Greg – Thanks!
Bill – That’s great to hear! With hobby stuff it’s easy to make it difficult for others to run, so I’m glad you’ve had some success. You’ll quickly find that there pretty much every other emulator is more feature-rich, but not all are open source. It’s also not optimized for speed but (hopefully) for readability.
Comment by Josh DeWald — February 26, 2009 @ 2:14 am