Force Shock Damage [1superchip]
#1
Force Shock Damage [1superchip]

This code will allow you to shock all other players in a race when you push the activator to shock all players. The Player ID that uses the shock can be changed, valid values for P are (0 - 11) setting the Player ID to 0 will give yourself invincibility. It is recommended to use No Lightning Flash by Anarion.

When used offline, CPUs are affected. If used in Time Trials ghosts set by humans will be effected and will get desynced.

YYYY is the controller address and ZZZZ is your button activator, do not press/hold any other buttons.

This code uses memory addresses 0x81430004 - 0x81430007. Make sure no other codes in your GCT/Cheat-Manager are using those addresses.

NTSC-U
C0000000 0000000B
3C608143 80630004
2C030000 41820044
3C608034 6063YYYY
A0630000 2C03ZZZZ
40820030 9421FF80
7D8802A6 BC610008
3860000P 3D80807A
618C91C0 7D8803A6
4E800021 B8610008
7D8803A6 38210080
4E800020 00000000
C27AE8F4 00000002
90050008 3C808143
90040004 00000000

PAL
C0000000 0000000B
3C608143 80630004
2C030000 41820044
3C608034 6063YYYY
A0630000 2C03ZZZZ
40820030 9421FF80
7D8802A6 BC610008
3860000P 3D80807B
618C7C20 7D8803A6
4E800021 B8610008
7D8803A6 38210080
4E800020 00000000
C27BD354 00000002
90050008 3C808143
90040004 00000000

NTSC-J
C0000000 0000000B
3C608143 80630004
2C030000 41820044
3C608034 6063YYYY
A0630000 2C03ZZZZ
40820030 9421FF80
7D8802A6 BC610008
3860000P 3D80807B
618C728C 7D8803A6
4E800021 B8610008
7D8803A6 38210080
4E800020 00000000
C27BC9C4 00000002
90050008 3C808143
90040004 00000000

NTSC-K
C0000000 0000000B
3C608143 80630004
2C030000 41820044
3C608033 6063YYYY
A0630000 2C03ZZZZ
40820030 9421FF80
7D8802A6 BC610008
3860000P 3D80807A
618C5FE0 7D8803A6
4E800021 B8610008
7D8803A6 38210080
4E800020 00000000
C27AB714 00000002
90050008 3C808143
90040004 00000000

Code creator: 1superchip
Code credits: Vega

Sources:

Code:
#C0 ASM

.set region, '' #Plug in e,p,j,k for compilation region

lis r3, 0x8143
lwz r3, 0x4 (r3)
cmpwi r3, 0
beq- the_end

.if (region == 'E' || region == 'e')
lis r3, 0x8034
.elseif (region == 'P' || region == 'p')
lis r3, 0x8034
.elseif (region == 'J' || region == 'j')
lis r3, 0x8034
.elseif (region == 'K' || region == 'k')
lis r3, 0x8033
.else # Invalid Region
.err
.endif

ori r3, r3, 0x8000 #PAL GCN value used just for compilation only
lhz r3, 0 (r3)

cmpwi r3, 0x0880 #GCN Y value used just for compilation only
bne- the_end

stwu sp, -0x0080 (sp) #Make stack frame
mflr r12 #Backup LR because C0
stmw r3, 0x8 (sp)

li r3, 1 #P value, 1 used just for compilation only

.if (region == 'E' || region == 'e')
lis r12, 0x807A
ori r12, r12, 0x91C0
.elseif (region == 'P' || region == 'p')
lis r12, 0x807B
ori r12, r12, 0x7C20
.elseif (region == 'J' || region == 'j')
lis r12, 0x807B
ori r12, r12, 0x728C
.elseif (region == 'K' || region == 'k')
lis r12, 0x807A
ori r12, r12, 0x5FE0
.else # Invalid Region
.err
.endif

mtlr r12
blrl #Call function and return

lmw r3, 0x8 (sp) #Pop stack frame
mtlr r12 #Recover LR because c0
addi sp, sp, 0x0080

the_end:

#blr #uncomment if NOT compiling with pyiiasmh

#############

#C2 ASM

#Address Ports
#807AE8F4 NTSC-U
#807BD354 PAL
#807BC9C4 NTSC-J
#807AB714 NTSC-K

stw r0,8(r5) #Default instruction
lis r4, 0x8143
stw r0, 0x4 (r4)
Reply


Messages In This Thread
Force Shock Damage [1superchip] - by 1superchip - 06-13-2020, 03:04 AM
RE: Force Shock Damage [1superchip] - by Ro_ - 06-13-2020, 06:52 AM
RE: Force Shock Damage [1superchip] - by Seeky - 07-18-2020, 09:23 PM
RE: Force Shock Damage [1superchip] - by Vega - 07-18-2020, 09:28 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)