Randomized CC Grand Prix [TheNinjaKingOW, Vega]
#1
This code will set the CC to a random CC no matter what you pick. It will also randomize if you get mirror or not, which means you can get mirror on unintended slots.

NTSC-U: 
c0000000 00000007
3d808000 896c1500
894c1501 396b0001
280b0003 41a00008
39600000 996c1500
394a0001 280a0002
41a00008 39400000
994c1501 4e800020
C2825098 00000003
3D808000 880C1501 
90051780 880C1500 
60000000 00000000 

PAL: 
c0000000 00000007
3d808000 896c1500
894c1501 396b0001
280b0003 41a00008
39600000 996c1500
394a0001 280a0002
41a00008 39400000
994c1501 4e800020
C283FAF8 00000003 
3D808000 880C1501 
90051780 880C1500 
60000000 00000000
 
NTSC-J: 
c0000000 00000007
3d808000 896c1500
894c1501 396b0001
280b0003 41a00008
39600000 996c1500
394a0001 280a0002
41a00008 39400000
994c1501 4e800020
C283F164 00000003 
3D808000 880C1501 
90051780 880C1500 
60000000 00000000 

NTSC-K: 
c0000000 00000007
3d808000 896c1500
894c1501 396b0001
280b0003 41a00008
39600000 996c1500
394a0001 280a0002
41a00008 39400000
994c1501 4e800020
C282DEB8 00000003 
3D808000 880C1501 
90051780 880C1500 
60000000 00000000



Source (C0) Randomizer
Code:
lis r12, 0x8000
lbz r11, 0x1500 (r12)
lbz r10, 0x1501 (r12)

addi r11, r11, 1

cmplwi r11, 3
blt+ dont_reset

li r11, 0

dont_reset:
stb r11, 0x1500 (r12)

addi r10, r10, 1
cmplwi r10, 2
blt+ dont_reset_this

li r10, 0

dont_reset_this:
stb r10, 0x1501 (r12)
#blr #Uncomment if not using Pyii

Source (C2) Apply the generated byte values
Code:
lis r12, 0x8000
lbz r0, 0x1501 (r12) #Load Mirror Mode byte
stw r0, 0x1780 (r5) #Write it
lbz r0, 0x1500 (r12) #Load CC byte (next instruction in static memory will write the CC byte to its proper location; no need for default instruction)
~MarioKartWii.com #1~
Reply
#2
Thx for posting this. Hopefully you were able to learn some new tricks and tips regarding ASM.

Note to code users: If Mirror Mode is chosen, it will show "Mirror Mode" on the Course selection screen regardless of what CC you get. So if you happen to get 50cc+Mirror, you won't know you're on 50cc for the engine class until the race starts and you notice how slow you are driving.
Reply
#3
There seems to have no side-affects in the offline portion of this code.
~MarioKartWii.com #1~
Reply
#4
50cc mirror mode sounds so bad. cant wait to try this code out later. Great work!
Discord: Alina.#6309
Twitter: @RMCW01

[Image: Screenshot_2021-02-15_184623.png]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)