Xbox 360 Emulator Research Project
Go to file
chss95cs@gmail.com 90c771526d "Fix" debug console, we were checking the cvar before any cvars were loaded, and the condition it checks in AttachConsole is somehow always false
Remove dead #if 0'd code in math.h

On amd64, page_size == 4096 constant, on amd64 w/ win32, allocation_granularity == 65536. These values for x86 windows havent changed over the last 20 years so this is probably safe
and gives a modest code size reduction

Enable XE_USE_KUSER_SHARED. This sources host time from KUSER_SHARED instead of from QueryPerformanceCounter, which is far faster, but only has a granularity of 100 nanoseconds.

In some games seemingly random crashes were happening that were hard to trace because
the faulting thread was actually not the one that was misbehaving, another threads stack was underflowing into the faulting thread.

Added a bunch of code to synchronize the guest stack and host stack so that if a guest longjmps the host's stack will be adjusted.
Changes were also made to allow the guest to call into a piece of an existing x64 function.

This synchronization might have a slight performance impact on lower end cpus, to disable it set enable_host_guest_stack_synchronization to false.
It is possible it may have introduced regressions, but i dont know of any yet

So far, i know the synchronization change fixes the "hub crash" in super sonic and allows the game "london 2012" to go ingame.

Removed emit_useless_fpscr_updates, not emitting these updates breaks the raiden game

MapGuestAddressToMachineCode now returns nullptr if no address was found, instead of the start of the function

add Processor::LookupModule

Add Backend::DeinitializeBackendContext
Use WriteRegisterRangeFromRing_WithKnownBound<0, 0xFFFF> in WriteRegisterRangeFromRing for inlining (previously regressed on performance of ExecutePacketType0)

add notes about flags that trap in XamInputGetCapabilities

0 == 3 in XamInputGetCapabilities

Name arg 2 of XamInputSetState

PrefetchW in critical section kernel funcs if available & doing cmpxchg

Add terminated field to X_KTHREAD, set it on termination

Expanded the logic of NtResumeThread/NtSuspendThread to include checking the type of the handle (in release, LookupObject doesnt seem to do anything with the type)
and returning X_STATUS_OBJECT_TYPE_MISMATCH if invalid. Do termination check in NtSuspendThread.

Add basic host exception messagebox, need to flesh it out more (maybe use the new stack tracking stuff if on guest thrd?)

Add rdrand patching hack, mostly affects users with nvidia cards who have many threads on zen

Use page_size_shift in more places

Once again disable precompilation! Raiden is mostly weird ppc asm which probably breaks the precompilation. The code is still useful for running the compiler over the whole of an xex in debug to test for issues
"Fix" debug console, we were checking the cvar before any cvars were loaded, and the condition it checks in AttachConsole is somehow always false

Remove dead #if 0'd code in math.h

On amd64, page_size == 4096 constant, on amd64 w/ win32, allocation_granularity == 65536. These values for x86 windows havent changed over the last 20 years so this is probably safe
and gives a modest code size reduction

Enable XE_USE_KUSER_SHARED. This sources host time from KUSER_SHARED instead of from QueryPerformanceCounter, which is far faster, but only has a granularity of 100 nanoseconds.

In some games seemingly random crashes were happening that were hard to trace because
the faulting thread was actually not the one that was misbehaving, another threads stack was underflowing into the faulting thread.

Added a bunch of code to synchronize the guest stack and host stack so that if a guest longjmps the host's stack will be adjusted.
Changes were also made to allow the guest to call into a piece of an existing x64 function.

This synchronization might have a slight performance impact on lower end cpus, to disable it set enable_host_guest_stack_synchronization to false.
It is possible it may have introduced regressions, but i dont know of any yet

So far, i know the synchronization change fixes the "hub crash" in super sonic and allows the game "london 2012" to go ingame.

Removed emit_useless_fpscr_updates, not emitting these updates breaks the raiden game

MapGuestAddressToMachineCode now returns nullptr if no address was found, instead of the start of the function

add Processor::LookupModule

Add Backend::DeinitializeBackendContext
Use WriteRegisterRangeFromRing_WithKnownBound<0, 0xFFFF> in WriteRegisterRangeFromRing for inlining (previously regressed on performance of ExecutePacketType0)

add notes about flags that trap in XamInputGetCapabilities

0 == 3 in XamInputGetCapabilities

Name arg 2 of XamInputSetState

PrefetchW in critical section kernel funcs if available & doing cmpxchg

Add terminated field to X_KTHREAD, set it on termination

Expanded the logic of NtResumeThread/NtSuspendThread to include checking the type of the handle (in release, LookupObject doesnt seem to do anything with the type)
and returning X_STATUS_OBJECT_TYPE_MISMATCH if invalid. Do termination check in NtSuspendThread.

Add basic host exception messagebox, need to flesh it out more (maybe use the new stack tracking stuff if on guest thrd?)

Add rdrand patching hack, mostly affects users with nvidia cards who have many threads on zen

Use page_size_shift in more places

Once again disable precompilation! Raiden is mostly weird ppc asm which probably breaks the precompilation. The code is still useful for running the compiler over the whole of an xex in debug to test for issues
2022-11-27 09:39:33 -08:00
.github CI: Remove game patches 2022-08-19 03:39:29 -07:00
android/android_studio_project [Android] Exclude executables from app build 2022-07-17 17:11:48 +03:00
assets icon fix 2022-05-19 09:39:55 +02:00
docs Adjustments for Building Canary 2022-07-30 11:13:17 -05:00
src/xenia "Fix" debug console, we were checking the cvar before any cvars were loaded, and the condition it checks in AttachConsole is somehow always false 2022-11-27 09:39:33 -08:00
third_party hopefully switched cxxopts to the main master branch now that the selectany changes are accepted 2022-11-05 11:08:04 -07:00
tools [GPU] Vulkan fragment shader interlock RB and related fixes/cleanup 2022-10-09 22:06:41 +03:00
.appveyor.yml Update .appveyor.yml 2022-05-19 09:39:57 +02:00
.azure-pipelines.yml Azure Pipelines: Ignore canary_base 2022-05-19 09:39:57 +02:00
.clang-format [UI] android.app.NativeActivity > WindowedAppActivity + code style 2021-09-18 20:32:24 +03:00
.drone.star [CI] Build all android targets 2022-07-17 19:57:37 -05:00
.gdbinit [threading linux] Implement Callback Queuing 2020-11-15 11:12:05 -06:00
.gitattributes [GPU] Shaders to common, xb buildshaders instead of buildhlsl 2021-06-05 18:53:53 +03:00
.gitignore "Fix" debug console, we were checking the cvar before any cvars were loaded, and the condition it checks in AttachConsole is somehow always false 2022-11-27 09:39:33 -08:00
.gitmodules Minor decoder optimizations, kernel fixes, cpu backend fixes 2022-11-05 10:50:33 -07:00
LICENSE Adding CONTRIBUTING.md so that github shows it on issues. 2015-08-28 14:16:38 -07:00
README.md Reflect the closure of #1333 2022-01-28 23:01:50 +03:00
premake5.lua Fix compiler errors i introduced under clang-cl 2022-09-29 07:04:17 -07:00
xb Add xb symlink to xenia-build to match xb.bat for win 2017-07-11 11:47:24 -06:00
xb.bat Python/xenia-build/xb fixes 2022-07-21 08:31:35 -05:00
xb.ps1 Python/xenia-build/xb fixes 2022-07-21 08:31:35 -05:00
xenia-build Python/xenia-build/xb fixes 2022-07-21 08:31:35 -05:00
xeniarc clang-format detection cleanup. 2015-08-01 00:41:46 -07:00

README.md

Xenia - Xbox 360 Emulator

Xenia is an experimental emulator for the Xbox 360. For more information, see the main Xenia wiki.

Interested in supporting the core contributors? Visit Xenia Project on Patreon.

Come chat with us about emulator-related topics on Discord. For developer chat join #dev but stay on topic. Lurking is not only fine, but encouraged! Please check the FAQ page before asking questions. We've got jobs/lives/etc, so don't expect instant answers.

Discussing illegal activities will get you banned.

Status

Buildbot Status Releases
Windows Build status LatestAll
Linux Build status

Quite a few real games run. Quite a few don't. See the Game compatibility list for currently tracked games, and feel free to contribute your own updates, screenshots, and information there following the existing conventions.

Disclaimer

The goal of this project is to experiment, research, and educate on the topic of emulation of modern devices and operating systems. It is not for enabling illegal activity. All information is obtained via reverse engineering of legally purchased devices and games and information made public on the internet (you'd be surprised what's indexed on Google...).

Quickstart

See the Quickstart page.

Building

See building.md for setup and information about the xb script. When writing code, check the style guide and be sure to run clang-format!

Contributors Wanted!

Have some spare time, know advanced C++, and want to write an emulator? Contribute! There's a ton of work that needs to be done, a lot of which is wide open greenfield fun.

For general rules and guidelines please see CONTRIBUTING.md.

Fixes and optimizations are always welcome (please!), but in addition to that there are some major work areas still untouched:

See more projects good for contributors. It's a good idea to ask on Discord and check the issues page before beginning work on something.

FAQ

See the frequently asked questions page.