Repository navigation
Preserve deterministic OAM scan state across first-frame restore - #9
Merged
Merged
Conversation
deviankim
changed the base branch from
feat/multiplayer-observation
to
browser-environment
October 1, 2026 15:37
Author
|
Reviewed. The OAM reader fields go into the reserved envelope words after |
# Conflicts: # packages/romdevtools/scripts/patches/gambatte-multiplayer-state.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restoring the first LCD-off multiplayer bootstrap frame synthesized a pending OAM scan rather than restoring its actual state. On the GBC cartridge regression, the next frame then differed from uninterrupted execution at sprite-position-buffer offsets 1980 and 1982, despite matching pixels. Preserve the OAM reader's pending-change position and sprite-size source in the deterministic envelope instead.
Tracks https://github.com/ssk-play/chiptoy/issues/96 and the M2 correction review in ssk-play/romdev-browser#16. Stacked on #8; it keeps that observation hook and the LCD follow-up from #7. This is a separate core fix; no browser payload is patched in place.
Use the existing reserved envelope words at offsets 72 and 76. Deterministic schema becomes
0x47420103, and gambatte package becomes0.15.0. Validate scan positions (0–80 or disabled 255) and Boolean size source before restoring. Ordinary savestate save/load remains unchanged when deterministic mode is off. Old deterministic schemas are rejected.The build recipe resets both newly patched sprite mapper files, so repeat builds remain idempotent. Core-owned digests include the preserved fields; no state bytes are filtered by the consumer.
Self-review and validation:
ROMDEV_BUILD_CWD=packages/romdevtools build-image/build-wasm.sh build-gambatte.sh, repeated successfully.b5306d03payload reproduces the GBC two-byte mismatch; the new payload passes it.Payload: https://github.com/ssk-play/romdev/releases/tag/browser-payloads-4be2b1a7777a, archive SHA-256
6a05620de4728392867eea07e87c2f6677cb0789197645c7b3559f9b0353c95d. Sourceb539ee652319aee4d136789eeb4b6aa6e5c99511(payload built from patch commit0ee02daa). Dev integration and external browser procedure are supplied in romdev-browser monteslu#16. Physical-phone performance acceptance is separate and pending. No merge or production deployment.