-
Notifications
You must be signed in to change notification settings - Fork 22
Add sgb.inc #77
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
base: master
Are you sure you want to change the base?
Add sgb.inc #77
Conversation
Closes gbdev#76
Oh, thanks! Good idea to make this a third .inc file, given all those super-specific but official SGB values ( It will need comments briefly mentioning what all these things are, like hardware.inc's heading/subheading/description structure, and to follow the formatting conventions (e.g. lowercase Also, Anyway, this is good reference to expand off of! |
Sure thing, I just had to get something out there quickly.
I'll have a look. Also, I just noticed that the actual |
Add header Add include guard Add comments Lowercase DEFs and EQUs Rename SGB_SOUND_ATTRS to SGB_SOUND_FLAGS
Having seen the I'm OK with changing the names, but not with hardcoding the values in binary form. |
May I suggest |
Sounds like a good compromise; I could accept an |
I understand the convention of using the I am wondering whether |
Again, turning it into a prefix seems appropriate:
|
As said in #76 I don't like the name I also have some issues with the semantics how things are used in pokered.
These constants actually have different meanings, despite being the same value. The first one is a mask to isolate the two lowest bits. The second is the ID for player 1. What the code does is to check if the player ID ever changes from the value for player 1, which also (by design) happens to be the same value that a non-SGB would return when no buttons are selected.
This does not actually represent what that code is doing. It's not sending the SGB data at this point, but rather doing a "regular" read of the joypad, which also increments the player index at some stage, maybe when the selected button group changes from Using the data transfer constants is obscuring what the code actually does. (The added delays also obscure what the code does. They shouldn't be needed, although that's Nintendo's fault and a disassembly can't do much about that.) I'd suggest using the regular For hardware.inc, I'd suggest constants with names along these lines:
|
Closes #76