Version 2.8 (0b46188) added bit/flag constants for the audio register aliases, but did so in an unusual way: since many audio registers are basically the same but for different channels, it reused constants.
AUDLENF_DUTY applies to AUD1LEN (NR11) and AUD2LEN (NR21)
- (...but not
AUD3LEN (NR31) or AUD4LEN (NR41)!)
AUDLENF_TIMER applies to AUD1LEN (NR11), AUD2LEN (NR21), and AUD4LEN (NR41)
- (...but not
AUD3LEN (NR31)!)
AUDENV_* apply to AUD1ENV (NR12), AUD2ENV (NR22), and AUD4ENV (NR42)
AUDHIGH_* apply to AUD1HIGH (NR14), AUD2HIGH (NR24), and AUD3HIGH (NR34)
I find this harder to keep track of than just having "redundant" bit/flag constants named after each individual register. It's too easy to mistake that e.g. AUDLENF_DUTY would apply to AUD3LEN based on the name, or wonder why AUD3ENV is missing.
Also, we provide separate bit/flag constants for rIF and rIE, even though they both have the same correspondence of interrupts to bits.
I'd like to define individual constants, and deprecate (but still define) these.
Version 2.8 (0b46188) added bit/flag constants for the audio register aliases, but did so in an unusual way: since many audio registers are basically the same but for different channels, it reused constants.
AUDLENF_DUTYapplies toAUD1LEN(NR11) andAUD2LEN(NR21)AUD3LEN(NR31) orAUD4LEN(NR41)!)AUDLENF_TIMERapplies toAUD1LEN(NR11),AUD2LEN(NR21), andAUD4LEN(NR41)AUD3LEN(NR31)!)AUDENV_*apply toAUD1ENV(NR12),AUD2ENV(NR22), andAUD4ENV(NR42)AUD3ENV!)AUDHIGH_*apply toAUD1HIGH(NR14),AUD2HIGH(NR24), andAUD3HIGH(NR34)AUD4HIGH!)I find this harder to keep track of than just having "redundant" bit/flag constants named after each individual register. It's too easy to mistake that e.g.
AUDLENF_DUTYwould apply toAUD3LENbased on the name, or wonder whyAUD3ENVis missing.Also, we provide separate bit/flag constants for
rIFandrIE, even though they both have the same correspondence of interrupts to bits.I'd like to define individual constants, and deprecate (but still define) these.