Skip to content

docs: Rust review methodology (FFI, config, tests, AI agents) - #32

Merged
ivall merged 3 commits into
xcl-dev:mainfrom
Krigsexe:harden/networking-unsafe-config
Nov 22, 2026
Merged

ivall merged 3 commits into
xcl-dev:mainfrom
Krigsexe:harden/networking-unsafe-config

Conversation

@Krigsexe

Copy link
Copy Markdown
Contributor

This PR only adds docs/xnetworking-rust-review.md: a working method for rigorous Rust, using XNetworking as the worked example. No code was changed, and no Windows build or tests were run. Feel free to edit, shorten or close it.

This is a small, one-off contribution from a systems engineer, father and gamer... ;)

Added a note about the review being a one-off contribution and included additional context on the project direction.
Expanded the review of XNetworking Rust implementation, emphasizing the importance of zero-initialization, proper handling of struct padding, and clear documentation for future changes. Added guidelines for working with AI agents and independent review processes before pull requests.
@ivall
ivall merged commit 54df001 into xcl-dev:main Nov 22, 2026
@ivall

ivall commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

Merged, thanks. The doc changes no code. I noted its two concrete points for a follow-up: default_security_info_bytes copies the struct's padding, and the offsets in extract_chain_certs should be checked against wincrypt.h.

ivall added a commit that referenced this pull request Nov 22, 2026
…ist layouts

Unicorn Overlord runs on a newer console D3D12 runtime from its own game OS.
It reports the same SDK version (0x20004) as XDefiant and Minecraft, but some
vtables are laid out differently:

- Command queue: there are two more methods before Signal. Signal is at #16,
  Wait #17, GetTimestampFrequency #18, SignalX #25 and PresentX #32. The
  title's Signal used to land on GetTimestampFrequency, which wrote 100 MHz
  over the fence's vtable, and the game crashed. queue_dispatch now handles
  the title's queue slots from #14. A fence passed to #16 or #17 marks the
  newer layout; the older layout never passes one there.
- Command list: the console methods from CopyTextureRegionX onward sit two
  slots later (#85 instead of #83). The texture uploads used to hit
  SetPredicationBufferX, so every texture stayed zero and the screen showed
  only shapes and gradients. guard::make_layout_split now picks the method
  at each call and leaves the argument registers, xmm ones included,
  untouched.

Also:
- Console-only resource state bits (0x100000 on the 4K display target) are
  masked off when a resource is created. The PC refused the resource and
  the title threw.
- The title commits 2046 of 2048 MB of unified memory at start. XCL's
  per-draw arena now has its own 64 MB pool at the end of window 0, so
  draws are no longer skipped.
- FENCES is a read-write lock. end_title reads it while the title's threads
  are suspended, so a suspended reader no longer blocks it.

Diagnostics:
- XCL_WATCH=rva sets a write watchpoint in the exe; the calling thread is
  armed at once.
- XCL_WATCH_FENCE=n watches the n-th fence.
- The log now shows the device's SDK version, console-only interface
  requests, the title's file opens with their flags, DirectStorage
  requests, unified-memory use, and (in traces) whether title textures hold
  data in memory.

README: Unicorn Overlord is listed as fully playable. Bink's GPU-assisted
mode is no longer listed as missing: it needs no Bink-specific support.
Hull, domain and amplification shaders are dropped from the list too, since
none of the games use them.
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.

2 participants