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

The code for the CPU dispatcher begins at 1:26 in the linked video, for those not willing to watch the whole thing.

A comment elsewhere in the thread mentions Sprocketnes, written in Rust, which takes a different tack here: it uses a hygienic macro to implement opcode dispatching, which allows the giant block of dispatching logic to be reused for both the emulator and the disassembler: https://github.com/pcwalton/sprocketnes/blob/master/cpu.rs#L...



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

Search: