Online Time Limit

From Custom Mario Kart
Jump to navigation Jump to search

If playing online, the racing time is limited by the game executor. Mario Kart Wii supports two timers. In offline mode, there are no limits.

Race Time Limit

The maximum race time is programmed in milliseconds. The current time is compared with this value. If the limit is reached, the race stops with a message. The original game uses 5:00 as a limit. CTGP Revolution and LE-CODE increased the limit to 5:40. LE-CODE build 37 and later support limits up to 525 seconds (8:45).

Watchdog

In addition to the Race Time Limit, there is also a watchdog that limits the time of the entire race session (countdown, race, scoreboards). This is programmed in frames (1/60s). After the time has expired, the next race with the selection screens will start immediately.

The original game has programmed a limit of 21,605 frames (360.08s = 6:00.08). CTGP Revolution and LE-CODE before build 37 use the same limit. If subtracting the countdown of four seconds and maximum race time of 5:40, then at least 16 seconds are left for the scoreboards. That is the reason for the 5:40 race time limit.

LE-CODE build 37 onward can now change the watchdog limit or disable it altogether. Here, the value of a 16-bit signed integer is used. Up to 0x7fff frames (32,767 frames = 546.12s = 9:06.12) can be set as the limit. Giving at least 17 seconds for scoreboards, the maximum recommended race time limit is 8:45.

Scoreboards

The scoreboards will be displayed very briefly when the total time since the countdown has already exceeded six minutes. This does not change even if the watchdog has been reprogrammed.

LE-CODE

LE-CODE Logo (Vertical).png

LE-CODE has a central function to manage both limits. It takes the wanted online time limit (seconds) as the parameter and does this:

  • If playing worldwide, the online time limit is always five minutes.
  • Values >65535s (0xffff) will be set to 65535s (18:12:15). It is not recommended to use times >525s (8:45).
  • The online time limit is programmed (patched) in milliseconds.
  • If the time limit is >525s (8:45), the watchdog is disabled and the following steps are skipped.
  • 30 seconds are added to the value. There is usually 26 seconds left for the scoreboards.
  • The value is multiplied by 60 to get the number of frames for the watchdog.
  • Values below the standard of 21,605 (360.08s = 6:00.08) are set to 21,605, and values larger than 0x7fff (32,767 frames = 546.12s = 9:06.12) are set to 0x7fff.
  • The watchdog is programmed (patched) with this number of frames.