pixrt10: initialize the build 19041 title runtime and serve XBTP queries #250

Closed
github-bot wants to merge 18 commits from gh-pr/250/head into gh-pr/250/base
Owner

@⁠bambermf on GitHub · 2026-11-23 07:26 UTC · original
bambermf:port/pix-title-runtime-19041 → main · +668 −20 · 7 files · 18 commits · closed without merging

Library / area — pixrt10 build 19041 title initialization and the in-process device session. This PR incorporates the listener cleanup from #234 and supersedes #241 and #246. The title startup changes are in 3e2831c and 892afc3.

Exports changed — None. Ordinal 2 remains missing while capture and notification behavior is incomplete.

Source of the behaviour — Headless IDA inspection of the build 19041 console DLL. The title entry at RVA 0x19fc0 supplies 15 callbacks. Its helper at 0x1a194 allocates 0x9d0 bytes inside the 0xae8-byte singleton and clears the construction guard on bad_alloc. The constructor at 0x12cd0 starts engine request and notification workers. The notification worker waits on two auto-reset events and a manual-reset shutdown event.

What was wrong

The emulator returned E_NOTIMPL before it could serve any 19041 PIX requests from the title initializer. The worker path for newer builds starts a separate capture-engine thread. The end-capture slot also cleared the capture state and called the title handler after a worker failure on 19041.

Measurements and change

Case Main This branch
19041 title startup using XBTP E_NOTIMPL Two worker handles, 120-byte title table
19041 version request after title startup No worker 84-byte reply over the accepted in-process link
ForceTCP marker with flag bit zero clear E_NOTIMPL E_NOTIMPL, caller table intact, retry succeeds after removing marker
End capture without a worker Clears state, invokes registered handler HRESULT 0x80070006, state 2, handler skipped

The capture-end failure and callback branches were checked by executing the console instructions with controlled worker results. The unsupported TCP path returns an error before worker startup. The test uses the Rust initializer and the real in-process XBTP provider with injected function bindings.

The 19041 worker accepts successive tools after a clean or partial-frame disconnect. Request 1305 returns 208 bytes of build information when enabled. Requests 36 and 1204 return a 68-byte E_FAIL reply with the capture queue disabled. The regression compares their replies and queries the version on the same connection.

Tests

Release builds and the full pixrt and pixrt10 release suites passed. The session test starts with a failed forced-TCP attempt and then retries, checks the title table and the number of workers, and validates both the unknown-command reply and the version reply. Local PR gate passed.

Capture notifications, complete capture commands, and invocation through the DLL ordinal remain pending. Runtime allocation failure handling follows the console exception path from disassembly and has not been fault-injected.

**@⁠bambermf** on GitHub · 2026-11-23 07:26 UTC · [original](https://github.com/omonkeyz/xbox-emulator/pull/250) `bambermf:port/pix-title-runtime-19041` → `main` · +668 −20 · 7 files · 18 commits · closed without merging **Library / area** — pixrt10 build 19041 title initialization and the in-process device session. This PR incorporates the listener cleanup from #234 and supersedes #241 and #246. The title startup changes are in 3e2831c and 892afc3. **Exports changed** — None. Ordinal 2 remains missing while capture and notification behavior is incomplete. **Source of the behaviour** — Headless IDA inspection of the build 19041 console DLL. The title entry at RVA 0x19fc0 supplies 15 callbacks. Its helper at 0x1a194 allocates 0x9d0 bytes inside the 0xae8-byte singleton and clears the construction guard on bad_alloc. The constructor at 0x12cd0 starts engine request and notification workers. The notification worker waits on two auto-reset events and a manual-reset shutdown event. ### What was wrong The emulator returned E_NOTIMPL before it could serve any 19041 PIX requests from the title initializer. The worker path for newer builds starts a separate capture-engine thread. The end-capture slot also cleared the capture state and called the title handler after a worker failure on 19041. ### Measurements and change | Case | Main | This branch | |---|---|---| | 19041 title startup using XBTP | E_NOTIMPL | Two worker handles, 120-byte title table | | 19041 version request after title startup | No worker | 84-byte reply over the accepted in-process link | | ForceTCP marker with flag bit zero clear | E_NOTIMPL | E_NOTIMPL, caller table intact, retry succeeds after removing marker | | End capture without a worker | Clears state, invokes registered handler | HRESULT 0x80070006, state 2, handler skipped | The capture-end failure and callback branches were checked by executing the console instructions with controlled worker results. The unsupported TCP path returns an error before worker startup. The test uses the Rust initializer and the real in-process XBTP provider with injected function bindings. The 19041 worker accepts successive tools after a clean or partial-frame disconnect. Request 1305 returns 208 bytes of build information when enabled. Requests 36 and 1204 return a 68-byte E_FAIL reply with the capture queue disabled. The regression compares their replies and queries the version on the same connection. ### Tests Release builds and the full pixrt and pixrt10 release suites passed. The session test starts with a failed forced-TCP attempt and then retries, checks the title table and the number of workers, and validates both the unknown-command reply and the version reply. Local PR gate passed. Capture notifications, complete capture commands, and invocation through the DLL ordinal remain pending. Runtime allocation failure handling follows the console exception path from disassembly and has not been fault-injected.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:15:51 +00:00
github-bot closed this pull request 2026-11-26 06:15:51 +00:00
Author
Owner

@⁠omonkeyz on GitHub · 2026-11-23 07:29 UTC · original

Thanks, this is careful work. Everything new stays behind the 19041 build check and opens no sockets. #250 already contains the commits of #241 and #246, so could you close those two in favour of this one? That gives us a single unit to review and test. It's planned for a later release batch than the one being frozen now, because it's the largest PIX change so far, and I'll run its tests as soon as the queue allows.

**@⁠omonkeyz** on GitHub · 2026-11-23 07:29 UTC · [original](https://github.com/omonkeyz/xbox-emulator/pull/250#issuecomment-7094383872) Thanks, this is careful work. Everything new stays behind the 19041 build check and opens no sockets. #250 already contains the commits of #241 and #246, so could you close those two in favour of this one? That gives us a single unit to review and test. It's planned for a later release batch than the one being frozen now, because it's the largest PIX change so far, and I'll run its tests as soon as the queue allows.
Author
Owner

@⁠omonkeyz on GitHub · 2026-11-23 13:45 UTC · original

Applied locally on main with your authorship kept (cherry-picked, 8b16440); tests pass in a sandbox. It ships in the next release; this PR will be closed when that is pushed. Thanks.

**@⁠omonkeyz** on GitHub · 2026-11-23 13:45 UTC · [original](https://github.com/omonkeyz/xbox-emulator/pull/250#issuecomment-7102982835) Applied locally on main with your authorship kept (cherry-picked, 8b16440); tests pass in a sandbox. It ships in the next release; this PR will be closed when that is pushed. Thanks.
Author
Owner

@⁠omonkeyz on GitHub · 2026-11-25 13:09 UTC · original

Applied on main in 8b16440 (cherry-picked onto the current history with your authorship kept; comment lines stripped per CONTRIBUTING). Thank you.

**@⁠omonkeyz** on GitHub · 2026-11-25 13:09 UTC · [original](https://github.com/omonkeyz/xbox-emulator/pull/250#issuecomment-7163369746) Applied on main in 8b16440 (cherry-picked onto the current history with your authorship kept; comment lines stripped per CONTRIBUTING). Thank you.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.