8000 Zdxsv: lobby game patches in replays and live streams by inada-s-ai[bot] · Pull Request #593 · inada-s/pcsx2 · GitHub
[go: up one dir, main page]

Skip to content

Zdxsv: lobby game patches in replays and live streams - #593

Merged
inada-s-ai[bot] merged 1 commit into
zdxsv-masterfrom
ai/replay-patches
Nov 15, 2026
Merged

inada-s-ai[bot] merged 1 commit into
zdxsv-masterfrom
ai/replay-patches

Conversation

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

Description of Changes

  • The battle's lobby game patches go into the replay header (BattleLogFile.patches, field 60; GamePatch / GamePatchCode messages), so both the saved file and the live stream carry them.
  • Playback and spectating apply them at the common start (PlayCommonStart, before key 0 is saved), rewrite the every-frame ones after each played frame (PlayNext), and restore the originals at PlayStop. Same checks as in battle: disc serial and originals.
  • A file without the field plays as before. Parsed codes go through the same range check as the lobby notice (bounded: 16 patches, 256 codes).
  • m4z.py: the spectator (LIVE) and the API replay (REPLAY_API) must apply every lobby patch and restore it; without PATCHES, none.

Rationale behind Changes

A patched battle replayed or watched without its patches would desync. Follow-up to PR 592 (inada-s/zdxsv#284).

Suggested Testing Steps

Verified on windows-mini (private rig, commit c982b92, server zdxsv ai/game-patch):

  • CLIENTS="1 3" EMU=1 GGPO=7101 NAT=open PATCHES=tests/zdxsv/server_patches.json LIVE=2 UPLOAD=1 REPLAY_API=4 m4z.py: PASS x2. Spectator and API replay: both patches applied and restored, 0 state hashes differ.
  • An older replay (no field, recorded with patches by the previous build): CLAMP=none rplay.py: PASS, 0 differ, no patch applied.
  • Control, same rig on the build before the field: spectator / API replay applied FAIL.
    Not run: four players, LIVE_NEXT, a seek or point-of-view switch while patched.

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

Yes: written and rig-tested by Claude Code.

🤖 Generated with Claude Code

…pply them at playback

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

0 participants

0