What would be even more interesting is a JIT-based emulator that worked by compiling bytecode <i>into Javascript</i>, then relying on the browser to compile it back into machine code.<p>A machine-independent, JIT-compiled JS emulator might actually end up being faster than some purely-interpreted native-code emulators. And unlike a purely native JIT emulator, it wouldn't need a compilation component (the browser would do that itself).<p>Obviously such a thing would be dramatically slower than a native JIT emulator -- but surprisingly few emulators are JIT-based.<p>(Possible catch: I know for a fact that some Nintendo DS games use small amounts of self-modifying code. This probably is true of previous generations, too.)