Yes, in most cases emulators run original, unmodified game code. The N64 is an exception to this, because it would be very difficult to write a program to emulate all of its hardware capabilities in realtime. So N64 emulators use what's called high-level emulation, where they analyze the game code and either recompile it to run natively, or do something that approximates the original. A good example of the inexact-ness of high-level emulation is in OoT, where certain procedural texturing effects had to be replaced by more generic effects, because they couldn't replicate the exact results of the N64's graphics chip. You can see this when Kakariko Village is being attacked by the evil spirit (replaced by a brown blob thing, the original was purple and constantly changing) and in TwinRova's spells. You can also see it in Mario 64 with the invisible cap (Mario becomes translucent instead of "pixely").