3 ms·
Show HN: I made my first NES emulator, written in Go
- sbarre 14y agoVery awesome! It would be great if at some point you wrote up a quick overview of how someone who isn't super familiar with NES emulators could start going through your code to explore/learn! What parts of this project were made easier/harder by choosing to do it in Go?
- ferg 14y agoThanks! Emulators are pretty tricky to learn, especially if you've never written one before. Between http://emu-docs.org/?page=NES http://emu-docs.org/?page=NES and http://nesdev.com/ http://nesdev.com/ you'll find all the information needed. If you look in the video and controller code you'll see that Go makes handling the concurrency there very easy. It also made testing really simple to add in without a ton of effort. Couple that with the fact that it's super clean and runs really fast on every machine I've tried on, it's held up pretty well for this type of project.
- sbarre 14y agoThanks! I'm less interested in writing an actual emulator but more just interested in understanding your approach and the code in general at a high level.. But I will take a look! Thanks again for sharing your work
- ferg 14y agoYeah I hear you. It can be difficult to follow if you're unfamiliar with the landscape is all. Maybe start things off by watching how the CPU works. Both the CPU and PPU work via a Step() function that is the entry-point for their respective functionality.