Melee Gecko Codes + Guide and Discussion

Obskore

Smash Ace
Joined
Jan 17, 2013
Messages
673
Location
Sonora / México
Disable Rumble When Controller is Unplugged
Code:
C2376BB0 00000008
3CC08045 60C6C380
38800000 38A0000A
39000000 7CE518AE
2C0700FF 40820008
7D0431AE 38840001
38A5000C 2C040004
4180FFE4 8081002C
60000000 00000000
In today's edition of "codes you didn't you know you wanted"... :)
what exactly does this code do?
does it mean it's actually enabled when the controller is unplugged? but it doesn't rumble when it's unplugged, what am i missing?
 

Myougi

My posts are gluten free.
Joined
Mar 14, 2014
Messages
484
Location
WEST COAST BEST COAST
what exactly does this code do?
does it mean it's actually enabled when the controller is unplugged? but it doesn't rumble when it's unplugged, what am i missing?
If rumble is turned on while a controller is plugged in, once said controller is unplugged rumble is turned off so that the next player won't have to turn it off themselves.
 

DRGN

Technowizard
Moderator
Premium
Joined
Aug 20, 2005
Messages
2,042
Location
Sacramento, CA
Ok, I've been searching, but have had no luck.... I'm looking for an ASM to move the contents of a FPR to a GPR (or vice versa). I assume I need to convert it from double-precision to single first, but then what? (I'm wondering if the would just be built-in to another command to also do the move.) Right now I have the workaround of loading it from the FPR to memory, and then from there to a GPR. I just wanted to know if there was a more efficient way.

A 'floating-point-add-immediate' would also work if one exists, but I'm not finding one.
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Ok, I've been searching, but have had no luck.... I'm looking for an ASM to move the contents of a FPR to a GPR (or vice versa). I assume I need to convert it from double-precision to single first, but then what? (I'm wondering if the would just be built-in to another command to also do the move.) Right now I have the workaround of loading it from the FPR to memory, and then from there to a GPR. I just wanted to know if there was a more efficient way.

A 'floating-point-add-immediate' would also work if one exists, but I'm not finding one.
I had the same question awhile back, but the answer is no. You have to load a value into an fpr from a memory address. If you wanted to "addi", you would probably do something like this:

(Say I wanted to add a value of 2 = 0x40000000)

lis r15,0x4000
stw r15,-0x8(sp)
lfs f15,-0x8(sp)
fadd...

The stack pointer is r1. I'm pretty sure the space behind it is free to use.
 

Magus420

Smash Master
Joined
Dec 13, 2003
Messages
4,541
Location
Close to Trenton, NJ Posts: 4,071
http://smashboards.com/threads/physics-input-etc-display-in-develop-mode.391956/

Physics, Input, etc Display in Develop Mode v2.0 (NTSC 1.00) [Magus]
C21A3CE8 00000008
3D808042 618C7940
894C0000 394A0001
2C0A0005 41A00008
39400000 994C0000
41A0001C 3D808016
618C4BC0 7D8803A6
4E800021 38000000
900DB088 00000000
061A3CEC 00000008
60000000 60000000
061A3E70 0000000C
3C608042 38637940
80630004 00000000
C2224D70 00000005
2C000001 41A0001C
2C000003 41A10014
3D408042 614A7947
7D2A00AE 913F0060
90040000 00000000
C2224DA8 00000005
2C000001 41A0001C
2C000003 41A10014
3D408042 614A7947
7D2A00AE 913F0060
90040000 00000000
C2390D68 00000079
9421FFC8 BE810008
3FE08042 63FF7940
8BDF0000 2C1E0001
4180000C 2C1E0004
40A10008 3BC00001
9BDF0000 1E9E2B67
929F0004 829F0008
2C140000 40A20010
3E801419 62941D00
929F0008 3A803030
3AA06666 3EC06666
62D63030 3FA08040
63BD84DE B2BD001C
B2BD0020 B2BD002E
B29D0038 92DD003A
B29D0046 92DD0048
92DD0054 B2BD0058
92DD0062 B2BD0066
3BFF0007 3F808049
639CD978 837C0004
2C1B0001 41A00034
2C1B0003 41A1002C
831C0000 7F1FD9AE
1EFB001C 3B17000E
7EBDBB2E 7EBDC32E
3AF70002 3B180002
7EDDB92E 7EDDC12E
3A800000 92820018
7C5A1378 3B200001
3FA0804D 63BD56A8
1EBEFFFC 7FBDA82E
83BD0020 6294FFFF
A2BD0006 7C15A000
4182027C 7F1FC8AE
82FD0070 2C180014
41820064 41800268
2C180018 408100B0
2C18001C 408100B4
2C18001F 408100EC
2C180022 40810108
2C18002E 40810114
2C1800D0 4182013C
2C1800D1 41820140
2C1800D2 41820154
2C1800D3 41820178
2C1800D4 41820190
2C1800DC 40810194
4800020C 7C19D800
40A2004C 3ABCFF3E
3B1CFF8E A6D50014
3AE00104 7ED7B879
4082002C A2F50008
56F7077B 41A20020
C0220018 C0420018
56D705EF 41A20008
C04281A8 D03D0110
D05D0114 7C15C000
4180FFC4 3ADD0110
4800017C 3ADD07D4
3AB8FFEB 48000168
3ADD00E0 41820010
3AB8FFE7 1EB5000C
48000158 C0360000
C0560004 C076000C
C0960010 C0B60018
C0D6001C EC21182A
EC21282A EC42202A
EC42302A 48000170
3EC0804B 62D6FE08
1EBE0044 7ED6AA14
8AB60021 2C1500FF
4182014C 3AB8FFE3
48000104 3ADD0680
40A20008 3AD60020
3AB8FFE0 480000F0
3AB8FFD5 7EBDAA14
3AC006E3 2C18002C
4081000C 3AB50004
3AC006E4 7EF5B0AE
8AD506DF 40A00008
3AE00000 480000D8
C03D1890 C05D19BC
480000FC C0220018
82DD227C 56D5018D
41A20008 C03D23A0
C05D1AAC 480000E0
2C1700B5 40A200D0
C03D08F4 C05D08FC
C0628F38 C0828B90
EC230828 EC211024
EC63202A EC431024
480000B4 C03D19F8
2C1700B2 41A000A4
2C1700B6 4181009C
82BD1A20 C0550058
48000094 82DD19F0
82FD19F4 48000058
3ADD09C0 3B18FF2B
3AE00002 7EB8BBD6
1EB50138 7ED6AA14
82B6FFB4 2C150000
41A2005C 3AF60004
571507FF 41A2001C
3AD60008 3AF6FFC8
48000010 1EB50008
7ED6AA14 3AF60004
C0360000 C0570000
48000034 C8628AF8
D8620020 D8620028
B2C20026 B2E2002E
C8220020 C8420028
EC211828 EC421828
4800000C C0220018
C0420018 D03A0000
D05A0004 3B390001
3B5A0008 2C190003
4081FD60 C0220000
C0420004 C0620008
C082000C C0A20010
C0C20014 BA810008
38210038 00000000
003D36ED 00000037
00408503 00000035
00408511 00000035
0640851F 00000030
3566205C 63303066
66303025 322E3566
205C6366 66303066
6625322E 3566205C
63666630 30666625
322E3566 20000000
06409FE0 00000010
C37A0000 C0000000
C1400000 440C0000
063E89F8 000000B4
546F702D 4E202020
20202000 45434220
546F7020 20202000
45434220 426F7474
6F6D2000 45434220
52696768 74202000
45434220 4C656674
20202000 46312043
68205665 6C6F6300
4632204B 42205665
6C6F6300 46332053
68205665 6C6F6300
546F7461 6C205665
6C6F6300 53797320
44697265 63746900
53797320 432D5374
69636B00 53797320
4C2F5220 20202000
43757220 44697265
63746900 50727620
44697265 63746900
43725072 20536869
656C6400 00000000
063E8C2C 00000030
546D7220 416E7920
53686400 546D7220
44696720 53686400
546D7220 4A756D70
20202000 546D7220
55702D42 20202000
063E8C6C 0000009C
446D672F 4869746C
61672000 48697453
746E2F47 72616200
53686965 6C645374
756E2000 53686420
48502F53 697A6500
546D7220 496E742F
496E7600 48422D30
20582F59 20202000
48422D30 205A2F53
697A6500 48422D31
20582F59 20202000
48422D31 205A2F53
697A6500 48422D32
20582F59 20202000
48422D32 205A2F53
697A6500 48422D33
20582F59 20202000
48422D33 205A2F53
697A6500 00000000

Code:
.....................	  -Increment Player ID/CPU Stat View Toggle (801A3CE8)-
lis	r12,0x8042
ori	r12,r12,0x7940	# 80427940
lbz	r10,0(r12)	# loads player ID to display stuff for
addi	r10,r10,1	# increment it
cmpwi	r10,5
blt+	0x8
li	r10,0		# reset ID to 0 if above 4
stb	r10,0(r12)	# update player ID
blt+	END		# skip disabling display if simply incrementing player ID

DISABLE:
lis	r12,0x8016	# stuff to run if cycled beyond player 4 and disabling CPU Stat display
ori	r12,r12,0x4BC0	# 80164BC0
mtlr	r12
blrl
li	r0,0
stw	r0,-20344(r13)	# clear pointer

END:

----------
801A3CEC:  38000000	li	r0,0		-> nop
801A3CF0:  900DB088	stw	r0,-20344(r13)	-> nop


.....................	  -Load Player ID Instead of Frame Count (801A3E70)-
801A3E70:  3C608047	lis	r3,-32697	-> lis	r3,0x8042
801A3E74:  38637D90	addi	r3,r3,32144	-> addi	r3,r3,0x7940	# 80427940
801A3E78:  80630008	lwz	r3,8(r3)	-> lwz	r3,4(r3)	# loads player ID * 11111 (for readability)



.....................	  -Load Display Setting on Float Pair Change (Advance Right) (80224D70)-
cmpwi	r0,1		# r0 is new pokemon setting (controls floats slot if 1-3)
blt+	END
cmpwi	r0,3
bgt+	END

lis	r10,0x8042
ori	r10,r10,0x7947	# 80427947. settings address -0x1
lbzx	r9,r10,r0	# loads floats setting for the slot
stw	r9,0x60(r31)	# store it into item setting so the float description text updates

END:
stw	r0,0(r4)	# entry point (80224D70). update pokemon setting after advancing Right

.....................	  -Load Display Setting on Float Pair Change (Advance Left) (80224DA8)-
cmpwi	r0,1		# r0 is new pokemon setting (controls floats slot if 1-3)
blt+	END
cmpwi	r0,3
bgt+	END

lis	r10,0x8042
ori	r10,r10,0x7947	# 80427947. settings address -0x1
lbzx	r9,r10,r0	# loads floats setting for the slot
stw	r9,0x60(r31)	# store it into item setting so the float description text updates

END:
stw	r0,0(r4)	# entry point (80224DA8). update pokemon setting after advancing Left


.....................	  -Load Custom CPU Stat Floats (80390D68)-
stwu	r1,-56(r1)	# make space for 12 registers
stmw	r20,8(r1)	# push r20-r31 onto the stack

lis	r31,0x8042
ori	r31,r31,0x7940	# 80427940
lbz	r30,0(r31)	# loads player ID to display stuff for
cmpwi	r30,1
blt-	RESET_ID
cmpwi	r30,4
ble+	SCALE_ID

RESET_ID:
li	r30,1		# set player ID to 1 if not 1-4

SCALE_ID:
stb	r30,0(r31)	# store player ID
mulli	r20,r30,11111	# scale up player id by 11111 (for on-screen readability)
stw	r20,4(r31)	# update player ID to display

DEFAULT_SETTINGS:
lwz	r20,8(r31)	# loads settings for displayed stuff
cmpwi	r20,0		# 0 if no settings defined yet
bne+	DEFAULT_COLORS
lis	r20,0x1419
ori	r20,r20,0x1D00	# 14191D00. TopN, Char Velocity, Directional Input (System)
stw	r20,8(r31)	# default settings for displayed stuff

DEFAULT_COLORS:
li	r20,0x3030	# 00003030 (- - 0 0)
li	r21,0x6666	# 00006666 (- - f f)
lis	r22,0x6666
ori	r22,r22,0x3030	# 66663030 (f f 0 0)
lis	r29,0x8040
ori	r29,r29,0x84DE	# 804084DE. Font color data address -0x1C

sth	r21,0x1C(r29)	# f f      @804084FA (float 1 Red)
sth	r21,0x20(r29)	# f f      @804084FE (float 1 Blue)
sth	r21,0x2E(r29)	# f f      @8040850C (float 2 Blue)

sth	r20,0x38(r29)	# 0 0      @80408516 (float 3 Red)
stw	r22,0x3A(r29)	# f f 0 0  @80408518 (float 3 Green/Blue)
sth	r20,0x46(r29)	# 0 0      @80408524 (float 4 Red)
stw	r22,0x48(r29)	# f f 0 0  @80408526 (float 4 Green/Blue)

stw	r22,0x54(r29)	# f f 0 0  @80408532 (float 5 Red/Green)
sth	r21,0x58(r29)	# f f      @80408536 (float 5 Blue)
stw	r22,0x62(r29)	# f f 0 0  @80408540 (float 6 Red/Green)
sth	r21,0x66(r29)	# f f      @80408544 (float 6 Blue)

UPDATE_SETTING:
addi	r31,r31,7	# 80427947. settings address -0x1
lis	r28,0x8049
ori	r28,r28,0xD978	# 8049D978. Address of Debug Item/Pokemon Settings
lwz	r27,0x4(r28)	# loads Pokemon Setting

cmpwi	r27,1
blt+	FLOAT_PREP
cmpwi	r27,3
bgt+	FLOAT_PREP	# no float font highlight or updating floats setting if not slots 1-3
lwz	r24,0x0(r28)	# loads Item Setting
stbx	r24,r31,r27	# stores item setting as floats setting for the slot

HIGHLIGHT:
mulli	r23,r27,0x1C	# float pairs' color data 0x1C apart. 1st float in pair offset
addi	r24,r23,0xE	# 2nd float in pair offset

sthx	r21,r29,r23	# 1st float Red = f f
sthx	r21,r29,r24	# 2nd float Red = f f
addi	r23,r23,2	# moves 1st float offset to Green/Blue
addi	r24,r24,2	# moves 2nd float offset to Green/Blue
stwx	r22,r29,r23	# 1st float Green/Blue = f f 0 0
stwx	r22,r29,r24	# 2nd float Green/Blue = f f 0 0

FLOAT_PREP:
li	r20,0
stw	r20,0x18(r2)	# stores 0 for when loading null floats
mr	r26,r2		# initialize address to store floats during code's loop
li	r25,1		# initialize current float pair being worked on

GET_MAIN_INDEX:
lis	r29,0x804D
ori	r29,r29,0x56A8	# 804D56A8. Address for player pointers (P1) +0x4
mulli	r21,r30,-0x4	# player ID * -4. pointers are 4 bytes apart and in reverse order
lwzx	r29,r29,r21
lwz	r29,0x20(r29)	# loads Main Index for player being displayed
ori	r20,r20,0xFFFF	# 0000FFFF. for empty player slot check


LOOP_START:
lhz	r21,0x6(r29)	# FFFF if empty player slot
cmpw	r21,r20
beq-	NULL_FLOATS	# go to use 0 for both floats in this pair if empty player slot
lbzx	r24,r31,r25	# loads setting for float pair being worked on
lwz	r23,0x70(r29)	# loads current action


cmpwi	r24,0x14	# 0x14 = TopN
beq-	TOPN
blt-	NULL_FLOATS	# load null floats if invalid setting on this float pair

cmpwi	r24,0x18
ble-	SCD		# 0x15 - 0x18 = SCD Top/Bottom/Right/Left

cmpwi	r24,0x1C
ble-	VELOCITIES	# 0x19 - 0x1C = Forces|Velocities

cmpwi	r24,0x1F
ble-	LIVE_INPUTS	# 0x1D - 0x1F = Live Controller Port Inputs

cmpwi	r24,0x22
ble-	CHAR_INPUTS	# 0x20 - 0x22 = Inputs Applied to Character

cmpwi	r24,0x2E
ble-	BUTTON_TIMERS	# 0x2B - 0x2E = Button Timers


cmpwi	r24,0xD0	# 0xD0 = Total Damage|Hitlag
beq-	DAMAGE_HITLAG

cmpwi	r24,0xD1	# 0xD1 = Hitstun|Grab Hold Time
beq-	HITSTUN_GRABTIME

cmpwi	r24,0xD2	# 0xD2 = Shield Stun (Actual|Calculated)
beq-	SHIELDSTUN

cmpwi	r24,0xD3	# 0xD3 = Shield Health|Size
beq-	SHIELD_HPSIZE

cmpwi	r24,0xD4	# 0xD4 = Timed Intangibility/Invincibility
beq-	TIMED_INTINV

cmpwi	r24,0xDC	# 0xD5 - 0xDC = Hitbox X/Y|Hitbox Z/Size
ble-	HITBOX
b	NULL_FLOATS	# load null floats if invalid setting on this float pair



TOPN:
cmpw	r25,r27
bne+	TOPN_ADDRESS	# skip input checks for TopN modification if TopN float pair not highlighted

TOPN_MODIFY:
subi	r21,r28,0xC2	# 8049D8B6. Controller port 1 debug held inputs -0x14
subi	r24,r28,0x72	# port 4's address for end of loop

TOPN_LOOP:
lhzu	r22,0x14(r21)	# loads next port's held inputs
li	r23,0x0104	# A and dpad-down buttons
andc.	r23,r22,r23
bne-	TOPN_LOOP_CHK	# skip if inputting anything besides A or dpad-down

lhz	r23,0x8(r21)	# loads press inputs
rlwinm. r23,r23,0,29,29	# check if dpad-down press
beq+	TOPN_LOOP_CHK	# skip if no dpad-down press

lfs	f1,0x18(r2)	# 0 for TopN X
lfs	f2,0x18(r2)	# 0 for TopN Y
rlwinm. r23,r22,0,23,23	# check if A button held
beq+	0x8
lfs	f2,-32344(r2)	# loads 100 for TopN Y if holding A
stfs	f1,0x110(r29)	# update TopN X
stfs	f2,0x114(r29)	# update TopN Y

TOPN_LOOP_CHK:
cmpw	r21,r24
blt+	TOPN_LOOP	# loop if not finished checking all controller ports


TOPN_ADDRESS:
addi	r22,r29,0x110	# Main Index + 0x110 = TopN X
b	COMMON_PAIR_4


SCD:
addi	r22,r29,0x7D4	# Main Index + 0x7D4 = SCD Top X
subi	r21,r24,0x15
b	COMMON_GROUP_8	# Top/Bottom/Right/Left are 0x8 bytes apart, and pairs 4 apart


VELOCITIES:
addi	r22,r29,0xE0	# Main Index + 0xE0 = F1 Char Velocity X
beq-	NET_VELOCITY	# 0x1C = Net Velocity
subi	r21,r24,0x19
mulli	r21,r21,0xC	# F1/F2/F3 forces float groups are 0xC bytes apart, and pairs 4 apart
b	COMMON_GROUP

NET_VELOCITY:
lfs	f1,0x0(r22)	# F1 Char Velocity X
lfs	f2,0x4(r22)	# F1 Char Velocity Y
lfs	f3,0xC(r22)	# F2 KB Velocity X
lfs	f4,0x10(r22)	# F2 KB Velocity Y
lfs	f5,0x18(r22)	# F3 Atk-Shd KB Velocity X
lfs	f6,0x1C(r22)	# F3 Atk-Shd KB Velocity Y
fadds	f1,f1,f3
fadds	f1,f1,f5	# total force X
fadds	f2,f2,f4
fadds	f2,f2,f6	# total force Y
b	LOOP_END


LIVE_INPUTS:
lis	r22,0x804B
ori	r22,r22,0xFE08	# 804BFE08. Controller port 1 inputs -0x44
mulli	r21,r30,0x44	# player ID * 0x44 (ports 0x44 apart)
add	r22,r22,r21
lbz	r21,0x21(r22)	# FF if empty controller port
cmpwi	r21,0xFF
beq-	NULL_FLOATS	# null floats if no controller plugged into port showing floats for
subi	r21,r24,0x1D
b	COMMON_GROUP_8	# Directional/C-Stick/LR inputs are 0x8 bytes apart, and pairs 4 apart


CHAR_INPUTS:
addi	r22,r29,0x680	# Main Index + 0x680 = Current Dir Input X
bne+	0x8		# skip if not 0x22 Curr/Prev Shield Input
addi	r22,r22,0x20	# shield input is 0x20 later than the usual 0x8 between groups
subi	r21,r24,0x20
b	COMMON_GROUP_8	# CurrDir/PrevDir/Shield inputs are 0x8 bytes apart, and pairs 4 apart


BUTTON_TIMERS:
subi	r21,r24,0x2B
add	r21,r29,r21	# Main Index + group offset
li	r22,0x6E3	# offset from main index 1st timer + 0x4 (0x2C timers are 4 apart)
cmpwi	r24,0x2C
ble-	LOAD_TIMERS
addi	r21,r21,0x4	# 2D-2E are 4 bytes after calculated group offset
li	r22,0x6E4	# offset from main index 1st timer + 0x5 (0x2D-2E timers are 5 apart)

LOAD_TIMERS:
lbzx	r23,r21,r22	# loads 2nd timer
lbz	r22,0x6DF(r21)	# loads 1st timer
bge+	0x8		# skip if 2C-2E
li	r23,0		# 2B has no 2nd timer. null
b	INT_TO_FLOAT	# convert the int timers into floats so they can be used



DAMAGE_HITLAG:
lfs	f1,0x1890(r29)	# loads Total Damage as 1st float
lfs	f2,0x19BC(r29)	# loads Hitlag as 2nd float
b	LOOP_END


HITSTUN_GRABTIME:
lfs	f1,0x18(r2)	# loads 0 for 1st float by default
lwz	r22,0x227C(r29)	# loads flags for things like hitstun
rlwinm. r21,r22,0,6,6	# check flag for in hitstun (-2------)
beq+	GRAB_TIME	# keep as 0 if not in hitstun
lfs	f1,0x23A0(r29)	# loads variable(?) that contains hitstun duration while in hitstun

GRAB_TIME:
lfs	f2,0x1AAC(r29)	# loads Grab Hold Time as 2nd float
b	LOOP_END


SHIELDSTUN:
cmpwi	r23,0xB5	# 0xB5 = GuardDamage
bne+	NULL_FLOATS	# null floats if not shield damage action

lfs	f1,0x8F4(r29)	# loads current animation frame
lfs	f2,0x8FC(r29)	# loads animation speed
lfs	f3,-28872(r2)	# 804D6798. loads 20 (41A00000). GuardDamage animation length for all characters
lfs	f4,-29808(r2)	# 804D63F0. loads 0.1 (3DCCCCCD). added to animation length for FSM calculations

fsubs	f1,f3,f1	# 20 - Current Frame = Animation Length Remaining
fdivs	f1,f1,f2	# (20 - Current Frame) / Speed = Actual Stun Time Remaining

fadds	f3,f3,f4	# 20 + 0.1
fdivs	f2,f3,f2	# (20 + 0.1) / Speed = Originally Calculated Stun Time
b	LOOP_END


SHIELD_HPSIZE:
lfs	f1,0x19F8(r29)	# loads Shield Health as 1st float

cmpwi	r23,0xB2	# 0xB2 = GuardOn
blt+	NULL_SECOND	# load 0 for 2nd float if not shield action
cmpwi	r23,0xB6	# 0xB6 = GuardReflect
bgt-	NULL_SECOND	# load 0 for 2nd float if not shield action

lwz	r21,0x1A20(r29)
lfs	f2,0x58(r21)	# loads Shield Collision Size as 2nd float
b	LOOP_END


TIMED_INTINV:
lwz	r22,0x19F0(r29)	# loads timed Intangibility
lwz	r23,0x19F4(r29)	# loads timed Invincibility
b	INT_TO_FLOAT	# convert the int timers into floats so they can be used


HITBOX:
addi	r22,r29,0x9C0	# Main Index + 0x9C0 = Hitbox-0 X
subi	r24,r24,0xD5	# setting remainder for hitbox setting group 0xD5 - 0xDC

li	r23,2
divw	r21,r24,r23	# each hitbox has 2 float pair settings associated with it
mulli	r21,r21,0x138	# hitboxes are 0x138 apart
add	r22,r22,r21	# address of X Offset of Hitbox being looked at

lwz	r21,-0x4C(r22)	# 0 = inactive hitbox ID, 2 = active no interp, 3 = active interp
cmpwi	r21,0
beq+	NULL_FLOATS	# null floats if hitbox ID not active

addi	r23,r22,0x4	# 2nd float is 4 bytes after 1st on Even hitbox settings
rlwinm. r21,r24,0,31,31	# check if Odd hitbox setting
beq+	COMMON_LOAD	# skip and load floats if Even hitbox setting
addi	r22,r22,0x8
subi	r23,r22,0x38	# Size (2nd float) is -0x38 from Z (1st), not +0x4
b	COMMON_LOAD	# load hitbox floats



COMMON_GROUP_8:
mulli	r21,r21,0x8	# groups of floats are 8 bytes apart

COMMON_GROUP:
add	r22,r22,r21	# adds group offset

COMMON_PAIR_4:
addi	r23,r22,0x4	# 2nd float 4 bytes after 1st

COMMON_LOAD:
lfs	f1,0x0(r22)
lfs	f2,0x0(r23)
b	LOOP_END


INT_TO_FLOAT:
lfd	f3,-29960(r2)	# loads magic double for int to float conversion
stfd	f3,0x20(r2)
stfd	f3,0x28(r2)
sth	r22,0x26(r2)	# 0x43300000800000xx. put 1st int at end of magic double
sth	r23,0x2E(r2)	# 2nd int
lfd	f1,0x20(r2)
lfd	f2,0x28(r2)
fsubs	f1,f1,f3	# subtract 0x4330000080000000 for converted int 1
fsubs	f2,f2,f3	# subtract 0x4330000080000000 for converted int 2
b	LOOP_END


NULL_FLOATS:
lfs	f1,0x18(r2)	# loads 0 for 1st float

NULL_SECOND:
lfs	f2,0x18(r2)	# loads 0 for 2nd float

LOOP_END:
stfs	f1,0x0(r26)	# store 1st float in pair at current pair's loading address
stfs	f2,0x4(r26)	# 2nd float
addi	r25,r25,1	# increment current float pair
addi	r26,r26,8	# update float storage address to next float pair slot
cmpwi	r25,3
ble+	LOOP_START	# loop for next float pair until all 3 are done

LOAD_FLOATS:
lfs	f1,0x0(r2)	# loads setting 1, float 1
lfs	f2,0x4(r2)	# loads setting 1, float 2
lfs	f3,0x8(r2)	# loads setting 2, float 1
lfs	f4,0xC(r2)	# loads setting 2, float 2
lfs	f5,0x10(r2)	# loads setting 3, float 1
lfs	f6,0x14(r2)	# loads setting 3, float 2

END:
lmw	r20,8(r1)	# pop r20-r31 off the stack
addi	r1,r1,56	# release the space



r20 = Temp Stuff | 0000FFFF
r21 = Temp Stuff
r22 = Temp Stuff |                  Common Load 1, Int to Float 1
r23 = Temp Stuff | Current Action | Common Load 2, Int to Float 2
r24 = Temp Stuff | Current Floats Setting for Functions
r25 = Current Floats Pair
r26 = Current Float Storage Address
r27 = Pokemon Setting
r28 = Address of Debug Item/Pokemon Settings and Debug Inputs
r29 = Font Color Data Address | Main Index for Player
r30 = Player ID
r31 = Display Settings Address | Display Settings Address + 0x7 (for indexed loading of settings)
Code:
---DOL Edits---
801A3CE8	0x1A08C8	48283C68 60000000 60000000
80427950	0x424950	3D808042 618C7940 894C0000 394A0001 2C0A0005 41A00008 39400000 994C0000 41A0001C 3D808016 618C4BC0 7D8803A6 4E800021 38000000 900DB088 4BD7C360

801A3E70	0x1A0A50	3C608042 38637940 80630004

80224D70	0x221950	48202C30
804279A0	0x4249A0	2C000001 41A0001C 2C000003 41A10014 3D408042 614A7947 7D2A00AE 913F0060 90040000 4BDFD3B0

80224DA8	0x221988	48202C28
804279D0	0x4249D0	2C000001 41A0001C 2C000003 41A10014 3D408042 614A7947 7D2A00AE 913F0060 90040000 4BDFD3B8

80390D68	0x38D948	480969D8
80427740	0x424740	9421FFC8 BE810008 3FE08042 63FF7940 8BDF0000 2C1E0001 4180000C 2C1E0004 40A10008 3BC00001 9BDF0000 1E9E2B67 929F0004 829F0008 2C140000 40A20010 3E801419 62941D00 929F0008 3A803030 3AA06666 3EC06666 62D63030 3FA08040 63BD84DE B2BD001C B2BD0020 B2BD002E B29D0038 92DD003A B29D0046 92DD0048 92DD0054 B2BD0058 92DD0062 B2BD0066 3BFF0007 3F808049 639CD978 837C0004 2C1B0001 41A00034 2C1B0003 41A1002C 831C0000 7F1FD9AE 1EFB001C 3B17000E 7EBDBB2E 7EBDC32E 3AF70002 3B180002 7EDDB92E 7EDDC12E 3A800000 92820018 7C5A1378 3B200001 3FA0804D 63BD56A8 1EBEFFFC 7FBDA82E 83BD0020 6294FFFF 4BFFFB20
80427360	0x424360	A2BD0006 7C15A000 4182027C 7F1FC8AE 82FD0070 2C180014 41820064 41800268 2C180018 408100B0 2C18001C 408100B4 2C18001F 408100EC 2C180022 40810108 2C18002E 40810114 2C1800D0 4182013C 2C1800D1 41820140 2C1800D2 41820154 2C1800D3 41820178 2C1800D4 41820190 2C1800DC 40810194 4800020C 7C19D800 40A2004C 3ABCFF3E 3B1CFF8E A6D50014 3AE00104 7ED7B879 4082002C A2F50008 56F7077B 41A20020 C0220018 C0420018 56D705EF 41A20008 C04281A8 D03D0110 D05D0114 7C15C000 4180FFC4 3ADD0110 4800017C 3ADD07D4 3AB8FFEB 48000168 3ADD00E0 41820010 3AB8FFE7 1EB5000C 48000158 C0360000 C0560004 C076000C C0960010 C0B60018 C0D6001C EC21182A EC21282A EC42202A EC42302A 48000170 3EC0804B 62D6FE08 1EBE0044 7ED6AA14 8AB60021 2C1500FF 4182014C 3AB8FFE3 48000104 3ADD0680 40A20008 3AD60020 3AB8FFE0 480000F0 3AB8FFD5 7EBDAA14 3AC006E3 2C18002C 4081000C 3AB50004 3AC006E4 7EF5B0AE 8AD506DF 40A00008 3AE00000 480000D8 C03D1890 C05D19BC 480000FC C0220018 82DD227C 56D5018D 41A20008 C03D23A0 C05D1AAC 480000E0 2C1700B5 40A200D0 C03D08F4
C05D08FC C0628F38 C0828B90 EC230828 EC211024 EC63202A EC431024 480000B4 C03D19F8 2C1700B2 41A000A4 2C1700B6 4181009C 82BD1A20 C0550058 48000094 82DD19F0 82FD19F4 48000058 3ADD09C0 3B18FF2B 3AE00002 7EB8BBD6 1EB50138 7ED6AA14 82B6FFB4 2C150000 41A2005C 3AF60004 571507FF 41A2001C 3AD60008 3AF6FFC8 48000010 1EB50008 7ED6AA14 3AF60004 C0360000 C0570000 48000034 C8628AF8 D8620020 D8620028 B2C20026 B2E2002E C8220020 C8420028 EC211828 EC421828 4800000C C0220018 C0420018 D03A0000 D05A0004 3B390001 3B5A0008 2C190003 4081FD60 C0220000 C0420004 C0620008 C082000C C0A20010 C0C20014 BA810008 38210038 4BF69748

803D36ED	0x3D06ED	37
80408503	0x405503	35
80408511	0x405511	35
8040851F	0x40551F	3566205C 63303066 66303025 322E3566 205C6366 66303066 6625322E 3566205C 63666630 30666625 322E3566 20000000
80409FE0	0x406FE0	C37A0000 C0000000 C1400000 440C0000

803E89F8	0x3E59F8	546F702D 4E202020 20202000 45434220 546F7020 20202000 45434220 426F7474 6F6D2000 45434220 52696768 74202000 45434220 4C656674 20202000 46312043 68205665 6C6F6300 4632204B 42205665 6C6F6300 46332053 68205665 6C6F6300 546F7461 6C205665 6C6F6300 53797320 44697265 63746900 53797320 432D5374 69636B00 53797320 4C2F5220 20202000 43757220 44697265 63746900 50727620 44697265 63746900 43725072 20536869 656C6400
803E8C2C	0x3E5C2C	546D7220 416E7920 53686400 546D7220 44696720 53686400 546D7220 4A756D70 20202000 546D7220 55702D42 20202000
803E8C6C	0x3E5C6C	446D672F 4869746C 61672000 48697453 746E2F47 72616200 53686965 6C645374 756E2000 53686420 48502F53 697A6500 546D7220 496E742F 496E7600 48422D30 20582F59 20202000 48422D30 205A2F53 697A6500 48422D31 20582F59 20202000 48422D31 205A2F53 697A6500 48422D32 20582F59 20202000 48422D32 205A2F53 697A6500 48422D33 20582F59 20202000 48422D33 205A2F53 697A6500
 

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
How do you make a code that activates when the player presses a specific button?
Theres a list of values for inputs at a certain memory address. You can either check for that value or check for the bit.
http://smashboards.com/threads/physics-input-etc-display-in-develop-mode.391956/

Physics, Input, etc Display in Develop Mode v2.0 (NTSC 1.00) [Magus]
C21A3CE8 00000008
3D808042 618C7940
894C0000 394A0001
2C0A0005 41A00008
39400000 994C0000
41A0001C 3D808016
618C4BC0 7D8803A6
4E800021 38000000
900DB088 00000000
061A3CEC 00000008
60000000 60000000
061A3E70 0000000C
3C608042 38637940
80630004 00000000
C2224D70 00000005
2C000001 41A0001C
2C000003 41A10014
3D408042 614A7947
7D2A00AE 913F0060
90040000 00000000
C2224DA8 00000005
2C000001 41A0001C
2C000003 41A10014
3D408042 614A7947
7D2A00AE 913F0060
90040000 00000000
C2390D68 00000079
9421FFC8 BE810008
3FE08042 63FF7940
8BDF0000 2C1E0001
4180000C 2C1E0004
40A10008 3BC00001
9BDF0000 1E9E2B67
929F0004 829F0008
2C140000 40A20010
3E801419 62941D00
929F0008 3A803030
3AA06666 3EC06666
62D63030 3FA08040
63BD84DE B2BD001C
B2BD0020 B2BD002E
B29D0038 92DD003A
B29D0046 92DD0048
92DD0054 B2BD0058
92DD0062 B2BD0066
3BFF0007 3F808049
639CD978 837C0004
2C1B0001 41A00034
2C1B0003 41A1002C
831C0000 7F1FD9AE
1EFB001C 3B17000E
7EBDBB2E 7EBDC32E
3AF70002 3B180002
7EDDB92E 7EDDC12E
3A800000 92820018
7C5A1378 3B200001
3FA0804D 63BD56A8
1EBEFFFC 7FBDA82E
83BD0020 6294FFFF
A2BD0006 7C15A000
4182027C 7F1FC8AE
82FD0070 2C180014
41820064 41800268
2C180018 408100B0
2C18001C 408100B4
2C18001F 408100EC
2C180022 40810108
2C18002E 40810114
2C1800D0 4182013C
2C1800D1 41820140
2C1800D2 41820154
2C1800D3 41820178
2C1800D4 41820190
2C1800DC 40810194
4800020C 7C19D800
40A2004C 3ABCFF3E
3B1CFF8E A6D50014
3AE00104 7ED7B879
4082002C A2F50008
56F7077B 41A20020
C0220018 C0420018
56D705EF 41A20008
C04281A8 D03D0110
D05D0114 7C15C000
4180FFC4 3ADD0110
4800017C 3ADD07D4
3AB8FFEB 48000168
3ADD00E0 41820010
3AB8FFE7 1EB5000C
48000158 C0360000
C0560004 C076000C
C0960010 C0B60018
C0D6001C EC21182A
EC21282A EC42202A
EC42302A 48000170
3EC0804B 62D6FE08
1EBE0044 7ED6AA14
8AB60021 2C1500FF
4182014C 3AB8FFE3
48000104 3ADD0680
40A20008 3AD60020
3AB8FFE0 480000F0
3AB8FFD5 7EBDAA14
3AC006E3 2C18002C
4081000C 3AB50004
3AC006E4 7EF5B0AE
8AD506DF 40A00008
3AE00000 480000D8
C03D1890 C05D19BC
480000FC C0220018
82DD227C 56D5018D
41A20008 C03D23A0
C05D1AAC 480000E0
2C1700B5 40A200D0
C03D08F4 C05D08FC
C0628F38 C0828B90
EC230828 EC211024
EC63202A EC431024
480000B4 C03D19F8
2C1700B2 41A000A4
2C1700B6 4181009C
82BD1A20 C0550058
48000094 82DD19F0
82FD19F4 48000058
3ADD09C0 3B18FF2B
3AE00002 7EB8BBD6
1EB50138 7ED6AA14
82B6FFB4 2C150000
41A2005C 3AF60004
571507FF 41A2001C
3AD60008 3AF6FFC8
48000010 1EB50008
7ED6AA14 3AF60004
C0360000 C0570000
48000034 C8628AF8
D8620020 D8620028
B2C20026 B2E2002E
C8220020 C8420028
EC211828 EC421828
4800000C C0220018
C0420018 D03A0000
D05A0004 3B390001
3B5A0008 2C190003
4081FD60 C0220000
C0420004 C0620008
C082000C C0A20010
C0C20014 BA810008
38210038 00000000
003D36ED 00000037
00408503 00000035
00408511 00000035
0640851F 00000030
3566205C 63303066
66303025 322E3566
205C6366 66303066
6625322E 3566205C
63666630 30666625
322E3566 20000000
06409FE0 00000010
C37A0000 C0000000
C1400000 440C0000
063E89F8 000000B4
546F702D 4E202020
20202000 45434220
546F7020 20202000
45434220 426F7474
6F6D2000 45434220
52696768 74202000
45434220 4C656674
20202000 46312043
68205665 6C6F6300
4632204B 42205665
6C6F6300 46332053
68205665 6C6F6300
546F7461 6C205665
6C6F6300 53797320
44697265 63746900
53797320 432D5374
69636B00 53797320
4C2F5220 20202000
43757220 44697265
63746900 50727620
44697265 63746900
43725072 20536869
656C6400 00000000
063E8C2C 00000030
546D7220 416E7920
53686400 546D7220
44696720 53686400
546D7220 4A756D70
20202000 546D7220
55702D42 20202000
063E8C6C 0000009C
446D672F 4869746C
61672000 48697453
746E2F47 72616200
53686965 6C645374
756E2000 53686420
48502F53 697A6500
546D7220 496E742F
496E7600 48422D30
20582F59 20202000
48422D30 205A2F53
697A6500 48422D31
20582F59 20202000
48422D31 205A2F53
697A6500 48422D32
20582F59 20202000
48422D32 205A2F53
697A6500 48422D33
20582F59 20202000
48422D33 205A2F53
697A6500 00000000

Code:
.....................      -Increment Player ID/CPU Stat View Toggle (801A3CE8)-
lis    r12,0x8042
ori    r12,r12,0x7940    # 80427940
lbz    r10,0(r12)    # loads player ID to display stuff for
addi    r10,r10,1    # increment it
cmpwi    r10,5
blt+    0x8
li    r10,0        # reset ID to 0 if above 4
stb    r10,0(r12)    # update player ID
blt+    END        # skip disabling display if simply incrementing player ID

DISABLE:
lis    r12,0x8016    # stuff to run if cycled beyond player 4 and disabling CPU Stat display
ori    r12,r12,0x4BC0    # 80164BC0
mtlr    r12
blrl
li    r0,0
stw    r0,-20344(r13)    # clear pointer

END:

----------
801A3CEC:  38000000    li    r0,0        -> nop
801A3CF0:  900DB088    stw    r0,-20344(r13)    -> nop


.....................      -Load Player ID Instead of Frame Count (801A3E70)-
801A3E70:  3C608047    lis    r3,-32697    -> lis    r3,0x8042
801A3E74:  38637D90    addi    r3,r3,32144    -> addi    r3,r3,0x7940    # 80427940
801A3E78:  80630008    lwz    r3,8(r3)    -> lwz    r3,4(r3)    # loads player ID * 11111 (for readability)



.....................      -Load Display Setting on Float Pair Change (Advance Right) (80224D70)-
cmpwi    r0,1        # r0 is new pokemon setting (controls floats slot if 1-3)
blt+    END
cmpwi    r0,3
bgt+    END

lis    r10,0x8042
ori    r10,r10,0x7947    # 80427947. settings address -0x1
lbzx    r9,r10,r0    # loads floats setting for the slot
stw    r9,0x60(r31)    # store it into item setting so the float description text updates

END:
stw    r0,0(r4)    # entry point (80224D70). update pokemon setting after advancing Right

.....................      -Load Display Setting on Float Pair Change (Advance Left) (80224DA8)-
cmpwi    r0,1        # r0 is new pokemon setting (controls floats slot if 1-3)
blt+    END
cmpwi    r0,3
bgt+    END

lis    r10,0x8042
ori    r10,r10,0x7947    # 80427947. settings address -0x1
lbzx    r9,r10,r0    # loads floats setting for the slot
stw    r9,0x60(r31)    # store it into item setting so the float description text updates

END:
stw    r0,0(r4)    # entry point (80224DA8). update pokemon setting after advancing Left


.....................      -Load Custom CPU Stat Floats (80390D68)-
stwu    r1,-56(r1)    # make space for 12 registers
stmw    r20,8(r1)    # push r20-r31 onto the stack

lis    r31,0x8042
ori    r31,r31,0x7940    # 80427940
lbz    r30,0(r31)    # loads player ID to display stuff for
cmpwi    r30,1
blt-    RESET_ID
cmpwi    r30,4
ble+    SCALE_ID

RESET_ID:
li    r30,1        # set player ID to 1 if not 1-4

SCALE_ID:
stb    r30,0(r31)    # store player ID
mulli    r20,r30,11111    # scale up player id by 11111 (for on-screen readability)
stw    r20,4(r31)    # update player ID to display

DEFAULT_SETTINGS:
lwz    r20,8(r31)    # loads settings for displayed stuff
cmpwi    r20,0        # 0 if no settings defined yet
bne+    DEFAULT_COLORS
lis    r20,0x1419
ori    r20,r20,0x1D00    # 14191D00. TopN, Char Velocity, Directional Input (System)
stw    r20,8(r31)    # default settings for displayed stuff

DEFAULT_COLORS:
li    r20,0x3030    # 00003030 (- - 0 0)
li    r21,0x6666    # 00006666 (- - f f)
lis    r22,0x6666
ori    r22,r22,0x3030    # 66663030 (f f 0 0)
lis    r29,0x8040
ori    r29,r29,0x84DE    # 804084DE. Font color data address -0x1C

sth    r21,0x1C(r29)    # f f      @804084FA (float 1 Red)
sth    r21,0x20(r29)    # f f      @804084FE (float 1 Blue)
sth    r21,0x2E(r29)    # f f      @8040850C (float 2 Blue)

sth    r20,0x38(r29)    # 0 0      @80408516 (float 3 Red)
stw    r22,0x3A(r29)    # f f 0 0  @80408518 (float 3 Green/Blue)
sth    r20,0x46(r29)    # 0 0      @80408524 (float 4 Red)
stw    r22,0x48(r29)    # f f 0 0  @80408526 (float 4 Green/Blue)

stw    r22,0x54(r29)    # f f 0 0  @80408532 (float 5 Red/Green)
sth    r21,0x58(r29)    # f f      @80408536 (float 5 Blue)
stw    r22,0x62(r29)    # f f 0 0  @80408540 (float 6 Red/Green)
sth    r21,0x66(r29)    # f f      @80408544 (float 6 Blue)

UPDATE_SETTING:
addi    r31,r31,7    # 80427947. settings address -0x1
lis    r28,0x8049
ori    r28,r28,0xD978    # 8049D978. Address of Debug Item/Pokemon Settings
lwz    r27,0x4(r28)    # loads Pokemon Setting

cmpwi    r27,1
blt+    FLOAT_PREP
cmpwi    r27,3
bgt+    FLOAT_PREP    # no float font highlight or updating floats setting if not slots 1-3
lwz    r24,0x0(r28)    # loads Item Setting
stbx    r24,r31,r27    # stores item setting as floats setting for the slot

HIGHLIGHT:
mulli    r23,r27,0x1C    # float pairs' color data 0x1C apart. 1st float in pair offset
addi    r24,r23,0xE    # 2nd float in pair offset

sthx    r21,r29,r23    # 1st float Red = f f
sthx    r21,r29,r24    # 2nd float Red = f f
addi    r23,r23,2    # moves 1st float offset to Green/Blue
addi    r24,r24,2    # moves 2nd float offset to Green/Blue
stwx    r22,r29,r23    # 1st float Green/Blue = f f 0 0
stwx    r22,r29,r24    # 2nd float Green/Blue = f f 0 0

FLOAT_PREP:
li    r20,0
stw    r20,0x18(r2)    # stores 0 for when loading null floats
mr    r26,r2        # initialize address to store floats during code's loop
li    r25,1        # initialize current float pair being worked on

GET_MAIN_INDEX:
lis    r29,0x804D
ori    r29,r29,0x56A8    # 804D56A8. Address for player pointers (P1) +0x4
mulli    r21,r30,-0x4    # player ID * -4. pointers are 4 bytes apart and in reverse order
lwzx    r29,r29,r21
lwz    r29,0x20(r29)    # loads Main Index for player being displayed
ori    r20,r20,0xFFFF    # 0000FFFF. for empty player slot check


LOOP_START:
lhz    r21,0x6(r29)    # FFFF if empty player slot
cmpw    r21,r20
beq-    NULL_FLOATS    # go to use 0 for both floats in this pair if empty player slot
lbzx    r24,r31,r25    # loads setting for float pair being worked on
lwz    r23,0x70(r29)    # loads current action


cmpwi    r24,0x14    # 0x14 = TopN
beq-    TOPN
blt-    NULL_FLOATS    # load null floats if invalid setting on this float pair

cmpwi    r24,0x18
ble-    SCD        # 0x15 - 0x18 = SCD Top/Bottom/Right/Left

cmpwi    r24,0x1C
ble-    VELOCITIES    # 0x19 - 0x1C = Forces|Velocities

cmpwi    r24,0x1F
ble-    LIVE_INPUTS    # 0x1D - 0x1F = Live Controller Port Inputs

cmpwi    r24,0x22
ble-    CHAR_INPUTS    # 0x20 - 0x22 = Inputs Applied to Character

cmpwi    r24,0x2E
ble-    BUTTON_TIMERS    # 0x2B - 0x2E = Button Timers


cmpwi    r24,0xD0    # 0xD0 = Total Damage|Hitlag
beq-    DAMAGE_HITLAG

cmpwi    r24,0xD1    # 0xD1 = Hitstun|Grab Hold Time
beq-    HITSTUN_GRABTIME

cmpwi    r24,0xD2    # 0xD2 = Shield Stun (Actual|Calculated)
beq-    SHIELDSTUN

cmpwi    r24,0xD3    # 0xD3 = Shield Health|Size
beq-    SHIELD_HPSIZE

cmpwi    r24,0xD4    # 0xD4 = Timed Intangibility/Invincibility
beq-    TIMED_INTINV

cmpwi    r24,0xDC    # 0xD5 - 0xDC = Hitbox X/Y|Hitbox Z/Size
ble-    HITBOX
b    NULL_FLOATS    # load null floats if invalid setting on this float pair



TOPN:
cmpw    r25,r27
bne+    TOPN_ADDRESS    # skip input checks for TopN modification if TopN float pair not highlighted

TOPN_MODIFY:
subi    r21,r28,0xC2    # 8049D8B6. Controller port 1 debug held inputs -0x14
subi    r24,r28,0x72    # port 4's address for end of loop

TOPN_LOOP:
lhzu    r22,0x14(r21)    # loads next port's held inputs
li    r23,0x0104    # A and dpad-down buttons
andc.    r23,r22,r23
bne-    TOPN_LOOP_CHK    # skip if inputting anything besides A or dpad-down

lhz    r23,0x8(r21)    # loads press inputs
rlwinm. r23,r23,0,29,29    # check if dpad-down press
beq+    TOPN_LOOP_CHK    # skip if no dpad-down press

lfs    f1,0x18(r2)    # 0 for TopN X
lfs    f2,0x18(r2)    # 0 for TopN Y
rlwinm. r23,r22,0,23,23    # check if A button held
beq+    0x8
lfs    f2,-32344(r2)    # loads 100 for TopN Y if holding A
stfs    f1,0x110(r29)    # update TopN X
stfs    f2,0x114(r29)    # update TopN Y

TOPN_LOOP_CHK:
cmpw    r21,r24
blt+    TOPN_LOOP    # loop if not finished checking all controller ports


TOPN_ADDRESS:
addi    r22,r29,0x110    # Main Index + 0x110 = TopN X
b    COMMON_PAIR_4


SCD:
addi    r22,r29,0x7D4    # Main Index + 0x7D4 = SCD Top X
subi    r21,r24,0x15
b    COMMON_GROUP_8    # Top/Bottom/Right/Left are 0x8 bytes apart, and pairs 4 apart


VELOCITIES:
addi    r22,r29,0xE0    # Main Index + 0xE0 = F1 Char Velocity X
beq-    NET_VELOCITY    # 0x1C = Net Velocity
subi    r21,r24,0x19
mulli    r21,r21,0xC    # F1/F2/F3 forces float groups are 0xC bytes apart, and pairs 4 apart
b    COMMON_GROUP

NET_VELOCITY:
lfs    f1,0x0(r22)    # F1 Char Velocity X
lfs    f2,0x4(r22)    # F1 Char Velocity Y
lfs    f3,0xC(r22)    # F2 KB Velocity X
lfs    f4,0x10(r22)    # F2 KB Velocity Y
lfs    f5,0x18(r22)    # F3 Atk-Shd KB Velocity X
lfs    f6,0x1C(r22)    # F3 Atk-Shd KB Velocity Y
fadds    f1,f1,f3
fadds    f1,f1,f5    # total force X
fadds    f2,f2,f4
fadds    f2,f2,f6    # total force Y
b    LOOP_END


LIVE_INPUTS:
lis    r22,0x804B
ori    r22,r22,0xFE08    # 804BFE08. Controller port 1 inputs -0x44
mulli    r21,r30,0x44    # player ID * 0x44 (ports 0x44 apart)
add    r22,r22,r21
lbz    r21,0x21(r22)    # FF if empty controller port
cmpwi    r21,0xFF
beq-    NULL_FLOATS    # null floats if no controller plugged into port showing floats for
subi    r21,r24,0x1D
b    COMMON_GROUP_8    # Directional/C-Stick/LR inputs are 0x8 bytes apart, and pairs 4 apart


CHAR_INPUTS:
addi    r22,r29,0x680    # Main Index + 0x680 = Current Dir Input X
bne+    0x8        # skip if not 0x22 Curr/Prev Shield Input
addi    r22,r22,0x20    # shield input is 0x20 later than the usual 0x8 between groups
subi    r21,r24,0x20
b    COMMON_GROUP_8    # CurrDir/PrevDir/Shield inputs are 0x8 bytes apart, and pairs 4 apart


BUTTON_TIMERS:
subi    r21,r24,0x2B
add    r21,r29,r21    # Main Index + group offset
li    r22,0x6E3    # offset from main index 1st timer + 0x4 (0x2C timers are 4 apart)
cmpwi    r24,0x2C
ble-    LOAD_TIMERS
addi    r21,r21,0x4    # 2D-2E are 4 bytes after calculated group offset
li    r22,0x6E4    # offset from main index 1st timer + 0x5 (0x2D-2E timers are 5 apart)

LOAD_TIMERS:
lbzx    r23,r21,r22    # loads 2nd timer
lbz    r22,0x6DF(r21)    # loads 1st timer
bge+    0x8        # skip if 2C-2E
li    r23,0        # 2B has no 2nd timer. null
b    INT_TO_FLOAT    # convert the int timers into floats so they can be used



DAMAGE_HITLAG:
lfs    f1,0x1890(r29)    # loads Total Damage as 1st float
lfs    f2,0x19BC(r29)    # loads Hitlag as 2nd float
b    LOOP_END


HITSTUN_GRABTIME:
lfs    f1,0x18(r2)    # loads 0 for 1st float by default
lwz    r22,0x227C(r29)    # loads flags for things like hitstun
rlwinm. r21,r22,0,6,6    # check flag for in hitstun (-2------)
beq+    GRAB_TIME    # keep as 0 if not in hitstun
lfs    f1,0x23A0(r29)    # loads variable(?) that contains hitstun duration while in hitstun

GRAB_TIME:
lfs    f2,0x1AAC(r29)    # loads Grab Hold Time as 2nd float
b    LOOP_END


SHIELDSTUN:
cmpwi    r23,0xB5    # 0xB5 = GuardDamage
bne+    NULL_FLOATS    # null floats if not shield damage action

lfs    f1,0x8F4(r29)    # loads current animation frame
lfs    f2,0x8FC(r29)    # loads animation speed
lfs    f3,-28872(r2)    # 804D6798. loads 20 (41A00000). GuardDamage animation length for all characters
lfs    f4,-29808(r2)    # 804D63F0. loads 0.1 (3DCCCCCD). added to animation length for FSM calculations

fsubs    f1,f3,f1    # 20 - Current Frame = Animation Length Remaining
fdivs    f1,f1,f2    # (20 - Current Frame) / Speed = Actual Stun Time Remaining

fadds    f3,f3,f4    # 20 + 0.1
fdivs    f2,f3,f2    # (20 + 0.1) / Speed = Originally Calculated Stun Time
b    LOOP_END


SHIELD_HPSIZE:
lfs    f1,0x19F8(r29)    # loads Shield Health as 1st float

cmpwi    r23,0xB2    # 0xB2 = GuardOn
blt+    NULL_SECOND    # load 0 for 2nd float if not shield action
cmpwi    r23,0xB6    # 0xB6 = GuardReflect
bgt-    NULL_SECOND    # load 0 for 2nd float if not shield action

lwz    r21,0x1A20(r29)
lfs    f2,0x58(r21)    # loads Shield Collision Size as 2nd float
b    LOOP_END


TIMED_INTINV:
lwz    r22,0x19F0(r29)    # loads timed Intangibility
lwz    r23,0x19F4(r29)    # loads timed Invincibility
b    INT_TO_FLOAT    # convert the int timers into floats so they can be used


HITBOX:
addi    r22,r29,0x9C0    # Main Index + 0x9C0 = Hitbox-0 X
subi    r24,r24,0xD5    # setting remainder for hitbox setting group 0xD5 - 0xDC

li    r23,2
divw    r21,r24,r23    # each hitbox has 2 float pair settings associated with it
mulli    r21,r21,0x138    # hitboxes are 0x138 apart
add    r22,r22,r21    # address of X Offset of Hitbox being looked at

lwz    r21,-0x4C(r22)    # 0 = inactive hitbox ID, 2 = active no interp, 3 = active interp
cmpwi    r21,0
beq+    NULL_FLOATS    # null floats if hitbox ID not active

addi    r23,r22,0x4    # 2nd float is 4 bytes after 1st on Even hitbox settings
rlwinm. r21,r24,0,31,31    # check if Odd hitbox setting
beq+    COMMON_LOAD    # skip and load floats if Even hitbox setting
addi    r22,r22,0x8
subi    r23,r22,0x38    # Size (2nd float) is -0x38 from Z (1st), not +0x4
b    COMMON_LOAD    # load hitbox floats



COMMON_GROUP_8:
mulli    r21,r21,0x8    # groups of floats are 8 bytes apart

COMMON_GROUP:
add    r22,r22,r21    # adds group offset

COMMON_PAIR_4:
addi    r23,r22,0x4    # 2nd float 4 bytes after 1st

COMMON_LOAD:
lfs    f1,0x0(r22)
lfs    f2,0x0(r23)
b    LOOP_END


INT_TO_FLOAT:
lfd    f3,-29960(r2)    # loads magic double for int to float conversion
stfd    f3,0x20(r2)
stfd    f3,0x28(r2)
sth    r22,0x26(r2)    # 0x43300000800000xx. put 1st int at end of magic double
sth    r23,0x2E(r2)    # 2nd int
lfd    f1,0x20(r2)
lfd    f2,0x28(r2)
fsubs    f1,f1,f3    # subtract 0x4330000080000000 for converted int 1
fsubs    f2,f2,f3    # subtract 0x4330000080000000 for converted int 2
b    LOOP_END


NULL_FLOATS:
lfs    f1,0x18(r2)    # loads 0 for 1st float

NULL_SECOND:
lfs    f2,0x18(r2)    # loads 0 for 2nd float

LOOP_END:
stfs    f1,0x0(r26)    # store 1st float in pair at current pair's loading address
stfs    f2,0x4(r26)    # 2nd float
addi    r25,r25,1    # increment current float pair
addi    r26,r26,8    # update float storage address to next float pair slot
cmpwi    r25,3
ble+    LOOP_START    # loop for next float pair until all 3 are done

LOAD_FLOATS:
lfs    f1,0x0(r2)    # loads setting 1, float 1
lfs    f2,0x4(r2)    # loads setting 1, float 2
lfs    f3,0x8(r2)    # loads setting 2, float 1
lfs    f4,0xC(r2)    # loads setting 2, float 2
lfs    f5,0x10(r2)    # loads setting 3, float 1
lfs    f6,0x14(r2)    # loads setting 3, float 2

END:
lmw    r20,8(r1)    # pop r20-r31 off the stack
addi    r1,r1,56    # release the space



r20 = Temp Stuff | 0000FFFF
r21 = Temp Stuff
r22 = Temp Stuff |                  Common Load 1, Int to Float 1
r23 = Temp Stuff | Current Action | Common Load 2, Int to Float 2
r24 = Temp Stuff | Current Floats Setting for Functions
r25 = Current Floats Pair
r26 = Current Float Storage Address
r27 = Pokemon Setting
r28 = Address of Debug Item/Pokemon Settings and Debug Inputs
r29 = Font Color Data Address | Main Index for Player
r30 = Player ID
r31 = Display Settings Address | Display Settings Address + 0x7 (for indexed loading of settings)
Code:
---DOL Edits---
801A3CE8    0x1A08C8    48283C68 60000000 60000000
80427950    0x424950    3D808042 618C7940 894C0000 394A0001 2C0A0005 41A00008 39400000 994C0000 41A0001C 3D808016 618C4BC0 7D8803A6 4E800021 38000000 900DB088 4BD7C360

801A3E70    0x1A0A50    3C608042 38637940 80630004

80224D70    0x221950    48202C30
804279A0    0x4249A0    2C000001 41A0001C 2C000003 41A10014 3D408042 614A7947 7D2A00AE 913F0060 90040000 4BDFD3B0

80224DA8    0x221988    48202C28
804279D0    0x4249D0    2C000001 41A0001C 2C000003 41A10014 3D408042 614A7947 7D2A00AE 913F0060 90040000 4BDFD3B8

80390D68    0x38D948    480969D8
80427740    0x424740    9421FFC8 BE810008 3FE08042 63FF7940 8BDF0000 2C1E0001 4180000C 2C1E0004 40A10008 3BC00001 9BDF0000 1E9E2B67 929F0004 829F0008 2C140000 40A20010 3E801419 62941D00 929F0008 3A803030 3AA06666 3EC06666 62D63030 3FA08040 63BD84DE B2BD001C B2BD0020 B2BD002E B29D0038 92DD003A B29D0046 92DD0048 92DD0054 B2BD0058 92DD0062 B2BD0066 3BFF0007 3F808049 639CD978 837C0004 2C1B0001 41A00034 2C1B0003 41A1002C 831C0000 7F1FD9AE 1EFB001C 3B17000E 7EBDBB2E 7EBDC32E 3AF70002 3B180002 7EDDB92E 7EDDC12E 3A800000 92820018 7C5A1378 3B200001 3FA0804D 63BD56A8 1EBEFFFC 7FBDA82E 83BD0020 6294FFFF 4BFFFB20
80427360    0x424360    A2BD0006 7C15A000 4182027C 7F1FC8AE 82FD0070 2C180014 41820064 41800268 2C180018 408100B0 2C18001C 408100B4 2C18001F 408100EC 2C180022 40810108 2C18002E 40810114 2C1800D0 4182013C 2C1800D1 41820140 2C1800D2 41820154 2C1800D3 41820178 2C1800D4 41820190 2C1800DC 40810194 4800020C 7C19D800 40A2004C 3ABCFF3E 3B1CFF8E A6D50014 3AE00104 7ED7B879 4082002C A2F50008 56F7077B 41A20020 C0220018 C0420018 56D705EF 41A20008 C04281A8 D03D0110 D05D0114 7C15C000 4180FFC4 3ADD0110 4800017C 3ADD07D4 3AB8FFEB 48000168 3ADD00E0 41820010 3AB8FFE7 1EB5000C 48000158 C0360000 C0560004 C076000C C0960010 C0B60018 C0D6001C EC21182A EC21282A EC42202A EC42302A 48000170 3EC0804B 62D6FE08 1EBE0044 7ED6AA14 8AB60021 2C1500FF 4182014C 3AB8FFE3 48000104 3ADD0680 40A20008 3AD60020 3AB8FFE0 480000F0 3AB8FFD5 7EBDAA14 3AC006E3 2C18002C 4081000C 3AB50004 3AC006E4 7EF5B0AE 8AD506DF 40A00008 3AE00000 480000D8 C03D1890 C05D19BC 480000FC C0220018 82DD227C 56D5018D 41A20008 C03D23A0 C05D1AAC 480000E0 2C1700B5 40A200D0 C03D08F4
C05D08FC C0628F38 C0828B90 EC230828 EC211024 EC63202A EC431024 480000B4 C03D19F8 2C1700B2 41A000A4 2C1700B6 4181009C 82BD1A20 C0550058 48000094 82DD19F0 82FD19F4 48000058 3ADD09C0 3B18FF2B 3AE00002 7EB8BBD6 1EB50138 7ED6AA14 82B6FFB4 2C150000 41A2005C 3AF60004 571507FF 41A2001C 3AD60008 3AF6FFC8 48000010 1EB50008 7ED6AA14 3AF60004 C0360000 C0570000 48000034 C8628AF8 D8620020 D8620028 B2C20026 B2E2002E C8220020 C8420028 EC211828 EC421828 4800000C C0220018 C0420018 D03A0000 D05A0004 3B390001 3B5A0008 2C190003 4081FD60 C0220000 C0420004 C0620008 C082000C C0A20010 C0C20014 BA810008 38210038 4BF69748

803D36ED    0x3D06ED    37
80408503    0x405503    35
80408511    0x405511    35
8040851F    0x40551F    3566205C 63303066 66303025 322E3566 205C6366 66303066 6625322E 3566205C 63666630 30666625 322E3566 20000000
80409FE0    0x406FE0    C37A0000 C0000000 C1400000 440C0000

803E89F8    0x3E59F8    546F702D 4E202020 20202000 45434220 546F7020 20202000 45434220 426F7474 6F6D2000 45434220 52696768 74202000 45434220 4C656674 20202000 46312043 68205665 6C6F6300 4632204B 42205665 6C6F6300 46332053 68205665 6C6F6300 546F7461 6C205665 6C6F6300 53797320 44697265 63746900 53797320 432D5374 69636B00 53797320 4C2F5220 20202000 43757220 44697265 63746900 50727620 44697265 63746900 43725072 20536869 656C6400
803E8C2C    0x3E5C2C    546D7220 416E7920 53686400 546D7220 44696720 53686400 546D7220 4A756D70 20202000 546D7220 55702D42 20202000
803E8C6C    0x3E5C6C    446D672F 4869746C 61672000 48697453 746E2F47 72616200 53686965 6C645374 756E2000 53686420 48502F53 697A6500 546D7220 496E742F 496E7600 48422D30 20582F59 20202000 48422D30 205A2F53 697A6500 48422D31 20582F59 20202000 48422D31 205A2F53 697A6500 48422D32 20582F59 20202000 48422D32 205A2F53 697A6500 48422D33 20582F59 20202000 48422D33 205A2F53 697A6500
Not quite sure what this does but I feel incredibly excited about it.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Yeah, that's it and is the same code for all game versions, though pretty sure "Hitbox Displays Do Not Interpolate in Develop Mode" would be a more accurate description since it's just the visual iirc.
Awesome. I edited the name, but it works for all game levels, not just Develop Mode. (assuming the use of a code to turn collision bubbles on in Master).
 

Magus420

Smash Master
Joined
Dec 13, 2003
Messages
4,541
Location
Close to Trenton, NJ Posts: 4,071
Stale Moves in Develop Mode (v1.00) [Magus]
04088FAC 41820030

-DOL-
1.00 0x85B8C
1.01 0x85C74
1.02 0x85E34
PAL 0x864EC

Code:
80088FA0:  800D9368	lwz	r0,-27800(r13)	804D9520(804D2888). debug game setting. 4 = develop
80088FA4:  2C000003	cmpwi	r0,3
80088FA8:  41800008	blt-	0x80088fb0	stale moves if 0-2
80088FAC:  48000030	b	0x80088fdc	skip stale moves if >=3
80088FB0:  FFE00890	fmr	f31,f1		stale moves. setting of <= 2
80088FB4:  8863000C	lbz	r3,12(r3)
80088FB8:  4BFAD209	bl	0x800361c0
80088FBC:  389E0000	addi	r4,r30,0
80088FC0:  38BF0000	addi	r5,r31,0
80088FC4:  4BFFFEAD	bl	0x80088e70	stale moves

This leaves the DEBUG-ROM setting (3) to still not use stale moves. Do we know the differences between that and Develop btw?
 
Last edited:

Magus420

Smash Master
Joined
Dec 13, 2003
Messages
4,541
Location
Close to Trenton, NJ Posts: 4,071
I've been using (1.00) the inputs at 804BFE2C which has press inputs in addition to held ones, and the analog inputs are converted into float form like how the game uses them. Also used debug mode inputs at 8049D8C8 which has presses and cancels out d-pad inputs if pressing multiple directions at once to account for the GCC d-pad being crappy and not activate multiple things at once trying to press a single direction.
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Stale Moves in Develop Mode (v1.00) [Magus]
04088FAC 41820030

-DOL-
1.00 0x85B8C
1.01 0x85C74
1.02 0x85E34
PAL 0x864EC

Code:
80088FA0:  800D9368    lwz    r0,-27800(r13)    804D9520(804D2888). debug game setting. 4 = develop
80088FA4:  2C000003    cmpwi    r0,3
80088FA8:  41800008    blt-    0x80088fb0    stale moves if 0-2
80088FAC:  48000030    b    0x80088fdc    skip stale moves if >=3
80088FB0:  FFE00890    fmr    f31,f1        stale moves. setting of <= 2
80088FB4:  8863000C    lbz    r3,12(r3)
80088FB8:  4BFAD209    bl    0x800361c0
80088FBC:  389E0000    addi    r4,r30,0
80088FC0:  38BF0000    addi    r5,r31,0
80088FC4:  4BFFFEAD    bl    0x80088e70    stale moves

This leaves the DEBUG-ROM setting (3) to still not use stale moves. Do we know the differences between that and Develop btw?
Nice. I tapped into the same function with this code to enable staling in all modes. I just changed the mode comparison to 5 instead of 3.

And I'm not sure what the difference is. Maybe DEBUG-ROM could give the developers more info in some way.
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
X/Y Axis Pause Camera Translation w/ C-Stick
Code:
C202CD9C 00000008
C0028434 89FD0001
3E00804C 62101FD4
1DEF0044 7E107A14
C1F00000 C21D0050
FE0F802A D21D0050
C1F00004 C21D0054
FE0F802A D21D0054
60000000 00000000
---> gif <---
(20XX hide H.U.D. toggle used as well)

ASM Notes:
Code:
************************************************
* X/Y Axis Pause Screen Translation w/ C-Stick *
************************************************

PAUSE Camera Offsets:
80452f2c - [8bit] player the pause camera is focused on
80452f2d - [8bit] player who paused the game.

80452f7c = x axis pause camera translation
80452f80 = y axis pause camera translation
80452f84 = z axis pause camera translation

(p1)
4c1fd4 = x c-stick axis
4c1fd8 = y c-stick axis
Axis values go from -1 to 1 [32-bit floats]

(p3)
4c2060 = y axis

...so each player's c-stick axis is 0x44 away from one another!

inject @ 8002cd9c
- function for storing pause camera offsets
-r29 = 80452f2c at this time

#default code line
lfs f0,-0x7BCC(rtoc)

#load player who paused game
lbz r15,1(r29)
lis r16,0x804c
ori r16,r16,0x1fd4
mulli r15,r15,0x44
add r16,r16,r15

#load c-stick x axis for this player
lfs f15,0(r16)
#load current x translation
lfs f16,0x50(r29)
#add c-stick value to x translation
fadd f16,f15,f16
stfs f16,0x50(r29)

#load c-stick y axis
lfs f15,0x4(r16)
#load current y translation
lfs f16,0x54(r29)
#add c-stick y value to y translation
fadd f16,f15,f16
stfs f16,0x54(r29)
Anyone try this on console? It works, but when I hit L or R while paused it immediately freezes. Didn't notice this happening on Dolphin.

sigh...
 
Last edited:

Wooggle

Smash Apprentice
Joined
Jul 7, 2014
Messages
83
Location
NJ, USA
Anyone try this on console? It works, but when I hit L or R while paused it immediately freezes. Didn't notice this happening on Dolphin.

sigh...
The same thing happens to me too.

I only use DOL mods because I haven't been able to get codes working on my console, so I was afraid that I just messed up the DOL mod somewhere, which is why I didn't say anything.

Also, when it is paused and I am not touching the C-Stick, the camera keeps moving very slightly. I tried unplugging the controller which stopped the problem, but when I put it back in,the problem persists. It also happens even when I restart my console. I'm not sure if this is a problem with the code or if my controller is just messed up.
 
Last edited:

Myougi

My posts are gluten free.
Joined
Mar 14, 2014
Messages
484
Location
WEST COAST BEST COAST
The same thing happens to me too.

I only use DOL mods because I haven't been able to get codes working on my console, so I was afraid that I just messed up the DOL mod somewhere, which is why I didn't say anything.

Also, when it is paused and I am not touching the C-Stick, the camera keeps moving very slightly. I tried unplugging the controller which stopped the problem, but when I put it back in,the problem persists. It also happens even when I restart my console. I'm not sure if this is a problem with the code or if my controller is just messed up.
I haven't tried this on console, but I can later if I have time.

I can go ahead and clear up the second part, it's your controller (or adapter). I've been using the code and playing with Dolphin. When using my keyboard the camera doesn't move at all but when using my controller on my PC it does slightly.
 

Wooggle

Smash Apprentice
Joined
Jul 7, 2014
Messages
83
Location
NJ, USA
I haven't tried this on console, but I can later if I have time.

I can go ahead and clear up the second part, it's your controller (or adapter). I've been using the code and playing with Dolphin. When using my keyboard the camera doesn't move at all but when using my controller on my PC it does slightly.
So are you saying that it is a problem with everyone's controllers and not just mine? In that case then the code may be a little bit too sensitive to the c-stick movement.
 

Kadano

Magical Express
Premium
Joined
Feb 26, 2009
Messages
2,161
Location
Vienna, Austria
So the code needs to have a "deadzone" to filter inputs, just like the game does it. @ Kadano Kadano measured the exact input ranges, but I can't find the posts/images.
Dead zone is [106,150] for both x and y, measured in Dolphin input display analog units. Not sure how this translates to in-game values, but it should be easy enough to convert them using Magus’ directional input display within Dolphin with input display on as well.
 
Last edited:
Joined
Oct 1, 2014
Messages
42
Location
Mute City
Disable Rumble When Controller is Unplugged
Code:
C2376BB0 00000008
3CC08045 60C6C380
38800000 38A0000A
39000000 7CE518AE
2C0700FF 40820008
7D0431AE 38840001
38A5000C 2C040004
4180FFE4 8081002C
60000000 00000000
In today's edition of "codes you didn't you know you wanted"... :)
Code:
Lagless FoD [Dan Salvato]
041cbbd4 60000000
041cbefc 48000028
041cbf54 60000000
041cbf84 60000000
Can anyone point me to/make these gecko codes into injections to the DOL mod? I am making the PERFECT tournament ready DOL, combining all things that make competitive play faster and more efficiently.
 

Cyjorg

tiny.cc/19XXTE
Joined
Nov 18, 2013
Messages
686
Location
Purdue University
Can anyone point me to/make these gecko codes into injections to the DOL mod? I am making the PERFECT tournament ready DOL, combining all things that make competitive play faster and more efficiently.
@0x1C87B4
48000115 -> 60000000

@0x1C8ADC
41820028 -> 48000028

@0x1C8B34
48000BC5 -> 60000000

@0x1C8B64
4BFFD775 -> 60000000
 

SinsOfApathy

Smash Journeyman
Joined
Feb 24, 2015
Messages
461
NNID
Psion312
Since the main post lacks it, I converted the DOL code for Debug Menu Default Language to a Gecko Code for 1.02. I've been using it with wParam's Memory Card Buffer Overflow.

Code:
Debug Menu Default Language (1.02) [SypherPhoenix, Apathy]
043FA258 000000??

Values:
00 - Japanese
01 - US English
02 - UK English (PAL Only)
03 - German (PAL Only)
04 - French (PAL Only)
05 - Italian (PAL Only)
06 - Spanish (PAL Only)
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Sorry just a random question but what is 60000000 in ASM? I see so many 04****** 60000000 codes, which I understand overwrite something in the dol at some offset to 60000000.
Yeah, it means "nop". Which is just a line that does nothing. So like instead of storing a value or branching somewhere else in memory, you stick a nop in there and those actions won't happen.
 
Last edited:

Magus420

Smash Master
Joined
Dec 13, 2003
Messages
4,541
Location
Close to Trenton, NJ Posts: 4,071
nop/60000000 in PPC is technically ori r0,r0,0 which Ors the contents of r0 with 0 into r0, which leaves r0 unchanged, doing nothing.

Speaking of nop...



Attacks that Deal Less than 1 Damage Have No Hitlag or DIability v2 (v1.02) [Magus]
040771E0 60000000
040772A4 60000000
040781D4 60000000
04076A48 60000000
04076B9C 60000000
04077A1C 60000000
04077B70 60000000
04076D3C 60000000
040776FC 60000000


Code:
-DOL-
1.02	0x73DC0, 0x73E84, 0x74DB4, 0x73628, 0x7377C, 0x745FC, 0x74750, 0x7391C, 0x742DC
PAL	0x74498, 0x7455C, 0x7548C, 0x73D00, 0x73E54, 0x74CD4, 0x74E28, 0x73FF4, 0x749B4
Code:
800771E0:  41820010	beq-	0x800771f0	<-- HURTBOX HIT - Character Hitbox - Attacker
800772A4:  41820010	beq-	0x800772b4	<-- HURTBOX HIT - Character Hitbox - Victim
800781D4:  41820010	beq-	0x800781e4	<-- HURTBOX HIT - Article Hitbox - Attacker+Victim
80076A48:  41820010	beq-	0x80076a58	<-- HITBOX HIT - Char vs Char - Low Port
80076B9C:  41820010	beq-	0x80076bac	<-- HITBOX HIT - Char vs Char - High Port
80077A1C:  41820010	beq-	0x80077a2c	<-- HITBOX HIT - Char vs Article - Character
80077B70:  41820010	beq-	0x80077b80	<-- HITBOX HIT - Char vs Article - Article
80076D3C:  41820010	beq-	0x80076d4c	<-- SHIELD HIT - Character Hitbox - Attacker+Victim
800776FC:  41820010	beq-	0x8007770c	<-- SHIELD HIT - Article Hitbox - Attacker+Victim
Code:
**v1.02 STUFF**
800771C4:  C0028900	lfs	f0,-30464(r2)	HURTBOX HIT - Character Hitbox - Attacker. f0  = 0
800771C8:  FC1F0000	fcmpu	cr0,f31,f0	f31 = actual float dmg done
800771CC:  4182002C	beq-	0x800771f8	0 damage
800771D0:  FC00F81E	fctiwz	f0,f31
800771D4:  D8010050	stfd	f0,80(r1)
800771D8:  80010054	lwz	r0,84(r1)	loads floored int dmg
800771DC:  2C000000	cmpwi	r0,0
800771E0:  41820010	beq-	0x800771f0	<-- THIS
800771E4:  D8010050	stfd	f0,80(r1)
800771E8:  83010054	lwz	r24,84(r1)	floored int dmg if >= 1
800771EC:  48000010	b	0x800771fc
800771F0:  3B000001	li	r24,1		1 for int dmg if < 1, and > 0
800771F4:  48000008	b	0x800771fc
800771F8:  3B000000	li	r24,0		0 for int dmg if = 0.00
800771FC:  3B200000	li	r25,0
...
80077248:  801A1914	lwz	r0,6420(r26)
8007724C:  7C180000	cmpw	r24,r0
80077250:  40810008	ble-	0x80077258
80077254:  931A1914	stw	r24,6420(r26)	r26=80D055C0(80D06ED4). stores int damage done. r24 is 1 even < 1.0 dmg
80077258:  801C1988	lwz	r0,6536(r28)
8007725C:  2C000000	cmpwi	r0,0
80077260:  408201C0	bne-	0x80077420
80077264:  801C198C	lwz	r0,6540(r28)
80077268:  2C000000	cmpwi	r0,0
8007726C:  408201B4	bne-	0x80077420
80077270:  881C221D	lbz	r0,8733(r28)
80077274:  5400FFFF	rlwinm.	r0,r0,31,31,31


80077288:  C0028900	lfs	f0,-30464(r2)	HURTBOX HIT - Character Hitbox - Victim. f0  = 0
8007728C:  FC1F0000	fcmpu	cr0,f31,f0	f31 = actual float dmg done
80077290:  4182002C	beq-	0x800772bc	0 damage
80077294:  FC00F81E	fctiwz	f0,f31
80077298:  D8010050	stfd	f0,80(r1)
8007729C:  80010054	lwz	r0,84(r1)	loads floored int dmg
800772A0:  2C000000	cmpwi	r0,0
800772A4:  41820010	beq-	0x800772b4	<-- THIS
800772A8:  D8010050	stfd	f0,80(r1)
800772AC:  83010054	lwz	r24,84(r1)	floored int dmg if >= 1
800772B0:  48000010	b	0x800772c0
800772B4:  3B000001	li	r24,1		1 for int dmg if < 1, and > 0
800772B8:  48000008	b	0x800772c0
800772BC:  3B000000	li	r24,0		0 for int dmg if = 0.00
800772C0:  881C221C	lbz	r0,8732(r28)
...
80077340:  801C183C	lwz	r0,6204(r28)
80077344:  7C180000	cmpw	r24,r0
80077348:  40810008	ble-	0x80077350
8007734C:  931C183C	stw	r24,6204(r28)	r28=80E1D100(80E1E93C). stores int damage done. r24 is 1 even < 1.0 dmg
80077350:  38000001	li	r0,1
80077354:  48000008	b	0x8007735c
80077358:  38000000	li	r0,0
8007735C:  2C000000	cmpwi	r0,0
80077360:  418200B0	beq-	0x80077410


800781B8:  C0028900	lfs	f0,-30464(r2)	HURTBOX HIT - Article Hitbox - Victim. f0  = 0
800781BC:  FC1F0000	fcmpu	cr0,f31,f0	f31 = actual float dmg done
800781C0:  4182002C	beq-	0x800781ec	0 damage
800781C4:  FC00F81E	fctiwz	f0,f31
800781C8:  D8010028	stfd	f0,40(r1)
800781CC:  8001002C	lwz	r0,44(r1)	loads floored int dmg
800781D0:  2C000000	cmpwi	r0,0
800781D4:  41820010	beq-	0x800781e4	<-- THIS
800781D8:  D8010028	stfd	f0,40(r1)
800781DC:  8321002C	lwz	r25,44(r1)	floored int dmg if >= 1
800781E0:  48000010	b	0x800781f0
800781E4:  3B200001	li	r25,1		1 for int dmg if < 1, and > 0
800781E8:  48000008	b	0x800781f0
800781EC:  3B200000	li	r25,0		0 for int dmg if = 0.00
800781F0:  881C221C	lbz	r0,8732(r28)
...
80078270:  801C183C	lwz	r0,6204(r28)
80078274:  7C190000	cmpw	r25,r0
80078278:  40810008	ble-	0x80078280
8007827C:  933C183C	stw	r25,6204(r28)	r28=80E1D100(80E1E93C). stores int damage done. r25 is 1 even < 1.0 dmg
80078280:  38000001	li	r0,1
80078284:  48000008	b	0x8007828c
80078288:  38000000	li	r0,0
8007828C:  2C000000	cmpwi	r0,0
80078290:  418200A0	beq-	0x80078330


80076A30:  C0028900	lfs	f0,-30464(r2)	HITBOX HIT - Char vs Char - Low Port
80076A34:  FC020000	fcmpu	cr0,f2,f0
80076A38:  41820028	beq-	0x80076a60
80076A3C:  D8210040	stfd	f1,64(r1)
80076A40:  80010044	lwz	r0,68(r1)
80076A44:  2C000000	cmpwi	r0,0
80076A48:  41820010	beq-	0x80076a58	<-- THIS
80076A4C:  D8210040	stfd	f1,64(r1)
80076A50:  83210044	lwz	r25,68(r1)
80076A54:  48000010	b	0x80076a64
80076A58:  3B200001	li	r25,1
80076A5C:  48000008	b	0x80076a64
80076A60:  3B200000	li	r25,0
80076A64:  3B400000	li	r26,0


80076B84:  C0028900	lfs	f0,-30464(r2)	HITBOX HIT - Char vs Char - High Port
80076B88:  FC020000	fcmpu	cr0,f2,f0
80076B8C:  41820028	beq-	0x80076bb4
80076B90:  D8210040	stfd	f1,64(r1)
80076B94:  80010044	lwz	r0,68(r1)
80076B98:  2C000000	cmpwi	r0,0
80076B9C:  41820010	beq-	0x80076bac	<-- THIS
80076BA0:  D8210040	stfd	f1,64(r1)
80076BA4:  83210044	lwz	r25,68(r1)
80076BA8:  48000010	b	0x80076bb8
80076BAC:  3B200001	li	r25,1
80076BB0:  48000008	b	0x80076bb8
80076BB4:  3B200000	li	r25,0
80076BB8:  3B400000	li	r26,0


80077A04:  C0028900	lfs	f0,-30464(r2)	HITBOX HIT - Char vs Article - Character
80077A08:  FC020000	fcmpu	cr0,f2,f0
80077A0C:  41820028	beq-	0x80077a34
80077A10:  D8210040	stfd	f1,64(r1)
80077A14:  80010044	lwz	r0,68(r1)
80077A18:  2C000000	cmpwi	r0,0
80077A1C:  41820010	beq-	0x80077a2c	<-- THIS
80077A20:  D8210040	stfd	f1,64(r1)
80077A24:  83210044	lwz	r25,68(r1)
80077A28:  48000010	b	0x80077a38
80077A2C:  3B200001	li	r25,1
80077A30:  48000008	b	0x80077a38
80077A34:  3B200000	li	r25,0
80077A38:  3B400000	li	r26,0


80077B58:  C0028900	lfs	f0,-30464(r2)	HITBOX HIT - Char vs Article - Article
80077B5C:  FC020000	fcmpu	cr0,f2,f0
80077B60:  41820028	beq-	0x80077b88
80077B64:  D8210040	stfd	f1,64(r1)
80077B68:  80010044	lwz	r0,68(r1)
80077B6C:  2C000000	cmpwi	r0,0
80077B70:  41820010	beq-	0x80077b80	<-- THIS
80077B74:  D8210040	stfd	f1,64(r1)
80077B78:  83210044	lwz	r25,68(r1)
80077B7C:  48000010	b	0x80077b8c
80077B80:  3B200001	li	r25,1
80077B84:  48000008	b	0x80077b8c
80077B88:  3B200000	li	r25,0


80076D20:  C0028900	lfs	f0,-30464(r2)	SHIELD HIT - Character Hitbox - Attacker+Victim. f0  = 0
80076D24:  FC010000	fcmpu	cr0,f1,f0	f1 = actual float dmg done
80076D28:  4182002C	beq-	0x80076d54	0 damage
80076D2C:  FC00081E	fctiwz	f0,f1
80076D30:  D8010020	stfd	f0,32(r1)
80076D34:  80010024	lwz	r0,36(r1)	loads floored int dmg
80076D38:  2C000000	cmpwi	r0,0
80076D3C:  41820010	beq-	0x80076d4c	<-- THIS
80076D40:  D8010020	stfd	f0,32(r1)
80076D44:  80610024	lwz	r3,36(r1)	floored int dmg if >= 1
80076D48:  48000010	b	0x80076d58
80076D4C:  38600001	li	r3,1		1 for int dmg if < 1, and > 0
80076D50:  48000008	b	0x80076d58
80076D54:  38600000	li	r3,0		0 for int dmg if = 0.00


800776E0:  C0028900	lfs	f0,-30464(r2)	SHIELD HIT - Article Hitbox - Victim. f0  = 0
800776E4:  FC010000	fcmpu	cr0,f1,f0	f1 = actual float dmg done
800776E8:  4182002C	beq-	0x80077714	0 damage
800776EC:  FC00081E	fctiwz	f0,f1
800776F0:  D8010038	stfd	f0,56(r1)
800776F4:  8001003C	lwz	r0,60(r1)	loads floored int dmg
800776F8:  2C000000	cmpwi	r0,0
800776FC:  41820010	beq-	0x8007770c	<-- THIS
80077700:  D8010038	stfd	f0,56(r1)
80077704:  83E1003C	lwz	r31,60(r1)	floored int dmg if >= 1
80077708:  48000010	b	0x80077718
8007770C:  3BE00001	li	r31,1		1 for int dmg if < 1, and > 0
80077710:  48000008	b	0x80077718
80077714:  3BE00000	li	r31,0		0 for int dmg if = 0.00

Makes stale 1 dmg hitboxes (only affects some things with lots of hits) work like in versions 1.00 and 1.01 where they aren't A/S/DIable. Being able to ASDI these hits a full 3 units half a dozen times or more through the move makes some of them a joke to escape and bad in 1.02 and PAL. May be missing a couple here but the attacks it affects include the rapid hits on Zelda's f/u-smash and neutral-b, Samus' u-air and up-b, Peach's up-b, YL's up-b, Mario's up/down-b, Mewtwo's u-smash and n-air (bottom hitboxes only), ICs down-b (outer range), Ness' PKT1 (tail), and CF/Sheik/Kirby/Fox/Falco/Kirby/Link/YL's rapid jabs.

Since it affects mostly characters that aren't as good it contributes to making v1.02 the most imbalanced NTSC version. Now for everyone I see running backups of v1.02 to use it so I can use Zelda on more than just my own setup =P
 
Last edited:

Magus420

Smash Master
Joined
Dec 13, 2003
Messages
4,541
Location
Close to Trenton, NJ Posts: 4,071
I guess I should be searching the thread instead of looking in the OP lol.

If it's this code though:
Code:
v1.00 Hitlag Behavior (1.02) [Dan Salvato]
040771f0 3b000000


Holy ****s, I spent hours looking for this one stupid line of code. If someone has done this already then RIP, lol.

Anyway, this code reverts hitlag behavior back to v1.00. In v1.00, any attack that dealt less than 1% damage had 0 frames of hitlag. Certain characters' attacks were balanced around this consideration, such as Samus' upB and Young Link's grounded upB. In v1.02, one frame of hitlag is applied, which makes these moves easily escapable with SDI.

Because of this, the v1.00 hitlag behavior is often preferred, especially for players who main the affected (often lower-tier) characters.
It wouldn't actually do anything besides change the attack's speed aesthetic by having the attacker not go into hitlag, while the important part with the victim still having the 3 frames of hitlag and full A/S/DIability remains :x

Edit: Nevermind, it does indeed make them harder to escape, but for a different reason. By the attacker not going into hitlag it locks them into hitlag without the ASDI or DI being able to occur in most cases. If SDI didn't go so far and it didn't look kinda odd, I'd say it would be an improvement in gameplay design to only be able to SDI the rapid hits instead of nothing, but testing it with Zelda's u-smash it's pretty easy to SDI out even when hit by the center of it since it's also no longer pulling you back in at all by being hitlag locked.
 
Last edited:
Top