What's new

The "I want to Code an Emulator" Suggestion thread

Agentdvd

New member
Isn't the Dreamcast one of the easiest emulators to emulate? Because it seems to be using the same power as an N64 Emulater although its alot stronger. Its probably just a good coder, but don't you think you should move it to moderate difficulty?
 

synch

New member
Isn't the Dreamcast one of the easiest emulators to emulate? Because it seems to be using the same power as an N64 Emulater although its alot stronger. Its probably just a good coder, but don't you think you should move it to moderate difficulty?

Are you a coder with experience of the Dreamcast architecture or you just speculating about how it might be without the slightest idea of what you're talking about?
 

miker00lz

New member
i would personally suggest that writing an emulator of something that runs on a 6502 or derivative CPU may be the best to start with. the CPU itself is incredibly simple, and doesn't really have too many odd quirks. it is also very, very well documented.

an Apple 2 emulator is a very ideal first system to work with. some of the more advanced aspects of it can get a little tricky, with all the various soft switches to interface various hardware with the CPU -- however, writing just enough of one to run the Apple 2 BIOS ROM and emulating the 40-column text mode as well as keyboard input is a piece of cake.

the NES, although based on near perfect clone of the 6502 (the only difference being the NES CPU does not support binary-coded decimal operations. the decimal status flag in the status register is ignored on it), is not excruciatingly painful to write an emu for as long as you aren't expecting 100% accuracy from the beginning. lots of great docs at http://nesdev.parodius.com and the nesdev wiki. there is also an amazingly friendly and helpful group of quite a few people on their forum and their IRC channel (#nesdev on efnet) who are more than happy to help even the noobiest of noobs.

extreme accuracy is not terribly important for a large number of games. megaman 2 for example, has very forgiving code and it was of the very first games i got going in my NES emu without having glitches. starship hector, super mario bros 1, and some others are very forgiving as well. the most difficult aspect is the emulation of it's graphics processor. it has many quirks that a few games rely on for proper operation, but again - most games don't.

i would not call NES emulation "simple" though, at least to somebody with no previous emu experience. again, try emulating an Apple 2 first to understand the 6502 and emulation in general then move on to something like NES.

and just fyi, if anybody was considering it, stay away from coding any x86 CPU emulators until you really understand the topic well. even the original 8086 is quite complex with it's addressing modes. i learned this first-hand, but after some months was able to come up with what is (as far as i can tell) a solid 8086/80186 emulator implementation. it took me about 4 or 5 months before by PC emu became reasonably useable as run DOS plus many apps properly. although, i knew almost nothing about x86 assembly when i started so if you have some knowledge in that and are familiar with it's instruction encodings, you should be able to do it quicker than that.
 
Last edited:

gokuss4

Meh...
Are there any general emulation programming tutorials on the web, such as explaining proper ways to implement certain parts of the hardware like CPU, memory, registers, opcodes, graphics, audio, and input? Preferrably with a couple c++ examples, but I can read and understand other code somewhat.
 

Top