Practical and Portable X86 Recompilation (2014)
mp2.dk
mp2.dk
I once did something similar by converting the Minecraft server to .NET with IKVM and hooking into its terrain generator.
I imagine that with a perfect optimizing compiler, this distinction would go away, but we're nowhere near that point.
Is it not possible to abstract away some of those calls back into native C++ code (i.e. avoiding the need for cpu and memory classes)?
Additionally one of the goals in reverse engineering is to understand how the algorithms actually work and get a deeper understanding beyond the "black-box" level. This technique doesn't really provide new insight into the code, it just transforms it from one kind of closed binary blob to another kind of closed binary blob.
Again, I don't mean to denigrate the work you have accomplished here, but I would hesitate to classify it as "Reverse Engineering"
That said, I can see how this is a technologically reasonable first step toward a new implementation. Once this initial translation step is done, individual functions can be swapped out for new (non-translated) versions fairly easily by editing source code, as opposed to patching the original binary. Later in the post, there's mention of replacing commonly-executed functions with native versions to improve performance and allow porting to other environments.
This will work right up until you're on par with the original server, and then you'll be severely limited since you can't change the world generation.
Now redistributing that code might maybe possibly get you into hot water, but to find out you'll need to go through a trial. So you use your disassembled source to learn the algorithm, then reimplement it in your own style. Now you're not even in the gray with respect to the original source.
Practical reuse of assembly is resourceful and this approach to portability quite cool (take a look at this non-portable approach to fixing up and executing an assembly dump[1]).
I wonder if the future of video game console emulation lies in recompilation, perhaps to an intermediate representation format for LLVM (similar to Dagger[2]).
[1] http://aluigi.altervista.org/mytoolz.htm#dump2func [2] http://dagger.repzret.org/
However, I am not a games programmer, and do not have any actual experience with console development. If there is anyone on here with experience in these areas, I would appreciate their thoughts on the matter.
As for where newer consoles are easier, the big thing is that there's more dynamic linking so there's more opportunity for high-level emulation of entire systems. Think being able to emulate entire OpenGL function calls rather than the raw GPU-specific register writes.
The number of different cases to tackle is certainly much smaller.