Skip to content

Support M64 extended format version 4 (Mupen 1.5.0-3), hotfix for Release - #79

Merged
FramePerfection merged 2 commits into
FramePerfection:Releasefrom
frKieran:hotfix/m64-extended-v4
Oct 16, 2026
Merged

FramePerfection merged 2 commits into
FramePerfection:Releasefrom
frKieran:hotfix/m64-extended-v4

Conversation

@frKieran

Copy link
Copy Markdown

The fix from #76, as a hotfix into Release, as suggested there: the same commit cherry-picked onto Release (v0.9.1), so it can ship in 0.9.2 without Development's changes. Fixes #66.

Movies recorded on Mupen 1.5.0-3 and later don't open in the M64 tab ("Specified argument was out of the range of valid values"). Extended version 4 added cpu_cf at 0x030 and rcp_lag_factor at 0x038, which M64Header.ToBytes wrote back as zero padding, so the roundtrip check in LoadBytes failed. This reads and writes the two fields, and writes the header bytes STROOP doesn't model back from the loaded header instead of zeros.

Tested on v0.9.1 with the same change: a 1.5.0-3 movie, an extended v1 movie and a v0 movie all open, and Save leaves each byte-identical apart from the VI count. Details in #76.

🤖 Generated with Claude Code

frKieran and others added 2 commits October 15, 2026 00:10
Mupen 1.5.0-3 (extended version 4) stores cpu_cf and rcp_lag_factor as doubles at 0x030 and 0x038. ToBytes wrote
that area as zero padding, so the roundtrip check in LoadBytes threw on every movie recorded with 1.5.0-3.
Read and write both fields, and write back the bytes this class doesn't model from the loaded header instead of
zeros, so later additions to the format don't break loading.

Fixes FramePerfection#66

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@FramePerfection FramePerfection left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the version bump myself, but lgtm.

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.

2 participants