Commit graph

118 commits

Author SHA1 Message Date
MiTHRAL
6db6674892 netcode-revival: fix the EA-connect gate - XNetGetConnectStatus returns 2
Some checks are pending
Lint & Format Check / Format Check (push) Waiting to run
The party state machine (sub_82A1B310 state 5) reads the RETURN VALUE of
XNetGetConnectStatus and only advances to 'EA connected' (party[423]=1, which
unlocks session advertise/join) when it equals 2. rexglue returned 0, so the
game stalled on 'Cannot Connect to EA Servers' forever despite the pointer
write. Also:

- XNetDnsLookup now actually resolves hostnames (getaddrinfo) into XNDNS
  (status=0, cina, aina[0..]) instead of always erroring - the EA resolver
  (sub_8298A460) busy-waits on it.
- XNetServerToInAddr ABI fixed: the game calls (caller, server_id,
  service_id, out), not (caller, XNADDR*, out, flags); returns the virtual
  IP (the party flow fakes EA connectivity via Connect/GetConnectStatus).
2026-08-28 22:23:34 -04:00
MiTHRAL
3016f14fe8 netcode-revival: fix the live-flag address + force the live-user cache flags
Some checks are pending
Lint & Format Check / Format Check (push) Waiting to run
The live-flag address was wrong: sub_8263E788's lis r11,-32003 gives
r11 = -2097348608 = 0x82FD0000 (recompiler value + 2^32), so the flag is at
0x82FC8851, not 0x83028851 (an arithmetic slip mis-multiplied 0x82FD0000).
We were forcing/reading an unrelated mapped byte, so the gate never saw the
forced value. Also force the game's cached 'live user exists' flags the
frontend online-access controllers check: 0x8308396C (14700) and 0x83084690
(18064).
2026-08-28 22:08:51 -04:00
MiTHRAL
aa8cda81a8 netcode-revival: report unk08=1 (Live indicator) in XamUserGetSigninInfo
Some checks are pending
Lint & Format Check / Format Check (push) Waiting to run
The 'enter online flow' gate (sub_82703960) requires XamUserGetSigninInfo(
liveFlag).unk08 == 1 or it shows 'please login with Xbox Live'. Set unk08 to
1 when the profile is Live signed-in.
2026-08-28 22:03:44 -04:00
MiTHRAL
7b9d706f79 netcode-revival: expose gate-status diagnostics for the Party Play frontend gate
Some checks are pending
Lint & Format Check / Format Check (push) Waiting to run
2026-08-28 21:37:37 -04:00
MiTHRAL
e09f224a6b netcode-revival: answer Xam user shims for every slot + live flag = user 0
Some checks are pending
Lint & Format Check / Format Check (push) Waiting to run
The game's 'Party Play' gate treats its internal live flag (0x83028851) as a
USER INDEX, then checks XamUserGetSigninState(idx) and XamUserGetSigninInfo
(idx). rexglue only answered user 0, so the predicate failed and the option
stayed greyed out (no rexglue API is even reached on click). Now:

- XamUserGetSigninState/GetSigninInfo/GetXUID/GetName/GetGamerTag/
  GetMembershipTier accept any slot < 4 and return the single profile
  (signed-in, live, Gold).
- ForceLiveFlag writes 0 (the profile's real slot) instead of 1, since the
  flag is a user index; slot 0 is safe for every index-into-live-array read.
2026-08-28 14:52:17 -04:00
MiTHRAL
73d8f36af2 netcode-revival: XNetTransport::ForceLiveFlag - force the game's live-user static
Some checks are pending
Lint & Format Check / Format Check (push) Waiting to run
Writes the title's internal 'live user' flag byte (0x83028851, derived from
sub_8263E788's lis -32003 / lbz -30639 = recompiler value -2097348608 ->
0x83030000 - 0x77AF) to 1 so the frontend stops refusing Xbox Live features
before it ever calls a rexglue API. Logs the first force.
2026-08-28 14:32:13 -04:00
MiTHRAL
51b8ce5ed2 netcode-revival: trace XNetStartup (earliest online-path call)
Some checks are pending
Lint & Format Check / Format Check (push) Waiting to run
2026-08-28 14:25:39 -04:00
MiTHRAL
7b6322b317 netcode-revival: trace the online-path XNet/Xam calls
Some checks are pending
Lint & Format Check / Format Check (push) Waiting to run
Adds an 'xnet trace' log to the online-path functions (XNetGetTitleXnAddr,
XNetGetEthernetLinkStatus, QosListen/QosLookup, CreateKey, Connect,
GetConnectStatus, XamUserGetSigninState/Info, XamShowSigninUI, privilege)
gated on the xnet_trace cvar (default on during bring-up, rate-limited for
the polling signin-state calls). Running the game and clicking the online
flow now shows exactly which gate the party/EA path hits, so we can fix the
real check instead of guessing at the reverse-engineered globals.
2026-08-28 14:20:58 -04:00
MiTHRAL
9e300e14bc netcode-revival: report online title address + active link
Some checks are pending
Lint & Format Check / Format Check (push) Waiting to run
The game's party state machine (57.cpp sub_82A1B310 state 1) freezes on
'connecting to EA Nation' because it gates on (XNetGetTitleXnAddr status &
0x60) == online AND XNetGetEthernetLinkStatus() != 0 to pick the online EA
server. rexglue returned STATIC (1) + link 0, so the state machine never
advanced. Now:

- XNetGetTitleXnAddr returns status 0x60 (the game's online bits; it checks
  (status & 0x60) in the EA resolver and session join) and populates
  inaOnline with the virtual IP.
- XNetGetEthernetLinkStatus returns active+100Mbps.

With the ONLINE status the party machine proceeds to CreateKey/RegisterKey,
the sign-in gate, XNetConnect and the session-ready state.
2026-08-28 14:13:10 -04:00
MiTHRAL
6fcc96de18 netcode-revival: fix SetRelay deadlock + grant multiplayer privileges
Some checks are pending
Lint & Format Check / Format Check (push) Waiting to run
- Deadlock: SetRelay held the transport mutex while join()ing the receive
  thread, which needs the mutex to observe running_ and exit. With the 200ms
  recv timeout the thread woke and hit the lock -> a room/server change froze
  the game (every room keystroke reconnects the transport). StopThread now
  detaches the thread under the lock and joins WITHOUT it.
- XamUserCheckPrivilege denied everything, which is the gate the game's
  'create a party' flow checks (multiplayer sessions); grant requested
  privileges so the P2P session flow opens, and log the mask.
2026-08-28 13:52:20 -04:00
MiTHRAL
3229aa3632 netcode-revival: report LIVE sign-in by default
Some checks are pending
Lint & Format Check / Format Check (push) Waiting to run
The game gates its online/team flow on XamUserGetSigninState == 2 ('make a
team', 'connect to EA Nation' refused with error 1245 otherwise). rexglue
only returned 2 when user_live_signed_in was set, which defaulted to false,
so the game never opened its P2P session/invite flow. Default the cvar to
true so the netcode revival can reach the session code.
2026-08-28 13:38:11 -04:00
MiTHRAL
3ec27d115b netcode-revival: receive timeout on the relay transport socket
Some checks are pending
Lint & Format Check / Format Check (push) Waiting to run
The Run thread blocked in recvfrom with no SO_RCVTIMEO, so when there was no
inbound game traffic the 4s heartbeat never fired (the relay swept the
silent transport client after ~8s) AND StopLocked()'s join() deadlocked
SetRelay on a room change (hanging the ghost network loop). A 200ms receive
timeout wakes the loop regularly: the heartbeat keeps the transport alive
and shutdown/room-change joins complete promptly.
2026-08-28 13:28:58 -04:00
MiTHRAL
01fe706c13 netcode-revival: pack the relay wire structs + heartbeat + transport logging
- #pragma pack(push,1) on the wire structs (the relay's proto is packed; the
  transport's were not, which would inflate sizes and corrupt every datagram)
  plus static_asserts pinning sizes to 7/31/1410/25/801.
- Heartbeat re-JOIN every 4s so the relay never times the transport out.
- REXLOG info for connect/join/session-reply so the flow is observable.
2026-08-28 02:14:19 -04:00
MiTHRAL
bf3635d7ad netcode-revival: relay transport for the game's netcode (Phase 1b)
Some checks are pending
Lint & Format Check / Format Check (push) Waiting to run
Route the game's own RakNet UDP through the ghost relay so real internet
peers can play, with the server as a pure relay/NAT stabilizer:

- XNetTransport: a rexglue relay client (joins the same relay + room as the
  ghost client), a receive thread, and:
  - SendGame(): wraps a datagram addressed to a virtual 10.80.0.x peer in a
    relay Game payload and sends it OUTBOUND to the relay (no inbound
    reachability / port forwarding needed).
  - QuerySessions()/Sessions(): discovery - the room members that
    XNetQosLookup reports to the game's session search.
  - Receive injection: relayed Game payloads are pushed into the game's
    registered sockets via XSocket::QueuePacket.
- XSocket: SendTo() to a virtual address routes through the transport;
  RecvFrom() drains queued relayed packets first; sockets register with the
  transport on Initialize.
- XNetQosLookup: queries the relay and returns the room's members as
  discovered sessions (with their virtual addresses), signaling completion.
- XNetGetTitleXnAddr identity now shares one source of truth with the
  transport (same 10.80.0.x).

Wire structs are minimal copies of the game's ghost protocol (kept
dependency-free); the relay's version check refuses mismatches.
2026-08-28 02:11:24 -04:00
MiTHRAL
767bd6e4bc netcode-revival: implement XNet session/address layer (Phase 0)
Some checks are pending
Lint & Format Check / Format Check (push) Waiting to run
Make the game's RakNet-based netcode reach the session flow instead of
hard-failing on stubbed/looping XNet APIs:

- XNetGetTitleXnAddr: stable per-machine virtual identity (10.80.0.x +
  unique 6-byte abEnet from the profile XUID) - RakNet needs non-zero,
  per-machine MAC bytes for its GUID (zero broke RakPeer::Startup; identical
  MACs collide GUIDs).
- XNetXnAddrToInAddr / XNetInAddrToXnAddr / XNetServerToInAddr /
  XNetXnAddrToMachineId / XNetInAddrToString: resolve our virtual addresses
  instead of returning failure / '666.666.666.666'.
- XNetQosListen: accept session advertisement (was X_ERROR_FUNCTION_FAILED).
- XNetQosLookup: return success + empty XNQOS + signal completion (Phase 1
  wires the relay registry so it returns real sessions).
- XNetCreateKey/RegisterKey/UnregisterKey: generate/accept session keys.
- XNetConnect / XNetGetConnectStatus: report established.
- getsockopt: real basic reads (SO_* / TCP_NODELAY) off the native socket.
- XNetSetSystemLinkPort: accept.

Phase 1 (relay transport + session registry) builds on this.
2026-08-28 01:54:51 -04:00
MiTHRAL
395e1ce67d netcode-revival foundation: fix cvar registry teardown SIOF + imgui RasterizerGamma
Some checks are pending
Lint & Format Check / Format Check (push) Waiting to run
- cvar.cpp: the static FlagRegistrar destructors run during __cxa_finalize
  and touch the registry after its function-local statics are destroyed
  (static destruction-order fiasco) - the codegen tool segfaults at exit.
  Leak the registry/mutex/index so teardown order cannot bite.
- imgui_drawer.cpp: drop ImFontConfig::RasterizerGamma assignments (removed
  from imgui); keeps the build working with the modern imgui a fresh
  submodule checkout provides (the pinned imgui commit no longer exists).
2026-08-28 01:48:05 -04:00
mchughalex
7eb0faf778 ui: guarantee progress when shrinking a wizard info row value
Some checks failed
Lint & Format Check / Format Check (push) Has been cancelled
2026-07-24 20:47:39 +01:00
mchughalex
8ea87c6d4b ui: log the build title at startup 2026-07-24 19:54:03 +01:00
mchughalex
3b0328da62 core: never create executable host memory for guest pages 2026-07-24 19:40:35 +01:00
mchughalex
5aa8c4c727 system: embed a version resource in the windows runtime library 2026-07-24 19:40:35 +01:00
mchughalex
593f8774f6 vulkan: allow non-bit-exact render target transfers behind an opt-in cvar 2026-07-24 19:39:33 +01:00
mchughalex
9100b278b7 ui: measure guest FPS as frame intervals per second 2026-07-24 13:33:44 +01:00
mchughalex
ae6ea8e925 ui: scale the auto frame cap margin with the display refresh rate 2026-07-24 13:33:44 +01:00
mchughalex
79761cbdd5 ui: log guest present cadence statistics behind a debug cvar 2026-07-22 19:50:53 +01:00
mchughalex
134a1c8f5e graphics: include cstddef for size_t in native_rhi.h 2026-07-22 12:59:38 +01:00
mchughalex
41dd2d5cb4 d3d12: batch submissions to frame end while native output suppresses emulated draws 2026-07-21 13:24:29 +01:00
mchughalex
17caf72bdd graphics: attribute native-pass GPU time to per-stage profile buckets 2026-07-21 12:31:10 +01:00
mchughalex
95d2792585 ui: keep the plain ambient-occlusion and anti-aliasing labels 2026-07-21 12:06:19 +01:00
mchughalex
a3032e0e13 ui: technique-first labels for PCSS shadows, GTAO, MSAA, V-Sync and VRR 2026-07-21 12:05:12 +01:00
mchughalex
9cb923735e ui: name the PCSS technique and its cost in the soft-shadows description 2026-07-21 12:02:40 +01:00
mchughalex
f8da2d0900 core: block instead of yield-spinning in the timer queue dispatch thread 2026-07-21 11:35:49 +01:00
mchughalex
3e842e62a6 system: resolve user-facing paths against the app root so a macOS bundle keeps them beside the .app 2026-07-21 11:01:12 +01:00
mchughalex
705b78f53e system: flush logs and _Exit on quit for macOS and Linux instead of tearing down under live guest threads 2026-07-21 10:33:27 +01:00
mchughalex
f3089c790f d3d12: log the process VRAM usage and budget from the native RHI 2026-07-21 10:21:32 +01:00
mchughalex
f7d808a426 vulkan: use 64 MB VMA blocks so evicted cache memory returns to the OS 2026-07-21 10:21:32 +01:00
mchughalex
7cfe51d80d input: reconcile mouse-button binds released outside the window 2026-07-21 10:10:56 +01:00
mchughalex
8b50844a34 ui: controller input backend row in the settings menu 2026-07-21 10:10:56 +01:00
mchughalex
fb392e48f6 gpu: apply the half-pixel offset in host pixels under resolution scaling to fix resolve-boundary seams 2026-07-21 10:10:56 +01:00
mchughalex
f00a126494 system: keep the process heap lock unowned across close-time guest thread suspension and make the forced-exit watchdog heap-free 2026-07-21 09:14:58 +01:00
mchughalex
4972095c49 vulkan: overflow the native-RHI constant ring into fence-retired regions 2026-07-21 09:04:15 +01:00
mchughalex
540e20ef2a d3d12: release retired native-RHI resources on a dedicated thread 2026-07-21 06:06:18 +01:00
mchughalex
a50f2c8a43 graphics: tighten retirement drain budgets and surface frame-maintenance timing 2026-07-21 05:51:30 +01:00
mchughalex
2a234c6b7c vulkan: default the scaled-resolve texture-load fast paths off 2026-07-21 05:24:35 +01:00
mchughalex
aa0f046ecf graphics: cut native-RHI churn stalls (batched view retirement, bounded drains, buffer bind classes, rebind skip) 2026-07-21 05:24:35 +01:00
mchughalex
7466d3c75e ui: forced-exit watchdog on window close for every platform 2026-07-21 03:31:06 +01:00
mchughalex
1cd0113ff2 graphics: wide guest output for native ultrawide, drop the emulated Hor+ classifier 2026-07-20 00:36:07 +01:00
mchughalex
66c42a571c ui: modifier chord support in the keybind registry 2026-07-20 00:08:07 +01:00
mchughalex
8642f6fe12 build: use a plain ASCII hyphen in the unsupported-architecture message 2026-07-19 23:37:10 +01:00
mchughalex
8130e534bc system: per-content-type root overrides in ContentManager 2026-07-19 23:18:43 +01:00
mchughalex
9181630ece graphics: suppress emulated draws by default while native output is active 2026-07-19 23:00:15 +01:00