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

Identify bitmasks #122

Open
Rangi42 opened this issue Nov 29, 2024 · 3 comments
Open

Identify bitmasks #122

Rangi42 opened this issue Nov 29, 2024 · 3 comments

Comments

@Rangi42
Copy link
Member

Rangi42 commented Nov 29, 2024

Most of the bit/res/set operations now use constants instead of magic numbers, but some related operations remain. Look over the and/or/xor instructions and see which ones can involve constants: https://pastebin.com/3kVig3fL (this list omits and $0f, and $f0, and xor $ff since nybbles and negation are understood).

@Rangi42
Copy link
Member Author

Rangi42 commented Dec 2, 2024

Note that the very first ones on that list, the and $3f ; sound lengths, are related to the rNR11 and rNR21 registers, which I would borrow hardware.inc's constant for... if one existed. gbdev/hardware.inc#46

@Rangi42
Copy link
Member Author

Rangi42 commented Dec 9, 2024

Note that audio_constants.asm lists some constants related to "wSoundInput", which does not exist! They seem more appropriate for rNR52.

@Rangi42
Copy link
Member Author

Rangi42 commented Dec 17, 2024

git grep -nP '^\t(and|or|xor) [0-9$%]' gives the lines to check.

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