prevnext   » SZS: Wiimms SZS Toolset » Guides » CT-CODE: Mario Kart Wii CT-Extensions

CT-CODE: Mario Kart Wii CT-Extensions

Contents

1.   Introduction

The original Mario Kart Wii support 32 racings tracks organiced into 8 cups. But this is much to less for custom tracks, because several hundrets custom track exist and about 100 are really good.

So Chadderz and MrBean35000vr started to extend Mario Kart Wii to allow up to 240 tracks in one distribution, CTGP Revoltution. Therefore they patched and changed the distribution on different places:

Overall, Chadderz and MrBean35000vr did a very good job!

This page decribes the special features of Wiimms SZS Tools to handle all related extensions. The tools call this extension CT-CODE.

2.   --ct-code

Enable the CT-CODE modus.
This global option is available for all tools and for all commands, but it has only impact to some actions. It enables the CT-CODE support. This means, it changes the behaviour of some commands to a CT-CODE related mode.

2.1   BMG messages

Normally, the message names 'T11' .. 'T84' and 'U11' .. 'U25' are used to define both messages related to the specified track or arena. But if option --ct-code is set, a third related message in the range 4000–402B is additionally defined.

2.2   Option --msg

Option --msg accepts the keywords CUPS, TRACKS and ARENAS to filter messages. If option --ct-code is set, the ranges of the 3 keywords are expanded to the messages ≥4000.

3.   Tool wstrt and file main.dol

Tool wstrt can analyse and patch StaticR.rel and main.dol files.

»wstrt ANALYSE« verifies the files and prints a list with status informations. »wstrt DUMP« dumps the section layout of DOL files. »wstrt PATCH« may patch StaticR.rel and main.dol.

To extend main.dol by the CT-CODE, execute the command:

wstrt patch main.dol --add-ctcode

4.   Tool wctct and TEX0 file CTGP_CODE

The only feature of tool wctct is to manage the CTGP_CODE file, which contains a list of cups and tracks and more.

Tool wctct has implicitly enabled the option --ctcode.

5.   BMG messages

Normally, the message names 'T11' .. 'T84' and 'U11' .. 'U25' are used to define both messages related to the specified track or arena. But if option --ct-code is set, a third related message in the range 4000–402B is additionally defined.

There are 2 additional patching modes for option --patch-bmg:
CT_COPY copies cup and track names to the CT-CODE section ≥4000. CT_FILL filles undefined messages of the CT-CODE section with default names.

6.   Slot ID & Music ID

The CT-CODE compiler reads the settings for the Slot ID and the Music ID as numeric value or expression. For Music IDs, numbers <42 (<0x2a) are interpreted as slot numbers and automatically converted to the related music id. However, names for the IDs are more user friendly than numbers. So the compiler defines constants for all possible values using the following rules: Variables are case insensitive. The capitalization is only used for better understanding. The following table shows all names and values:

Constants for slot and music assignments
Name Value Usage related
Music ID
Description
xLC 117
0x75
Music ID 117
0x75
Music ID of a music title not used in the game. Probably the title was designed for Luigi Circuit.
T11
LC
8
0x08
Slot ID
Music ID
125
0x7d
Slot of track Luigi Circuit, but music of track Mario Circuit. Both tracks share the same music files, by mistake or not.
T12
MMM
1
0x01
Slot ID
Music ID
119
0x77
Slot and Music of track Moo Moo Meadows.
T13
MG
2
0x02
Slot ID
Music ID
121
0x79
Slot and Music of track Mushroom Gorge.
T14
TF
4
0x04
Slot ID
Music ID
123
0x7b
Slot and Music of track Toad's Factory.
T21
MC
0
0x00
Slot ID
Music ID
125
0x7d
Slot and Music of track Mario Circuit.
T22
CM
5
0x05
Slot ID
Music ID
127
0x7f
Slot and Music of track Coconut Mall.
T23
DKS
6
0x06
Slot ID
Music ID
129
0x81
Slot and Music of track DK Summit.
T24
WGM
7
0x07
Slot ID
Music ID
131
0x83
Slot and Music of track Wario's Gold Mine.
T31
DC
9
0x09
Slot ID
Music ID
135
0x87
Slot and Music of track Daisy Circuit.
T32
KC
15
0x0f
Slot ID
Music ID
133
0x85
Slot and Music of track Koopa Cape.
T33
MT
11
0x0b
Slot ID
Music ID
143
0x8f
Slot and Music of track Maple Treeway.
T34
GV
3
0x03
Slot ID
Music ID
139
0x8b
Slot and Music of track Grumble Volcano.
T41
DDR
14
0x0e
Slot ID
Music ID
137
0x89
Slot and Music of track Dry Dry Ruins.
T42
MH
10
0x0a
Slot ID
Music ID
141
0x8d
Slot and Music of track Moonview Highway.
T43
BC
12
0x0c
Slot ID
Music ID
145
0x91
Slot and Music of track Bowser's Castle.
T44
RR
13
0x0d
Slot ID
Music ID
147
0x93
Slot and Music of track Rainbow Road.
T51
gPB
rPB
16
0x10
Slot ID
Music ID
165
0xa5
Slot and Music of track GCN Peach Beach.
T52
dYF
rYF
20
0x14
Slot ID
Music ID
173
0xad
Slot and Music of track DS Yoshi Falls.
T53
sGV2
rGV2
25
0x19
Slot ID
Music ID
151
0x97
Slot and Music of track SNES Ghost Valley 2.
T54
nMR
rMR
26
0x1a
Slot ID
Music ID
159
0x9f
Slot and Music of track N64 Mario Raceway.
T61
nSL
rSL
27
0x1b
Slot ID
Music ID
157
0x9d
Slot and Music of track N64 Sherbet Land.
T62
gSGB
rSGB
31
0x1f
Slot ID
Music ID
149
0x95
Slot and Music of track GBA Shy Guy Beach.
T63
dDS
rDS
23
0x17
Slot ID
Music ID
175
0xaf
Slot and Music of track DS Delfino Square.
T64
gWS
rWS
18
0x12
Slot ID
Music ID
169
0xa9
Slot and Music of track GCN Waluigi Stadium.
T71
dDH
rDH
21
0x15
Slot ID
Music ID
177
0xb1
Slot and Music of track DS Desert Hills.
T72
gBC3
rBC3
30
0x1e
Slot ID
Music ID
155
0x9b
Slot and Music of track GBA Bowser Castle 3.
T73
nDKJP
rDKJP
29
0x1d
Slot ID
Music ID
161
0xa1
Slot and Music of track N64 DK's Jungle Parkway.
T74
gMC
rMC
17
0x11
Slot ID
Music ID
167
0xa7
Slot and Music of track GCN Mario Circuit.
T81
sMC3
rMC3
24
0x18
Slot ID
Music ID
153
0x99
Slot and Music of track SNES Mario Circuit 3.
T82
dPG
rPG
22
0x16
Slot ID
Music ID
179
0xb3
Slot and Music of track DS Peach Gardens.
T83
gDKM
rDKM
19
0x13
Slot ID
Music ID
171
0xab
Slot and Music of track GCN DK Mountain.
T84
nBC
rBC
28
0x1c
Slot ID
Music ID
163
0xa3
Slot and Music of track N64 Bowser's Castle.
A11
aBP
BP
33
0x21
Music ID 183
0xb7
Music of battle arena Block Plaza.
A12
aDP
DP
32
0x20
Music ID 181
0xb5
Music of battle arena Delfino Pier.
A13
aFS
FS
35
0x23
Music ID 185
0xb9
Music of battle arena Funky Stadium.
A14
aCCW
CCW
34
0x22
Music ID 187
0xbb
Music of battle arena Chain Chomp Wheel.
A15
aTD
TD
36
0x24
Music ID 189
0xbd
Music of battle arena Thwomp Desert.
A21
asBC4
arBC4
sBC4
rBC4
39
0x27
Music ID 195
0xc3
Music of battle arena SNES Battle Course 4.
A22
agBC3
arBC3
40
0x28
Music ID 197
0xc5
Music of battle arena GBA Battle Course 3. The alternatives without leading 'a' are not available, because they are already used for track GBA Bowser Castle 3.
A23
anSS
arSS
nSS
rSS
41
0x29
Music ID 199
0xc7
Music of battle arena N64 Skyscraper.
A24
agCL
arCL
gCL
rCL
37
0x25
Music ID 191
0xbf
Music of battle arena GCN Cookie Land.
A25
adTH
arTH
dTH
rTH
38
0x26
Music ID 193
0xc1
Music of battle arena DS Twilight House.