Mii Head Rainbow Color Cycler [Vega / Sponge]
#1
Mii Head Rainbow Color Cycler [Vega / Sponge]

This code will cycle the Mii head's skin and hair colors via a Rainbow color spectrum. The changes are live for character/vehicle selection, racing/battle, and wifi idle.

S = Speed (value is in hex)
1 = Change color per 1/4 second
2 = Change color per 1/8 second (all 8 colors in 1 second)
E = Max limit (color changes every frame)

If you increase the S value beyond E, colors will start to not cycle correctly.

NOTE: This code makes use of memory address 0x80000998, make sure no other codes in your GCT/Cheat-Manager are using that address.

Region-Free
C0000000 00000018
3D808000 896C0998
396B000S 280B0078
41A00008 39600000
280B0013 3D20FF00
40810040 280B0027
3D20FFFF 40810034
280B003B 3D2000FF
40810028 280B004F
3D2000FF 6129FF00
40810018 280B0063
3D29FF01 4081000C
3D20FF00 6129FF00
612A00FF 996C0998
896C5F27 3D208024
2C0B00EC 612CB8B0
41820020 2C0B0010
612CB260 41820014
2C0B0054 612CB688
41820008 612CB598
38000028 7C0903A6
914C0000 7C00606C
7C0004AC 7C0067AC
4C00012C 398C0004
4200FFE8 4E800020



Code creators: Vega, Sponge
Code credits: Atlas (Hair Color & Skin Addresses)



#START ASSEMBLY (C0; Execute ASM)

#Set Vector, Load Byte Tracker, set Alpha Channel

lis r12, 0x8000
lbz r11, 0x0998 (r12)

#Increment Byte, Add, Check Limit, Branch

addi r11, r11, 1 #Speed of cycle
cmplwi r11, 120
blt+ color_check

li r11, 0 #Reset

color_check:

#Set Color based on check

cmplwi r11, 19
lis r9, 0xFF00 #Red
ble- build_color_hex_code

cmplwi r11, 39
lis r9, 0xFFFF #Yellow
ble- build_color_hex_code

cmplwi r11, 59
lis r9, 0x00FF #Green
ble- build_color_hex_code

cmplwi r11, 79
lis r9, 0x00FF
ori r9, r9, 0xFF00 #Cyan
ble- build_color_hex_code

cmplwi r11, 99
subis r9, r9, 0x00FF #Blue (0x0000FF00)
ble- build_color_hex_code

#magenta, final color option
lis r9, 0xFF00
ori r9, r9, 0xFF00

#Build Color Hex, Store Byte

build_color_hex_code:
ori r10, r9, 0x00FF #Place in Alpha value

stb r11, 0x0998 (r12)

#Find Region of Game

lbz r11, 0x5F27 (r12) #Instruction here is vital. Virtually impossible for this to be modded by something unrelated

lis r9, 0x8024 #All Mii Head Addr's start with this upper 16 bits

cmpwi r11, 0xEC #pal
ori r12, r9, 0xB8B0
beq- set_ctr

cmpwi r11, 0x10 #japan
ori r12, r9, 0xB260
beq- set_ctr

cmpwi r11, 0x54 #korea
ori r12, r9, 0xB688
beq- set_ctr

#usa
ori r12, r9, 0xB598

#Loop Stuff, Write Color

set_ctr:
li r0, 40 #40 (0x28) total consecutive words at memory to be rewritten
mtctr r0

loop:
stw r10, 0 (r12)

dcbst 0, r12 #These 4 instructions for clearing cache, its most likely needed. Too lazy to test w/o, lul.
sync
icbi 0, r12
isync

addi r12, r12, 4
bdnz+ loop

#blr Uncomment this and adjust compiled code accordingly if using WiiRDGui to compile

#END ASSEMBLY
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)