Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Great job! #1

Closed
dbousamra opened this issue Apr 6, 2018 · 3 comments
Closed

Great job! #1

dbousamra opened this issue Apr 6, 2018 · 3 comments

Comments

@dbousamra
Copy link

dbousamra commented Apr 6, 2018

Hi

I'm not a Lobster's member :( Github needs to allow comments. I've written a NES emulator (http://github.com/dbousamra/hnes), so I know how tricky the NES is. I found your code really clean, and easy to understand. Nice work!

@rbaron
Copy link
Owner

rbaron commented Apr 6, 2018

Hey @dbousamra. Thanks for the message! Indeed it's been really an adventure writing this. The funny thing is I considered doing this in Haskell! I did the advent of code challenge in Haskell last year and had a lot of fun. In the end I wans't as brave as you, though. Really nice work there too!

@jairodasilva
Copy link

I agree: Great job, @rbaron.
Right now, I'm writing my GameBoy emulator in Go, and I found your code really helpful, simple and clean.

Just because of my OSD, I must comment: Constant names follow the same naming rule of a normal variable or type in Go: FRAME_RATE must be FrameRate. The gometalinter tool is very good to find these kind of mistakes. But, besides this, everything looks great!

@rbaron
Copy link
Owner

rbaron commented Apr 8, 2018

Amazing. Thanks for the tip @jairodasilva. I'll take a closer look at gometalinter!

About the code, when I began writing this, I didin't have a very good mental model of all the moving parts of the NES. What helped me a lot was reading the source code for several other open source emulators out there. In particular, I messed around a lot with AndreaOrru/LaiNES and fogleman/nes. The first one is amazing in that it is super concise and the info on nesdev wiki is often straightforwardly distilled in the code. The second one is an extremely well written and polished NES emulator in Go. I highly recommend taking a look at both!

@rbaron rbaron closed this as completed Apr 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants