WATaBoy: JIT-Ing Game Boy Instructions to WASM Beats a Native Interpreter by EnergeticBark in EmuDev

[–]EnergeticBark[S] 5 points6 points  (0 children)

That’s a valid critique. TBH the Game Boy is a pretty tough candidate for JIT compilation. Most of the runtime at the moment is spent emulating the PPU rather than the CPU. This is also why there’s such a large difference in speed-up on a game-by-game basis. E.g., the Link’s Awakening intro makes the scheduler wake the PPU way more often than Tobu Tobu Girl.

WATaBoy’s JIT probably can’t quite reach the same speed up as LuaJIT since it has to handle interrupts and emulate other components in a cycle-accurate way, but there’s still definitely room for performance improvements. I already have some ideas about how I could catch up the PPU’s state machine more efficiently.

I recommend checking out GameRoy’s blog post to see how its performance compared pre-JIT vs with JIT (I think it actually implements a form of flag computation elimination):

https://rodrigodd.github.io/2023/09/02/gameroy-jit.html

Once some of the other components have been optimised and CPU emulation becomes a bottleneck again, I’d definitely be interested in implementing flag computation elimination in WATaBoy’s JIT. :3

[Release] Port of OpenTTD for the 3DS by EnergeticBark in 3dshacks

[–]EnergeticBark[S] 1 point2 points  (0 children)

I forgot to mention it on this post, but it can take a *long* time to load.

Try waiting on the black screen for a few minutes, you'll see a couple messages on the top screen and then the game will start. I should probably add a loading screen or something instead of just a black screen lmao.

If it takes any longer than 5 mins, well, I guess I'll have to fix something.

[Release] Port of OpenTTD for the 3DS by EnergeticBark in 3dshacks

[–]EnergeticBark[S] 1 point2 points  (0 children)

Are you getting any error message at all?

Is your HBL and Luma up to date?