Difference between revisions of "Run Xbox Games on ReactOS"

From ReactOS Wiki
Jump to: navigation, search
(See Also: update link)
(Related projects: remove questionable "NTOSDrop" project, no documentation found on it, and the source of XBE loader was never published)
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
[http://www.betaarchive.com/forum/viewtopic.php?f=6&t=11986 NTOSDrop] was/is a custom Windows Research Kernel that included the "Hiroshima/xe XBOX application layer". Unfortunately, that code cannot be looked at by any ReactOS developers due to the Windows Research Kernel being under a different license; additionally, while the coder could give advice to ReactOS, they can never contribute code.
+
{{Notice|This page is about FOSS implementation of the gaming kernel based on ReactOS for original Xbox. For the full port of ReactOS desktop operating system see [[Xbox Port]].}}
  
 +
ReactOS has an original [[Xbox Port|Xbox port]] but it can run only Windows applications and lacks ability to run actual original Xbox games.
 +
 +
A new non-Desktop ReactOS kernel target must be created for running Xbox games. It would be specificly meant to run on Xbox hardware, and would have to support Xbox kernel functionality.
 +
 +
Specifically, the XBE loading must be implemented but probably also various other tasks related to memory management and more.
  
 
==Problems==
 
==Problems==
*The XBox discs are recorded from the outside in, not inside-out like standard discs
+
Xbox OS uses a radically different software architecture from Windows:
**see XDVDFS and [http://forums.ngemu.com/showthread.php?t=145975 XISO] formats
+
* Xbox Executables (XBE) are used instead of Executable (EXE) files.
**may be possible to make an exact image of an XBox DVD (by ignoring any standard disc file systems) then use software to read from the last sector forward and remake the ISO "reversed"
+
* XBE run in ring 0 and no ring 3 exists. This may require some changes to ReactOS.
*Discs are [http://forums.ngemu.com/showpost.php?p=551238&postcount=16 encrypted]
+
* XBE expect to locate HAL and other kernel API functions in a single statically linked kernel.
 +
* XBE are also statically linked.
 +
* XBE access hardware directly, so support can only be provided for ReactOS running on an original Xbox.
 +
* The kernel uses cryptography and stores keys to encrypt various data (network traffic, saved games, etc.), these keys must be dumped, and key derivation must be recreated.
 +
* The kernel only provides some critical hardware support (mostly video Encoder and IDE controller).
 +
 
 +
These changes mean that a custom desktop-less OS variant of ReactOS, specifically for original Xbox, has to be made.
 +
 
 +
This variant would be equivalent to the original <code>xboxkrnl.exe</code> by Microsoft. It would be binary-compatible with original Xbox games (but incompatible with non-Xbox hardware and Windows applications).
 +
 
 +
==Related projects==
 +
 
 +
===XQEMU===
 +
XQEMU is an original Xbox emulator that emulates the hardware level, specifically Xbox revision 1.0. XQEMU is targeting computers running Linux, Mac OS X and Windows.
 +
 
 +
Because it emulates hardware, it requires ROM images (some of which are hard to obtain) to be able to boot.
 +
 
 +
The code in XQEMU can be used to understand some of the hardware, which will have to be supported by ReactOS.
 +
 
 +
Additionally, XQEMU could possibly be used to test ReactOS.  However, this might not work correctly, as XQEMU only supports hardware access methods as used by Microsoft's original kernel. Some legacy devices or device access methods might not be supported (PIO vs. DMA, for example).
 +
 
 +
===Cxbx-Reloaded===
 +
Cxbx-Reloaded is an original Xbox emulator that emulates the kernel level. It also hooks into the game code (by using a pattern-search) to avoid direct hardware access.
 +
 
 +
As Cxbx-Reloaded is targeting computers running Windows, most of the kernel re-implementation are simple adapters to Windows functions; however, the implemented variants are confirmed to work with some original Xbox games.
 +
 
 +
Other kernel functionality is implicitly documented in code and might be useful (such as key derivation on XBE load).
 +
 
 +
Since Cxbx-Reloaded uses very specific hardware emulation ways, it can't be used to emulate a virtual Xbox for testing ReactOS.
  
==XBox 360==
+
==Related articles==
Project Xenia got very far in their Xbox 360 emulator.
+
* [[Xbox Port|ReactOS Xbox port]]
*[http://www.noxa.org/blog/2011/02/22/building-an-xbox-360-emulator-part-0/ Introduction]
+
* [[Install ReactOS on Xbox]]
*[http://www.noxa.org/blog/2011/02/23/building-an-xbox-360-emulator-part-1-feasibilitycpu/ Feasibility: CPU]
+
* [[Run XBox 360 Games on ReactOS]]
*[http://www.noxa.org/blog/2011/02/23/building-an-xbox-360-emulator-part-2-feasibilitygpu/ Feasibility: GPU]
 
*[http://www.noxa.org/blog/2011/02/28/building-an-xbox-360-emulator-part-3-feasibilityos/ Feasibility: OS]
 
*[http://www.noxa.org/blog/2011/08/11/building-an-xbox-360-emulator-part-4-tools-and-information/ Tools and Information]
 
*[http://www.noxa.org/blog/2011/08/13/building-an-xbox-360-emulator-part-5-xex-files/ XEX Executables]
 
*[http://www.noxa.org/blog/2011/08/21/building-an-xbox-360-emulator-part-6-code-translation-techniques/ Code Translation Techniques]
 
*[http://hitmen.c02.at/html/xbox360_releases.html Some info about the 360]
 
  
 
==See Also==
 
==See Also==
*[http://web.archive.org/web/20110928113820/http://www.xbox365.com/stories/xdkcomplete.shtml XBox documentation]
+
* [https://github.com/mborgerson/reactos/wiki ReactOS on Xbox notes by Matt Borgerson]
*http://www.caustik.com/cxbx/progress.htm
+
* [https://github.com/mborgerson/reactos/tree/xbox ReactOS Xbox port fixes by Matt Borgerson]
*[http://www.ngemu.com/forums/forumdisplay.php?f=63 cXBx forum]
+
* [https://github.com/XboxDev/XboxDev XboxDev information page (original Xbox related projects and Discord server by hobbyists)]
*[http://forums.ngemu.com/showpost.php?p=552035&postcount=21 Resources]
+
* [https://xboxdevwiki.net/ XboxDevWiki (original Xbox platform documentation by hobbyists)]
*[http://forums.ngemu.com/showthread.php?t=130457 Some details on loading XBE executables]
+
* [https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/tree/develop/src/core/kernel/exports Emulation of original Xbox kernel functions in Cxbx-Reloaded]
 +
* [https://github.com/xqemu/xqemu/tree/master/hw/xbox Emulation of original Xbox hardware in XQEMU]
 +
* [https://github.com/LukeUsher/Cxbx-Reloaded/blob/nvnet-revisited/src/core/kernel/exports/EmuKrnlPhy.cpp NVNet Phy code for the networking in games]
  
  
 
[[Category:Ideas]]
 
[[Category:Ideas]]

Revision as of 07:43, 9 September 2019

Imbox notice.png

Notice: This page is about FOSS implementation of the gaming kernel based on ReactOS for original Xbox. For the full port of ReactOS desktop operating system see Xbox Port.

ReactOS has an original Xbox port but it can run only Windows applications and lacks ability to run actual original Xbox games.

A new non-Desktop ReactOS kernel target must be created for running Xbox games. It would be specificly meant to run on Xbox hardware, and would have to support Xbox kernel functionality.

Specifically, the XBE loading must be implemented but probably also various other tasks related to memory management and more.

Problems

Xbox OS uses a radically different software architecture from Windows:

  • Xbox Executables (XBE) are used instead of Executable (EXE) files.
  • XBE run in ring 0 and no ring 3 exists. This may require some changes to ReactOS.
  • XBE expect to locate HAL and other kernel API functions in a single statically linked kernel.
  • XBE are also statically linked.
  • XBE access hardware directly, so support can only be provided for ReactOS running on an original Xbox.
  • The kernel uses cryptography and stores keys to encrypt various data (network traffic, saved games, etc.), these keys must be dumped, and key derivation must be recreated.
  • The kernel only provides some critical hardware support (mostly video Encoder and IDE controller).

These changes mean that a custom desktop-less OS variant of ReactOS, specifically for original Xbox, has to be made.

This variant would be equivalent to the original xboxkrnl.exe by Microsoft. It would be binary-compatible with original Xbox games (but incompatible with non-Xbox hardware and Windows applications).

Related projects

XQEMU

XQEMU is an original Xbox emulator that emulates the hardware level, specifically Xbox revision 1.0. XQEMU is targeting computers running Linux, Mac OS X and Windows.

Because it emulates hardware, it requires ROM images (some of which are hard to obtain) to be able to boot.

The code in XQEMU can be used to understand some of the hardware, which will have to be supported by ReactOS.

Additionally, XQEMU could possibly be used to test ReactOS. However, this might not work correctly, as XQEMU only supports hardware access methods as used by Microsoft's original kernel. Some legacy devices or device access methods might not be supported (PIO vs. DMA, for example).

Cxbx-Reloaded

Cxbx-Reloaded is an original Xbox emulator that emulates the kernel level. It also hooks into the game code (by using a pattern-search) to avoid direct hardware access.

As Cxbx-Reloaded is targeting computers running Windows, most of the kernel re-implementation are simple adapters to Windows functions; however, the implemented variants are confirmed to work with some original Xbox games.

Other kernel functionality is implicitly documented in code and might be useful (such as key derivation on XBE load).

Since Cxbx-Reloaded uses very specific hardware emulation ways, it can't be used to emulate a virtual Xbox for testing ReactOS.

Related articles

See Also