XBox 360 Emulators for the PC

Now we just need a PSNow port!
Well, I'd gladly pirate my Xbox One in order to use something like that, even if it meant I'd have to buy another one down the line. I still dig some of my old games and systems.

I wonder why something as apparently simple as creating an original Xbox emulator hasn't been realised yet. It was just a PC, for the most part.
 
I wonder why something as apparently simple as creating an original Xbox emulator hasn't been realised yet. It was just a PC, for the most part.
Good write-up here:
http://www.neogaf.com/forum/showpost.php?p=48088464&postcount=26

Basically: lack of documentation, not really being off-the-shelf GPU adds to the problem (hybrid NV20/NV25). I do recall Wavey mentioning that it had one or two things that were precursor to the NV3x. Long time ago :oops:

Man would I love to have some of those exclusives in HD now... (MechAssault, Kingdom Under Fire, Otogi)
 
Man would I love to have some of those exclusives in HD now... (MechAssault, Kingdom Under Fire, Otogi)

Rallisport Challenge 2
Rallisport Challenge 2
Rallisport Challenge 2!!!

It's the reason I will always have an Xbox in storage taking up roughly 1/3 of my living space.
 
Debugging emulation this slow must be excruciating. I found considerably faster to still be unbearable. It's impressive that it got this far under these conditions.
 
I wonder why something as apparently simple as creating an original Xbox emulator hasn't been realised yet. It was just a PC, for the most part.

As AlNets said, the NV25 was a custom part and I seem to remember there was some issue with Nvidia actually releasing documentation even to MS. I think it was a similar situation to where they are now with their linux support.
 
Good write-up here:
http://www.neogaf.com/forum/showpost.php?p=48088464&postcount=26

Basically: lack of documentation, not really being off-the-shelf GPU adds to the problem (hybrid NV20/NV25). I do recall Wavey mentioning that it had one or two things that were precursor to the NV3x. Long time ago :oops:

Man would I love to have some of those exclusives in HD now... (MechAssault, Kingdom Under Fire, Otogi)

yeah, Otogi 1 and 2, Panzer Dragoon, Jet Set Radio Future,need HD re release treatment.
 
I can't imagine an Xbox 360 emulator is going to run the 360's software-based Xbox emulator within itself at a usable rate until we have PCs that are incredibly faster than today's. We can barely "emulate" Gamecube and PS2 at full speed...

As AlNets said, the NV25 was a custom part

NV2A, you mean. ;) I think it's something in between NV20 and NV25 when it comes to features. But since they weren't limited to PC D3D, games did things beyond even D3D 8.1.
 
I can't imagine an Xbox 360 emulator is going to run the 360's software-based Xbox emulator within itself at a usable rate until we have PCs that are incredibly faster than today's. We can barely "emulate" Gamecube and PS2 at full speed...

i dont know about you but i can get very high frame rates (100+) with very high rez + AA on both PCSX2 and dolphin on current hardware. I haven't tried a target of 720P with no AA etc and both dolphin and PCSX2 have limited multicore support.

it will be interesting to see how well they can thread it. also how close is AVX to the 360's vector/simd units?
 
i dont know about you but i can get very high frame rates (100+) with very high rez + AA on both PCSX2 and dolphin on current hardware.
In my experience with Dolphin and PCSX2, game speed varies greatly from game to game. Have you played F-Zero GX? There's a heat haze effect on some tracks that I specifically remember reducing game speed to a crawl on my 4.3 GHz 2500k and Radeon 6950. There is some interaction between Cube's CPU and GPU with that effect and it can't be emulated with good performance on PC IIRC.

Dolphin and PCSX2 have about 10 years of development effort behind them and they are still troublesome. Assuming Xenia goes anywhere, I figure it will be years before it's fairly complete, and by then hardware will be 10x faster.
 
I can't imagine an Xbox 360 emulator is going to run the 360's software-based Xbox emulator within itself at a usable rate until we have PCs that are incredibly faster than today's. We can barely "emulate" Gamecube and PS2 at full speed...



NV2A, you mean. ;) I think it's something in between NV20 and NV25 when it comes to features. But since they weren't limited to PC D3D, games did things beyond even D3D 8.1.
On another forum someone wrote that because the emulator is a recompiler it would require a cpu with less than 10x the power of the xenon cpu to emulate many games at playable frame rates.
Emulating the GPU is straghtforward enough and current pc gpus are more than powerful enough.

http://www.noxa.org/blog/category/projects/xenia/
 
Last edited by a moderator:
On another forum someone wrote that because the emulator is a recompiler it would require less than10x the power of the xenon cpu to emulate many games at playable frame rates.
Emulating the GPU is straghtforward enough and current pc gpus are more than powerful enough.

http://www.noxa.org/blog/category/projects/xenia/

All of the popular console emulators are using dynamic recompilation for the CPU portion.


"Cons

Incredibly hard to write" :)
 
Thanks

The author wrote this on his blog,

The Xbox 360 is an embedded system, geared towards gaming and fairly specialized - but at the end of the day it's derived from the Windows NT kernel and draws with DirectX 9. The hardware is all totally custom (CPU/GPU/memory system/etc), but roughly equivalent to mainstream hardware with a 64-bit PPC chip like those shipped in Macs for awhile and an ATI video chipset not too far removed from a desktop card. Although it's not going to be a piece of cake and there are some significant differences that may cause problems, this actually isn't the worst situation.

The next few posts will investigate each core component of the system and try to answer the two questions above. They'll cover the CPU, GPU, and operating system.

Reference: http://en.wikipedia.org/wiki/Xenon_(processor), http://free60.org/Xenon_(CPU)

64-bit PowerPC w/ in-order execution and running big-endian
3.2GHz 3 physical cores/6 logical cores
L1: 32KB instruction/32KB data, L2: 1MB (shared)
Each core has 32 integer, 32 floating-point, and 128 vector registers
Altivec/VMX128 instructions for SIMD floating-point math
~96GFLOPS single-precision, ~58GFLOPS double-precision, ~9.6GFLOPS dot product
PowerPC

The PowerPC instruction set is RISC - this is a good thing, as it's got a fairly small set of instructions (relative to x86) - it doesn't make things much easier, though. Building a translator for PPC to x86-* is a non-trivial piece of work, but not that bad. There are some considerations to take into account when translating the instruction set and worrying about performance, highlighted below:

Xenon is 64-bit - meaning that it uses instructions that operate on 64-bit integers. Emulating 64-bit on 32-bit instruction sets (such as x86) is not only significantly more code but also at least 2x slower. May mean x86-64 only, or letting some other layer do the work if 32-bit compatibility is a must.
Xenon uses in-order execution - great for simple/cheap/power-efficient hardware, but bad for performance. Optimizing compilers can only do so much, and instruction streams meant for in-order processors should always run faster on out-of-order processors like the x86.
The shared L2 cache, at 1MB, is fairly small considering there is no L3 cache. General memory accesses on the 360 are fast, but not as fast as the 8MB+ L3 caches commonly found in desktop processors.
PPC has a large register file at 32I/32F/128V relative to x86 at 6I/8F/8V and x86-64 at 12I/16F&V - assuming the PPC compiler is fully utilizing them (or the game developers are, and it's safe to bet they are) this could cause a lot of extra memory swaps.
Being big-endian makes things slightly less elegant, as all loads and stores to memory must take this into account. Operations on registers are fine (a lot of the heavy math where perf really matters), but because of all the clever bit twiddling hacks out there memory must always be valid. This is the biggest potentially scary performance issue, I believe.
Luckily there is a tremendous amount of information out there on the PowerPC. There are many emulators that have been constructed, some of which run quite fast (or could with a bit of tuning). The only worrisome area is around the VMX128 instructions, but it turns out there are very few instructions that are unique to VMX128 and most are just the normal Altivec ones. (If curious, the v*128 named instructions are VMX128 - the good news is that they've been documented enough to reverse).

Multi-core

'6 cores' sounds like a lot, but the important thing to remember is that they are hardware threads and not physical cores. Comparing against a desktop processor it's really 3 hardware cores at 3.2GHz. Modern Core i7's have 4-6 hardware cores with 8-12 hardware threads - enough to pin the threads used on a 360 to their own dedicated hardware threads on the host.

There is of course extra overhead running on a desktop computer: you've got both other applications and the host OS itself fighting for control of the execution pipeline, caches, and disk. Having 2x the hardware resources, though, should be plenty from a raw computing standpoint:

SetThreadAffinityMask/SetThreadIdealProcessor and equivalent functions can control hardware threading.
The properties of out-of-order execution on the desktop processors should allow for better performance of hardware threads vs. the Xenon.
The 3 hardware cores are sharing 1MB of L2 on the Xenon vs. 8-16MB L3 on the desktop so cache contention shouldn't happen nearly as often.
Extra threads on the host can be used to offload tasks that on a real Xenon are sharing time with the game, such as decompression.
Raw performance

The Xbox marketing guys love to throw around their fancy GFLOP numbers, but in reality they are not all that impressive. Due to the aforementioned in-order execution and the strange performance characteristics of a lot of the VMX128 instructions it's almost impossible to hit the reported numbers in anything but carefully crafted synthetic benchmarks. This is excellent, as modern CPUs are exceeding the Xenon numbers by a decent margin (and sometimes by several multiples). The number of registers certainly helps the Xenon out but only experimentation will tell if they are crucial to the performance.

With all of the above analysis I think I can say that it's not only possible to emulate a Xenon, but it'll likely be sufficiently fast to run well.

To answer the first question above: by the time a Xenon emulation is up to 95% compatibility the target host processors will be plenty fast;
in a few years it'll almost seem funny that it was ever questioned.

And is there enough information out there? So far, yes. I spent a lot of nights reverse engineering the special instructions on the PSP processor and the Xenon is about as documented now. The Free60 project has a decent toolchain but is lacking some of the VMX128 instructions which will make testing things more difficult, but it's not impossible.


Combined with some excellent community-published scripts for IDA Pro (which I have to buy a new license of... ack $$$ as much as a new MacBook) the publicly available information and some Redbull should be enough to get the Xbox 360 CPU running on the desktop.

http://www.noxa.org/blog/category/projects/xenia/
 
All of the popular console emulators are using dynamic recompilation for the CPU portion.


"Cons

Incredibly hard to write" :)

Most emulators with dynamic recompilation are doing something in between what he calls JIT and what he calls recompilation. No one that I know of is doing any kind of whole program analysis, and ahead of time recompilation is limited to what can be resolved by following direct branches.

That said, some emulator recompilers do at least do analysis that goes beyond translated blocks, and definitely beyond basic blocks.

The important thing to remember is that these comparisons only take into consideration emulating the CPU.
 
Most emulators with dynamic recompilation are doing something in between what he calls JIT and what he calls recompilation. No one that I know of is doing any kind of whole program analysis, and ahead of time recompilation is limited to what can be resolved by following direct branches.

That said, some emulator recompilers do at least do analysis that goes beyond translated blocks, and definitely beyond basic blocks.

The important thing to remember is that these comparisons only take into consideration emulating the CPU.

But emulating the CPU is obviously the biggest hurdle since it involves going from one architecture to another and the Xenon still has comparable theoretical GFLOPS performance to many modern CPUs. As far as performance comes to mind, emulating the eDRAM could be an issue too if whoever isn't using a top end graphics card with oodles of bandwidth. But in a few years we may have stacked DRAM on APUs with that kind of bandwidth too, so yes, the number of host targets will only increase.
 
If previous consoles emulators are anything to go by, the custom GPU and the ability to use it however desired, and any fancy CPU/GPU interaction will be huge hurdles as well. I wonder what this will look like in 10 years....

360 emulation isn't being explored by MS at all is it?
 
If DX12 is very similar or even identical across PC and XB1 then wouldn't that have the potential to make XB1 emulation on the PC very easy? Perhaps even easier than the 360? Especially when you consider the win8 basis of it's OS, x86 CPU and the GCN1.1 GPU.
 
Back
Top