Live data from Hacker News

Xenia - An Xbox 360 emulator

github.com

21–30 of 74 posts

Re: Xenia - An Xbox 360 emulator

#21

Earlier quoted context omitted.

Xbox 360 used a PowerPC instruction set. It would seem unlikely that emulation could be efficient enough to have it work reliably good and fast.

It isn't necessary to purely emulate every instruction, you can cache translated code segments like a JIT compiler does. It has been done before for fast x86 emulation on a VLIW chipset: http://en.wikipedia.org/wiki/Code_Morphing_Software More details: http://en.wikipedia.org/wiki/Binary_translation#Dynamic_bina...

It's not just about translating instructions. Console games are extremely optimized and fine tuned for the processor they run on. A block of 40 PowerPC instructions may take 40 clock cycles to run on a PowerPC Processor, but 120 clock cycles to run on an x86 processor once they're blindly emulated. Programmers (and compilers) will change the type of instructions they're using to best fit the situation and the instruction set they will be using.

Then there's the problem where PowerPC is big endian and x86 is little endian so add potentially additional processing for network and file system code as well (models, textures, sounds, etc), in addition to any magic numbers[0] that may be used in the codebase.

While it is possible to emulate, the performance would be abysmal. Just take a look at GameBoy emulators for the PC. They use massive amounts of CPU due to the necessary overhead to emulate the processor, graphics, sound, etc. Trying to play a game like Call of Duty or Grand Theft Auto emulated from PPC to x86 would just be sluggish at best.

[0]http://en.wikipedia.org/wiki/Magic_number_(programming)

Re: Xenia - An Xbox 360 emulator

#22
post #15

One thing I've wondered... And this is somewhat unrelated, is why the Xbox One doesn't run 360 games. One of the core features of it's OS is the fact that everything is running in a modified Hyper-V environment. So why couldn't MS have emulated the 360 on the hypervisor?! Will be cool to see this project progress and hopefully running on an Xbox One dev kit.

In reality you could emulate it. The problem is the xbone doesn't have a powerful enough x86 processor to emulate the powerpc 360. It was around 2010 that mainstream computers matured enough to easily emulate a ps2, for instance.

> It was around 2010 that mainstream computers matured enough to easily emulate a ps2, for instance.

The PS2 is an incredibly weird architecture, though. Lots of different processors requiring really strict synchronization in weird ways. It's not that the raw horsepower wasn't there for emulation (it has been there since ~2004), but that it's just strange enough that emulating it is brutally difficult.

Re: Xenia - An Xbox 360 emulator

#23

Earlier quoted context omitted.

The amount of traffic this is going to get is probably a bit nuts, so it's pretty well deserved imo. If your feelings are hurt by someone not wanting to get hammered with idiotic requests/e-mails about a very clear alpha 'project', you should maybe reconsider your ISP payments.

Agreed, A good note to not trust anything claiming to be the finished/working version of this is in its place. But I can't but wonder how those people get there anyway. Linkbait? First many people get lured in then hope some are going to help, be rude to the rest and tell them to get off. mhh I don't know...

It sounds more like a Linus approach of being productive rather than caring about being PC. Worrying about joe schmoes feelings that will just blindly expect a perfect product is the last thing I would want for a hobby. He seems to know his stuff, so I think talent will attract talent.

Re: Xenia - An Xbox 360 emulator

#25

Earlier quoted context omitted.

That's rather neat, even though it can't run the games. I can understand the tone in the README.md because a lot of 'gamers', even the technically oriented ones, expect a lot from the word 'emulator'.

yea, a lot of people would be submitting issues that they can't run a game without those first disclaimers

Sadly, they probably still do even with the disclaimer. Just my experience with dealing with similar audience to emulators (mobile apps) and making a disclaimer the top line of your summary.

Re: Xenia - An Xbox 360 emulator

#26
post #2

That's a great project and I'm going to dive into the source pretty soon! However I'm not sure I really like the tone used in the README.md... :/

The "I'm doing this and I don't give a damn about you" attitude I think has at least some merit. If the lead programmer is good, its better if he/she can say no. If there is a correlation between being an asshole and being successful I haven't seen it.

Re: Xenia - An Xbox 360 emulator

#28
post #12

Earlier quoted context omitted.

The 360 ran a PowerPC instruction set while the Original Xbox and Xbox One run x86 architecture. The game would have to be rewritten to run on Xbox One. I'd assume this makes it difficult.

That's the whole point of a VM right? OS X could run PowerPC apps with Rosetta when they went Intel. I just assumed that we could do the same since the Xbox One has a beastly processor compared to the aged 360 one.

PPC OS X apps didn't need any low-level system emulation; they could only talk to hardware via the kernel, and they could only talk to the kernel via system libraries. So at kernel boundaries you could simply translate the PPC system call to x86.

Whereas basically all consoles expose low-level system stuff to the game, such as memory-mapped IO, low-level GPU commands, TLBs, DMA, etc. All of this can't be emulated without a large amount of overhead.

At least 6th and especially 7th generation consoles have such complex timings that emulating the clocks of different parts isn't generally needed. And it's possible that Xbox 360 and PS3 require games to go through their kernel for a lot of hardware access; I don't know.

Re: Xenia - An Xbox 360 emulator

#30
post #22
post #15

Earlier quoted context omitted.

In reality you could emulate it. The problem is the xbone doesn't have a powerful enough x86 processor to emulate the powerpc 360. It was around 2010 that mainstream computers matured enough to easily emulate a ps2, for instance.

> It was around 2010 that mainstream computers matured enough to easily emulate a ps2, for instance. The PS2 is an incredibly weird architecture, though. Lots of different processors requiring really strict synchronization in weird ways. It's not that the raw horsepower wasn't there for emulation (it has been there since ~2004), but that it's just strange enough that emulating it is brutally difficult.

Yeah, we emulate the Gamecube (which was more powerful) much more efficiently.
Post reply on HN