
Xenia - An Xbox 360 emulator - devbug
https://github.com/benvanik/xenia
======
noxa
Author here. Yeah, the readme is meant to scare off people. Even with it I
still get people on IRC or email asking me if they can play game X or where
they can get a copy. The note about no downloads is for all those who download
360 emulators from shady YouTube links and such - there's a surprising number
of fakes packed with malware and viruses floating around.

Status of the project is that it's coming along well, after a long period of
inactivity. Many games get to title screens though don't draw much. I'm really
hoping AMD gets its shit together and releases Mantle soon, as that will make
emulating the GPU related things significantly easier.

~~~
fidz
A little bit OOT, why do you use .jp for the domain?

~~~
noxa
All the other TLDs (xenia.com, etc) are squatted/taken. And .jp is cool :)

~~~
rezaprima
Interestingly, Xenia is a brand of Daihatsu car. At least in Indonesia.
[http://www.daihatsu.co.id/products/highlight/xenia](http://www.daihatsu.co.id/products/highlight/xenia)

------
tasoeur
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... :/

~~~
dippyskoodlez
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.

~~~
Freestyler_3
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...

~~~
dippyskoodlez
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.

------
justin_
The developer made some interesting posts about how the emulator will work on
his blog a couple years back:

[http://www.noxa.org/blog/](http://www.noxa.org/blog/)

~~~
snowman41
Great link, thanks.

------
whalesalad
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.

~~~
onedev
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.

~~~
whalesalad
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.

~~~
chinpokomon
Most VMs aren't full architecture emulation. Instead they use a trap to
prevent some instructions from executing, but the rest are passed through as
native instructions. Breaking out of this virtualized environment could
potentially pose a security risk, and it is possible to detect that you are in
a virtualized host because timing wasn't as exact as for these intercepted
calls as they are on actual hardware.

Intel and AMD added additional instructions that reduced the chance that
information running on one VM couldn't be leaked to another VM. This is the
foundation of Hypervisors, which are low level systems designed specifically
for giving a managed interface for the host OS, but importantly these are
still virtualized VMs meaning the computer architecture is still the same as
the hardware. (a little hand-wavey but correct enough for the sake of
discussion)

Transmeta designed cores that weren't strictly x86 for example, but the
technology is more like RISC vs. CISC. By transforming the CISC instructions
into equivalent RISC instructions on the fly, the underlying processor is
RISC. This is already true of (almost?) every modern CPU, they execute micro
code. Transmeta was one of the first to do this. I'm not sure, but Transmeta
may have performed instruction reordering in their pipeline at the micro code
level whereas others did this at the opcode level. I'm not aware of any
instance where they used this to simultaneously provide multiple architectures
on the same silicon, although at a glance it seems plausible. It would have
been very expensive to build multiple ISAs into the same core, especially if
the demand for such technology is nonexistent. By scraping the transistors
that would have been used to support multiple ISAs, you can use that space for
better pipelines, SIMD, multiple cores, or simply increase the yield, conserve
power, and/or make the processor more efficient.

Any of those options would be better, so I don't believe any of these mythical
multi-ISA processors exist.

The bottom line is that for the Xbox One to support Xbox 360 code, they would
have to emulate everything and there simply aren't enough CPU cycles to make
that happen.

Since I'm on a roll, the biggest disappointment was that the Xbox 360 didn't
emulate the Play Station. Now obviously the Xbox 360 is made by Microsoft and
the PS is made by Sony, but the idea isn't so extreme. A company called
Conecttix [1] created a PS emulator for the Mac. The Mac was using the same
ISA as the PS, so the emulator only had to emulate the BIOS and peripherals.
Sony took them to court and lost. The pivotal piece was that Microsoft bought
Connectix and a part of that company lives on in the Virtual PC virtualization
software now made by Microsoft. Sony apparently bought the PS emulator and
killed it, but imagine if that had gone to Microsoft instead? The Xbox 360
uses the same ISA, so in theory it could have also run a 360 version of VGS.
Gamers who didn't have a PS2 might have been able to play their PS games on
Microsoft hardware. Microsoft would have gotten hardware sales and Sony would
have received money for game licenses.

For this generation, Microsoft would have done well for itself by acquiring
OnLive or building out its own server side gaming system as Sony has done by
purchasing Gaiki. This would have given the Xbox One the ability to play Xbox
360 games over a remote desktop type of link. I think if the public backlash
against the online offerings wasn't so boisterous, we may have seen a service
like that at launch instead of the watered down version they scrambled to
produce.

The key future proofing component of Xbox One is the ability to run parts of
the game in the cloud. This is why the slower core of the Xbox One shouldn't
be seen as limiting. Games can be written to push complex calculations to a
server farm while the local core handles more pedestrian chores. Extending
that idea further, we may see Xbox 360 emulation yet. The Xbox One is posed to
win the battle this generation if these long term strategies are given time to
mature and be fully realized. The PS4 has some short term appeal, but the gap
between Microsoft and Sony isn't as wide as the gap between those two
companies and Nintendo.

[1]
[http://en.m.wikipedia.org/wiki/Connectix_Virtual_Game_Statio...](http://en.m.wikipedia.org/wiki/Connectix_Virtual_Game_Station)

~~~
brigade
Nope on Connectix VGS not emulating the CPU - PSX and PS2 both used MIPS CPUs,
vs. PowerPC in Mac. It very much was the exact same thing as PCSX or
derivates.

The only platform a PSX emulator might have not done full
dynarec/interpretation would have been the PSP, and that's unlikely to
actually exist for various reasons.

~~~
memsom
you mean like the POPS emulator that the PSP used to run PlayStation 1 games
(to correct the common mistake, the PSX was a completely different Japanese
console, which only had the PlayStation as one of its parts).

~~~
joshuapants
PSX was a codename for the PlayStation. They decided to reuse the name for
their failed entertainment center, but the name predates it by almost a
decade.

------
PhasmaFelis
I'm amused by how many video game emulator devs insist that they're not for
playing video games. (MAME is another big one.)

~~~
noxa
And why is that difficult to believe? My previous emulation project
([https://code.google.com/p/pspplayer/](https://code.google.com/p/pspplayer/))
was the same kind of exercise: do something no one else had done and learn a
lot doing it. As a hobbyist the act of doing something is far more fulfilling
than the output.

~~~
PhasmaFelis
It's not difficult to believe, it's just funny. Devoting an enormous amount of
time and energy to understanding and reproducing a device whose only purpose
is to play video games while insisting that you're not interested in video
games is a pretty funny thing to do.

I mean, I obsess over odd stuff too, I'd guess most of us do, but it's
important to keep a sense of humor about it.

~~~
noxa
Oh, for sure. I thought you were implying that I only was doing it to
play/steal/etc games (as many people assume). I've got a pile of awesome
Japanese import games I picked up the last time I was there that I'd love to
play, but the region locking on the real consoles prevents me. If I had an
emulator, that wouldn't be a problem. Not the only reason I'm doing this, of
course (I could just buy a Japanese console), but it's a reason nonetheless :)

~~~
mercer
Might such a comment be used against you? Just curious.

~~~
noxa
It's fair use. If a book is not available for sale in the US I can travel to
the UK and buy a copy and bring it back with me and read it. It may not be
what the publisher wanted, but it's a legally purchased good used in a legit
way.

------
anonymousab
Can't exactly download/build this on my current machine. What does it actually
do so far?

~~~
dippyskoodlez
Step 1.) read the readme.

~~~
anonymousab
No currently supported features, but I assume it actually does...something. Or
serves some early purpose towards the development of a 'complete' emulator.

------
andrewf
I'm really curious about which new (Windows 8-only) APIs are potentially
useful.

~~~
noxa
There are a bunch related to D3D, and I'm currently using
RtlAddGrowableFunctionTable in the JIT to get proper stack walking (previously
this was really painful). There are also some kernel primitives I'd like to
take advantage of once things are working to do some cool memory tricks and
hopefully speed things up.

------
xanth
Time to start the cease and desist countdown.

~~~
Natsu
While there are other ways to screw up, like promoting illegal ROMs, emulation
itself is legal thanks to Sony vs. Connectix.

~~~
grecy
I wish Connectix had stuck around and continued making Emuators. Virtual Game
Station was awesome.

~~~
dikei
It was awesome, but EPSXE and others surpassed it years ago :).

