Dissecting gngb emulator for learning purposes... essentially just adding comments