Re:Show HN: IronBoy, a highly accurate GameBoy emulator writ...
by zackangelo on Tuesday April 18, 2023 @01:31PM
(#35617077)
"runs WASM" made me wonder: is transpiling a ROM to WASM an effective strategy for emulating something like a GameBoy? You'd still have many issues to solve, not least of which mapping the hardware onto a runtime layer, but you'd benefit from all of the innovation happening in the WASM ecosystem.
[ Parent
| on HN ]
Re:Show HN: IronBoy, a highly accurate GameBoy emulator writ...
by circuit10 on Tuesday April 18, 2023 @03:18PM
(#35618681)
Sort of related: https://andrewkelley.me/post/jamulator.html
Re:Show HN: IronBoy, a highly accurate GameBoy emulator writ...
by pornel on Tuesday April 18, 2023 @10:23PM
(#35623522)
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.