Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APU: clarify which bits of NR41 are actually used #518

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

iximeow
Copy link
Contributor

@iximeow iximeow commented Dec 14, 2023

the docs that were present gave the misleading impression that NR41 sets an 8-bit timer similar to NR31, and that channel 4's length is counted up to 256 like NR31. but channel 4 counts length up to 64 more like channels 1 and 2, with an initial length set from the low six bits of this register.

(spotted this by going through the above logic, noticing that channel 4 seemed to run too long, and comparing against a few other emulators. i don't actually know what happens with the upper two bits here, if they're ignored, or what.)

Copy link
Member

@ISSOtm ISSOtm left a comment

Choose a reason for hiding this comment

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

That looks like a copy-paste mistake from NR31, the upper two bits are indeed unused. Thanks!

@ISSOtm ISSOtm merged commit 138d7f8 into gbdev:master Dec 14, 2023
2 checks passed
@iximeow iximeow deleted the patch-3 branch December 14, 2023 21:04
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.

None yet

2 participants