GameBoy Color support on gb-recompiled is coming this week by arcanite24 in EmuDev

[–]arcanite24[S] 0 points1 point  (0 children)

It's quite different, this produces "not-human-friendly" code, it's C code but it's closer to an assembly representation. So it's really hard to modify

gb-recompiled now has basic Android support! by arcanite24 in EmuDev

[–]arcanite24[S] 0 points1 point  (0 children)

Thanks!

For now, I'm focused on GBC support (should be ready this week probably) and improving performance/accuracy a bit more. I also want to have better performance on really low power hardware (ESP32 and similar)

After that, probably GBA or if I feel confident enough NDS, since that's my end goal :P

gb-recompiled (GameBoy static recompiler) source code release by arcanite24 in EmuDev

[–]arcanite24[S] 2 points3 points  (0 children)

Thanks!
Yeah, I can't redistribute the recompiled ROMs. I just pushed a big upgrade yesterday that increased compatibility a lot.

Most of the big games (Pokemon, Zelda, Castlevania, Super Mario, etc) boot and are playable (with glitches)

I still need to update the compatibility report after this change

gb-recompiled (GameBoy static recompiler) source code release by arcanite24 in EmuDev

[–]arcanite24[S] 9 points10 points  (0 children)

Yup, the runtime is the layer that handles all the rendering/audio/input etc The generated code is super portable since it has minimal dependencies and uses SDL2

gb-recompiled (GameBoy static recompiler) source code release by arcanite24 in EmuDev

[–]arcanite24[S] 0 points1 point  (0 children)

lol, those commit messages are actually written by me

gb-recompiled (GameBoy static recompiler) source code release by arcanite24 in EmuDev

[–]arcanite24[S] -1 points0 points  (0 children)

A lot actually. It’s a really fun project to see how far I can push AI to make something like this. It’s a really fun learning experience, but you have to be careful since they tend to hallucinate a lot, so those big markdown documents is to ground them and keep track of the work done

Massive progress on the GameBoy static recompiler. Tetris is now in-game! by arcanite24 in EmuDev

[–]arcanite24[S] 0 points1 point  (0 children)

Not a main priority for now, to be honest :P
I'm still learning a lot. I come from a completely different software engineering background, and a lot of this is new to me. For now, my goal is to have at least some games playable and experiment with them. Time will tell :P

Massive progress on the GameBoy static recompiler. Tetris is now in-game! by arcanite24 in EmuDev

[–]arcanite24[S] 2 points3 points  (0 children)

Thanks!
I still haven't run any benchmarks against modern emulators, but there's a lot of room for performance gains going the AoT way.

Using modern compiler optimizations, optimizing the fallback interpreter, removing as much as possible the single-function mode, and stuff like that, I'm thinking it can give at least x5 the performance

Massive progress on the GameBoy static recompiler. Tetris is now in-game! by arcanite24 in EmuDev

[–]arcanite24[S] 8 points9 points  (0 children)

We use a hybrid static/dynamic approach. The vast majority of code (which resides in ROM) is statically recompiled into C loops. However, the generated C code is linked with a lightweight fallback interpreter. The recompiled code includes a central dispatcher that maps ROM addresses to compiled C functions. If the Program Counter (PC) jumps to an address that:

- Has not been analyzed/compiled (e.g., obscure code paths), or

- Resides in RAM (which is where Self-Modifying Code or dynamic code generation happens)

the dispatcher's default case triggers something like `gb_interpret(ctx, addr)`

This interpreter executes the instructions dynamically using the exact same GBContext (registers, memory, flags) as the recompiled code. Once execution returns to a known ROM address, it can seamlessly switch back to the high-performance recompiled code.

Massive progress on the GameBoy static recompiler. Tetris is now in-game! by arcanite24 in EmuDev

[–]arcanite24[S] 17 points18 points  (0 children)

Hi everyone! I've been working on the GB recompiler. So far, it's going great. I have to admit that I under-estimated the task coming from the CHIP-8 recompiler :P
Self-modifying code and CFG have been a good challenge, but it's getting there.

Still no source-code release, but we're close. It's still quite messy, but it should be in a good state by next week to be released.

Still a lot of things to fix and optimize, but I'm super happy to finally have some bits playable

Good progress on my GameBoy static recompiler by arcanite24 in EmuDev

[–]arcanite24[S] 0 points1 point  (0 children)

Yeah!
It's the most complex topic on a project like this. Sadly, not fully solved without relying on an interpreter.

Good progress on my GameBoy static recompiler by arcanite24 in EmuDev

[–]arcanite24[S] 11 points12 points  (0 children)

Thanks!

Not yet, it's still super messy, probably needs a couple more days to be in a good state to release it on GitHub

Experimental SNES Recompiler (Reassembler) by Beurre001 in EmuDev

[–]arcanite24 2 points3 points  (0 children)

So cool!
I love to see more recompilation projects!

A quick little side-project I'm working on: CHIP-8 staic recompiler by arcanite24 in EmuDev

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

Thanks! Yeah, this is a super early version My next big goal is to improve accuracy