Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If I were to write an emulator, what old system should I pick? I've never written one before and I don't know a lot about low level CPU stuff. Probably a video-game system would the most rewarding rather than some generic system/cpu like a PDP or the 8086... you could actually play a game with it in the end.


Most people will recommend the CHIP-8 system, because it is simple to handle - very simple graphics, very simple CPU, and a decent range of games to play with.

If you're thinking "old school" then your choices are NES, Gameboy, and 8080. Personally I wrote an 8086 emulator, to play space-invaders.

8080 is a reasonably simple system, without horribly complicated graphics or MMU addons. Interrupts were hard to debug, but otherwise it's a very well documented system with lots of directions you can go in afterwards - emulate DOS, and Hercules? Emulate CP/M? Emulate other games? Or start looking into running Windows even!


Chip-8 is a great start, it was a virtual machine used for Atari 2600 style games: https://tobiasvl.github.io/blog/write-a-chip-8-emulator/ Basic but still a good first step.


Chip-8 is a great place to start. It is easier to program than the Atari 2600, and is also monochrome. And the guide mentioned is an excellent resource.


Thanks!


A GameBoy is the obvious answer here, but the IBM PC (the 5150, the original one) is another good choice if you want to have a lot of software to try it with.


Is a gameboy pretty basic? This tooling seems pretty cool.


I've been slowly working on my GB emulator for a couple of months now. There's a lot of resources around, which is good. Unfortunately there are also parts that are ambiguous and somewhat poorly documented, which has caused a lot of misery. I had to resort to looking up other people's implementations, and it's not a very satisfying way to develop.

My one advice would be not to skip any parts in the implementation ("I just skip the cpu timing so I can have something on the screen quickly"), as many things are interconnected and changing things becomes very difficult later on.

All in all it's a really fun project and at least I learned a ton. My original motivation was to learn Rust, but it turns out that was the easiest part.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: