Hacker News new | past | comments | ask | show | jobs | submit | Bulbasaur2015's comments login

This is so funny

this is really good. thank you


very cool


What was the most challenging part for you in building this emulator?


It took 14 days to get it functionally-complete, where I could beat Mario using savestates.

The PPU took 7 days, the CPU took 5 days, the APU took 1 day, and there's a spare day for everything else.

The CPU was easy to make: Its natural unit of output is a single CPU instruction. Even if there are many details, it's a straightforward process to compare an instruction-by-instruction log with a reference log until there are no differences.

The PPU was harder because the natural unit of output is an entire frame: It's not any easier to get the first pixel correct, than to get them all correct. So almost everything needs to be in place before you can validate its output.


That's impressive. A few follow up questions:

1. Was this your first NES emulator?

2. Your first project in Rust?


Yes to both of these. I usually use C for projects like these, and wanted to see how Rust compared.


Follow up to that: Did you write any other emulators in the past?


I want to build one myself as well, but I don't want to use existing code as a guide, rather challenge myself to implement from raw specs.

The problem is I haven't really found any yet that helped me (admittedly, I have so far devoted just one Saturday morning to it.) Are there any specs about the hardware that you used, or that anyone else can share?


> Are there any specs about the hardware that you used, or that anyone else can share?

Everything you need is either on http://wiki.nesdev.com or on their forums. I know because that's what I did with my NES emulator - I explicitly didn't want to look at any source code and instead wanted to implement everything only based on the docs.

Granted, what's on the NESdev isn't always easy to grok, up to the point of being really confusing sometimes. What I've found really helped is gradually setting up a test suite based on various test ROMs I could find, which even allows you to implement some parts of the emulator TDD-style once you get the basics up and running.


Shoutout to TASVideos here, who maintain a fairly up to date list of test ROMs for various hardware features. Once you have the emulator basics down (working well enough, say, to run Super Mario Bros, which is surprisingly demanding) you can throw blargg's tests at your emulator and start chasing the accuracy rabbit down the most marvelous of rabbit holes.

http://tasvideos.org/EmulatorResources/NESAccuracyTests.html


very good


did they say what the P stands for?


I think that the official name normally comes out very close to the GA release.


rule of thumb is stay away from mobile web unless necessary because of slow browser performance


I don't know about browsers being slow these days ? WebGL2 and the various JS engines V8, Chakra, JSCore


very cool. i prefer this than then the real one. YT has too much fluff and rabbit hole material


learn to recharge whenever you want and you can. take powernaps, or go for a walk or a shower


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

Search: