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

Define more MASK constants #46

Open
Rangi42 opened this issue Dec 2, 2024 · 0 comments
Open

Define more MASK constants #46

Rangi42 opened this issue Dec 2, 2024 · 0 comments

Comments

@Rangi42
Copy link
Contributor

Rangi42 commented Dec 2, 2024

Various hardware registers combine multiple meaningful values. For example, AUD1LEN and AUD2LEN (NR11 and NR21) combine the wave pattern in bits 6-7 and the sound length in bits 0-6; or AUD1SWEEP (NR10) combines the sweep time in bits 4-6, the sweep direction in bit 3, and the sweep shift in bits 0-2.

It would be convenient to have mask constants to do and a, <FOO>MASK to isolate these values.

However, the only such constant so far is OAMF_PALMASK EQU %00000111. I'd like to have more, such as AUDLEN_LENMASK EQU %0011111, AUD1SWEEP_TIMEMASK EQU %01110000, etc.

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

No branches or pull requests

1 participant