Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 601
» Latest member: User12345667
» Forum threads: 1,695
» Forum posts: 12,724

Full Statistics

Online Users
There are currently 154 online users.
» 0 Member(s) | 150 Guest(s)
Bing, Facebook, Google, Yandex

Latest Threads
Make it to 10,000
Forum: General Discussion
Last Post: Cealgair
1 hour ago
» Replies: 6,336
» Views: 4,644,715
Custom Laps (Full)
Forum: Code Support / Help / Requests
Last Post: Vega
7 hours ago
» Replies: 5
» Views: 9,608
Request: steal item code
Forum: Code Support / Help / Requests
Last Post: DrTap
Yesterday, 11:11 AM
» Replies: 3
» Views: 83
No Disconnect [Bully]
Forum: Online Non-Item
Last Post: Zeraora
Yesterday, 03:59 AM
» Replies: 3
» Views: 8,487
Galaxy Colosseum Topmen C...
Forum: Online Non-Item
Last Post: _Ro
07-25-2024, 11:53 PM
» Replies: 0
» Views: 20
Somes Codes Request
Forum: Code Support / Help / Requests
Last Post: Unnamed
07-25-2024, 02:31 PM
» Replies: 4
» Views: 6,564
Thunder Cloud Effect Modi...
Forum: Offline; Item
Last Post: Unnamed
07-25-2024, 02:28 PM
» Replies: 0
» Views: 25
Show Every Object on Mini...
Forum: Visual & Sound Effects
Last Post: _Ro
07-24-2024, 12:40 AM
» Replies: 0
» Views: 57
Request: Ultra Mini Turbo...
Forum: Code Support / Help / Requests
Last Post: Vega
07-23-2024, 11:22 PM
» Replies: 8
» Views: 775
Coin magnet code
Forum: Code Support / Help / Requests
Last Post: Unnamed
07-23-2024, 01:02 PM
» Replies: 4
» Views: 8,076

 
  Line Tracers [Skullface]
Posted by: SkullFace - 07-02-2024, 08:18 PM - Forum: Online Non-Item - No Replies

Line Tracers [Skullface]

NTSC_U
C250C934 00000004
2C18FFFF 40810010
1DF80004 3DEF8000
908F0B30 C0040000
60000000 00000000
C25887A4 00000003
1DFD0004 3DEF8000
906F0B30 C0030000
60000000 00000000
C278EEF8 00000004
801D008C 1D9B0004
3D8C8150 900C0000
3D608151 93AB0000
60000000 00000000
C27E4C98 00000003
3DE08000 5460063E
1E600004 926F1534
60000000 00000000
C0000000 00000033
9421FF80 BC410008
7DE802A6 3D808151
818C0000 2C0C0000
41820170 3E408000
3DC0809C 81CED110
2C0E0000 4182015C
81CE0020 82721534
7DCE9A14 81CE0000
81CE0024 81CEFFF8
81CE0008 81CE0008
39CE0010 3BEE0068
3F808000 639C0B30
3BA00000 7FDCE82E
7C1EF800 41820031
2C1E0000 41820114
48000039 3BBD0004
7FDCE82E 7C1EF800
41820015 2C1E0000
418200F8 4800001D
4BFFFFE4 3BBD0004
7FDCE82E 7C1EF800
4CA20020 4BFFFFF0
7F6802A6 3D808016
618CDB94 7D8803A6
4E800021 38600009
38800001 3D808016
618CD304 7D8803A6
4E800021 38600000
38800009 38A00001
38C00004 38E00000
3D808016 618CDBC8
7D8803A6 4E800021
38600001 38800007
38A00001 3D808017
618C2784 7D8803A6
4E800021 38600010
38800000 3D808016
618CF274 7D8803A6
4E800021 386000A8
38800000 38A00002
3D808016 618CF050
7D8803A6 4E800021
C01F0000 C03F0004
C05F0008 D0038000
D0238000 D0438000
C01E0000 C03E0004
C05E0008 D0038000
D0238000 D0438000
7F6803A6 4E800020
7DE803A6 B8410008
38210080 4E800020

PAL
C2510DA8 00000004
2C18FFFF 40810010
1DF80004 3DEF8000
908F0B30 C0040000
60000000 00000000
C258EFC8 00000003
1DFD0004 3DEF8000
906F0B30 C0030000
60000000 00000000
C2797F04 00000004
801D008C 1D9B0004
3D8C8150 900C0000
3D608151 93AB0000
60000000 00000000
C27EEFA8 00000003
3DE08000 5460063E
1E600004 926F1534
60000000 00000000
C0000000 00000033
9421FF80 BC410008
7DE802A6 3D808151
818C0000 2C0C0000
41820170 3E408000
3DC0809C 81CE18F8
2C0E0000 4182015C
81CE0020 82721534
7DCE9A14 81CE0000
81CE0024 81CEFFF8
81CE0008 81CE0008
39CE0010 3BEE0068
3F808000 639C0B30
3BA00000 7FDCE82E
7C1EF800 41820031
2C1E0000 41820114
48000039 3BBD0004
7FDCE82E 7C1EF800
41820015 2C1E0000
418200F8 4800001D
4BFFFFE4 3BBD0004
7FDCE82E 7C1EF800
4CA20020 4BFFFFF0
7F6802A6 3D808016
618CDC34 7D8803A6
4E800021 38600009
38800001 3D808016
618CD3A4 7D8803A6
4E800021 38600000
38800009 38A00001
38C00004 38E00000
3D808016 618CDC68
7D8803A6 4E800021
38600001 38800007
38A00001 3D808017
618C2824 7D8803A6
4E800021 38600010
38800000 3D808016
618CF314 7D8803A6
4E800021 386000A8
38800000 38A00002
3D808016 618CF0F0
7D8803A6 4E800021
C01F0000 C03F0004
C05F0008 D0038000
D0238000 D0438000
C01E0000 C03E0004
C05E0008 D0038000
D0238000 D0438000
7F6803A6 4E800020
7DE803A6 B8410008
38210080 4E800020

NTSC_J
C2510728 00000004
2C18FFFF 40810010
1DF80004 3DEF8000
908F0B30 C0040000
60000000 00000000
C258E948 00000003
1DFD0004 3DEF8000
906F0B30 C0030000
60000000 00000000
C2797570 00000004
801D008C 1D9B0004
3D8C8150 900C0000
3D608151 93AB0000
60000000 00000000
C27EE614 00000003
3DE08000 5460063E
1E600004 926F1534
60000000 00000000
C0000000 00000033
9421FF80 BC410008
7DE802A6 3D808151
818C0000 2C0C0000
41820170 3E408000
3DC0809C 81CE0958
2C0E0000 4182015C
81CE0020 82721534
7DCE9A14 81CE0000
81CE0024 81CEFFF8
81CE0008 81CE0008
39CE0010 3BEE0068
3F808000 639C0B30
3BA00000 7FDCE82E
7C1EF800 41820031
2C1E0000 41820114
48000039 3BBD0004
7FDCE82E 7C1EF800
41820015 2C1E0000
418200F8 4800001D
4BFFFFE4 3BBD0004
7FDCE82E 7C1EF800
4CA20020 4BFFFFF0
7F6802A6 3D808016
618CDB54 7D8803A6
4E800021 38600009
38800001 3D808016
618CD2C4 7D8803A6
4E800021 38600000
38800009 38A00001
38C00004 38E00000
3D808016 618CDB88
7D8803A6 4E800021
38600001 38800007
38A00001 3D808017
618C2744 7D8803A6
4E800021 38600010
38800000 3D808016
618CF234 7D8803A6
4E800021 386000A8
38800000 38A00002
3D808016 618CF010
7D8803A6 4E800021
C01F0000 C03F0004
C05F0008 D0038000
D0238000 D0438000
C01E0000 C03E0004
C05E0008 D0038000
D0238000 D0438000
7F6803A6 4E800020
7DE803A6 B8410008
38210080 4E800020

NTSC_K
C24FEDC8 00000004
2C18FFFF 40810010
1DF80004 3DEF8000
908F0B30 C0040000
60000000 00000000
C257D020 00000003
1DFD0004 3DEF8000
906F0B30 C0030000
60000000 00000000
C27862C4 00000004
801D008C 1D9B0004
3D8C8150 900C0000
3D608151 93AB0000
60000000 00000000
C27DD368 00000003
3DE08000 5460063E
1E600004 926F1534
60000000 00000000
C0000000 00000033
9421FF80 BC410008
7DE802A6 3D808151
818C0000 2C0C0000
41820170 3E408000
3DC0809B 81CEFF38
2C0E0000 4182015C
81CE0020 82721534
7DCE9A14 81CE0000
81CE0024 81CEFFF8
81CE0008 81CE0008
39CE0010 3BEE0068
3F808000 639C0B30
3BA00000 7FDCE82E
7C1EF800 41820031
2C1E0000 41820114
48000039 3BBD0004
7FDCE82E 7C1EF800
41820015 2C1E0000
418200F8 4800001D
4BFFFFE4 3BBD0004
7FDCE82E 7C1EF800
4CA20020 4BFFFFF0
7F6802A6 3D808016
618CDCD0 7D8803A6
4E800021 38600009
38800001 3D808016
618CD440 7D8803A6
4E800021 38600000
38800009 38A00001
38C00004 38E00000
3D808016 618CDD04
7D8803A6 4E800021
38600001 38800007
38A00001 3D808017
618C28C0 7D8803A6
4E800021 38600010
38800000 3D808016
618CF3B0 7D8803A6
4E800021 386000A8
38800000 38A00002
3D808016 618CF18C
7D8803A6 4E800021
C01F0000 C03F0004
C05F0008 D0038000
D0238000 D0438000
C01E0000 C03E0004
C05E0008 D0038000
D0238000 D0438000
7F6803A6 4E800020
7DE803A6 B8410008
38210080 4E800020

Code Creator: Skullface
Code Contributors: Bully (Item Spy ASM), Hamster35000vr (Address), mdmwii (P1 Pointer Calculator Helper)

Code:
#============================================================#
#                           Source                           #
#------------------------------------------------------------#
# Unknown Address Ports:                                     #
# RMCE - 0x8050C934                                          #
# RMCP - 0x80510DA8                                          #
# RMCJ - 0x80510728                                          #
# RMCK - 0x804FEDC8                                          #
#============================================================#

.set EVA_Addr, 0x0B30

cmpwi r24, -0x1
ble- the_end
mulli r15, r24, 0x0004
subis r15, r15, 0x8000
stw r4, EVA_Addr (r15)

the_end:
lfs f0, 0x0000 (r4) # Original Instruction

Code:
#============================================================#
#                           Source                           #
#------------------------------------------------------------#
# Unknown Address Ports:                                     #
# RMCE - 0x805887A4                                          #
# RMCP - 0x8058EFC8                                          #
# RMCJ - 0x8058E948                                          #
# RMCK - 0x8057D020                                          #
#============================================================#

.set EVA_Addr, 0x0B30

mulli r15, r29, 0x0004
subis r15, r15, 0x8000
stw r3, EVA_Addr (r15)
lfs f0, 0x0000 (r3) # Original Instruction
Code:
#============================================================#
#                           Source                           #
#------------------------------------------------------------#
# Unknown Address Ports:                                     #
# RMCE - 0x8078EEF8                                          #
# RMCP - 0x80797F04                                          #
# RMCJ - 0x80797570                                          #
# RMCK - 0x807862C4                                          #
#============================================================#

lwz r0, 0x008C (r29) # Original Instruction
mulli r12, r27, 0x0004
addis r12, r12, 0x8150
stw r0, 0x0000 (r12)
lis r11, 0x8151
stw r29, 0x0000 (r11)
Code:
#============================================================#
#                           Source                           #
#------------------------------------------------------------#
# Unknown Address Ports:                                     #
# RMCE - 0x807E4C98                                          #
# RMCP - 0x807EEFA8                                          #
# RMCJ - 0x807EE614                                          #
# RMCK - 0x807DD368                                          #
#============================================================#

lis r15, 0x8000
rlwinm r0, r3, 0, 24, 31 # Original Instruction
mulli r19, r0, 0x0004
stw r19, 0x1534 (r15)
Code:
#============================================================#
#                           Source                           #
#------------------------------------------------------------#
# C0 Codetype                                                #
#============================================================#

.set region, '' # Put in e,p,j,k for compilation region
.set EVA_Addr, 0x0B30

# Push the Stack
stwu r1, -0x80 (r1)
stmw r2, 0x0008 (r1)

# Backup LR because C0
mflr r15

# Check if we're in a race
lis r12, 0x8151
lwz r12, 0x0000 (r12)
cmpwi r12, 0x0000
beq- the_end

lis r18, 0x8000

# KartManager_s_instance Address
.if (region == 'E' || region == 'e') # RMCE
lis r14, 0x809C
lwz r14, 0xFFFFD110 (r14)
.elseif (region == 'P' || region == 'p') # RMCP
lis r14, 0x809C
lwz r14, 0x18F8 (r14)
.elseif (region == 'J' || region == 'j') # RMCJ
lis r14, 0x809C
lwz r14, 0x0958 (r14)
.elseif (region == 'K' || region == 'k') # RMCK
lis r14, 0x809B
lwz r14, 0xFFFFFF38 (r14)
.endif

# Check if P1 Pointer is null (seems to only happen on real hardware)
cmpwi r14, 0x0000
beq- the_end

# Calculate P1 Pointer
lwz r14, 0x0020 (r14)
lwz r19, 0x1534 (r18)
add r14, r14, r19
lwz r14, 0x0000 (r14)
lwz r14, 0x0024 (r14)
lwz r14, -0x8 (r14)
lwz r14, 0x0008 (r14)
lwz r14, 0x0008 (r14)
addi r14, r14, 0x0010
addi r31, r14, 0x0068

# Check if the first pointer is a P1 Pointer
lis r28, 0x8000
ori r28, r28, EVA_Addr
li r29, 0x0000
lwzx r30, r28, r29
cmpw r30, r31
beql- fix_r30_value

# Check if we're at the end of the player pointer list
cmpwi r30, 0x0000
beq- the_end

bl call_draw_functions

loop:
addi r29, r29, 0x0004
lwzx r30, r28, r29
cmpw r30, r31
beql- fix_r30_value

# Check if we're at the end of the player pointer list
cmpwi r30, 0x0000
beq- the_end

bl call_draw_functions
b loop

fix_r30_value:
addi r29, r29, 0x0004
lwzx r30, r28, r29
cmpw r30, r31
bnelr+
b fix_r30_value

call_draw_functions:

# Backup LR
mflr r27

.if (region == 'E' || region == 'e') # RMCE
lis r12, 0x8016
ori r12, r12, 0xDB94
.elseif (region == 'P' || region == 'p') # RMCP
lis r12, 0x8016
ori r12, r12, 0xDC34
.elseif (region == 'J' || region == 'j') # RMCJ
lis r12, 0x8016
ori r12, r12, 0xDB54
.elseif (region == 'K' || region == 'k') # RMCK
lis r12, 0x8016
ori r12, r12, 0xDCD0
.endif
mtlr r12
blrl # Call GXClearVtxDesc

li r3, 0x9 # GX_VA_POS
li r4, 0x1 # GX_DIRECT
.if (region == 'E' || region == 'e') # RMCE
lis r12, 0x8016
ori r12, r12, 0xD304
.elseif (region == 'P' || region == 'p') # RMCP
lis r12, 0x8016
ori r12, r12, 0xD3A4
.elseif (region == 'J' || region == 'j') # RMCJ
lis r12, 0x8016
ori r12, r12, 0xD2C4
.elseif (region == 'K' || region == 'k') # RMCK
lis r12, 0x8016
ori r12, r12, 0xD440
.endif
mtlr r12
blrl # Call GXSetVtxDesc

li r3, 0   # GX_VTXFMT0
li r4, 0x9 # GX_VA_POS
li r5, 0x1 # GX_POS_XYZ
li r6, 0x4 # GX_F32
li r7, 0
.if (region == 'E' || region == 'e') # RMCE
lis r12, 0x8016
ori r12, r12, 0xDBC8
.elseif (region == 'P' || region == 'p') # RMCP
lis r12, 0x8016
ori r12, r12, 0xDC68
.elseif (region == 'J' || region == 'j') # RMCJ
lis r12, 0x8016
ori r12, r12, 0xDB88
.elseif (region == 'K' || region == 'k') # RMCK
lis r12, 0x8016
ori r12, r12, 0xDD04
.endif
mtlr r12
blrl # Call GXSetVtxAttrFmt

li r3, 0x1 # GX_TRUE
li r4, 0x7 # GX_ALWAYS
li r5, 0x1 # GX_TRUE
.if (region == 'E' || region == 'e') # RMCE
lis r12, 0x8017
ori r12, r12, 0x2784
.elseif (region == 'P' || region == 'p') # RMCP
lis r12, 0x8017
ori r12, r12, 0x2824
.elseif (region == 'J' || region == 'j') # RMCJ
lis r12, 0x8017
ori r12, r12, 0x2744
.elseif (region == 'K' || region == 'k') # RMCK
lis r12, 0x8017
ori r12, r12, 0x28C0
.endif
mtlr r12
blrl # Call GXSetZMode

li r3, 0x10 # Width of the lines
li r4, 0    # GX_TO_ZERO
.if (region == 'E' || region == 'e') # RMCE
lis r12, 0x8016
ori r12, r12, 0xF274
.elseif (region == 'P' || region == 'p') # RMCP
lis r12, 0x8016
ori r12, r12, 0xF314
.elseif (region == 'J' || region == 'j') # RMCJ
lis r12, 0x8016
ori r12, r12, 0xF234
.elseif (region == 'K' || region == 'k') # RMCK
lis r12, 0x8016
ori r12, r12, 0xF3B0
.endif
mtlr r12
blrl # Call GXSetLineWidth

li r3, 0xA8 # GX_LINES
li r4, 0x00 # GX_VTXFMT0
li r5, 0x02 # Amount of points
.if (region == 'E' || region == 'e') # RMCE
lis r12, 0x8016
ori r12, r12, 0xF050
.elseif (region == 'P' || region == 'p') # RMCP
lis r12, 0x8016
ori r12, r12, 0xF0F0
.elseif (region == 'J' || region == 'j') # RMCJ
lis r12, 0x8016
ori r12, r12, 0xF010
.elseif (region == 'K' || region == 'k') # RMCK
lis r12, 0x8016
ori r12, r12, 0xF18C
.endif
mtlr r12
blrl # Call GXBegin

# Get P1 X, Z, and Y and send it
lfs f0, 0x0000 (r31)
lfs f1, 0x0004 (r31)
lfs f2, 0x0008 (r31)
stfs f0, -0x8000 (r3)
stfs f1, -0x8000 (r3)
stfs f2, -0x8000 (r3)

# Get PX X, Z, and Y and send it
lfs f0, 0x0000 (r30)
lfs f1, 0x0004 (r30)
lfs f2, 0x0008 (r30)
stfs f0, -0x8000 (r3)
stfs f1, -0x8000 (r3)
stfs f2, -0x8000 (r3)

# Restore LR
mtlr r27

# Return from Call
blr

the_end:

# Restore LR because C0
mtlr r15

# Pop the Stack
lmw r2, 0x0008 (r1)
addi r1, r1, 0x0080

Print this item

  Determine Item Rank Position By Distance To First [Gearworks]
Posted by: Gearworks - 06-25-2024, 12:46 PM - Forum: Offline; Item - No Replies

I made this experimental code to see how MKW plays with MK8's distance based item rank calculation.

I have noticed that there are some courses with alternate checkpoint paths with item boxes in them that cause the game to think you're further away from first than where you should be, so keep that in mind. (Rainbow Road, Bowser's Castle)

Although this code is primarily meant for offline play, this should work fine online.

NTSC-U is currently the only tested version as I do not have playable access to the other regions.

NTSC-U

Code:
047AC54C 3800000C
047ACA0C 38000000
C27AE924 00000018
7D2802A6 3CE0809C
80E78F70 81070018
89080000 7C081800
4082000C 38600001
48000090 48000031
44BB8000 457A0000
45CB2000 46147000
46435000 4680E800
46A02800 46C35000
46E67800 4706C400
47185800 7CC802A6
3C80809C 80848F28
80840020 C0A40010
80A7000C 5500103A
7C85002E C084000C
EC840172 5460103A
7C85002E C064000C
EC630172 EC441828
38600000 5460103A
38630001 7C26042E
FC020800 4180000C
2C03000C 4180FFE8
7D2803A6 4E800020
60000000 00000000

PAL
Code:
047BAFAC 3800000C
047BB46C 38000000
C27BD384 00000018
7D2802A6 3CE0809C
80E7D730 81070018
89080000 7C081800
4082000C 38600001
48000090 48000031
44BB8000 457A0000
45CB2000 46147000
46435000 4680E800
46A02800 46C35000
46E67800 4706C400
47185800 7CC802A6
3C80809C 8084D6E8
80840020 C0A40010
80A7000C 5500103A
7C85002E C084000C
EC840172 5460103A
7C85002E C064000C
EC630172 EC441828
38600000 5460103A
38630001 7C26042E
FC020800 4180000C
2C03000C 4180FFE8
7D2803A6 4E800020
60000000 00000000

NTSC-J
Code:
047BA618 3800000C
047BAAD8 38000000
C27BC9F0 00000018
7D2802A6 3CE0809C
80E7C790 81070018
89080000 7C081800
4082000C 38600001
48000090 48000031
44BB8000 457A0000
45CB2000 46147000
46435000 4680E800
46A02800 46C35000
46E67800 4706C400
47185800 7CC802A6
3C80809C 8084C748
80840020 C0A40010
80A7000C 5500103A
7C85002E C084000C
EC840172 5460103A
7C85002E C064000C
EC630172 EC441828
38600000 5460103A
38630001 7C26042E
FC020800 4180000C
2C03000C 4180FFE8
7D2803A6 4E800020
60000000 00000000

NTSC-K
Code:
047A936C 3800000C
047A982C 38000000
C27AB744 00000018
7D2802A6 3CE0809B
80E7BD70 81070018
89080000 7C081800
4082000C 38600001
48000090 48000031
44BB8000 457A0000
45CB2000 46147000
46435000 4680E800
46A02800 46C35000
46E67800 4706C400
47185800 7CC802A6
3C80809B 8084BD28
80840020 C0A40010
80A7000C 5500103A
7C85002E C084000C
EC840172 5460103A
7C85002E C064000C
EC630172 EC441828
38600000 5460103A
38630001 7C26042E
FC020800 4180000C
2C03000C 4180FFE8
7D2803A6 4E800020
60000000 00000000

Source
Code:
// Mario Kart Wii Determine Item Rank Position By Distance To First
// Created by Gearworks on 10/11/2023

// Always load and use 12 player item slot table

// NTSC-U
047AC54C 3800000C
047ACA0C 38000000

// PAL
047BAFAC 3800000C
047BB46C 38000000

// NTSC-J
047BA618 3800000C
047BAAD8 38000000

// NTSC-K
047A936C 3800000C
047A982C 38000000

// Main code

Hook Address: 807AE924 NTSC-U
              807BD384 PAL
              807BC9F0 NTSC-J
              807AB744 NTSC-K

.set region, ''

.if (region == 'E' || region == 'e')

.set raceDirector, 0x809B8F70
.set kmpInfo, 0x809B8F28

.elseif (region == 'P' || region == 'p')

.set raceDirector, 0x809BD730
.set kmpInfo, 0x809BD6E8

.elseif (region == 'J' || region == 'j')

.set raceDirector, 0x809BC790
.set kmpInfo, 0x809BC748

.elseif (region == 'K' || region == 'k')

.set raceDirector, 0x809ABD70
.set kmpInfo, 0x809ABD28

.else

.error "invalid region selected"

.endif

mflr r9 # back up lr

lis r7, raceDirector@ha
lwz r7, raceDirector@l(r7)
lwz r8, 0x18(r7)
lbz r8, 0(r8) # player id of the player in 1st place

cmpw r8, r3
bne check_distance

li r3, 1 # the player is already in first, don't bother checking distance
b end

check_distance:
bl distances # distances are processed as "below <distance in units> for <rank position>"
.float 1500.0
.float 4000.0
.float 6500.0
.float 9500.0
.float 12500.0
.float 16500.0
.float 20500.0
.float 25000.0
.float 29500.0
.float 34500.0
.float 39000.0
distances:
mflr r6

lis r4, kmpInfo@ha
lwz r4, kmpInfo@l(r4)
lwz r4, 0x20(r4)
lfs f5, 0x10(r4) # course length

lwz r5, 0xC(r7)

slwi r0, r8, 2
lwzx r4, r5, r0
lfs f4, 0xC(r4) # get race progress for the player in 1st
fmuls f4, f4, f5

slwi r0, r3, 2
lwzx r4, r5, r0
lfs f3, 0xC(r4) # get race progress for the player who hit the itembox
fmuls f3, f3, f5

fsubs f2, f4, f3

li r3, 0
check_distance_loop:
slwi r0, r3, 2
addi r3, r3, 1

lfsx f1, r6, r0
fcmpu cr0, f2, f1
blt end

cmpwi r3, 0xC
blt check_distance_loop

end:
mtlr r9 # restore lr
blr # skip the rest of the function and return

Print this item

  Mario Kart Throwback (CT Pack)
Posted by: CyrusTheYoshi - 06-06-2024, 11:19 PM - Forum: Textures/Mods/CT's - No Replies


[Image: Mario_Kart_Throwback_Logo.png]

What is Mario Kart Throwback?
Mario Kart Throwback is a custom track distribution that is themed roughly around the 2014-2015 era of CTs(with some 2012 and 2013 tracks included as well). It's meant to be an omage to older, more obscure tracks that time may have forgotten, including representation of packs such as Wine's CT Pack and older versions of MKW Hack Pack.

How many courses are in Mario Kart Throwback?
192. As the pack gets updated, I may add more depending on interest.

Why did you pick to theme it around this era specifically?
I personally have a lot of nostalgia for this era of CTs, and I feel there are a lot of courses that have long been forgotten by the community that deserve a second chance, so to speak. Not all of them are perfect, and some will definitely show their age, but I still hope people will be able to find some fun experiencing a lesser-known era of custom tracks; an unofficial "sister pack" to CTGP Classic, so to speak.

Do you plan to release more updates for this pack after release?
Yes I do. For starters, sometime after v1.0 releases, I hope to put out a Homebrew Channel application (and Wii channel WAD) for the pack, bypassing Riivolution entirely. This channel would allow users to update the pack automatically, without needing to re-download anything. I also hope to do a similar thing for Dolphin users(or people who don't want the channel), by having a downloadable PC software with an auto-updater included as well.

Additionally, overtime I plan to add more features to the pack; things like staff ghosts, more friend room settings, accessibility textures(things like darkening or de-saturating textures on courses that may cause eye strain), etc.

When will the pack be out?
It's out right now! You can visit the CT Wiiki page to download.

You can join the Discord server for any updates and to organize rooms with other players.

Print this item

  Request: Ultra Mini Turbo Geckocode?
Posted by: Pieplup - 06-06-2024, 07:12 PM - Forum: Code Support / Help / Requests - Replies (8)

Does anyone have an ultra miniturbo gecko code?

Print this item

  Request: Cache Miis into Player Slots without playing Online?
Posted by: emeraldvixen - 06-02-2024, 05:13 AM - Forum: Code Support / Help / Requests - Replies (1)

Hi, I'm new here, I have been here as a guest for a few days and finally drummed up the courage to make an account and ask around for help with something I've been trying to achieve for a couple weeks or so now, I think.

I want to start by saying I am not a CTGP player, and I have most recently been playing on the Dolphin Emulator.

I've been really wanting to race against my Mii characters in offline mode. I've had limited success in research and testing, but I am wondering if it's possible to make all 11 CPU opponents Mii Characters, AND manually pick which miis they use.

My search began when I found this post on the Mario Kart Wii subreddit: https://www.reddit.com/r/MarioKartWii/co...yer_slots/

In a reply, the poster mentions they got it to work by using any code that sets opponents character/vehicle, and by caching in all 12 slots by playing online. However, I don't have 12 Wiis / Wii Us, nor do I want to mod my Wii U in fear of bricking it.

However, I did some testing and research, and found a few things.
1. It's possible to cache CPUS 1-3 by first playing 4 Player Mode and selecting Mii characters from there. When doing so, their icon still shows up on the map and points/results screen, however the name of the mii is only present on the points screen.
2. There's a code "Anti Freeze from Invalid Miis" that prevents the game from freezing when a Mii in the race is invalid or null, however it uses the first created Mii on the system, and still freezes if that Mii isn't present on the console (i.e. if that Mii is in the Mii Parade). Additionally, unlike the former method, no icons or names are shown for these racers.

With all this in mind I'm wondering if it's possible to create a code that would somehow let me put my Miis into all 12 slots and race against them in offline mode? At the very least I'd like to race 3 without any other CPUs. I've tried CPU bot by Dea and MarioBOT by Vega, however in both cases each player is controlled by a CPU and I can only watch, which, while entertaining to an extent, I'd enjoy being part of the race.

I hope what I ask for isn't too much, I'm willing to pay for someone to make this code for me. It's been a dream of mine to race against my Miis in this game and the fact I've gotten as far as I have already fills me with so much enthusiasm. Sorry for the wall of text haha. Fingers crossed someone can help me with this!

Print this item

  Disable Post Processing Effect Flags [Gearworks]
Posted by: Gearworks - 05-29-2024, 01:11 PM - Forum: Visual & Sound Effects - Replies (2)

Credit to maritoguionyo for the ports from NTSC-U

X Values (flag to remove):
01: Transparency
02: Shadows
04: ???
08: ???
10: Bloom
20: Depth of field
To use multiple flags, add them together

NTSC-U
C25A66B4 00000003
38A000XX 54A5043E
7C842878 38A00000
60000000 00000000

PAL
C25B15DC 00000003
38A000XX 54A5043E
7C842878 38A00000
60000000 00000000

NTSC-J
C25B0F5C 00000003
38A000XX 54A5043E
7C842878 38A00000
60000000 00000000

NTSC-K
C259F634 00000003
38A000XX 54A5043E
7C842878 38A00000
60000000 00000000

Source:

Code:
li r5, 0xXX
clrlwi r5, r5, 16
andc r4, r4, r5
li r5, 0

Print this item

  Request: Support for multiple lap counter checkpoints for online
Posted by: lschlick - 05-22-2024, 10:55 PM - Forum: Code Support / Help / Requests - No Replies

Sometimes a track is designed in such a way that it could have a lap counter in multiple places, such as a track that has multiple routes, or a track that has a shortcut that skips the normal lap counter, or a track like Maka Wuhu that is split into 3 "sub-laps".

Multiple lap counters are fine to have offline, but not fine to have online. It'd be great if there was a fix for this.

Here is somewhere where you can read on how lap counters work. https://wiki.tockdom.com/wiki/Check_Point#Lap_Counter

Print this item

  Request : Disable boost pads acceleration
Posted by: Katos - 05-18-2024, 10:38 AM - Forum: Code Support / Help / Requests - No Replies

Hello,
I'm looking for a code that keeps the jump provided by some boost pads (e.g. Mushroom Gorge) but disables acceleration of all boost pads.

Print this item

  Wiimote Speaker Sound Player Cycler [Ro]
Posted by: _Ro - 05-17-2024, 06:11 AM - Forum: Incomplete & Outdated Codes - No Replies

Wiimote Speaker Sound Player & Cycler [Ro]

This code is an idea i had earlier today - it allows cycling thru every sound & music of the game and have it play on the wiimote speaker. Most of the sounds do play in game too, but some don't, only playing on the wiimote itself. This is just an experimental code, thus it isn't ported for other regions and more of a proof of concept. JoshuaMK's millisecond timer modifier code is used to display the current sound index ID that is selected. The code only works in game.

This code makes uses address 0x800016FC thru 0x800016FE. Make sure no other codes use these addresses.

Here's a small demonstration of the code: https://www.youtube.com/shorts/aiNJ7njQfS4

NTSC-U

NTSC-U
C2705C0C 00000011
81830000 9421FF80
BC610008 3CA08034
A0C51462 3FE08000
70CB000C 41820058
889F16FE 2C040001
41820044 A09F16FC
70CB0008 4082000C
38840001 48000008
3884FFFF B09F16FC
3D808070 618C1934
7D8903A6 4E800421
38800003 3D808070
618CC1DC 7D8903A6
4E800421 39600001
41820008 39600000
997F16FE B8610008
38210080 00000000
C27ED9F8 00000002
3D808000 A38C16FC
60000000 00000000
lwz r12,0(r3)
stwu r1,-128(r1)
stmw r3,8(r1)
lis r5, 0x8034
lhz r6, 0x1462 (r5)
lis r31, 0x8000
andi. r11, r6, 0xC
beq no
lbz r4, 0x16FE (r31)
cmpwi r4, 1
beq skip
lhz r4, 0x16FC (r31)
andi. r11, r6, 0x8
bne sub
addi r4, r4, 1
b str
sub:
subi r4, r4, 1
str:
sth r4, 0x16FC (r31)
lis r12, 0x8070
ori r12, r12, 0x1934
mtctr r12
bctrl - Call play sound function
li r4, 3
lis r12, 0x8070
ori r12, r12, 0xC1DC
mtctr r12
bctrl - Call wiimote play sound function
skip:
li r11, 1
beq skip2
no:
li r11, 0
skip2:
stb r11, 0x16FE (r31)
lmw r3,8(r1)
addi r1,r1,128

Code creator: Ro
Code credits: JoshuaMK (Millisecond Timer Modifier - to display current sound index)

Print this item

  Mini Turbo Functionality
Posted by: DracoTH - 05-16-2024, 05:55 PM - Forum: Code Support / Help / Requests - Replies (4)

Hey! I was hoping if anyone could help me out with this, so I've been making a statmod, where I basically rebalanced all vehicles taking mk8dx into account, but then realized that the vehicles with higher mini turbo didn't have the same advantages as in 8dx, since Mini Turbo just affects the time a mini turbo lasts and doesn't affect how much it takes to charge one.
Is there any way to make it so that depending on the Mini turbo duration stat of a vehicle the time it takes to charge a Mini Turbo is reduced or increased?

Print this item