8000 Replay window: play in a child pcsx2 process by inada-s-ai[bot] · Pull Request #581 · inada-s/pcsx2 · GitHub
[go: up one dir, main page]

Skip to content

Replay window: play in a child pcsx2 process - #581

Merged
inada-s merged 10 commits into
zdxsv-masterfrom
ai/replay-child-579
Nov 13, 2026
Merged

inada-s merged 10 commits into
zdxsv-masterfrom
ai/replay-child-579

Conversation

@inada-s-ai
@inada-s-ai inada-s-ai Bot commented Nov 13, 2026 •
Copy link
Copy Markdown

Description of Changes

Play in the replay window (local, remote, favorites, live) starts a child pcsx2 process (-nogui -zdxsvreplay <pov>:<parent pid>:<source>) instead of shutting down the running game. The child reads the parent's settings; its saves, cache, logs and save states go to <data dir>/replay-child/. In the child, memory cards, DEV9, fast boot/login, replay save/upload, crash reports, achievements, Discord and the update check are off, and no play time is added. It exits at the replay's end, when the replay does not start, when its window closes, or within 1 s of the parent exiting. Only one child runs at a time; Play is refused during a net battle. ZdxsvReplayReturn is removed: the game is never stopped, so there is nothing to return to.

Rationale behind Changes

The player can stay in the lobby while watching a replay or a live battle. Issue: #579

Suggested Testing Steps

  • Run (private rig, windows-mini, ecad3ee and 730db26): CHILD=1 rplay.py on a 2p replay → PASS: replay state hashes 0 differ, the child exits, the instance's files are unchanged. Control: the build without the play time guard FAILs on inis/playtime.dat.
  • Run (private rig, windows-mini, 730db26): lobbychild.py → PASS: a parent logged in to the local lobby keeps its connection and files while a child plays a 2p replay (0 differ, no TCP/UDP) and exits; KILL_PARENT_S=20 → the child exits after the parent is killed. Control INPROC=1 FAILs on inis/PCSX2.ini, inis/playtime.dat.
  • Run (private rig, windows-mini, 730db26): m4z.py solo GGPO battle with SIDE_CHILD → 0 mismatches, 0 rollback frames (same as without a child), child 0 differ.
  • Run (private rig, windows-mini, bea1881): m4z.py 1v1 GGPO battle with SIDE_CHILD on one client, 3 runs → 0 mismatches on both peers, rollback frames 0/0, 1/9, 0/0 (no child: 0/0 over 2 runs), child 0 differ. The rig launches the child itself; the Play button path (which no longer sets a priority) was only built, not run.
  • Run (private rig, windows-mini, 2490367): m4z.py 1v1 GGPO battle with SIDE_CHILD playing the battle's live stream → 0 mismatches, rollback frames 0/0, child 9560 state hashes 0 differ, exit 0.
  • Run (private rig, windows-mini, 2490367): a child whose replay file is missing exits within 3 s, before the game boots. Control (bea1881): it ran the game on.
  • Run (private rig, windows-mini, ed2f1b9): CHILD=1 rplay.py and lobbychild.py again after the return-state cleanup → PASS, 0 differ. Same on a local merge with Replay step: no audio burst, fast step back, step hotkeys #580 (git merges cleanly, MSBUILD_RC=0, both PASS).
  • Measured (windows-mini, ed2f1b9, PresentMon on the shown DX11 parent in the lobby, 65 s window): with a child playing, the parent stays at 59.94 fps, p99 frame time 19.2 / 19.9 ms, frames over 20 ms 9 / 37 (max 56 ms). Without a child: 59.94 fps, p99 18.0 / 17.6 ms, frames over 20 ms 2 / 0. So a child adds occasional frame hitches in the parent but does not lower its average frame rate.
  • Not run yet: a controller press in an unfocused child (no pad on the rig box). Linux and macOS builds were not run locally; CI builds them.

Did you use AI to help find, test, or implement this issue or feature?

Yes: Claude Code wrote the change and ran the rig check.

🤖 Generated with Claude Code

inada-s-ai Bot and others added 2 commits November 13, 2026 13:39
…, the game keeps running

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@inada-s-ai
inada-s-ai Bot marked this pull request as ready for review November 13, 2026 07:51
@inada-s
inada-s merged commit 283376e into zdxsv-master Nov 13, 2026
2 checks passed
@inada-s
inada-s deleted the ai/replay-child-579 branch November 13, 2026 08:26
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

0