On topic, I had tremendous fun writing the CPU emulation for my maybe 1/3rd done NES emulator (that I likely won't finish, but who knows).
Off topic, I wouldn't do a 6502 as a giant switch, you'll likely miss out on a lot of the shared logic. If you decode the instructions differently, you can easily reuse logic for addressing modes and what not.
Off topic, I wouldn't do a 6502 as a giant switch, you'll likely miss out on a lot of the shared logic. If you decode the instructions differently, you can easily reuse logic for addressing modes and what not.
I really like how the opcodes are laid out in the table on this wiki http://wiki.nesdev.com/w/index.php/CPU_unofficial_opcodes