Skip to content

Xbox platform files rebuilt from the 5960 binary - #94

Merged
MrMilenko merged 13 commits into
mainfrom
prov-xbox-platform
Nov 19, 2026
Merged

MrMilenko merged 13 commits into
mainfrom
prov-xbox-platform

Conversation

@MrMilenko

Copy link
Copy Markdown
Owner

The Xbox side's platform code, rebuilt from the 5960 retail dashboard: the CD-ROM service, DirectSound setup, the DiscDrive, Config, MemoryMonitor and Joystick nodes, and the app shell in xbox/main.cpp. Each rebuilt function carries the binary address it came from, with write-ups in docs/decomp (AppShell, Config, Disc, Input, MemoryMonitor, NtIoSvc). Theseus's own additions (DiscManager, SMBus, LEDs, fans, temps, modchip, encoder, network, skins, widgets, panic screen) are kept as they were.

Checked old against new on the logic that can run off console: 20,000 disc TOCs, 30,000 EEPROM states across 60 Config functions, 400 drives through 60 tray steps, 300 random memory unit runs, 200 joystick runs and 3,000 frames of the app shell, all identical. Xbox retail and debug compile clean, desktop builds and runs clean.

Fixes that came out of comparing with 5960, each in its own commit and each needing a console test:

  • The Memory pane read the hard drive as 0 blocks.
  • Fast IR remote presses of different keys counted as repeats.
  • GetLaunchReason knows 5960's reasons 12 to 19.
  • Disc detection re-reads the tray before calling a disc bad.
  • GetEthernetLinkStatus said linked with no cable.
  • Config.ini's 480p and 720p modes only apply on an HDTV or VGA pack, like 5960. Likely related to Xbox: black screen on boot #87.

Wrote Open, Close, the table of contents, raw reads and the track lengths fresh from 0x64da0..0x650c0 and documented them. The disc id and name slots stay as Theseus's own. Track lists, lengths, disc ids and read retries match the old code on 20,000 made up tables of contents.
DirectSound init and buffer creation are written fresh from 0x62750 and 0x626b0; the singleton, cleanup and lock helpers are Theseus's. The debug build's trace and error helpers have no retail counterpart, so I wrote a smaller set from scratch and dropped the unused hex dump and class list. Both build for Xbox retail and debug; needs a console test.
The node, its tray polling and GetDiscType are written fresh from 0x39d70..0x3a2b0. DiscManager, the tray buttons and the Discord launch stay as they were. Events, disc types and track times match the old code over 400 drives and 24,000 scripted tray changes.
Language, video, audio, time zone, ratings, pass codes, launch data and the misc flags are written fresh from 0x3a430..0x3b9e0. The modchip, SMBus, power, skin and network functions stay Theseus's. Every rebuilt function matches the old code over 30,000 randomized EEPROM states, plus 108 font file cases.
Mounting, removal, selection paths, block counts, naming and formatting are written fresh from 0x4be70..0x4cd10; I checked the path table against the binary's. Events and selection match the old code over 300 runs of 200 random plug, unplug and select steps.
Binding, properties, device handling, the remote code table, event rules and the secret key are written fresh from 0x40620..0x41800. Per port handling, LastActivePort and the overlay hooks stay Theseus's. All 19,708 events match the old code over 200 runs of 600 random pad, remote and property steps.
Launch data, the startup render states, Draw, Advance, cleanup, the memory unit format and the startup file are written fresh from 0x2c520..0x2dd20. Boot timing, Config.ini video modes, skins, widgets and the panic screen stay Theseus's. Draw makes the same 124,612 calls as before over 3,000 random frames.
A bounds check added in the hardening pass rejected Dev0, the hard drive, before its C: branch could run, so its totals and the ratio always came back 0. It now allows Dev0, like 5960 does. Needs a console test.
The remote stored the new packet before comparing key codes, so a different key pressed within 120 ms looked like a held key and could be swallowed. It now compares first, the way 5960 does at 0x41040. Needs a console test with a remote.
5960 names reasons 12 to 19 (FromOnlineDash, Friends, VoiceChat, Messages, AccountManagement, NewAccount, AccountRecovery and NetworkSettings, all Internal); Theseus only knew the older 6, 7 and 9, which stay. Needs a console test with a title that sends one.
5960's GetDiscType reads the tray again when none of the marker files turned up, and calls it no disc if the tray settled meanwhile instead of a bad disc. Theseus skipped that second look. Needs a console test.
It returned whether XNet had an address lookup going, which is 1 with no cable plugged in. 5960 asks XNetGetEthernetLinkStatus for the link bit, so it does too now. Needs a console test with and without a cable.
A console with Use Progressive or Use 720p set booted into a progressive mode even on a composite or S-Video cable, which those can't show: a black screen. Those packs now get the normal interlaced mode, as 5960 does. Might be issue 87. Needs a console test on a standard AV cable.
@MrMilenko
MrMilenko merged commit f07b9d6 into main Nov 19, 2026
5 checks passed
@MrMilenko
MrMilenko deleted the prov-xbox-platform branch November 19, 2026 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant