xexkit wiki
xexkit builds native Xbox 360 titles (default.xex) with GCC and no Microsoft XDK, for RGH/JTAG consoles running Aurora or FSD. These pages hold what we found out while porting FAKE-08 (a PICO-8 emulator) to the console. Most of it isn't written down anywhere else, so each page says what was seen on the console and why the runtime does what it does.
Pages
| Page | About |
|---|---|
| Getting started | Build the tools, build a title, run it on the console |
| Toolchain and ABI | GCC flags, the console calling convention, the link script, the stack, C++ start-up |
| Video | Getting a picture on screen at all, then sharp at 1080p: the LUT, the 0x60EC commit, the scaler, tiling, fast blits |
| The Guide | Making the Xbox button's Guide show over a title, and ending safely |
| Audio | The kernel's render driver, the frame format, latency |
| Input | Controllers through XAM |
| Files and storage | Paths, devices, the FAT32 USB listing bug, deleting files |
| Time | The 49.875 MHz time base, sleeping, frame pacing |
| Crashes and debugging | crash.txt, addr2line, logging, diagnosing on hardware |
| Xenia vs. hardware | What Xenia Canary does differently |
| Pitfalls | Mistakes that cost us hours: stale copies, FTP, Docker, screenshot plugins |
| Porting guide | Porting a program, with FAKE-08 as the worked example |
| Sources | Where the knowledge comes from |
The short version
- A title's surface only reaches the screen once the **display LUT is
filled and the surface is committed through 0x60EC**, as XAM does it. VdSwap alone, VdSetDisplayMode and VdTurnDisplayOn do nothing for it.
- For a sharp picture, make the front buffers the output's size and turn
the scaler off. The kernel's 640x480 surface is stretched and blurred.
- Swap every frame with VdSwap and show XAM's surface when VdSwap hands it
back. Otherwise the Guide never appears.
- The time base runs at 49.875 MHz, not the 50 MHz the kernel reports.
- Clear the buffer before every
NtQueryDirectoryFile. A FAT32 USBstick's driver doesn't write
NextEntryOffset. - Functions the kernel calls back (audio, exceptions) must keep r14-r31
whole in 64 bits.
- Never let a title end by itself while the Guide is open. The console
hangs.