Hacker News new | ask | show | jobs
by pornel 1154 days ago
It could give you JIT for free, but I don't think it's a silver bullet.

It would be hard to implement. ROM is unstructured data, interpreted however the game wants. You'd need some heuristics or instrumentation to find which parts are code, and where the code jumps to.

You still need the hardware emulated, and emulation ideally should be cycle accurate, so the generated WASM would be tightly coupled to the emulator. Resulting binary likely would be larger, as I expect 8-bit Thumb code to be more compact than 32-bit WASM.