Difference between revisions of "Slot Usage"

From Custom Mario Kart
Jump to navigation Jump to search
(Cleanup)
Line 1: Line 1:
This article describes some technical aspects of [[slot]]s for [[custom track distribution]] maintainers.
+
== Overview ==
 +
This article describes the '''slot usage''' of [[Mario Kart Wii]] compared to certain mods that expand the track selection screen.
  
 +
== Mario Kart Wii ==
 +
The tracks of [[Mario Kart Wii]] are internally addressed by slot identifiers beginning with value {{code|0}}. The game uses integers (at least 31 bit unsigned) to identify a track. Since track identifiers are transmitted as a single byte, a maximum of 256 slots are available online.
  
__TOC__
+
{| class="textbox grid sortable center"
 
+
|+ Slot usage
== Original Mario Kart Wii ==
+
! Slots (Hex)
 
+
! Slots (Dec)
The tracks of '''Mario Kart Wii''' are internally addressed by slot identifiers beginning with value 0. The game uses integers (at least 31 bit unsigned) to identify a track. But the network protocol is the bottleneck: track identifiers are transmitted as single byte. So there are only 256 slots available if playing online.
+
! Amount
 
 
{| class="textbox grid sortable"
 
|+ Track slot usage of ''Mario Kart Wii''
 
|-
 
! Slots Hex
 
! Slots Dec
 
! N
 
 
! Usage
 
! Usage
 
|-
 
|-
{{tab-3center| 0x00–0x1f | 0–31 | 32 }}
+
| 0x00–0x1f || 0–31 || 32
| {{yes|Original racing tracks (T11–T84)}}
+
| {{yes|Original tracks (T11–T84)}}
 
|-
 
|-
{{tab-3center| 0x20–0x29 | 32–41 | 10 }}
+
| 0x20–0x29 || 32–41 || 10
 
| {{yes|Original battle arenas (A11–A25)}}
 
| {{yes|Original battle arenas (A11–A25)}}
 
|-
 
|-
{{tab-3center| 0x2a–0x35 | 42–53 | 12 }}
+
| 0x2a–0x35 || 42–53 || 12
| {{unknown|''not used''}}
+
| {{unknown|Unused}}
 
|-
 
|-
{{tab-3center| 0x36 | 54 | 1 }}
+
| 0x36 || 54 || 1
| {{opt|Galaxy Colosseum}}
+
| {{opt|[[Wii Galaxy Colosseum|Galaxy Colosseum]]}}
 
|-
 
|-
{{tab-3center| 0x37–0x3a | 55–58 | 4 }}
+
| 0x37–0x3a || 55–58 || 4
| {{opt|Special scenes like ''Winning run demo''}}
+
| {{opt|Winning scene<br>Losing scene<br>Luigi Circuit (Credits)<br>Broken losing scene}}
 
|-
 
|-
{{tab-3center| 0x3b–0x41 | 59–65 | 7 }}
+
| 0x3b–0x41 || 59–65 || 7
| {{unknown|''not used''}}
+
| {{unknown|Unused}}
 
|-
 
|-
{{tab-3center| 0x42 | 66 | 1 }}
+
| 0x42 || 66 || 1
| {{no|Maybe reserved.}}
+
| {{no|Reserved}}
 
|-
 
|-
{{tab-3center| 0x43 | 67 | 1 }}
+
| 0x43 || 67 || 1
| {{no|Online Protocol: ''No track selected yet''}}
+
| {{no|Online: ''No track selected yet''}}
 
|-
 
|-
{{tab-3center| 0x44–0xfe | 68–254 | 187 }}
+
| 0x44–0xfe || 68–254 || 187
| {{unknown|''not used''}}
+
| {{unknown|Unused}}
 
|-
 
|-
{{tab-3center| 0xff | 255 | 1 }}
+
| 0xff || 255 || 1
| {{no|Online Protocol: ''Random selected''}}
+
| {{no|Online: ''Random''}}
 
|}
 
|}
  
There is a total of 206 (12+7+187) free slots in Nintendo mode.
+
In total, there are 206 slots available for extra custom tracks.
  
 
== CT-CODE ==
 
== CT-CODE ==
 +
[[CT-CODE]] uses the normal slot distribution as a base. It uses free slots and overwrites some existing ones for custom tracks.
  
[[CT-CODE]] (or CT-Code; an abbreviation of ''Custom Track Code'') is an extension of Mario Kart Wii. CT-CODE was developed by [[MrBean35000vr]] and [[Chadderz]] for their [[CTGP Revolution]]. The name ''CT-CODE'' was created by [[Wiimm]], when he implemented CT-CODE support in his [[SZS Tools]].
+
{| class="textbox grid sortable center"
 
+
|+ Slot usage
The main purpose is to allow more than 32 racing tracks in one [[distribution]]. So it uses free slots and misapply some other slots.
+
! Slots (Hex)
 
+
! Slots (Dec)
{| class="textbox grid sortable"
+
! Amount
|+ Slot Usage of CT-CODE
 
|-
 
! Slots Hex
 
! Slots Dec
 
! N
 
 
! Usage
 
! Usage
 
|-
 
|-
{{tab-3center| 0x00–0x1f | 0–31 | 32 }}
+
| 0x00–0x1f || 0–31 || 32
| {{yes|Original racing tracks (T11–T84)}}
+
| {{yes|Original tracks (T11–T84)}}
 
|-
 
|-
{{tab-3center| 0x20–0x41 | 32–65 | 34 }}
+
| 0x20–0x41 || 32–65 || 34
 
| {{maybe|Custom tracks}}
 
| {{maybe|Custom tracks}}
 
|-
 
|-
{{tab-3center| 0x42 | 66 | 1 }}
+
| 0x42 || 66 || 1
| {{no|Maybe reserved.}}
+
| {{no|Reserved}}
 
|-
 
|-
{{tab-3center| 0x43 | 67 | 1 }}
+
| 0x43 || 67 || 1
| colspan=2 {{no|Online Protocol: ''No track selected yet''}}
+
| {{no|Online: ''No track selected yet''}}
 
|-
 
|-
{{tab-3center| 0x44–0xfe | 68–254 | 187 }}
+
| 0x44–0xfe || 68–254 || 187
 
| {{maybe|Custom tracks}}
 
| {{maybe|Custom tracks}}
 
|-
 
|-
{{tab-3center| 0xff | 255 | 1 }}
+
| 0xff || 255 || 1
| {{no|Online Protocol: ''Random selected''}}
+
| {{no|Online: ''Random''}}
 
|}
 
|}
  
[[CT-CODE]] uses the free slots and overrides arena and special slots to get space for 221 custom tracks in addition to the 32 original racing tracks.
+
In total, there are 221 slots available for custom tracks.
 
 
The [[BMG]] message id for track names is calculated by: '''<tt>0x4000 + slot</tt>'''.
 
  
 
== LE-CODE ==
 
== LE-CODE ==
[[File:LE-CODE Logo (Vertical).png|right]]
+
[[LE-CODE]] also uses the normal slot distribution as a base, but leaves it mostly unchanged. In addition, it edits the online protocol to allow for extra custom tracks. Track identifiers are not transmitted as a 16 bit value, therefore allowing for 32,768 extra slots. Due to limitations, a maximum of 4,096 extra slots were added.
 
 
[[LE-CODE]] (or LE-Code; an abbreviation of ''Leseratte Code'') is an extension of Mario Kart Wii. LE-CODE was developed by [[Leseratte]]. The name ''LE-CODE'' was created by [[Wiimm]], when he implemented LE-CODE support in his [[SZS Tools]].
 
 
 
LE-CODE changes not only the behavior of the game, it changes the online protocol too. The most important modification is, that track identifiers are transmitted as 16 bit value (15 bits unsigned). So 32768 different slots (plus 1 for random) can be used — more than enough for custom tracks. If using about 4000 custom tracks, the game runs in other limits like total game size or usability for track selection. Therefor Leseratte and Wiimm decided to limit the number of supported slots to 4096 (0x1000); it's a space decision too. This limit is implemented in the LE-CODE executor as well in [[Wiimms SZS Tools]] and  [[mkw-ana]].
 
  
{| class="textbox grid sortable"
+
{| class="textbox grid sortable center"
|+ Slot usage of LE-CODE
+
|+ Slot usage
|-
+
! Slots (Hex)
! Slots Hex
+
! Slots (Dec)
! Slots Dec
+
! Amount
! N
 
 
! Usage
 
! Usage
 
|-
 
|-
{{tab-3center| 0x000–0x01f | 0–31 | 32 }}
+
| 0x000–0x01f || 0–31 || 32
| {{yes|Original racing tracks (T11–T84)}}
+
| {{yes|Original tracks (T11–T84)}}
 
|-
 
|-
{{tab-3center| 0x020–0x02b | 32–41 | 10 }}
+
| 0x020–0x02b || 32–41 || 10
 
| {{yes|Original battle arenas (A11–A25)}}
 
| {{yes|Original battle arenas (A11–A25)}}
 
|-
 
|-
{{tab-3center| 0x02a–0x035 | 42–53 | 12 }}
+
| 0x02a–0x035 || 42–53 || 12
| {{unknown|''not used''}}
+
| {{unknown|Unused}}
 
|-
 
|-
{{tab-3center| 0x036 | 54 | 1 }}
+
| 0x036 || 54 || 1
| {{opt|Galaxy Colosseum}}
+
| {{opt|[[Wii Galaxy Colosseum|Galaxy Colosseum]]}}
 
|-
 
|-
{{tab-3center| 0x037–0x03a | 55–58 | 4 }}
+
| 0x037–0x03a || 55–58 || 4
| {{opt|Special scenes like ''Winning run demo''}}
+
| {{opt|Winning scene<br>Losing scene<br>Luigi Circuit (Credits)<br>Broken losing scene}}
 
|-
 
|-
{{tab-3center| 0x03b–0x03c | 59–60 | 2 }}
+
| 0x03b–0x03c || 59–60 || 2
| {{unknown|''not used''}}
+
| {{unknown|Unused}}
 
|-
 
|-
{{tab-3center| 0x03d–0x041 | 61–65 | 5 }}
+
| 0x03d–0x041 || 61–65 || 5
| {{maybe|used for [[LE-DEF#random|special random selections]]}}
+
| {{maybe|[[LE-DEF#random|Special random selections]]}}
 
|-
 
|-
{{tab-3center| 0x042 | 66 | 1 }}
+
| 0x042 || 66 || 1
| {{no|Maybe reserved.}}
+
| {{no|Reserved}}
 
|-
 
|-
{{tab-3center| 0x043 | 67 | 1 }}
+
| 0x043 || 67 || 1
| {{no|Online Protocol: ''No track selected yet''}}
+
| {{no|Online: ''No track selected yet''}}
 
|-
 
|-
{{tab-3center| 0x044–0xfff | 68–4095| 4028 }}
+
| 0x044–0xfff || 68–4095 || 4028
 
| {{maybe|Custom tracks}}
 
| {{maybe|Custom tracks}}
 
|-
 
|-
{{tab-3center| 0x1000–0x7fff | 4096–32767 | 28672 }}
+
| 0x1000–0x7fff || 4096–32767 || 28672
| {{unknown|CT usage possible, but excluded for different reasons}}
+
| {{unknown|Unused}}
|-
 
{{tab-3center| 0xffff | 65535 | 1 }}
 
| {{no|Online Protocol: ''Random selected''}}
 
 
|-
 
|-
 +
| 0xffff || 65535 || 1
 +
| {{no|Online: ''Random''}}
 
|}
 
|}
  
The [[BMG]] message id for track names is calculated by: '''<tt>0x7000 + slot</tt>'''.
+
In total, there are 4,028 slots available for custom tracks.
  
 
== Slot Comparison ==
 
== Slot Comparison ==
 +
The following table compares all slot usages of the regular game, [[CT-CODE]] and [[LE-CODE]].
  
The following table shows all used slots by Nintendo, [[CT-CODE]] and [[LE-CODE]]. Due to network protocol limits, Nintendo and CT-CODE can only use the first 256 slots, while LE-CODE can use 65536 slots. Anyway, it is limited to 4096 slots plus 1 slot for random selection for different reasons; see [[#LE-CODE|section above]].
+
{| class="textbox grid sortable center"
 
+
|+ Slot usage comparison
{| class="textbox grid"
+
! Slots (Hex)
|+ Track slot usage of all variants
+
! Slots (Dec)
|-
+
! Amount
! Slots Hex
+
! Nintendo
! Slots Dec
+
! CT-CODE
! N
+
! LE-CODE
! [[LE-CODE]]
 
! Nintendo Usage
 
! [[CT-CODE]]
 
 
|-
 
|-
{{tab-3center| 0x00–0x1f | 0–31 | 32 }}
+
| 0x00–0x1f || 0–31 || 32
| colspan=3 {{yes|Original racing tracks (T11–T84)}}
+
| colspan=3 {{yes|Original tracks (T11–T84)}}
 
|-
 
|-
{{tab-3center| 0x20–0x29 | 32–41 | 10 }}
+
| 0x20–0x29 || 32–41 || 10
| colspan=2 {{yes|Battle arenas (A11–A25)}}
+
| {{yes|Original battle arenas (A11-A25)}}
 
| rowspan=6 {{maybe|34 custom tracks}}
 
| rowspan=6 {{maybe|34 custom tracks}}
 +
| {{yes|Original battle arenas (A11-A25)}}
 
|-
 
|-
{{tab-3center| 0x2a–0x35 | 42–53 | 12 }}
+
| 0x2a–0x35 || 42–53 || 12
| colspan=2 {{unknown|''not used''}}
+
| {{unknown|Unused}}
 +
| {{unknown|Unused}}
 
|-
 
|-
{{tab-3center| 0x36 | 54 | 1 }}
+
| 0x36 || 54 || 1
| colspan=2 {{opt|Galaxy Colosseum}}
+
| {{opt|[[Wii Galaxy Colosseum|Galaxy Colosseum]]}}
 +
| {{opt|[[Wii Galaxy Colosseum|Galaxy Colosseum]]}}
 
|-
 
|-
{{tab-3center| 0x37–0x3a | 55–58 | 4 }}
+
| 0x37–0x3a || 55–58 || 4
| colspan=2 {{opt|Special scenes like ''Winning run demo''}}
+
| {{opt|Winning scene<br>Losing scene<br>Luigi Circuit (Credits)<br>Broken losing scene}}
 +
| {{opt|Winning scene<br>Losing scene<br>Luigi Circuit (Credits)<br>Broken losing scene}}
 
|-
 
|-
{{tab-3center| 0x3b–0x3c | 59–60 | 2 }}
+
| 0x3b–0x3c || 59–60 || 2
| {{unknown|''not used''}}
+
| rowspan=2 {{unknown|Unused}}
| rowspan=2 {{unknown|''not used''}}
+
| {{unknown|Unused}}
 
|-
 
|-
{{tab-3center| 0x3d–0x41 | 61–65 | 5 }}
+
| 0x3d–0x41 || 61–65 || 5
| {{maybe|used for [[LE-DEF#random|special random selections]]}}
+
| {{maybe|[[LE-DEF#random|Special random selections]]}}
 
|-
 
|-
{{tab-3center| 0x42 | 66 | 1 }}
+
| 0x42 || 66 || 1
| colspan=3 {{no|Maybe reserved.}}
+
| colspan=3 {{no|Reserved}}
 
|-
 
|-
{{tab-3center| 0x43 | 67 | 1 }}
+
| 0x43 || 67 || 1
| colspan=3 {{no|Online Protocol: ''No track selected yet''}}
+
| colspan=3 {{no|Online: ''No track selected yet''}}
 
|-
 
|-
{{tab-3center| 0x44–0xfe | 68–254 | 187 }}
+
| 0x44–0xfe || 68–254 || 187
| rowspan=3 {{maybe|4028 custom tracks}}
+
| {{unknown|Unused}}
| {{unknown|''not used''}}
 
 
| {{maybe|187 custom tracks}}
 
| {{maybe|187 custom tracks}}
 +
| rowspan=3 {{maybe|4,028 custom tracks}}
 
|-
 
|-
{{tab-3center| 0xff | 255 | 1 }}
+
| 0xff || 255 || 1
| colspan=2 {{no|Online Protocol: ''Random selected''}}
+
| colspan=2 {{no|Online: ''Random''}}
 
|-
 
|-
{{tab-3center| 0x100–0xfff | 256–4095| 3840 }}
+
| 0x100–0xfff || 256–4095 || 3840
| colspan=2 rowspan=4 {{na|''no online support''}}
+
| colspan=2 rowspan=4 {{na|No support}}
 
|-
 
|-
{{tab-3center| 0x1000–0x7fff | 4096–32767 | 28672 }}
+
| 0x1000–0x7fff || 4096–32767 || 28672
| {{unknown|CT usage possible, but<br>excluded for different reasons }}
+
| {{unknown|Unused}}
 
|-
 
|-
{{tab-3center| 0x8000-0xfffe | 32768–65534 | 32767 }}
+
| 0x8000-0xfffe || 32768–65534 || 32767
| {{na|''no online support''}}
+
| {{na|No support}}
 
|-
 
|-
{{tab-3center| 0xffff | 65535 | 1 }}
+
| 0xffff || 65535 || 1
| {{no|Online Protocol:<br/> ''Random selected''}}
+
| {{no|Online: ''Random''}}
 
|}
 
|}
  
 
[[Category:Technical Information]]
 
[[Category:Technical Information]]
 
[[Category:LE-CODE]]
 
[[Category:LE-CODE]]

Revision as of 13:56, 29 August 2023

Overview

This article describes the slot usage of Mario Kart Wii compared to certain mods that expand the track selection screen.

Mario Kart Wii

The tracks of Mario Kart Wii are internally addressed by slot identifiers beginning with value 0. The game uses integers (at least 31 bit unsigned) to identify a track. Since track identifiers are transmitted as a single byte, a maximum of 256 slots are available online.

Slot usage
Slots (Hex) Slots (Dec) Amount Usage
0x00–0x1f 0–31 32 Original tracks (T11–T84)
0x20–0x29 32–41 10 Original battle arenas (A11–A25)
0x2a–0x35 42–53 12 Unused
0x36 54 1 Galaxy Colosseum
0x37–0x3a 55–58 4 Winning scene
Losing scene
Luigi Circuit (Credits)
Broken losing scene
0x3b–0x41 59–65 7 Unused
0x42 66 1 Reserved
0x43 67 1 Online: No track selected yet
0x44–0xfe 68–254 187 Unused
0xff 255 1 Online: Random

In total, there are 206 slots available for extra custom tracks.

CT-CODE

CT-CODE uses the normal slot distribution as a base. It uses free slots and overwrites some existing ones for custom tracks.

Slot usage
Slots (Hex) Slots (Dec) Amount Usage
0x00–0x1f 0–31 32 Original tracks (T11–T84)
0x20–0x41 32–65 34 Custom tracks
0x42 66 1 Reserved
0x43 67 1 Online: No track selected yet
0x44–0xfe 68–254 187 Custom tracks
0xff 255 1 Online: Random

In total, there are 221 slots available for custom tracks.

LE-CODE

LE-CODE also uses the normal slot distribution as a base, but leaves it mostly unchanged. In addition, it edits the online protocol to allow for extra custom tracks. Track identifiers are not transmitted as a 16 bit value, therefore allowing for 32,768 extra slots. Due to limitations, a maximum of 4,096 extra slots were added.

Slot usage
Slots (Hex) Slots (Dec) Amount Usage
0x000–0x01f 0–31 32 Original tracks (T11–T84)
0x020–0x02b 32–41 10 Original battle arenas (A11–A25)
0x02a–0x035 42–53 12 Unused
0x036 54 1 Galaxy Colosseum
0x037–0x03a 55–58 4 Winning scene
Losing scene
Luigi Circuit (Credits)
Broken losing scene
0x03b–0x03c 59–60 2 Unused
0x03d–0x041 61–65 5 Special random selections
0x042 66 1 Reserved
0x043 67 1 Online: No track selected yet
0x044–0xfff 68–4095 4028 Custom tracks
0x1000–0x7fff 4096–32767 28672 Unused
0xffff 65535 1 Online: Random

In total, there are 4,028 slots available for custom tracks.

Slot Comparison

The following table compares all slot usages of the regular game, CT-CODE and LE-CODE.

Slot usage comparison
Slots (Hex) Slots (Dec) Amount Nintendo CT-CODE LE-CODE
0x00–0x1f 0–31 32 Original tracks (T11–T84)
0x20–0x29 32–41 10 Original battle arenas (A11-A25) 34 custom tracks Original battle arenas (A11-A25)
0x2a–0x35 42–53 12 Unused Unused
0x36 54 1 Galaxy Colosseum Galaxy Colosseum
0x37–0x3a 55–58 4 Winning scene
Losing scene
Luigi Circuit (Credits)
Broken losing scene
Winning scene
Losing scene
Luigi Circuit (Credits)
Broken losing scene
0x3b–0x3c 59–60 2 Unused Unused
0x3d–0x41 61–65 5 Special random selections
0x42 66 1 Reserved
0x43 67 1 Online: No track selected yet
0x44–0xfe 68–254 187 Unused 187 custom tracks 4,028 custom tracks
0xff 255 1 Online: Random
0x100–0xfff 256–4095 3840 No support
0x1000–0x7fff 4096–32767 28672 Unused
0x8000-0xfffe 32768–65534 32767 No support
0xffff 65535 1 Online: Random