Diipfake [Vega]
#1
Diipfake [Vega]

One of my favorite codes that I've created. Shoutout to Cealgair for the clever name!



Playlist of real WW usage: https://youtube.com/playlist?list=PL2UIu...4MTny9gvEy

WARNING: This code will probably get you banned from Wiimmfi (if used in public WWs/Battles) even though it gives you zero material racing advantages, and afaik violates zero current known Wiimmfi rules regarding what's being modified via codes. You've been warned. If unsure, just stick to using this with your friends in Private Rooms.

This code will allow you to clone anybody's attributes (except VR+BR as I aimed to make this Wiimmfi "safe") and play with those attributes on the next online race/battle. What does this mean?

Example:
  1. Code configured to clone Mii, Online Rank, Character & Vehicle
  2. Press activator at results of race. A random opponent is selected by the Code
  3. On next race, you will have that opponent's Mii, Rank, Character, and Vehicle
  4. Everyone will see the effects

XXXX = Controller Address
ZZZZ = Button to press to clone a random selected opponent
zzzz = Deactivator

Do NOT press/hold-down other buttons when pressing ZZZZ/zzzz. You don't need to spam the activator/deactivator. Simply press it.

q value (PAL Code Only):
5 = GCN
4 = non-GCN

The code is entirely configurable on what to clone via the "mimic" values below.

Mimic values (set 1 for true, 0 for false):
M = Mii
R = Region ID (line colour)
G = Flag & Globe Location
S = Online Rank Icon (Star rank)
K = Character & Vehicle

Appropriate Times of when to press ZZZZ/zzzz~
  • During a Race
  • At Results Screen
  • At Screen to choose between Next Race or Quit
  • At Character Selection that appears right after Host starts Friend Room

If you press ZZZZ/zzzz at any other time, de-syncing may occur (what you see on your Screen won't match what others see on their screens).

If you have already cloned somebody and want to clone a new person, just hit the ZZZZ button again. Keep in mind the selection is random so it's always possible the same opponent gets selected again. It's also possible that the code selects somebody who is in Live View (if using in WW), meaning once that opponent views the players list screen, they will see a clone of themselves, lol.

Code quirks:
  1. The code may not work correctly if you start off with a Player/Guest Mii. Start off with a regular/custom Mii. The code can CLONE player/guest Miis fine, just don't start with them.
  2. After using the code (even if you deactivate), when going offline, you will see your License Miis have been removed. Don't worry, your Miis have not been deleted forever. Simply go to License Options to Select Mii to reapply your Miis for each License.
  3. If enabling the K option, when you've cloned an Opponent's Char+Vehicle, you will NEVER see it during course selection. Don't worry, you will have it once the race starts, and everyone will see it.

Final NOTE: This code makes use of memory addresses 0x800006D0 thru 0x800006DD and 0x80004040 thru 0x80004094. Make sure no other codes you have equipped are using those addresses.

PAL
040006D4 00MRGSK0
C21AAA8C 00000045
3D80809C 818C2108
2C0C0000 41820210
896C0000 2C0B0000
41820204 3D40803q
A14AXXXX 280AZZZZ
3D608000 800B4040
2F800000 41820068
280Azzzz 40A201E0
419E01DC 38000000
980B06DD 3D408043
80CB408C 80EB4090
890B4094 90CAABD8
90EABBDC 990AAB67
990C00C5 74C000FF
4082001C 38C0FFFF
3C808024 60845DA8
55031838 38630004
7CE3202E 90CC00B8
90EC00BC 6169403E
48000138 40BE005C
812B06D0 89290008
814D9698 814A0010
1D29004A 7D4A4A14
394A0002 914B06D8
38000013 392C000C
6166403C 7C0903A6
84090004 94060004
4200FFF8 3D408043
80EAABD8 810ABBDC
892AAB67 90E60004
91060008 9926000C
3900000C 38EC0008
39200000 7D0903A6
840700C0 2C000000
41820008 39290001
4200FFF0 2C090000
418200FC 7CAC42E6
7CE54B96 7CE749D6
7CE72850 38E70001
38A00001 98AB06DD
7CE903A6 392C0008
38C00000 840900C0
38C60001 2C000000
41A2FFF4 4200FFF0
98CB06DC 810B06D4
3CE08043 75000001
41820010 88A900BD
98AC00C5 98A7AB67
71001000 41820040
800900B0 80C900B4
900C00B8 90CC00BC
2C00FFFF 40820020
3D408024 614A5DA8
54A51838 7C05502E
38A50004 5400063E
7CC5502E 9007ABD8
90C7BBDC 75000010
41820054 39290006
38C00025 814B06D8
398C000E 7CC903A6
A4090002 B40A0002
B40C0002 4200FFF4
A0090002 B00C0002
806B06D0 88830008
38000000 980300A4
3D808052 38A0FFFF
618C6020 7D8903A6
4E800421 80010014
60000000 00000000
C25FB0A4 00000002
3D808000 80030074
906C06D0 00000000
C2644370 0000000A
80632100 3D808000
880C06DD 2C000000
4182003C 816C06D4
898C06DC 2C0C0000
4182002C 1D8C0038
7D436214 71600100
4182000C 880A001F
9803001F 71600010
4182000C A00A001C
B003001C 00000000
C254A9D8 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000
C254AA00 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000
C254AA28 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000

NTSC-U
040006D4 00MRGSK0
C21AA9EC 00000045
3D80809C 818CD958
2C0C0000 41820210
896C0000 2C0B0000
41820204 3D408034
A14AXXXX 280AZZZZ
3D608000 800B4040
2F800000 41820068
280Azzzz 40A201E0
419E01DC 38000000
980B06DD 3D408042
80CB408C 80EB4090
890B4094 90CA6858
90EA785C 990A67E7
990C00C5 74C000FF
4082001C 38C0FFFF
3C808024 60845A90
55031838 38630004
7CE3202E 90CC00B8
90EC00BC 6169403E
48000138 40BE005C
812B06D0 89290008
814D9698 814A0010
1D29004A 7D4A4A14
394A0002 914B06D8
38000013 392C000C
6166403C 7C0903A6
84090004 94060004
4200FFF8 3D408042
80EA6858 810A785C
892A67E7 90E60004
91060008 9926000C
3900000C 38EC0008
39200000 7D0903A6
840700C0 2C000000
41820008 39290001
4200FFF0 2C090000
418200FC 7CAC42E6
7CE54B96 7CE749D6
7CE72850 38E70001
38A00001 98AB06DD
7CE903A6 392C0008
38C00000 840900C0
38C60001 2C000000
41A2FFF4 4200FFF0
98CB06DC 810B06D4
3CE08042 75000001
41820010 88A900BD
98AC00C5 98A767E7
71001000 41820040
800900B0 80C900B4
900C00B8 90CC00BC
2C00FFFF 40820020
3D408024 614A5A90
54A51838 7C05502E
38A50004 5400063E
7CC5502E 90076858
90C7785C 75000010
41820054 39290006
38C00025 814B06D8
398C000E 7CC903A6
A4090002 B40A0002
B40C0002 4200FFF4
A0090002 B00C0002
806B06D0 88830008
38000000 980300A4
3D808052 38A0FFFF
618C1BAC 7D8903A6
4E800421 80010014
60000000 00000000
C25DA7C0 00000002
3D808000 80030074
906C06D0 00000000
C2612F50 0000000A
8063D930 3D808000
880C06DD 2C000000
4182003C 816C06D4
898C06DC 2C0C0000
4182002C 1D8C0038
7D436214 71600100
4182000C 880A001F
9803001F 71600010
4182000C A00A001C
B003001C 00000000
C254549C 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000
C25454C4 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000
C25454EC 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000

NTSC-J
040006D4 00MRGSK0
C21AA9AC 00000045
3D80809C 818C1168
2C0C0000 41820210
896C0000 2C0B0000
41820204 3D408034
A14AXXXX 280AZZZZ
3D608000 800B4040
2F800000 41820068
280Azzzz 40A201E0
419E01DC 38000000
980B06DD 3D408043
80CB408C 80EB4090
890B4094 90CAA558
90EAB55C 990AA4E7
990C00C5 74C000FF
4082001C 38C0FFFF
3C808024 60845758
55031838 38630004
7CE3202E 90CC00B8
90EC00BC 6169403E
48000138 40BE005C
812B06D0 89290008
814D9698 814A0010
1D29004A 7D4A4A14
394A0002 914B06D8
38000013 392C000C
6166403C 7C0903A6
84090004 94060004
4200FFF8 3D408043
80EAA558 810AB55C
892AA4E7 90E60004
91060008 9926000C
3900000C 38EC0008
39200000 7D0903A6
840700C0 2C000000
41820008 39290001
4200FFF0 2C090000
418200FC 7CAC42E6
7CE54B96 7CE749D6
7CE72850 38E70001
38A00001 98AB06DD
7CE903A6 392C0008
38C00000 840900C0
38C60001 2C000000
41A2FFF4 4200FFF0
98CB06DC 810B06D4
3CE08043 75000001
41820010 88A900BD
98AC00C5 98A7A4E7
71001000 41820040
800900B0 80C900B4
900C00B8 90CC00BC
2C00FFFF 40820020
3D408024 614A5758
54A51838 7C05502E
38A50004 5400063E
7CC5502E 9007A558
90C7B55C 75000010
41820054 39290006
38C00025 814B06D8
398C000E 7CC903A6
A4090002 B40A0002
B40C0002 4200FFF4
A0090002 B00C0002
806B06D0 88830008
38000000 980300A4
3D808052 38A0FFFF
618C59A0 7D8903A6
4E800421 80010014
60000000 00000000
C25FA980 00000002
3D808000 80030074
906C06D0 00000000
C26439DC 0000000A
80631160 3D808000
880C06DD 2C000000
4182003C 816C06D4
898C06DC 2C0C0000
4182002C 1D8C0038
7D436214 71600100
4182000C 880A001F
9803001F 71600010
4182000C A00A001C
B003001C 00000000
C254A358 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000
C254A380 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000
C254A3A8 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000

NTSC-K
040006D4 00MRGSK0
C21AADE8 00000045
3D80809B 818C0748
2C0C0000 41820210
896C0000 2C0B0000
41820204 3D408033
A14AXXXX 280AZZZZ
3D608000 800B4040
2F800000 41820068
280Azzzz 40A201E0
419E01DC 38000000
980B06DD 3D408042
80CB408C 80EB4090
890B4094 90CA8BF8
90EA9BFC 990A8B87
990C00C5 74C000FF
4082001C 38C0FFFF
3C808024 60845B88
55031838 38630004
7CE3202E 90CC00B8
90EC00BC 6169403E
48000138 40BE005C
812B06D0 89290008
814D96B8 814A0010
1D29004A 7D4A4A14
394A0002 914B06D8
38000013 392C000C
6166403C 7C0903A6
84090004 94060004
4200FFF8 3D408042
80EA8BF8 810A9BFC
892A8B87 90E60004
91060008 9926000C
3900000C 38EC0008
39200000 7D0903A6
840700C0 2C000000
41820008 39290001
4200FFF0 2C090000
418200FC 7CAC42E6
7CE54B96 7CE749D6
7CE72850 38E70001
38A00001 98AB06DD
7CE903A6 392C0008
38C00000 840900C0
38C60001 2C000000
41A2FFF4 4200FFF0
98CB06DC 810B06D4
3CE08042 75000001
41820010 88A900BD
98AC00C5 98A78B87
71001000 41820040
800900B0 80C900B4
900C00B8 90CC00BC
2C00FFFF 40820020
3D408024 614A5B88
54A51838 7C05502E
38A50004 5400063E
7CC5502E 90078BF8
90C79BFC 75000010
41820054 39290006
38C00025 814B06D8
398C000E 7CC903A6
A4090002 B40A0002
B40C0002 4200FFF4
A0090002 B00C0002
806B06D0 88830008
38000000 980300A4
3D808051 38A0FFFF
618C4044 7D8903A6
4E800421 80010014
60000000 00000000
C25E94C4 00000002
3D808000 80030074
906C06D0 00000000
C2632688 0000000A
80630740 3D808000
880C06DD 2C000000
4182003C 816C06D4
898C06DC 2C0C0000
4182002C 1D8C0038
7D436214 71600100
4182000C 880A001F
9803001F 71600010
4182000C A00A001C
B003001C 00000000
C2538A30 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000
C2538A58 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000
C2538A80 00000004
5405FFFE 3D808000
898C06DD 2C0C0001
40820008 38A00001
60000000 00000000



Code creator: Vega
Code credits: Anarion (local Geo info packet), Atlas (Default Geo table), Megazig (OSSleepThread addr)




RAM Write Source:
Code:
Write 0x00MRGSK0 at 0x800006D4.


First ASM:
Code:
#Hooked at epilogue of OSSleepthread
#Why was this hooked here? When i was hooking to a spot within SK_UserHandler_importRecvPackets, I received a obscure one-time bug. Granted the code was way different (with an extra ASM) at that time. So I just decided to revamp the entire code. Was the one-time bug the fault of that function hook? Probably not, but let's be safe.
#PAL    801AAA8C
#NTSC-U 801AA9EC
#NTSC-J 801AA9AC
#NTSC-K 801AADE8

#Region Assembling Option
.set region, '' #Fill in E, P, J, or K within the quotes for your region when Compiling! Lowercase letters can also be used.

#EVA Notes
#800006D0 (word) is Online Self Mii Struct Ptr
#800006D4 (word) Mimic config
#800006D8 (word) ptr-2 to saved Mii data
#800006DC (byte) random num+1 aka "count"
#800006DD (byte) Code-On flag for 3rd ASM

#NOTE: There's NO need to make a Stack Frame because we are hooked at first ins of epilogue (with the og instruction being at end), and there's no return value (r3) to preserve

#Directives
.if     (region == 'P' || region == 'p') #PAL
    .set USER_Static_ptr, 0x809c2108
    .macro load_unk_ptr register
        lwz \register, -0x6968 (r13) #func 0x800bc3e0
    .endm
    .set ChangeRawMiiToNetLite_Func, 0x80526020
    .set anarion, 0x8042AB67
    .set geo_table, 0x80245DA8
.elseif (region == 'E' || region == 'e') #NTSC-U
    .set USER_Static_ptr, 0x809bd958
    .macro load_unk_ptr register
        lwz \register, -0x6968 (r13) #func 0x800bc340
    .endm
    .set ChangeRawMiiToNetLite_Func, 0x80521BAC
    .set anarion, 0x804267E7
    .set geo_table, 0x80245A90
.elseif (region == 'J' || region == 'j') #NTSC-J
    .set USER_Static_ptr, 0x809c1168
    .macro load_unk_ptr register
        lwz \register, -0x6968 (r13) #func 0x800bc300
    .endm
    .set ChangeRawMiiToNetLite_Func, 0x805259A0
    .set anarion, 0x8042A4E7
    .set geo_table, 0x80245758
.elseif (region == 'K' || region == 'k') #NTSC-K
    .set USER_Static_ptr, 0x809b0748
    .macro load_unk_ptr register
        lwz \register, -0x6948 (r13) #func 0x800bc440
    .endm
    .set ChangeRawMiiToNetLite_Func, 0x80514044
    .set anarion, 0x80418B87
    .set geo_table, 0x80245B88
.else #Invalid Region
    .err #Region match not detected. Tell the Assembler to halt and throw an error.
.endif

#Check if a USER pointer exists, then check if a room exists
lis r12, USER_Static_ptr@ha
lwz r12, USER_Static_ptr@l (r12)
cmpwi r12, 0
beq- end
lbz r11, 0 (r12)
cmpwi r11, 0
beq- end

#Check if ZZZZ/zzzz was pressed
lis r10, 0x8035 #GCN PAL used for test source
lhz r10, 0xFFFF8200 (r10) #GCN PAL used for test source
cmplwi r10, 0x0880 #GCN Y button used for test source

#Do some stuff that both activator situations would require, yes this is slower code but will cut down in length
lis r11, 0x8000 #Set EVA Upper
lwz r0, 0x4040 (r11) #Has default contents already been saved? Null loaded here means NO
cmpwi cr7, r0, 0

#Now do rest of branches and checks
beq- activate_mimic
cmplwi r10, 0x0090 #GCN Z button used for test source
bne+ end

#De-mimic!
#Were defaults saved? If not, do nothing
beq- cr7, end

#Clear Code-On Flag
li r0, 0
stb r0, 0x6DD (r11)

#Set anarion ptr
lis r10, anarion@ha

#Restore Anarion Packet original contents and original Flag/Globe/RegID USER Packet contents
lwz r6, 0x4040+0x4C (r11)
lwz r7, 0x4040+0x50 (r11)
lbz r8, 0x4040+0x54 (r11)
stw r6, anarion+0x0071@l (r10)
stw r7, anarion+0x1075@l (r10)
stb r8, anarion@l (r10)
stb r8, 0xC5 (r12) #Region ID has no differences in Anarion vs USER Packet
andis. r0, r6, 0x00FF #Check if flag/region settings were configured
bne- mimic_deact_restore_falgregion_user_stuff
li r6, -1 #USER Packet uses -1 for non-configured flag/region settings
#Need to grab default globe location of region id for USER Packet
lis r4, geo_table@h
ori r4, r4, geo_table@l
slwi r3, r8, 3
addi r3, r3, 4
lwzx r7, r3, r4

mimic_deact_restore_falgregion_user_stuff:
stw r6, 0xB8 (r12)
stw r7, 0xBC (r12)

#Set r9 as -2 of your backed up Mii Data (USER-Packet specific, NOT Database)
ori r9, r11, 0x4040-2

#Copy all saved Mii data to Mii DB and USER packet; mii DB excludes checksum
b mimic_mii_data_set_ctr_amt

#____Mimic____!
activate_mimic:
#Check if your default stuff was already saved. If not, save it!
bne+ cr7, continue_activate_mimic

#Grab Online Self Mii ptr thingy to grab DB index
lwz r9, 0x6D0 (r11)
lbz r9, 0x8 (r9)

#Grab MiiData-2 ptr using DB root ptr and index, then save it to EVA. Rather do it in this code than the other code
load_unk_ptr r10
lwz r10, 0x10 (r10)
mulli r9, r9, 74
add r10, r10, r9
addi r10, r10, 2 #Account for RNOD word magic but only add 2 cuz of halfword loop
stw r10, 0x6D8 (r11)

#Backup your original USER Packet Mii Data + CRC16
li r0, 19 #Size in words
addi r9, r12, 0xC
ori r6, r11, 0x4040-4
mtctr r0
backup_mii_data_loop:
lwzu r0, 0x4 (r9)
stwu r0, 0x4 (r6)
bdnz+ backup_mii_data_loop

#Save Country, Globe, and Region ID stuff
lis r10, anarion@ha
lwz r7, anarion+0x0071@l (r10)
lwz r8, anarion+0x1075@l (r10)
lbz r9, anarion@l (r10)
stw r7, 0x4 (r6)
stw r8, 0x8 (r6)
stb r9, 0xC (r6)

#Calculate Room count (excluding yourself and guests), this is hacky, there's definitely better ways to do this.
continue_activate_mimic:
li r8, 12 #Max amt of opponent USER packets possible in USER handle as a whole (NOT included yours) is actually 12. A packet (at full room no guests) is left unused. Idk how sloting goes, so we need to check this extra packet.
addi r7, r12, 8 #Point to your USER packet (8 bytes past Root)
li r9, 0
mtctr r8
calc_room_size_loop:
lwzu r0, 0xC0 (r7)
cmpwi r0, 0
beq- 0x8
addi r9, r9, 1
bdnz+ calc_room_size_loop

#It may be possible for the ZZZZ to be pressed right before a room is actually made or right after it disssolves. Check for zero r9
check_for_no_opps:
cmpwi r9, 0
beq- end

#Generate Random number based on roomsize-1 count
mftbl r5
divwu r7, r5, r9
mullw r7, r7, r9
subf r7, r7, r5
addi r7, r7, 1

#Set Code-On flag high for 3rd ASM
li r5, 1
stb r5, 0x6DD (r11)

#Find opponent to mimic. Set CTR and r11 start ptr (-192 from first possible opp USER Packet)
mtctr r7
addi r9, r12, 8 #Point to your USER packet (8 bytes past Root)

#Set a count because we need to use this count to know how to navigate to opp's SELECT packet in 3rd ASM (cuz of spacing/unused SELECT packets). USER Packets align up with SELECT packets. We cannot use the random num for this!
li r6, 0

#Now loop thru all applicable USER packets
check_player_amt_in_user_pkt_loop:
lwzu r0, 0xC0 (r9)
addi r6, r6, 1
cmpwi r0, 0
beq- check_player_amt_in_user_pkt_loop #If no USER packet, reloop but do NOT decrement CTR
bdnz+ check_player_amt_in_user_pkt_loop

#Store "count" to EVA for 3rd ASM
stb r6, 0x6DC (r11)

#Get Mimic Settings
lwz r8, 0x6D4 (r11)

#preset anarion ptr
lis r7, anarion@ha #NOTE keep r7 intact til we get to mii copy stuff

#r11 (Opp USER Packet ptr) has now been set!
#Check Region ID copy flag
andis. r0, r8, 0x0001
beq- check_flagglobe_copy_flag

#Note -8's have to be done because opp USER doesn't have the 0x8 bytes in front like r11 (Your USER packet)
#Copy Opp's Region ID now
lbz r5, 0xC5-8 (r9) #NOTE keep r5 intact til once we're past geo table stuff
stb r5, 0xC5 (r12)
stb r5, anarion@l (r7) #For your screen

#Check Flag+Globe copy flag
check_flagglobe_copy_flag:
andi. r0, r8, 0x1000
beq- check_mii_copy_flag

#Copy Flag+Globe
lwz r0, 0xB8-8 (r9)
lwz r6, 0xBC-8 (r9)
stw r0, 0xB8 (r12)
stw r6, 0xBC (r12)

#Need to update Flag+Globe on your screen now
#Did opp have flag set?
cmpwi r0, -1
bne- write_flag_globe_your_screen
lis r10, geo_table@h
ori r10, r10, geo_table@l
slwi r5, r5, 3 #Multiply Region ID by 8 to get exact ptr within geo table
lwzx r0, r5, r10 #Load new flag+province+city values
addi r5, r5, 4
clrlwi r0, r0, 24 #Clear out everything but the country code byte
lwzx r6, r5, r10 #Load default globe location of reg id NOTE is this even needed because this is usually zero when province within country isnt set and game does its own geo table lookup, but whatever, JUST incase!

write_flag_globe_your_screen:
stw r0, anarion+0x0071@l (r7)
stw r6, anarion+0x1075@l (r7)

#Check for Mii copy flag
check_mii_copy_flag:
andis. r0, r8, 0x0010
beq- end

mimic_mii_data:
addi r9, r9, 0xE-8 #Point to -2 of Mii Data spot in Opp's USER Packet
mimic_mii_data_set_ctr_amt:
li r6, 37 #37 halfwords is 74 bytes
lwz r10, 0x6D8 (r11) #Set r10 as -2 to spot in Mii DB
addi r12, r12, 0xE #Point to -2 of Mii Data spot in destination/your USER Packet
mtctr r6
mimic_mii_loop:
lhzu r0, 0x2 (r9)
sthu r0, 0x2 (r10)
sthu r0, 0x2 (r12)
bdnz+ mimic_mii_loop

#Copy Opp's Mii Checksum from their USER to yours (this does NOT go into Mii DB!)
lhz r0, 0x2 (r9)
sth r0, 0x2 (r12)

#Grab Online Self Mii Struct ptr and DB index
lwz r3, 0x6D0 (r11)
lbz r4, 0x8 (r3)

#Now we need to update our Online Self Mii char/icon packet thingy
#Theres a byte held in the mii struct that tells the mii-related funcs that its already processed, clear this byte
li r0, 0
stb r0, 0x00A4 (r3)

#Call ChangeRawMiiToNetLite_Func
#r3 is ptr to Online Self Mii Struct thingy
#r4 is DB index byte
#r5 is always -1?
lis r12, ChangeRawMiiToNetLite_Func@h
li r5, -1
ori r12, r12, ChangeRawMiiToNetLite_Func@l
mtctr r12
bctrl

#Original Instruction, End Code
end:
lwz r0, 0x0014 (sp)

---------------

Second ASM:
Code:
#Summary: Store Online Self Mii Struct Ptr Thingy to EVA
#PAL    805FB0A4
#NTSC-U 805DA7C0
#NTSC-J 805FA980
#NTSC-K 805E94C4
lis r12, 0x8000
lwz r0, 0x0074 (r3) #Original Instruction
stw r3, 0x6D0 (r12)

---------------

Third ASM:
Code:
#Hooked at unk func at address right before it calls GetWinningTrack Appears to be only func that calls SK_SELECTHandler_getWinningVoter
#Hook occurs the moment the lottery starts. Only occurs once.
#Summary: Check user flag for online rank and character+vehicle. Switch those attributes if flag(s) are present

#PAL    80644370
#NTSC-U 80612F50
#NTSC-J 806439DC
#NTSC-K 80632688

#Region Setting
.set region, '' #p, e, j, or k

#Directives #TODO
.if     (region == 'P' || region == 'p') #PAL
    .macro og_instruction
        lwz r3, 0x2100 (r3)
    .endm
.elseif (region == 'E' || region == 'e') #NTSC-U
    .macro og_instruction
        lwz r3, -0x26D0 (r3)
    .endm
.elseif (region == 'J' || region == 'j') #NTSC-J
    .macro og_instruction
        lwz r3, 0x1160 (r3)
    .endm
.elseif (region == 'K' || region == 'k') #NTSC-K
    .macro og_instruction
        lwz r3, 0x0740 (r3)
    .endm
.else #Invalid Region
    .err #Region match not detected. Tell the Assembler to halt and throw an error.
.endif

#OG Instruction, finish loading SELECT Handle ptr
og_instruction

#Check Code-On Flag from 2nd ASM
lis r12, 0x8000
lbz r0, 0x6DD (r12)
cmpwi r0, 0
beq- end

#Load Mimic Config
lwz r11, 0x6D4 (r12)

#Load saved "count"
lbz r12, 0x6DC (r12)
cmpwi r12, 0
beq- end

#Multiply count by SELECT packet size
mulli r12, r12, 0x38 #Size of SELECT packets are 0x38 bytes

#Get opp's SELECT Packet ptr-8
add r10, r3, r12

#Check for Online Rank Icon Copy flag
andi. r0, r11, 0x0100
beq- check_kartvehicle_copy_flag

#Fyi, offsets are based for reading/writing data in your own SELECT Packet with using the SELECT Handle Root ptr.

#Copy Rank
lbz r0, 0x1F (r10)
stb r0, 0x1F (r3)

check_kartvehicle_copy_flag:
andi. r0, r11, 0x0010
beq- end

#Copy Character and Vehicle
lhz r0, 0x1C (r10)
sth r0, 0x1C (r3)

#End code
end:

------------

4th, 5th, and 6th ASM Sources:
Code:
#Hooked at r5 arg setup for the 3 parents that call SetCountryFunc, SetLatitudeFunc, and SetLongtitudeFunc respectively
#Hook Addresses
#PAL    8054A9D8 8054AA00 8054AA28
#NTSC-U 8054549C 805454C4 805454EC
#NTSC-J 8054A358 8054A380 8054A3A8
#NTSC-K 80538A30 80538A58 80538A80
#Summary: If code is active force the flag/region settings to be On

#Original Instruction. Extract "Display Flag & Region Settings?" bit from rksys.dat
rlwinm r5, r0, 31, 31, 31

#Check if Code is On
lis r12, 0x8000
lbz r12, 0x6DD (r12)
cmpwi r12, 1
bne- 0x8

#Force Game to use Flag and region info from Anarion's "packet" (the dumped SYSCONF)
li r5, 1
Reply
#2
How does this work with someone using the multi-mii code (https://mariokartwii.com/showthread.php?tid=2411) you posted a few days ago?
Reply
#3
Codes are not meant to be ran together, but if someone did...

1. If you activate/deactivate before race results, the Change Miis code would take priority as it executes later at a ScorePage function (very moment results appear). You would swap to next legit Mii in your Database regardless of what your current Mii is.

2. If you activate/deactivate at race results or at next-race/continue screen, this code would take priority.

No matter how many times the Change Mii code has cycled Miis, you can always deactivate to go to your legit Mii (as long as point 2 is followed).

But this is all in theory and at quick glance. Chances are, something will botch, and desync or even a freeze will occur.
Reply
#4
Playlist of some WWs!
https://youtube.com/playlist?list=PL2UIu...4MTny9gvEy

WW's #5 would probably be the best out of the list
WW's 5 thru 7 are better than 1 thru 4 imo
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)