Live data from Hacker News

Unleashed Recompiled: PC port of the Xbox 360 version of Sonic Unleashed

github.com

1–10 of 27 posts

Re: Unleashed Recompiled: PC port of the Xbox 360 version of Sonic Unleashed

#2
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.

Re: Unleashed Recompiled: PC port of the Xbox 360 version of Sonic Unleashed

#5
post #3

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)

And similar recomp projects include Zelda { Ocarina of Time, Majora's Mask } and Starfox.

- https://github.com/HarbourMasters/Shipwright

- https://github.com/HarbourMasters/2ship2harkinian

- https://github.com/HarbourMasters/Starship

Re: Unleashed Recompiled: PC port of the Xbox 360 version of Sonic Unleashed

#6
post #4

Am I understanding right that this is basically an ahead of time xbox360 emulator? Absolutely fascinating.

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.

Re: Unleashed Recompiled: PC port of the Xbox 360 version of Sonic Unleashed

#7
post #6
post #4

Am I understanding right that this is basically an ahead of time xbox360 emulator? Absolutely fascinating.

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.

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.

Re: Unleashed Recompiled: PC port of the Xbox 360 version of Sonic Unleashed

#8
post #7
post #6

Earlier quoted context omitted.

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.

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 t…

Sounds a bit like WINE

Re: Unleashed Recompiled: PC port of the Xbox 360 version of Sonic Unleashed

#9
post #6
post #4

Am I understanding right that this is basically an ahead of time xbox360 emulator? Absolutely fascinating.

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.

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.

Re: Unleashed Recompiled: PC port of the Xbox 360 version of Sonic Unleashed

#10
post #8
post #7

Earlier quoted context omitted.

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 t…

Sounds a bit like WINE

No. Way lower level. WINE runs native code and replaces library and system calls. This turns native code into C++ macros and then recompiles those into code. This is like a JIT with C++ as the IR. On the other hand WINE is not an emulator ;)
Post reply on HN