Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a Simple Old School Console Emulator [closed]

Tags:

emulation

I'm now with the dream to start a project of a emulator of old school consoles(Atari, Colecovision...), but before I start I need to know some things:

  • Which is the most easy console to create an emulator of it?
  • Where I can find some good resources to build it?
  • Which is the best language to build a emulator?

Thanks.

like image 415
Nathan Campos Avatar asked Oct 31 '09 18:10

Nathan Campos


2 Answers

First of all internet is full of resources covering this topic, I can point you at one of the most basic one I started from while developing my emulators: http://fms.komkon.org/EMUL8/HOWTO.html

If you want something more compreensive of many hardwares (and you will) check this out: http://www.zophar.net/

Writing an emulator is quite a complex story, you have to recreate perfectly the hardware on which programs are running otherwise it won't work! I would suggest to start from a simple hw like a GameBoy (that has a modified Z80 cpu, one of the simpler and most funny to implement. I suggest www.z80.info about this topic).. you shouldn't try with complex hardwares because you have to care about too many things.

Of course the best language is plain C or C++, just because it sticks more with hardware and it's very efficient.. mind that you need to write a virtual machine that behave exactly as the real one.

like image 160
Jack Avatar answered Oct 15 '22 18:10

Jack


Which is the most easy console to create an emulator of it?

I found that Chip-8 is a good starting point. It's relatively simple with on/off graphics, only one fixed sound and under 40 opcodes.

I found Cowgod's Chip-8 Technical Reference to be a great resource.

Where I can find some good resources to build it?

You need to pick your target system and then research for the technical information about it. This is much easier if you choose a popular system, such as the Gameboy (mentioned by Jack).

Which is the best language to build a emulator?

C/C++ is great because you are close to the hardware so can get the best performance. There have been emulators written in Assembly before, but I wouldn't recommend it (especially if you're just starting out).

In saying that though, there have been emulators written in JavaScript that have acceptable frame rates.

I'd choose a language you're most comfortable, and keep in mind anything closer to the metal will theoretically achieve better performance.

I wrote some blog posts that may help too:

  • Write a NES Emulator with JavaScript
  • JavaScript Chip-8 Emulator
like image 21
alex Avatar answered Oct 15 '22 17:10

alex