Mario Kart Wii Gecko Codes, Cheats, & Hacks

Full Version: Items On Minimap [stebler]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Items On Minimap [stebler]

Warning: this code gives a tactical advantage and as such using it in worldwides or regionals can get you banned.

Screenshot: [Image: dEapUsn.png]

PAL:
c2858194 00000005
3c60809c 80633618
80830244 80840000
a0840008 80630248
7c641a14 1c6301b4
386301a4 00000000
c27ea450 00000005
3b5b0001 3ca0809c
80a53618 80c50244
80c60000 a0c60008
80a50248 7ca62a14
7f5a2a14 00000000
c27ea6e0 00000023
4e800421 3b400000
3af801a4 3b200000
7ee3bb78 3d808063
618cd798 7d8903a6
4e800421 3c60808d
60633900 90770000
7f03c378 3b9c0001
7f84e378 7ee5bb78
3d808063 618cd278
7d8903a6 4e800421
38610020 92e30000
3cc0808a 60c49477
60c59482 60c69491
38e00000 3d80805c
618c2c60 7d8903a6
4e800421 7ee3bb78
3ca0808a 60a49477
60a5a007 3d808063
618cd9c0 7d8903a6
4e800421 9b570081
9b370082 3cc0808a
60c3f7c0 48000015
000c182c 604c5820
7840848c 689c9000
7c8802a6 7c84d0ae
7ca32214 7ee3bb78
60c4a7c8 3d808063
618ce0f0 7d8903a6
4e800421 3af701b4
3b390001 3c60809c
80633618 1c9a0024
7c632214 80630050
7c191800 4180ff0c
3b5a0001 2c1a000f
4180fefc 00000000
c27eaca8 00000010
4e800421 807f016c
2c030000 4182006c
807f0198 388000a0
988300b8 3c804140
9083004c 90830050
38600001 987f0080
3c60809c 80633618
889f0081 1c840024
7c632214 80830058
88bf0082 7c052000
40800028 38800000
989f0080 8063004c
54a4103a 7c63202e
38830044 7ca464aa
389f019c 7ca465aa
60000000 00000000


NTSC-U:
c2836704 00000005
3c60809c 8063ee20
80830244 80840000
a0840008 80630248
7c641a14 1c6301b4
386301a4 00000000
c27e0ba4 00000005
3b5b0001 3ca0809c
80a5ee20 80c50244
80c60000 a0c60008
80a50248 7ca62a14
7f5a2a14 00000000
c27e0e34 00000023
4e800421 3b400000
3af801a4 3b200000
7ee3bb78 3d808060
618cc378 7d8903a6
4e800421 3c60808c
6063ead0 90770000
7f03c378 3b9c0001
7f84e378 7ee5bb78
3d808060 618cbe58
7d8903a6 4e800421
38610020 92e30000
3cc0808a 60c43d4f
60c53d5a 60c63d69
38e00000 3d80805b
618ca2cc 7d8903a6
4e800421 7ee3bb78
3ca0808a 60a43d4f
60a546df 3d808060
618cc5a0 7d8903a6
4e800421 9b570081
9b370082 3cc0808a
60c38d00 48000015
000c182c 604c5820
7840848c 689c9000
7c8802a6 7c84d0ae
7ca32214 7ee3bb78
60c44e48 3d808060
618cccd0 7d8903a6
4e800421 3af701b4
3b390001 3c60809c
8063ee20 1c9a0024
7c632214 80630050
7c191800 4180ff0c
3b5a0001 2c1a000f
4180fefc 00000000
c27e13fc 00000010
4e800421 807f016c
2c030000 4182006c
807f0198 388000a0
988300b8 3c804140
9083004c 90830050
38600001 987f0080
3c60809c 8063ee20
889f0081 1c840024
7c632214 80830058
88bf0082 7c052000
40800028 38800000
989f0080 8063004c
54a4103a 7c63202e
38830044 7ca464aa
389f019c 7ca465aa
60000000 00000000


NTSC-J:
c2857800 00000005
3c60809c 80632678
80830244 80840000
a0840008 80630248
7c641a14 1c6301b4
386301a4 00000000
c27e9abc 00000005
3b5b0001 3ca0809c
80a52678 80c50244
80c60000 a0c60008
80a50248 7ca62a14
7f5a2a14 00000000
c27e9d4c 00000023
4e800421 3b400000
3af801a4 3b200000
7ee3bb78 3d808063
618cce04 7d8903a6
4e800421 3c60808d
60632a50 90770000
7f03c378 3b9c0001
7f84e378 7ee5bb78
3d808063 618cc8e4
7d8903a6 4e800421
38610020 92e30000
3cc0808a 60c485d7
60c585e2 60c685f1
38e00000 3d80805c
618c25e0 7d8903a6
4e800421 7ee3bb78
3ca0808a 60a485d7
60a59167 3d808063
618cd02c 7d8903a6
4e800421 9b570081
9b370082 3cc0808a
60c3e920 48000015
000c182c 604c5820
7840848c 689c9000
7c8802a6 7c84d0ae
7ca32214 7ee3bb78
60c49928 3d808063
618cd75c 7d8903a6
4e800421 3af701b4
3b390001 3c60809c
80632678 1c9a0024
7c632214 80630050
7c191800 4180ff0c
3b5a0001 2c1a000f
4180fefc 00000000
c27ea314 00000010
4e800421 807f016c
2c030000 4182006c
807f0198 388000a0
988300b8 3c804140
9083004c 90830050
38600001 987f0080
3c60809c 80632678
889f0081 1c840024
7c632214 80830058
88bf0082 7c052000
40800028 38800000
989f0080 8063004c
54a4103a 7c63202e
38830044 7ca464aa
389f019c 7ca465aa
60000000 00000000


NTSC-K:
c2846554 00000005
3c60809b 80631c58
80830244 80840000
a0840008 80630248
7c641a14 1c6301b4
386301a4 00000000
c27d8810 00000005
3b5b0001 3ca0809b
80a51c58 80c50244
80c60000 a0c60008
80a50248 7ca62a14
7f5a2a14 00000000
c27d8aa0 00000023
4e800421 3b400000
3af801a4 3b200000
7ee3bb78 3d808062
618cbab0 7d8903a6
4e800421 3c60808c
60631d98 90770000
7f03c378 3b9c0001
7f84e378 7ee5bb78
3d808062 618cb590
7d8903a6 4e800421
38610020 92e30000
3cc08089 60c478d7
60c578e2 60c678f1
38e00000 3d80805b
618c0cc4 7d8903a6
4e800421 7ee3bb78
3ca08089 60a478d7
60a58467 3d808062
618cbcd8 7d8903a6
4e800421 9b570081
9b370082 3cc08089
60c3dc20 48000015
000c182c 604c5820
7840848c 689c9000
7c8802a6 7c84d0ae
7ca32214 7ee3bb78
60c48c28 3d808062
618cc408 7d8903a6
4e800421 3af701b4
3b390001 3c60809b
80631c58 1c9a0024
7c632214 80630050
7c191800 4180ff0c
3b5a0001 2c1a000f
4180fefc 00000000
c27d9068 00000010
4e800421 807f016c
2c030000 4182006c
807f0198 388000a0
988300b8 3c804140
9083004c 90830050
38600001 987f0080
3c60809b 80631c58
889f0081 1c840024
7c632214 80830058
88bf0082 7c052000
40800028 38800000
989f0080 8063004c
54a4103a 7c63202e
38830044 7ca464aa
389f019c 7ca465aa
60000000 00000000


Source code:
Code:
# inject at 80858194 (PAL)
# inject at 80836704 (NTSC-U)
# inject at 80857800 (NTSC-J)
# inject at 80846554 (NTSC-K)

.set region, ''

.if (region == 'P')
    .set ItemDirector_staticInstance, 0x809c3618
.elseif (region == 'E')
    .set ItemDirector_staticInstance, 0x809bee20
.elseif (region == 'J')
    .set ItemDirector_staticInstance, 0x809c2678
.elseif (region == 'K')
    .set ItemDirector_staticInstance, 0x809b1c58
.else
    .err
.endif


lis r3, ItemDirector_staticInstance@ha
lwz r3, ItemDirector_staticInstance@l (r3)
lwz r4, 0x244 (r3)
lwz r4, 0x0 (r4) # first object of last item type
lhz r4, 0x8 (r4) # global id
lwz r3, 0x248 (r3) # number of objects of last item type
add r3, r4, r3 # maximum number of items

mulli r3, r3, 0x1b4 # one CtrlRace2DMapObject per item
addi r3, r3, 0x1a4 # size of expanded CtrlRace2DMap
Code:
# inject at 807ea450 (PAL)
# inject at 807e0ba4 (NTSC-U)
# inject at 807e9abc (NTSC-J)
# inject at 807d8810 (NTSC-K)

.set region, ''

.if (region == 'P')
    .set ItemDirector_staticInstance, 0x809c3618
.elseif (region == 'E')
    .set ItemDirector_staticInstance, 0x809bee20
.elseif (region == 'J')
    .set ItemDirector_staticInstance, 0x809c2678
.elseif (region == 'K')
    .set ItemDirector_staticInstance, 0x809b1c58
.else
    .err
.endif

addi r26, r27, 1 # original instruction

lis r5, ItemDirector_staticInstance@ha
lwz r5, ItemDirector_staticInstance@l (r5)
lwz r6, 0x244 (r5)
lwz r6, 0x0 (r6) # first object of last item type
lhz r6, 0x8 (r6) # global id
lwz r5, 0x248 (r5) # number of objects of last item type
add r5, r6, r5 # maximum number of items

add r26, r26, r5 # number of children
Code:
# inject at 807ea6e0 (PAL)
# inject at 807e0e34 (NTSC-U)
# inject at 807e9d4c (NTSC-J)
# inject at 807d8aa0 (NTSC-K)

.set region, ''

.if (region == 'P')
    .set ControlLoader_load, 0x805c2c60
    .set UIControl_insertChild, 0x8063d278
    .set LayoutUIControl_ct, 0x8063d798
    .set LayoutUIControl_setPictureSourceLayout, 0x8063d9c0
    .set LayoutUIControl_setPicture, 0x8063e0f0
    .set str_game_image, 0x808a9477
    .set str_map_start_line, 0x808a9482
    .set str_start_line, 0x808a9491
    .set str_item, 0x808aa007
    .set str_race_null, 0x808aa7c8
    .set str_kame_green, 0x808af7c0
    .set CtrlRace2DMapObject_vt, 0x808d3900
    .set ItemDirector_staticInstance, 0x809c3618
.elseif (region == 'E')
    .set ControlLoader_load, 0x805ba2cc
    .set UIControl_insertChild, 0x8060be58
    .set LayoutUIControl_ct, 0x8060c378
    .set LayoutUIControl_setPictureSourceLayout, 0x8060c5a0
    .set LayoutUIControl_setPicture, 0x8060ccd0
    .set str_game_image, 0x808a3d4f
    .set str_map_start_line, 0x808a3d5a
    .set str_start_line, 0x808a3d69
    .set str_item, 0x808a46df
    .set str_race_null, 0x808a4e48
    .set str_kame_green, 0x808a8d00
    .set CtrlRace2DMapObject_vt, 0x808cead0
    .set ItemDirector_staticInstance, 0x809bee20
.elseif (region == 'J')
    .set ControlLoader_load, 0x805c25e0
    .set UIControl_insertChild, 0x8063c8e4
    .set LayoutUIControl_ct, 0x8063ce04
    .set LayoutUIControl_setPictureSourceLayout, 0x8063d02c
    .set LayoutUIControl_setPicture, 0x8063d75c
    .set str_game_image, 0x808a85d7
    .set str_map_start_line, 0x808a85e2
    .set str_start_line, 0x808a85f1
    .set str_item, 0x808a9167
    .set str_race_null, 0x808a9928
    .set str_kame_green, 0x808ae920
    .set CtrlRace2DMapObject_vt, 0x808d2a50
    .set ItemDirector_staticInstance, 0x809c2678
.elseif (region == 'K')
    .set ControlLoader_load, 0x805b0cc4
    .set UIControl_insertChild, 0x8062b590
    .set LayoutUIControl_ct, 0x8062bab0
    .set LayoutUIControl_setPictureSourceLayout, 0x8062bcd8
    .set LayoutUIControl_setPicture, 0x8062c408
    .set str_game_image, 0x808978d7
    .set str_map_start_line, 0x808978e2
    .set str_start_line, 0x808978f1
    .set str_item, 0x80898467
    .set str_race_null, 0x80898c28
    .set str_kame_green, 0x8089dc20
    .set CtrlRace2DMapObject_vt, 0x808c1d98
    .set ItemDirector_staticInstance, 0x809b1c58
.else
    .err
.endif


bctrl # original instruction

li r26, 0 # item type
addi r23, r24, 0x1a4 # current control (CtrlRace2DMapObject)

item_type_loop:
li r25, 0 # object index

object_loop:
mr r3, r23 # current control

lis r12, LayoutUIControl_ct@h
ori r12, r12, LayoutUIControl_ct@l
mtctr r12
bctrl

lis r3, CtrlRace2DMapObject_vt@h
ori r3, r3, CtrlRace2DMapObject_vt@l
stw r3, 0x0 (r23)

mr r3, r24 # this (CtrlRace2DMap)
addi r28, r28, 1
mr r4, r28 # child index
mr r5, r23 # current control

lis r12, UIControl_insertChild@h
ori r12, r12, UIControl_insertChild@l
mtctr r12
bctrl

addi r3, r1, 0x20 # ControlLoader (can be safely reused)
stw r23, 0x0 (r3)

lis r6, str_start_line@h # optimize common upper part
ori r4, r6, str_game_image@l # directory name
ori r5, r6, str_map_start_line@l # control file name
ori r6, r6, str_start_line@l # "section 3" name
li r7, 0x0 # animations

lis r12, ControlLoader_load@h
ori r12, r12, ControlLoader_load@l
mtctr r12
bctrl

mr r3, r23 # current control
lis r5, str_item@h # optimize common upper part
ori r4, r5, str_game_image@l # directory name
ori r5, r5, str_item@l # layout file name

lis r12, LayoutUIControl_setPictureSourceLayout@h
ori r12, r12, LayoutUIControl_setPictureSourceLayout@l
mtctr r12
bctrl

stb r26, 0x81 (r23) # store the item type
stb r25, 0x82 (r23) # store the object index

# get the item picture name
lis r6, str_kame_green@h
ori r3, r6, str_kame_green@l
bl trick
.byte 0x00 # 0x0 -> kame_green
.byte 0x0c # 0x1 -> kame_red
.byte 0x18 # 0x2 -> banana
.byte 0x2c # 0x3 -> kinoko
.byte 0x60 # 0x4 -> star
.byte 0x4c # 0x5 -> kame_wing
.byte 0x58 # 0x6 -> thunder
.byte 0x20 # 0x7 -> dummybox
.byte 0x78 # 0x8 -> kinoko_big
.byte 0x40 # 0x9 -> bomb_hei
.byte 0x84 # 0xa -> gesso
.byte 0x8c # 0xb -> pow
.byte 0x68 # 0xc -> GoldenKinoko
.byte 0x9c # 0xd -> killer
.byte 0x90 # 0xe -> thunder_c
.balign 0x4
trick:
mflr r4
lbzx r4, r4, r26
add r5, r3, r4

mr r3, r23
ori r4, r6, str_race_null@l

lis r12, LayoutUIControl_setPicture@h
ori r12, r12, LayoutUIControl_setPicture@l
mtctr r12
bctrl

addi r23, r23, 0x1b4 # move to the next control

addi r25, r25, 1 # increment the object index
lis r3, ItemDirector_staticInstance@ha
lwz r3, ItemDirector_staticInstance@l (r3)
mulli r4, r26, 0x24
add r3, r3, r4
lwz r3, 0x48 + 0x8 (r3) # maximum number of objects of the current type
cmpw r25, r3
blt object_loop

addi r26, r26, 1 # increment the item type
cmpwi r26, 15
blt item_type_loop
Code:
# inject at 807eaca8 (PAL)
# inject at 807e13fc (NTSC-U)
# inject at 807ea314 (NTSC-J)
# inject at 807d9068 (NTSC-K)

.set region, ''

.if (region == 'P')
    .set ItemDirector_staticInstance, 0x809c3618
.elseif (region == 'E')
    .set ItemDirector_staticInstance, 0x809bee20
.elseif (region == 'J')
    .set ItemDirector_staticInstance, 0x809c2678
.elseif (region == 'K')
    .set ItemDirector_staticInstance, 0x809b1c58
.else
    .err
.endif

bctrl # original instruction

# only proceed if we have a picture source layout
lwz r3, 0x16c (r31)
cmpwi r3, 0x0
beq end

# set the opacity of the pane
lwz r3, 0x198 (r31)
li r4, 0xa0
stb r4, 0xb8 (r3)

# set the size of the pane
lis r4, 0x4140 # 12.0f
stw r4, 0x4c (r3)
stw r4, 0x50 (r3)

# hide the control
li r3, 1
stb r3, 0x80 (r31)

lis r3, ItemDirector_staticInstance@ha
lwz r3, ItemDirector_staticInstance@l (r3)
lbz r4, 0x81 (r31) # item type
mulli r4, r4, 0x24
add r3, r3, r4
lwz r4, 0x48 + 0x10 (r3) # current number of objects of this type

lbz r5, 0x82 (r31) # object index
cmpw r5, r4
bge end

# show the control
li r4, 0
stb r4, 0x80 (r31)

lwz r3, 0x48 + 0x4 (r3) # object array
slwi r4, r5, 2
lwzx r3, r3, r4 # object

# copy the item object position to the control
addi r4, r3, 0x44
lswi r5, r4, 0xc
addi r4, r31, 0x19c
stswi r5, r4, 0xc

end:
Nice work!