# 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](Getting-Started.md) | Build the tools, build a title, run it on the console | | [Toolchain and ABI](Toolchain-and-ABI.md) | GCC flags, the console calling convention, the link script, the stack, C++ start-up | | [Video](Video.md) | Getting a picture on screen at all, then sharp at 1080p: the LUT, the 0x60EC commit, the scaler, tiling, fast blits | | [The Guide](The-Guide.md) | Making the Xbox button's Guide show over a title, and ending safely | | [Audio](Audio.md) | The kernel's render driver, the frame format, latency | | [Input](Input.md) | Controllers through XAM | | [Files and storage](Files-and-Storage.md) | Paths, devices, the FAT32 USB listing bug, deleting files | | [Time](Time.md) | The 49.875 MHz time base, sleeping, frame pacing | | [Crashes and debugging](Crashes-and-Debugging.md) | `crash.txt`, addr2line, logging, diagnosing on hardware | | [Xenia vs. hardware](Xenia-vs-Hardware.md) | What Xenia Canary does differently | | [Pitfalls](Pitfalls.md) | Mistakes that cost us hours: stale copies, FTP, Docker, screenshot plugins | | [Porting guide](Porting-Guide.md) | Porting a program, with FAKE-08 as the worked example | | [Sources](Sources.md) | Where the knowledge comes from | ## The short version 1. 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. 2. 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. 3. **Swap every frame with VdSwap** and show XAM's surface when VdSwap hands it back. Otherwise the Guide never appears. 4. The **time base runs at 49.875 MHz**, not the 50 MHz the kernel reports. 5. **Clear the buffer before every `NtQueryDirectoryFile`.** A FAT32 USB stick's driver doesn't write `NextEntryOffset`. 6. Functions the **kernel calls back** (audio, exceptions) must keep r14-r31 whole in 64 bits. 7. **Never let a title end by itself while the Guide is open.** The console hangs.