This is an interesting, simple, and approachable explanation of how the Game Genie affects NES game code to change the behavior of the game with seemingly little context.
I never had a Game Genie / GameShark as a kid but this is still a great overview of how the NES worked. I’d be super interested to read a more in depth article about the NES/SNES hardware if anyone knows of one.
This is an interesting overview of NES emulation and how it relates to the hardware: http://arstechnica.com/gaming/2011/08/accuracy-takes-power-one-mans-3ghz-quest-to-build-a-perfect-snes-emulator/
You could start with emulators people are writing. Brit Butler has been working on a 6502 emulator in Common Lisp, and has plenty of notes.