Language…
12 users online:  AmperSam, Dan2point5, drkrdnk, fsvgm777, Gasterus155, JPhanto, kirsvantas, nonamelol1, reevebarusadar8, signature_steve, Sokobansolver, tOaO - Guests: 251 - Bots: 342
Users: 64,795 (2,377 active)
Latest user: mathew

Super Nintendo Button addresses

Hiya.
I'm kind of new here so I apologise if this is a stupid question.

There is a patch that allows Mario to Charge up the fire flower to shoot a Yoshi fireball by pressing Y + R.

However, Instead of Y + R I would like to have the charge function mapped to Y + X or Just X.

In order to do that, I believe I need to change the button address seen here:

Does anyone happen to know the addresses, and if so, could you list them here or link me to a list of them?

Thank you in advance~
For Y+X, you can change !Button2 to %01000000.

If you're interested in details, check the descriptions for addresses $15 through $18 in the RAM Map. $15 and $16 are responsible for one group of buttons, $17 and $18 are responsible for another. The format for $17 is described as "axlr----", which means "the first four bits are for A, X, L and R respectively, the others don't matter". If one of those buttons is being held, the correspoding bit in $17 is set to 1.

Originally the value in that patch was %00010000, which corresponds to checking the forth bit (the R button). By changing it to %01000000, you're making it check for the second bit, which checks for the X button instead. You can also have multiple bits set at once: if you wanted X and R at the same time, you could use %01010000.

Not sure how much of a programming background you have, so if this doesn't make sense to you, don't worry about it. %01000000 should do.


 
Originally posted by WhiteYoshiEgg
For Y+X, you can change !Button2 to %01000000.

If you're interested in details, check the descriptions for addresses $15 through $18 in the RAM Map. $15 and $16 are responsible for one group of buttons, $17 and $18 are responsible for another. The format for $17 is described as "axlr----", which means "the first four bits are for A, X, L and R respectively, the others don't matter". If one of those buttons is being held, the correspoding bit in $17 is set to 1.

Originally the value in that patch was %00010000, which corresponds to checking the forth bit (the R button). By changing it to %01000000, you're making it check for the second bit, which checks for the X button instead. You can also have multiple bits set at once: if you wanted X and R at the same time, you could use %01010000.

Not sure how much of a programming background you have, so if this doesn't make sense to you, don't worry about it. %01000000 should do.


I know next to nothing about code, though I do understand what you mean by changing bits.

Thank you very much!