Repository navigation
Fix a batch of small correctness issues - #52
Merged
Merged
Conversation
- RTC prescaler: `prescale -= prescale` zeroed the counter instead of subtracting the 0x8000 overflow threshold. Currently latent rather than symptomatic — osc1 reaches RTC::clock one tick at a time, so the remainder at crossing is always zero and the two forms coincide (verified by A/B: zero baseline/ROM divergence) — but it would lose time the moment osc1 ever arrived batched. The harness exercise now starts the RTC and the per-second log prints value+prescale so future regressions are visible. - libretro savestates: retro_unserialize() copied the state and then returned false, so every savestate load reported failure to the frontend. - Breakpoints are a Set instead of an array: the running loop checked indexOf per executed instruction. - npm scripts chain with && instead of ;, so a failed step no longer lets the rest run (a failed core build used to still produce a "successful" vite build with a stale wasm). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
asterick
force-pushed
the
asterick/correctness-fixes
branch
from
June 7, 2026 06:10
641c52f to
577d048
Compare
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.
Summary
Four small, independent correctness fixes (stacked on #51 — retarget to main after it merges):
rtc.cc):prescale -= prescalezeroed the counter instead of subtracting the0x8000overflow threshold. Honest severity: latent, not symptomatic —osc1reachesRTC::clockone tick at a time, so the remainder at crossing is always zero and both forms coincide today. Verified by A/B: zero divergence on baselines and on 3 commercial ROMs × 30 s. It would silently lose time the moment osc1 delivery was ever batched. The harness exercise now starts the RTC and the log line printsrtc=value+prescale, so the subsystem is regression-covered going forward (baselines regenerated for the new column).libretro.cc):retro_unserialize()copied the state then returnedfalse— every savestate load reported failure to the frontend. Now returnstrue.Set<number>instead of an array — the running loop did anindexOfper executed instruction.&&instead of;— a failed core build no longer letsvite build"succeed" with a stale wasm. (CI's stale comment about this updated too.)Verification
.sobuilds;npm run check, wasm core build, andmake -C core/test checkall clean🤖 Generated with Claude Code