Skip to content

RedSound/RedCommand: 96.56% -> 99.46% - #17675

Open
SirEnkido wants to merge 7 commits into
zcanann:mainfrom
SirEnkido:agent/redcommand
Open

RedSound/RedCommand: 96.56% -> 99.46%#17675
SirEnkido wants to merge 7 commits into
zcanann:mainfrom
SirEnkido:agent/redcommand

Conversation

@SirEnkido

Copy link
Copy Markdown

What changed

src/RedSound/RedCommand.cpp (+ one enum in include/ffcc/RedSound/RedEntry.h), across _SePlayStart, _MusicPlayStart, and helpers. Seven commits, each an independent verified step:

  • _SePlayStart: loop restructure with chained zero-assignments; if/else outlining with a block-scope trackNo; explicit U16 high-shift (<< 8) combine form via a new named enum
  • _MusicPlayStart: chained zero-assignments mirroring _SePlayStart; ADSR memset to DEFAULT_WORD(-1); in-place sequential volume scaling; a shared function-scope trackNo reused for the reverb index and track counter (register-coloring lever consistent with the original compiler output)

Evidence

  • main/RedSound/RedCommand fuzzy (report.json): 96.56% → 99.46% (+2.90)
  • DOL verified byte-identical (build/GCCP01/ok passes; sha1 matches config/GCCP01/build.sha1)
  • Independently audited: all 20 /* --INFO-- */ headers preserved, no offset tricks, no fake symbols, no extern crutches, only the two intended files touched

Notes for review

  • The remaining sub-100% functions (_SePlayStart 97.3%, SeBlockPlay 98.6%, _MusicPlayStart 99.7%, _EraseTime/MusicStop ~99.9%) were each disassembled and confirmed to be register-allocation / scheduling artifacts (e.g. a phantom stmw r24 save over a byte-identical body); left as-is rather than chased with hacks.
  • RedMusicVolumeFromInput was inlined into sequential mutate statements purely for scheduling match — flagged for transparency, not a rule violation.

Produced by Claude agents following AGENTS.md / WORK_SPLIT.md, operated by @SirEnkido. Every intermediate score in the commit messages was verified against report.json at commit time.

🤖 Generated with Claude Code

SirEnkido and others added 7 commits July 18, 2026 12:48
…+ chained zero-assignments)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…, trackNo local, waveNo/count variable reuse)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…n waveNo/sequence-offset combines)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ssignments mirroring _SePlayStart, ADSR memset -1)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ntial volume scaling)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… variable for reverb index + track counter)

Co-Authored-By: Claude Fable 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.

1 participant