News for hackers. Stuff that matters.
Re:Xemu: Original Xbox Emulator by bdcravens on Sunday April 07, 2024 @01:38PM (#39962324)
The original Xbox was essentially a PC of the time running a heavily customized version of Windows. Does this emulate that kernel without using any Microsoft code?
Re:Xemu: Original Xbox Emulator by iforgotpassword on Sunday April 07, 2024 @01:52PM (#39962403)
I think most people familiar with the original Xbox hw (like people working on xemu :)) take offense when you say it's just a PC. It's PC hardware, but nothing much is shared with the "IBM PC" architecture-wise. Even the software side is very different. It's not running a customized version of Windows, but the Windows kernel. One stripped down to 256kb, including the boot up animation and sound. That design for example required that a lot of things get linked into a game's executable, like network drivers and the entire TCP/IP stack.

If it were that easy, we'd have had a wine pendant for Xbox binaries 20 years ago. Cxbx is pretty much the wine approach to Xbox emulation and it's far from perfect.

Re:Xemu: Original Xbox Emulator by anthk on Sunday April 07, 2024 @02:39PM (#39962755)
Linux would ran on that with ease. And, yes, Wine ran, but just Win32 PE binaries, not XBE ones.

OFC it was an "IBM PC". Some people could run ReactOS on it.

Re:Xemu: Original Xbox Emulator by Dwedit on Sunday April 07, 2024 @11:51PM (#39966055)
> nothing much is shared with the "IBM PC" architecture-wise

Gate A20 begs to differ.

Re:Xemu: Original Xbox Emulator by fps_doug on Monday April 08, 2024 @03:27AM (#39967112)
It's built into the CPU, what did you expect them to do, burn it with a laser?

.... well in hindsight that might've been a smart thing to do :o)

Re:Xemu: Original Xbox Emulator by Dwedit on Monday April 08, 2024 @03:38AM (#39967183)
Gate A20 famously was responsible for the original XBOX getting hacked. It redirected execution from the special hidden ROM into ordinary flash ROM, bypassing all security.
Re:Xemu: Original Xbox Emulator by bri3d on Sunday April 07, 2024 @02:05PM (#39962492)
There are two major original Xbox emulators - cxbx/cxbx-reloaded, which originally tried to do both LLE and HLE but these days does exclusively high-level emulation like you are describing, and xemu (this one), which does mostly low-level emulation.

So no, in this case Xemu runs the original Xbox kernel. This is why it's more compatible and generally much more robust than cxbx in terms of game support.

There are a lot of challenges with doing HLE for Xbox. While there is a kernel, its HAL is very low-level. Games are statically linked against the entire stack of DLLs that you'd usually find in Windows (the Xbox SDK), and depending on when they were released, can have one of about a gazillion versions of the Xbox SDK in them. So doing HLE is a matter of finding and hooking an enormous number of SDK functions, but also keeping up with the plethora of minor changes which were made constantly through the life of the console. Emulating the kernel doesn't get you very far, because it still provides low-level interfaces to (for example) manipulating GPU state, so you end up having to implement the GPU hardware in LLE anyway.

Re:Xemu: Original Xbox Emulator by jsheard on Sunday April 07, 2024 @01:45PM (#39962356)
Per the documentation you have to provide dumps of the original Xbox bootroms, and it can optionally use a HDD image taken from a real Xbox, but the latter isn't required because they provide a basic cleanroom reimplementation of the dashboard you can use instead.

https://xemu.app/docs/required-files/

The CPU in the Xbox was literally an off-the-shelf Intel processor (some crazy people even soldered in faster CPUs that were never meant for the Xbox) but as I understand it the GPU is weird, and that's where most of the difficulty with emulation comes from. It's a unique mashup of GeForce 2 and GeForce 3 IP that was never used anywhere else, so the existing efforts to reverse engineer GF2 and GF3 for Linux drivers were of limited use.

Re:Xemu: Original Xbox Emulator by IntelMiner on Sunday April 07, 2024 @02:07PM (#39962506)
This is a myth that is incorrect. The original Xbox's BIOS bares little to no resemblance to Windows 2000 (its closest contemporary) and runs from a 1MB flash chip at most. Games run Bare Metal on the system
Re:Xemu: Original Xbox Emulator by flohofwoe on Sunday April 07, 2024 @01:42PM (#39962336)
If I remember right, most of the "operating system" was linked statically into the game images (AFAIK at least the DirectX libs, not sure about any low level "firmware" stuff). I'm pretty sure there was no concept of "hardware drivers" though.
Re:Xemu: Original Xbox Emulator by skinatro on Sunday April 07, 2024 @01:56PM (#39962426)
The original xbox actually had a real os based on the windows 2000[1] unlike it's competitors like the PSX

[1]-https://www.theverge.com/2020/5/21/21265995/xbox-source-code...

Re:Xemu: Original Xbox Emulator by dagmx on Sunday April 07, 2024 @02:53PM (#39962846)
The original XBox didn’t compete against the PSX. It was one generation later competing with the PS2, DreamCast and GameCube
Re:Xemu: Original Xbox Emulator by Narishma on Sunday April 07, 2024 @03:23PM (#39963075)
The Dreamcast was discontinued just as the Xbox was preparing to launch, so they didn't really compete.
Re:Xemu: Original Xbox Emulator by accrual on Sunday April 07, 2024 @02:12PM (#39962535)
The Xbox hardware was also quite advanced for its release date (2001). Many PCs at the time still had 100MHz FSB but the Xbox ran at 133MHz. The Xbox also had DDR RAM, not much of it (64MB), but DDR wouldn't be commonplace until the Pentium 4 and Athlon XP platforms a couple years later. Most PCs were still running regular single-channel SDRAM.

I've built a near-period correct PC with a later and faster CPU (Tualatin at 1.0GHz vs Xbox's Coppermine at 700MHz), more RAM (512MB), faster GPU (GF4 Ti4400), but it still can't achieve the raw memory and GPU bandwidth the Xbox had.

Re:Xemu: Original Xbox Emulator by jsheard on Sunday April 07, 2024 @02:15PM (#39962564)
The fun thing about the RAM was that although the retail units only had 64MB, they shared the motherboard design with the devkits which had 128MB, and if you sourced a second set of RAM chips you could fully populate the board and build a 128MB retail unit. That was useful for some homebrew, and also made it possible to play games built for the Sega Chihiro arcade platform, which used the Xbox architecture but had the full 128MB of RAM installed and allowed games to use all of it.

If you were brave enough to replace a BGA chip you could upgrade the CPU as well, the stock one was an off-the-shelf 733mhz Pentium which happened to have a 1.4ghz counterpart, and surprisingly swapping the CPU out for the faster one mostly just worked. The faster chips were electrically compatible, but Intel only packaged those as socketed desktop parts, so people designed these wacky interposer boards to re-route the pins to the correct places on the Xboxes BGA footprint.

https://i.imgur.com/nvJdKfM.jpeg

Re:Xemu: Original Xbox Emulator by jwells89 on Sunday April 07, 2024 @04:05PM (#39963411)
I love hackery like this that pushes hardware capabilities to their limits. It’s kinda like extreme overclocking, except somehow both more crazy and usually more likely to have an end result that’s practical for day to day usage.
Re:Xemu: Original Xbox Emulator by skinatro on Sunday April 07, 2024 @01:47PM (#39962368)
If I am not wrong this is a LLE (low level emulator) rather than a hle so it should emulate the hardware rather than the kernel. So you need the dump of the microsoft's xbox kernel for it to work