Skip to content

fix(apu): correct square sweep negate and overflow mute threshold#651

Open
SergioChan wants to merge 1 commit intobfirsh:mainfrom
SergioChan:fix/apu-sweep-negate-threshold-608
Open

fix(apu): correct square sweep negate and overflow mute threshold#651
SergioChan wants to merge 1 commit intobfirsh:mainfrom
SergioChan:fix/apu-sweep-negate-threshold-608

Conversation

@SergioChan
Copy link
Copy Markdown

Summary

  • fix square-channel sweep negate math so pulse 1 uses the expected period - (period >> shift) - 1 behavior
  • use the hardware-valid sweep mute cutoff (0x7ff) instead of 4095 in both sweep update and sample muting checks
  • keep the change scoped to src/papu/channel-square.js with no unrelated behavior updates

Testing

  • npm test -- --runInBand test/apu.test.js (passes; project test runner executes its full configured suite with all tests passing)

Related

Fixes #608

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.

APU: square channel sweep unit has wrong negate formula and muting threshold

1 participant