Difference between revisions of "Custom Track Regions"

From Custom Mario Kart
Jump to navigation Jump to search
(→‎Applying Regions: The ID of the span is used by external links.)
 
(257 intermediate revisions by 48 users not shown)
Line 1: Line 1:
See the [[Talk:Custom Track Regions#Status Column|discussion]] for the temporary '''Status''' column.
+
Regions are a concept by [[Nintendo]], to allow regional or continental races in [[Mario Kart Wii]]. Nintendo defined the regions from 0 to 6.  Regions ≥7 can be used for [[Custom Track Distribution|custom track distributions]] to isolate the users of a distribution from all other players.
'''⇒ [[Custom Track Regions/Details|Details about Regions]].
+
 
{| class="textbox grid sortable"
+
== How Region Numbers Are Used Internally ==
|+ Custom Track Regions
+
 
! <span title="Verify your reservation. See discussion for details">Status</span>
+
[[Mario Kart Wii]] uses an unknown algorithm to assign itself a region number. The DVD type (PAL, NTSC, etc.) and the region of the [[Wii]] have them influence to determine the region. The region is then stored to an internal numeric variable.
! Region
+
 
! Distribution which uses the Custom Region
+
If connecting to a region, this region number is used to create an alpha numeric region name. For versus races, the C format string "vs_%d" is used, and for battles, the string "bt_%d". The "%d" is replaced by the signed decimal presentation of the region number. This combined prefix and region number is used by the game to search player in the online matchmaking database.
|- class="bg-gray1"
+
 
| {{check}}
+
:Example: If region 12 is active, the versus race region name becomes "vs_12" and the battle race region name becomes "bt_12".
| align=center colspan=2 | Worldwide isn't any region, see »[[Custom Track Regions/Details|Details about Regions]]«.
+
 
|- class="bg-blue1"
+
For worldwide races, the names "vs" and "bt" without a number extension are used. This means that worldwide races don't use regions (region 0 is Japan).
| {{check}}
+
 
| align=center | 0
+
== Patching for Wiimmfi ==
| Nintendo (Japan)
+
 
|- class="bg-blue1"
+
If you plan to patch a distribution for [[Wiimmfi]] and for a specific region (1234 in this example), then use the following command:
| {{check}}
+
wstrt patch --wiimmfi --region 1234 StaticR.rel main.dol
| align=center | 1
+
It is important to have original versions of '''StaticR.rel''' and '''main.dol''' and to patch both files.
| Nintendo (North America)
+
 
|- class="bg-blue1"
+
== How the Region Patch Works ==
| {{check}}
+
 
| align=center | 2
+
The well known region patch replaces a 32-bit instruction of the code. The original instruction is: ''»load the content of variable region_number into the register«''. This instruction is replaced by ''»load a constant value into the register«''. Because the limit of 32 bit for the instruction, the value is a sign extended 16 bit value. So only values between 0x8000 – 0x7fff (-32768 – +32767) are possible.
| Nintendo (Europe)
+
 
|- class="bg-blue1"
+
If using a negative number, the region name becomes for example "vs_-12345". Tests confirmed, that this regions with 9 characters work at [[Nintendo]]'s servers like all others. And [[Wiimmfi]] supports it too, but has limited the accepted range from 0 to 7999 plus some other regions.
| {{check}}
+
 
| align=center | 3
+
With this practice, 65536 (0x10000) versus regions are possible. However, changing the prefix of the string from "vs_" to something else makes it possible to use billions of different regions. Prefix modifications except »vx« and »bx« are not allowed by [[Wiimmfi]].
| Nintendo (Australia)
+
 
|- class="bg-blue1"
+
=== Issues ===
| {{check}}
+
 
| align=center | 4
+
The old ''region patch'' has forgotten to patch the region in some parts:  
| Nintendo (Taiwan)
+
 
|- class="bg-blue1"
+
* If player A plays in region 123 and the friend B meets A using the friends list, B is registered as player of its native region, e.g. 1 for USA. So as soon as player B gets host of the race (because the original host quits), other people from region 1 can join via the "Continental VS Race" button.
| {{check}}
+
* The region patch does not work for battle.
| align=center | 5
+
 
| Nintendo (Korea)
+
[[Wiimms SZS Tools]] fixed it and will patch 8 different places in [[StaticR.rel]]. The tools can also patch [[main.dol]] to define a login region. This login region can be used to identify the distribution of a private room.
|- class="bg-blue1"
+
 
| {{check}}
+
=== New Patch Version by [[Leseratte]] ===
| align=center | 6
+
 
| Nintendo (China)
+
Leseratte has created a new version of the patch, fixing the battle and friend list bug.
|- class="bg-gray1"
+
 
| {{check}}
+
With a special cheat code, it is possible to use regions from -2,147,483,647 to +4,294,967,296 allowing 6,442,450,943 regions in total. But this patch currently cannot be put into an ISO, so it's unreleased for now. [[Wiimmfi]] does not support this extended range of regions.
| align=center | 7
+
 
| Reserved by [[User:Leseratte|Leseratte]]
+
== <span id=apply>Applying Regions</span> ==
|- class="bg-green1"
+
 
| {{check}}
+
Since August 2017, there is a new system for applying and managing custom regions for [[Wiimmfi]]. Other servers (for example based on AltWFC) may have their own system.
| align=center | 8
+
 
| [[CTGP Revolution v1.0|CTGP Revolution v1.00.0000]]
+
For [[Wiimmfi]], visit the page »[http://wiimmfi.de/region/list#free List of free custom regions]«, search a free region and then use the form at »[http://wiimmfi.de/region/apply Apply regions]« to apply one or more regions. For the second page, you have to be logged-on. Read the explanations of both pages.
|- class="bg-green1"
 
| {{check}}
 
| align=center | 9
 
| [[CTGP Revolution v1.01|CTGP Revolution v1.01.0000]]
 
|- class="bg-green1"
 
| {{check}}
 
| align=center | 10
 
| [[CTGP Revolution v1.03]]'s region pool
 
|- class="bg-green1"
 
| {{check}}
 
| align=center | 11
 
| [[CTGP Revolution v1.02|CTGP Revolution v1.02.0003]] Alpha
 
|- class="bg-green1"
 
| {{check}}
 
| align=center | 12-20
 
| [[CTGP Revolution v1.03]]'s region pool
 
|- class="bg-green1"
 
| {{check}}
 
| align=center | 21
 
| [[CTGP Revolution v1.02|CTGP Revolution v1.02.0003]] official
 
|- class="bg-green1"
 
| {{check}}
 
| align=center | 22-59
 
| [[CTGP Revolution v1.03]]'s region pool
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 60-68
 
| Reserved by [[User:Torran|Torran]]
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 69
 
| Reserved by [[Tock]]
 
|- class="bg-green1"
 
| {{check}}
 
| align=center | 70
 
| [[Stickboy Kart Wii]]
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 71-74
 
| Reserved by [[Helix]]
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 75-98
 
| Reserved by [[User:Torran|Torran]]
 
|- class="bg-red1"
 
| {{check}}
 
| align=center | 99
 
| Reserved for short-term tests; free for all.
 
|- class="bg-green1"
 
| {{check}}
 
| align=center | 100
 
| [[Pro CT Pack]] v1.0
 
|- class="bg-green1"
 
| {{check}}
 
| align=center | 101
 
| [[Pro CT Pack]] v2.0 - v3.0
 
|- class="bg-green1"
 
| {{check}}
 
| align=center | 102-128
 
| Used by [[Wiimms Mario Kart Fun]]
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 129-159
 
| Reserved for future versions of [[Wiimms Mario Kart Fun]]
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 160
 
| Reserved for a CT distribution by [[SpyKid]]
 
|- class="bg-green1"
 
| {{nocheck}}
 
| align=center | 161
 
| [[Legend's Awesome CT Pack]]
 
|- class="bg-gray1"
 
| {{nocheck}}
 
| align=center | 162-175
 
| Reserved for future versions of [[Legend's Awesome CT Pack]]
 
|- class="bg-gray1"
 
| {{nocheck}}
 
| align=center | 176
 
| Reserved by [[Rukasudo90]]
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 177
 
| Reserved for [[Medal Kart 64]]
 
|- class="bg-green1"
 
| {{check}}
 
| align=center | 178
 
| Diddz Gang CTWW/AltWFC
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 179
 
| Reserved for [[User:Sucht93a|Sucht93a]]
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 180-183
 
| Reserved by [[User:JoeeyTheDino|JσεεуTD]] for [[Joeey, Cyan, Cyther & Bradley's Countdown Pack]]
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 184
 
| Reserved by [[User:Bradley|Bradley]] for Bradley's Speed Mod Pack
 
|- class="bg-green1"
 
| {{check}}
 
| align=center | 185-186
 
| [[SpyKid's CT Pack]]
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 187-190
 
| Reserved for future versions of [[SpyKid's CT Pack]]
 
|- class="bg-green1"
 
| {{check}}
 
| align=center | 191
 
| [[Atlas]]'s WHackR region
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 192-195
 
| Reserved for testing by [[Miles5x5]]
 
|- class="bg-green1"
 
| {{check}}
 
| align=center | 196-199
 
| [[Wine's CT Pack]]
 
|- class="bg-green1"
 
| {{check}}
 
| align=center | 200-202
 
| [[MKW Hack Pack]]
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 203
 
| Reserved by [[Huili]] for testing purposes.
 
|- class="bg-green1"
 
| {{nocheck}}
 
| align=center | 204
 
| [[Spade's Custom Track Pack]]
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 205-212
 
| Reserved for [[User:Mike15,000vr|Mike15,000vr]] CT pack beta testing & releases
 
|-class="bg-gray1"
 
| {{check}}
 
| align=center | 213-215
 
| Reserved by [[User:Dhillon521|Dhillon521]]
 
|-class="bg-green1"
 
| {{check}}
 
| align=center | 216
 
| Reserved by [[User:FunX NEvolution|FunX NEvolution]]
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 217-219
 
| Reserved by [[Huili]] for future [[MKW Hack Pack]] updates
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 220
 
| Reserved for an upcoming distribution by [[FunkyDude15]]
 
|- class="bg-gray1"
 
| {{nocheck}}
 
| align=center | 221
 
| Reserved by [[User:Isle|Isle]]
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 222-224
 
| Reserved for future hacks by [[Suigetsu]]
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 225-499
 
| Reserved for future remakes by [[Remake Kart 12]]
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 500-530
 
| Reserved for future hacks by [[rca42623]]
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 531-550
 
| Reserved for future hacks by [[Emergamer02]]
 
|- class="bg-green1"
 
| {{check}}
 
| align=center | 551
 
| [[Pro CT Pack]] v4.0
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 552-565
 
| Reserved for future versions of [[Pro CT Pack]]
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 566-575
 
| Reserved for [[Peach Kart 8]] and Retro Distributions by [[Dark Star]] & [[Super-Mario68]]
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 576-579
 
| Reserved for [[4tbMyles8110vr's CT Pack]] and future hacks by [[User:4tbMyles8110mkwii|4tbMyles8110mkwii]]
 
|-
 
| {{check}}
 
| align=center | 580-665
 
| ''85 free regions''
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 666
 
| Reserved for [[Mario Kart QZW]]
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 667-672
 
| Reserved by Gekogaeru00 ([[AC]]'s friend)
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 673-800
 
| Reserved by [[AC]]
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 801-810
 
| Reserved by [[User:PC Freak|PC Freak]]
 
|- class="bg-green1"
 
| {{check}}
 
| align=center | 811
 
| DWYW Region by [[YKW Alex]]
 
|-
 
| {{check}}
 
| align=center | 812-1991
 
| ''1180 free regions''
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 1992
 
| Reserved by [[YoshiFanX54321]]
 
|-
 
| {{check}}
 
| align=center | 1993-8899
 
| ''6907 free regions''
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 8900-8999
 
| Reserved by [[Miles5x5]]
 
|- class="bg-red1"
 
| {{check}}
 
| align=center | 9000-9999
 
| Reserved for tests by [[Wiimm]] to have a large continuous amount of non-used regions.
 
|- class="bg-gray1"
 
| {{check}}
 
| align=center | 10000
 
| Reserved by [[User:Udderdude|Udderdude]]
 
|-
 
| {{check}}
 
| align=center | 10001-13999
 
| ''55534 free regions''
 
|- class="bg-green1"
 
| {{check}}
 
| align=center | 14900
 
| Reserved for 200KM/H Races Pack by [[George35000vr|George99]]
 
|-
 
| {{check}}
 
| align=center | 14901-65535
 
| ''55534 free regions''
 
|}
 
<noinclude>[[Category:Distribution]]</noinclude>
 

Latest revision as of 12:18, 15 May 2022

Regions are a concept by Nintendo, to allow regional or continental races in Mario Kart Wii. Nintendo defined the regions from 0 to 6. Regions ≥7 can be used for custom track distributions to isolate the users of a distribution from all other players.

How Region Numbers Are Used Internally

Mario Kart Wii uses an unknown algorithm to assign itself a region number. The DVD type (PAL, NTSC, etc.) and the region of the Wii have them influence to determine the region. The region is then stored to an internal numeric variable.

If connecting to a region, this region number is used to create an alpha numeric region name. For versus races, the C format string "vs_%d" is used, and for battles, the string "bt_%d". The "%d" is replaced by the signed decimal presentation of the region number. This combined prefix and region number is used by the game to search player in the online matchmaking database.

Example: If region 12 is active, the versus race region name becomes "vs_12" and the battle race region name becomes "bt_12".

For worldwide races, the names "vs" and "bt" without a number extension are used. This means that worldwide races don't use regions (region 0 is Japan).

Patching for Wiimmfi

If you plan to patch a distribution for Wiimmfi and for a specific region (1234 in this example), then use the following command:

wstrt patch --wiimmfi --region 1234 StaticR.rel main.dol

It is important to have original versions of StaticR.rel and main.dol and to patch both files.

How the Region Patch Works

The well known region patch replaces a 32-bit instruction of the code. The original instruction is: »load the content of variable region_number into the register«. This instruction is replaced by »load a constant value into the register«. Because the limit of 32 bit for the instruction, the value is a sign extended 16 bit value. So only values between 0x8000 – 0x7fff (-32768 – +32767) are possible.

If using a negative number, the region name becomes for example "vs_-12345". Tests confirmed, that this regions with 9 characters work at Nintendo's servers like all others. And Wiimmfi supports it too, but has limited the accepted range from 0 to 7999 plus some other regions.

With this practice, 65536 (0x10000) versus regions are possible. However, changing the prefix of the string from "vs_" to something else makes it possible to use billions of different regions. Prefix modifications except »vx« and »bx« are not allowed by Wiimmfi.

Issues

The old region patch has forgotten to patch the region in some parts:

  • If player A plays in region 123 and the friend B meets A using the friends list, B is registered as player of its native region, e.g. 1 for USA. So as soon as player B gets host of the race (because the original host quits), other people from region 1 can join via the "Continental VS Race" button.
  • The region patch does not work for battle.

Wiimms SZS Tools fixed it and will patch 8 different places in StaticR.rel. The tools can also patch main.dol to define a login region. This login region can be used to identify the distribution of a private room.

New Patch Version by Leseratte

Leseratte has created a new version of the patch, fixing the battle and friend list bug.

With a special cheat code, it is possible to use regions from -2,147,483,647 to +4,294,967,296 allowing 6,442,450,943 regions in total. But this patch currently cannot be put into an ISO, so it's unreleased for now. Wiimmfi does not support this extended range of regions.

Applying Regions

Since August 2017, there is a new system for applying and managing custom regions for Wiimmfi. Other servers (for example based on AltWFC) may have their own system.

For Wiimmfi, visit the page »List of free custom regions«, search a free region and then use the form at »Apply regions« to apply one or more regions. For the second page, you have to be logged-on. Read the explanations of both pages.