Skip to content

Define more MASK constants #46

Open
@Rangi42

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions