abysspartyy
Smash Cadet
- Joined
- May 11, 2015
- Messages
- 55
Normally, you can only input moves as Master Hand and Crazy Hand on ports 3 & 4, respectively. This code allows you to control Master Hand and Crazy Hand from any controller port.
I modified Achilles1515's code from 20XX to fix the broken grab input for Master Hand.
Gecko Code
Source Code
I modified Achilles1515's code from 20XX to fix the broken grab input for Master Hand.
Gecko Code
$MH/CH Control with Any Port [sushie, Achilles1515]
*Control MH/CH with any port instead of being restricted to ports 3 & 4
C21508B8 00000003
88C4000C 1CC60044
7CC61A14 80C60000
60000000 00000000
04156AFC 8006065C
Source Code
Python:
import ../../melee
const
ControllableAnyPorts* =
createCode "MH/CH Control with Any Port":
description: "Enables you to control MH/CH with any port instead of being restricted to ports 3 & 4"
authors: ["sushie", "Achilles1515"]
code:
# patch that uses the correct input struct depending on the player for Master Hand
# Master Hand needs a longer patch to fix the broken grab inputs
gecko 0x801508b8
# r3 = HSD_InputStructStart
# r4 = fighter data
regs rInputStructStart, rFighterData, (6), rInputStruct
lbz rInputStruct, 0xC(rFighterData) # player index
mulli rInputStruct, rInputStruct, 0x44 # player index * sizeof each input struct
add rInputStruct, rInputStruct, rInputStructStart # get proper input struct for calculated input struct offset
lwz r6, 0(rInputStruct) # load the input
gecko.end
# patch for enabling control with crazy hand
gecko 0x80156AFC, lwz r0, 0x65C(r6)
when isMainModule:
generate "./generated/controlallports.asm", ControllableAnyPorts
Code:
# mh 0x801508b8
lbz r6, 12(r4)
mulli r6, r6, 0x44
add r6, r6, r3
lwz r6, 0(r6)
# ch 0x80156AFC
lwz r0, 0x65C(r6)
Last edited: