News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

Changing the save button combination?

Started by vivify93, August 28, 2017, 08:53:19 AM

Previous topic - Next topic

vivify93

Hi everyone, I hope you're doing well.

So we all know about how to end the game and get your password; you press the Start Button on Controller 1 to pause, then on Controller 2, you press D-Pad Up and the A Button in tandem. However, for ease of access, I would prefer it all to be done on Controller 1, like it is in Metroid: Rogue Dawn.

Would I need to know ASM to accomplish this? I'm going to be applying this on top of Metroid + Saving by Snarfblam, if it changes anything. The buttons I'd like to change the save combo to are the A and Select Buttons.

Thank you so much for your time; have a nice day! :)

snarfblam

From the disassembly, this is the code that checks for up+A on controller 2. I marked the important stuff in the left margin.

    PauseMode:
  > LC9B1:  lda Joy2Status                  ;Load buttons currently being pressed on joypad 2.
  > LC9B3:  and #$88                        ;
  > LC9B5:  eor #$88                        ;both A & UP pressed?-->
    LC9B7:  bne Exit14                      ;Exit if not.
    LC9B9:  ldy EndTimerHi                  ;
    LC9BC:  iny                             ;Is escape timer active?-->
    LC9BD:  bne Exit14                      ;Sorry, can't quit if this is during escape scence.
    LC9BF:  sta GamePaused                  ;Clear pause game indicator.
    LC9C1:  inc MainRoutine                 ;Display password is the next routine to run.


If you don't know assembly, you can find it in a vanilla Metroid ROM at $1C9C1: A5 15 29 88 49 88. In an expanded ROM I think it will be at $3C9C1. Change the 15 to 14 to check controller 1 instead of controller 2, and change both 88s to the appropriate bitmask for whatever button combo works for you.

Quotebit 7=A, bit 6=B, bit 5=SELECT, bit 4=START, bit 3=Up, bit 2=Down, bit 1=Left, bit 0=Right.

vivify93

#2
Thank you so much! I appreciate it. I actually found the bytes at $39971. It looks like in Metroid + Saving, the last two bytes have changed--to A5 15 29 88 60 AD. But changing 15 to 14 makes it so Controller 1 Up+A saves and quits. It seems to have no adverse effects other than the fact that it scrolls the map up by a tile before opening the Game Over screen.

I appreciate this a lot. Thank you. :)