The 'Select' button is often unused in normal NES gameplay. Let's say I want to make it so that when you push select, your jump height is doubled on your next jump. After that jump, the jump height is reset to normal. I suspect I need to add instructions for the following:
- 'Listen' for the select key, which is currently not used for anything
- Set a byte in memory that indicates whether select key has been pressed since last player jump
- Inside the player jumping subroutine, check the status of the 'select key pressed' byte, and set the jump height accordingly. Then clear the 'select key pressed' byte.
Another thing that may help is that I already need to obliterate the stuff that happens when pausing and unpausing, in this and probably subsequent ROMs that I hack. So that gives me some space to use that is always available during regular gameplay, although I admit it is not pretty.
I'd also like some help on listening for more complex button combinations, such as simultaneous keypresses (select + start gives you a powerup) or button sequences where there is a limited time to execute the sequence (e.g., A-B-B-A pressed during 1 second adds a life). How can I find the main subroutine that is constantly checking for buttons? Is there a usual location for it? I see a few values in the CPU being set to precise values while I press buttons, but putting read breakpoints on them leads to a constant series of rapid snaps at different locations.
Thanks.