X + Y Disables Start

Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
#1
Holding X + Y + Start on a Gamecube controller for two seconds forces the controller to reset itself, as if it were unplugged and plugged back in. This code will disable the Start button when X + Y is held. It is a game polish that allows the player to reset his/her controller without the game registering Start being pressed. For instance, you can reset on the character select screen without advancing to the stage select screen, or pause the game and reset while keeping the game paused.

Document

 
Last edited:
Joined
Nov 9, 2014
Messages
665
#3
Such a great idea for a code, here's a shorter version:

Code:
$X/Y Disables Start
C23775BC 00000005
540304E7 41820018
5403052A 2C030C00
4082000C 38600000
506064E6 901A0000
60000000 00000000
Code:
#To be inserted at 803775bc

  #Check if pressing start
    rlwinm. r3,r0,0,0x1000
    beq Injection_Exit
    #Check if also holding X+Y
    rlwinm r3,r0,0,0xC00
    cmpwi r3,0xC00
    bne Injection_Exit
  #Remove the start input
    li  r3,0
    rlwimi  r0,r3,12,0x1000
  Injection_Exit:
  #store their instant input
    stw    r0, 0 (r26)
 
Last edited:

tauKhan

Smash Lord
Joined
Feb 9, 2014
Messages
1,347
#4
... why did I never think of this.

Here's a version with slightly modified functionality: Only Start press (or "instant Start") is removed, but Start is still recognized as being held down. If X or Y is released while still holding Start, that is no longer detected as a new Start press.

Code:
$X + Y Disables Start
C2377ACC 00000003
80C50000 54C00CE6
54C714E6 7CE70038
7CC63878 00000000
Code:
#To be inserted at 0x80377ACC

    #Original codeline, load current inputs
        lwz r6, 0(r5)
  
    #Align the bits corresponding to X & Y being held with Start being held, masking all other bits out
        rlwinm r0, r6, 1, 0x1000
        rlwinm r7, r6, 2, 0x1000
    #Bitwise logic operations. Start held becomes 1 if and only if Start is held and either X or Y isn't held. All other bits remain as they were.
        and r7, r7, r0
        andc r6, r6, r7
 
Last edited:
Top Bottom