Get the top HN stories in your inbox every day.
OuterVale
perching_aix
> It isn't traditional emulation, and it isn't a decompilation. It is a static recompilation of the Xbox 360 version.
And all its real benefits come from the countless manual changes made to it, such as rewriting the rendering code. This is because at its core, especially for now, there's no meaningful technological difference between what the tool they used does vs what an emulator does.
Applications on the X360 were barred from self-modifying, so an emulator can/will statically (ahead-of-time) recompile the executable before jumping to it. Whether this is actually what Xenia (the x360 emu) does or if they JIT / hybrid it to get rid of the lengthy precomp, idk, but RPCS3 (the ps3 emu) where this exact same situation also applies does do this, even via LLVM, so there really is 0 difference. (On the PS3 though, there's also SPU code, which can and does self modify, so that needs JITing).
aquova
As a fan of the game, I just built it and got it working for myself. It's really impressive and is running great on my machine. I realize (with dread) that the game is about 17 years old now, but I eagerly awaited it release back in the day, and it was one of first games that I still think of as "modern". Rewatching the opening movie, I'm not sure you could easily distinguish it from a modern CGI cutscene.
Borealid
This is conceptually similar to Ship of Harkinian ( https://www.shipofharkinian.com/ ). If someone cares enough about a particular game to put this level of tailored work into it, wonderful.
There is a down side, though: because emulators handle a much wider variety of games, they get better feature sharing for things like save states, shaders, controller bindings, etc. With libretro things even go a step beyond that and different systems' games can all share the same launcher UI and the same support for things like RetroAchievements!
So a recompiled version is better from a performance standpoint, and might have more game-specific quality of life features, but it also means more development time is devoted to that particular game.
LorenDB
Similar Sonic projects include SA2 Redux[0] and Project 06[1].
[0]: https://gamejolt.com/games/SA2R/939490
[1]: https://youtube.com/c/ChaosX (best link as there is no official website)
ronjouch
And similar recomp projects include Zelda { Ocarina of Time, Majora's Mask } and Starfox.
- https://github.com/HarbourMasters/Shipwright
foldor
Those projects from the ship of harkinian are not recomp. Those are based on completed decompilation projects. So they're not translating the mips assembly to an unreadable C being recompiled. They're true ports from as close to the real source code as you can get.
louhike
SA2 redux looks more like a remake than a recomp. I didn’t know the project though and it seems promising!
robbiet480
It's already available on macOS too, runs pretty well https://github.com/squidbus/UnleashedRecomp/actions/runs/136...
heavensteeth
Every time MattKC uploads[0], his video's subject matter appears on HN a few hours later. I'm beginning to think it's not a coincidence :)
no_time
Am I understanding right that this is basically an ahead of time xbox360 emulator?
Absolutely fascinating.
dharmab
It's not emulation. It's recompiled to the target device's native machine code. It also required a lot of additional low-level, per game programming to make stuff like graphics and sound work correctly.
phire
Traditional emulators also recompile games to the target device's native machine code. It just happens dynamically at runtime, hence the name "dynamic recompiler" or "Just In Time recompiler".
This is just a static recompiler or ahead of time recompiler, except instead of directly targeting machine code, it's targeting C/C++ as a type of portable assembly. It basically just looks like a bunch of macros implementing the behaviour of powerpc instructions.
The recompiled result will preform nowhere near as good as a proper manual decompilation project, it's still baking in a huge number of quirks from PowerPC and the compiler they originally used, and will have noticeably worse performance. But, performance will usually be good enough, and it's easy to manually replace any bad code-gen that shows up as a bottleneck in profiles.
And while they did replace a bunch of graphics/audio code, they are still directly emulating a bunch of the original Xbox 360 Kernel and hardware.
alt227
As I understand it, standard emulation is not dynamic recompiling or jit, it is emulating and converting system calls in realtime. So the game calls a system function unique to the original platform, the emulator sees that call and makes a similar one (or multiple) in the language of the emulating system, and then returns the correct response back to the original call from the game.
I dont think it is compiling anything here.
bri3d
It’s a weird in between, IMO. I don’t think it’s fair to say it’s not emulation, because in most places the original architecture’s state is maintained and functions are hooked through macros like PPC_FUNC - the original source code is not fully ported to the host platform, but relies on a set of compile and runtime tricks which, well, emulate the properties of the guest. But yes, it’s not traditional emulation and things are gradually ported to be more “native” over time.
zapzupnz
Sounds a bit like WINE
remix2000
Compared to the og recompiler <https://github.com/rexdex/recompiler>, this is super basic and only matches patterns specific to a single compiler rather than devising a CFG as one would expect with such a tool. I wasn't able to analyze, let alone "recompile" even the basic "dolphin" demo.
undefined
DeathArrow
It's the first time I hear about static recompilation. I didn't know you can recompile something to run on a different architecture and OS.
undefined
undefined
Get the top HN stories in your inbox every day.
This is one of the most impressive things I've seen in a while. It isn't traditional emulation, and it isn't a decompilation.
It is a static recompilation of the Xbox 360 version. It required a ton of low-level re-handling of things from the 360's Xenon CPU and Xenos GPU.
Not only is it the game running natively on PC, it has also been modded to support all manner of tweaks and enhancements that are manageable in-game, and mod support.
Really impressive stuff.
Release trailer: https://www.youtube.com/watch?v=TJreGbVPDx0