Repository navigation
Observe completed logical worlds before view rendering - #8
Merged
Merged
Conversation
deviankim
marked this pull request as ready for review
October 1, 2026 14:00
This was referenced Oct 1, 2026
deviankim
changed the base branch from
fix/multiplayer-lcd-state
to
browser-environment
October 1, 2026 15:37
deviankim
added a commit
that referenced
this pull request
Oct 1, 2026
# 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.
A player-view game can be deterministic across clients while its canonical consoles simulate different worlds. Comparing RAM at a display boundary is too late: rendering can already have changed it. This adds a bounded diagnostic publication hook that copies physical RAM when the engine writes its completed-world marker, before rendering.
Tracks https://github.com/ssk-play/chiptoy/issues/96. Stacked on #7 (base
fix/multiplayer-lcd-state), without changing that PR. The consumer is ssk-play/romdev-browser#16; the engine publisher and trusted linked-symbol/world schema integration belong to M3.The optional GB/GBC/NES exports observe a stable writable marker, unbanked LE32 tick and physical RAM fields. They never freeze CPU, advance clocks or modify emulated state. Eight publications, 32 spans and 1024 bytes are hard bounds. Drains return owned records and truncation metadata; restore/reset/media changes disarm and require rebinding. The diagnostic is outside savestates and causal hashes. Normal disk-state formats and deterministic schemas are unchanged. Boot RAM clearing cannot publish because the marker value must match
0xa5.Core-host is 0.16.0, Gambatte 0.14.0 and fceumm 0.15.0. Exact dependent pins and workspace lockfile are updated. Recipes built both cores with the shared C observer; payload https://github.com/ssk-play/romdev/releases/tag/browser-payloads-da7751d556b4, archive SHA-256
e635d2f9feaf756ae20b0028193ca92df0be1bbf7912a03b991b4b590c77faa8. Sourceb5306d03d23a39b719b01cc7eea34d953baac56b.Self-review checked physical-bank pointer handling, optional export detection, lifecycle cleanup, bounded copying, and state/hash exclusion. The selected core regression suite passed 75 tests with two existing skips and no failures. Five new tests compare raw snapshots, causal digests, CPU registers, pixels and audio against uninstrumented execution for 130 frames on GB/GBC/NES, prove pre-view bytes survive later view writes, and cover overflow, owned copies, invalid spans and C89 ABI behavior. ESLint and diff checks passed.
Consumer build/typecheck and all 65 tests pass, including logical tick comparison for one/two/four views, deliberately divergent worlds, and separate HTTP execution parity. Dev validation: Worker
714920f8-f18d-42ec-aa1d-f0043b409fa9, companion commit3971450(https://github.com/ssk-play/chiptoy/pull/104), library heada44b9cc. Served library/lib/romdev-browser/1.0.0-d14f76fad9/, worker build8bbb01dac2bd21e3e8563c5b9660417a3ae64e5f2dfcaf396eb7de54c890e768. Chrome 152, Android 16 emulator Chrome 153 and iOS 26 Simulator Safari each passed nine logical-world cases and all 15 rollback smoke combinations; private dev reports were read back with this clean source/build and zero hidden interruptions. Browser console errors: zero.External test: