Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any emulator programming tutorial or guide? [duplicate]

Possible duplicate of How do Emulators Work and How are they Written?

I want to program an emulator ( may be NES or C64, I haven't decided yet ), I know there are lots of them so many may ask why would someone want to make one from scratch, but I want to include some specific characteristics in it, and also for the sake of building it myself.
I'd like to read a guide from someone who has built one and can transmit the experience, it doesn't have to be platform-specific ( better if it's not ) since I know how to program, what I don't is how to emulate.

like image 558
Petruza Avatar asked Jan 22 '10 15:01

Petruza


People also ask

What programming language are emulators written in?

You'll need a working knowledge of C, and a knowledge of assembly language might be helpful. If you don't know assembly, writing an emulator is a great way to become knowlegeable about it. You will also need to be comfortable with hexadecimal math (also known as base 16, or simply "hex").

What is emulator in programming?

An emulator is a hardware device or software program that enables one computer system (also known as a host) to imitate the functions of another computer system (known as the guest). It enables the host system to run software, tools, peripheral devices and other components which are designed for the guest system.


2 Answers

Well, you can google lots of articles, but there's one resource I found particularly useful :
http://www.nesdev.com
Here you'll find pretty much all you need to know to write a working NES emu, from complete hardware specifications, to the instruction set, and test roms. Have fun.

like image 178
fingerprint211b Avatar answered Sep 23 '22 07:09

fingerprint211b


Both the NES and C64 are based on the 8 bit 65xx processor. Writing an instruction set emulator for that chip is pretty trivial since the instruction set is small.

The larger issue is to emulate the other support hardware, video controller, etc. It's been a long time since I programmed a C64, and I never programmed an NES, so my memory is foggy. As I recall the C64 had a one or two chip solution for video and interfaces.

like image 24
Richard Pennington Avatar answered Sep 23 '22 07:09

Richard Pennington