Go Down

Topic: Super NESduino (Read 2400 times) previous topic - next topic

Nelsyv

I thought of a really fun idea for my first big Arduino project (although it is something that might have been done already). I know it will probably be difficult (if it's possible) but I figure if I learn all the hard stuff along the way, I'll be better prepared for a second big project.

The idea: A HANDHELD SNES EMULATOR

(Okay maybe a little too dramatic :P) Now before we get lost down on memory lane of the wonderful system, I just want a little guidance on my somewhat ambitious project. Sooooo...

Draft 1 (possibly slightly incredibly wrong)

  • A board with a fairly large memory limit (program probably will take a lot of space)

  • An SD card shield/reader (put rom(s) to be loaded on the SD card)

  • An LCD (maybe even touch  8)) shield at least 256x224 (for video output, but maybe also a GUI)

  • An audio shield w/speakers (for audio output, duh)

  • A lot of buttons (for controls)

  • A battery pack (so its portable)



As for how to emulate a ROM... I found an open-source SNES emulator called "ZSNES" that says it is written in C++, so I downloaded the source code for it. I'm a bit totally a noob when it comes to C++, so I'll probably need help converting this to Arduino Language/an Arduino library later down the road.

As far as I figure, I should probably start with the software, and then I'll know what kind of requirements I will need for hardware (and then purchase accordingly). So the first question is: "Where do I start?"
I'd think it would be to figure out how the source code for my SNES emulator works, but I may definitely be wrong.

Thanks for reading this fairly long post, and thank you so much for replying!  :smiley-mr-green:
Give a man a wiring diagram, he builds for a day. Teach him how to make his own, and he builds until he runs out of parts :P

arduinoPi

you might want to go with something like a raspberry pi. Not saying you can't do it with Arduino, but it would make things much simpler to use a raspberry pi.

James C4S


Not saying you can't do it with Arduino

Okay then I will say it:  You can not emulate a SNES (or NES) with just an Arduino.

The Arduino is a Microcontroller with a limited amount of RAM.  Both of those systems had microprocessors, video processors, and sound generators all of which were more powerful than the ATmega328.

Wrong project for an Arduino.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Nelsyv



Not saying you can't do it with Arduino

Okay then I will say it:  You can not emulate a SNES (or NES) with just an Arduino.

The Arduino is a Microcontroller with a limited amount of RAM.  Both of those systems had microprocessors, video processors, and sound generators all of which were more powerful than the ATmega328.

Wrong project for an Arduino.


Now, obviously you have waaaaaaaaay more experience than me (no sarcasm here, you have like 1000 times more posts than me), but as it seems to me what you are saying is that the limitations of an Arduino (in this instance) are:


  • Sound production

  • Video production

  • microprocessor (which, correct me if I am wrong, is very similar to a microcontroller but it has more pins and such?)

  • "power" of ATmega328



In my twisted/erroneous brain (and I will always admit that it makes mistakes), it seems that sound production is easily achieved (mp3 shields and such), video production is also easily achieved (LCDs, even RCA has been done), and the only thing that I can't think of a solution to is the last two points, based entirely on the fact that I am unsure of what you mean here.
If what you mean is not enough pins, I'd feel fairly confident saying that there are boards/controllers out there that have more pins than an ATmega328 (which I believe, without checking, is on the Arduino Mega, therefore giving the most pins of all "official" Arduino boards).
If you mean memory limit, I'd also feel fairly confident saying that there are boards/controllers out there with more memory capacity than an ATmega328.
If you mean something different entirely, then I'm just further proving myself a noob :P.


you might want to go with something like a raspberry pi. Not saying you can't do it with Arduino, but it would make things much simpler to use a raspberry pi.


I don't know a whole lot about Raspberry Pi's, but I do believe it is a bit bigger as far as form factor from a microcontroller, and doesn't it also use an entirely different programming language too?
Give a man a wiring diagram, he builds for a day. Teach him how to make his own, and he builds until he runs out of parts :P

James C4S

Pins has nothing to do with it.

The SNES was based on a 16-bit microprocessor running a 21MHz clock with 128k of RAM.  That's just the CPU.   You'd still have to account for a GPU, Sound processor, and controller interface.

The Arduino is based on an ATmega328 which is a 8-bit microcontroller running 16MHz with 2k of RAM.

See the problem?
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Nelsyv

Can't you just burn the Arduino bootloader to any microcontroller though? I'm pretty sure there are microcontrollers out there with that kind of RAM and clock speed. I don't think the hardware limitations are very limiting if you just use a non-Arduino controller, unless I misunderstand the versatility available.
Give a man a wiring diagram, he builds for a day. Teach him how to make his own, and he builds until he runs out of parts :P

James C4S


Can't you just burn the Arduino bootloader to any microcontroller though?

Sure as long as it is one of the 3 types of microcontrollers Arduino bootloaders exist for.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

djjoshuad

I agree with James, wrong project for an AVR Arduino, but it *could* be possible with a Due.  That assumes you're willing to write a crapload of code.  A Raspberry Pi would be a much better choice and it's very similar in size to an Arduino Uno.  In fact, there are existing SNES emulators that could be pretty easily compiled to work without you having to write any code at all.

James C4S

#8
Jan 31, 2013, 03:24 am Last Edit: Jan 31, 2013, 03:36 am by James C4S Reason: 1

I agree with James, wrong project for an AVR Arduino, but it *could* be possible with a Due.

Emulating a system with 128k of RAM in a microcontroller with 40k 96k of RAM would be interesting.

Of course the Due's SAM3 does support an external memory chip, but you'd have to design a custom board to support it.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

djjoshuad

The "official" Due ships with 96k and I assumed he would need to add at least another 32k, but some of the clones are being given more.  RasPi is still a significantly better choice but he wanted to use an Arduino ;)

James C4S

My bad, that changed from the announcement and I never caught it...
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Well you might be able to with more than one Arduino...'maybe' everything except sound...only because I don't know crap about sound on the arduino, and I have been trying to figure out how to put a PC sound headphone jack on my project for MONTHS!!! But with one arduino doing all the Video, and another to offload some other things, like joystick, and well LOTS of other things...just a thought

Go Up