writing an emulator?

Started by
19 comments, last by doynax 18 years, 7 months ago
I'd like to try and write an emulator just for the learning experience. Something simple like an atari 2600 and maybe if I get it done try my hand at writing one for the snes. What are good sites to learn about the process of writing an emulator? It appears there's not much information on this (or at least I can't find anything on the subject).
Advertisement
This might help... Although, it is for writing a gameboy emulator, it's probably more or less the same basic process.
And... many emulators out there are open source and you can browse the code freely. I haven't looked but there must be some that have well documented code an enterprising young coder could learn from.
------------------<a href="http://jsgc.sourceforge.net>jsgc
ZSNES is open source, but as I recall it's mostly coded in ASM, with some C.
to do something like that you have to be i imaging amazing with how computers and programming languages work, i mean if youve just read beginners c++i n 20 mins then you may as well go an dig urself an early grave, hoever if you just read assembler for the pros and hacked nasa last night then it will be a doddle i can imagine

all u have to ask urself is can i program a console blackjack game with classes in c++, if the answer is no . . or even maybe, then no, i doubt u have enough knoe how to create an emulator
alright thanks,

@zero: Is only for the learning experience I don't care if I get it finished or not, just as long as I get it half working at least. I have some experience in programming c++ around 5+ years and have experience in some other languages as well, nothing special really :/

Again thank you, I appreciate the input.
You really should learn a RISC assembly language before trying something like this. An emulator is essentially a software emulation of a set of chip and it's low-level programs like BIOS. There's no way you'll be able to build one until you can at least use one.
I teleported home one night; With Ron and Sid and Meg; Ron stole Meggie's heart away; And I got Sydney's leg. <> I'm blogging, emo style
Scet has been working on something pretty interesting recently, check it out in his journal.
Rob Loach [Website] [Projects] [Contact]
its ok man, i was just saying i dont want you going down a road which is virtually impossible unless u are one of those crazy coder types, i dont think in 20 years id be good enough to do anything like that, im barely any good at dx after 6 months solid learning
Seeing as how I'm probably the only one here making an emulator, I'll give you some advice:

You don't need to know how to make games in assembler. However you should be able to read and understand it as you will have to deal with. You'll need to know the assembler for the system you choose and x86 since lots of examples use inline asm. Also being able to make your own programs for the system is a huge bonus. Oh and if you don't know what an opcode is, well you're screwed.

As for what system to emulate, trust me that the early consoles are not "easy". For example the NES(and SNES and Atari, etc..) cartridges can contain extra processors and have specal memory mappers added on to an already retarded 8/16bit memory system.

I'd suggest going with a hand-held system like the Gameboy or GBA. Their memory model is flat for the most part(no silly "banking") and there's no co-processors to deal with.

Be sure you can find plenty of resources on the system you choose. And download the source to some open-source emulators, it can help a lot when starting out. Just be sure to get one written by someone sane(not ZSNES [lol])

Edit: and if someone tells you to use Python/VB/Java because C/C++/ASM is too hard, tell them to go to hell. You need every cycle you can get.

This topic is closed to new replies.

Advertisement