=0;--$i,$temp=0) { $temp = $bigint1[$i] + $bigint2[$i]+$carry; if($temp & 0x100) { $carry = 1; } else { $carry = 0; } $bigint1[$i] = $temp & 0xFF; } } function bigint_mul() { global $bigint1; global $bigint2; global $bigresult; for($i = 0; $i < 10; ++$i) { $bigresult[$i] = 0; } for($i = 0; $i < 80; ++$i) { if($bigint2[9] & 0x01) { for ($j = 9, $temp = 0, $carry = 0; $j >= 0; --$j, $temp = 0) { $temp = $bigresult[$j] + $bigint1[$j] + $carry; if($temp&0x100) { $carry = 1; } else { $carry = 0; } $bigresult[$j] = $temp & 0xFF; } } for ($j = 0, $temp = 0, $carry = 0; $j < 10; ++$j, $temp = 0) { $temp=$bigint2[$j]; $bigint2[$j] &= 0xFE; $bigint2[$j] >>= 1; $bigint2[$j] += $carry; if($temp & 0x01) { $carry = 0x80; } else { $carry = 0; } } for ($j = 9, $temp = 0, $carry = 0; $j >= 0; --$j, $temp = 0) { $temp=$bigint1[$j]; $bigint1[$j] &= 0x7F; $bigint1[$j] <<= 1; $bigint1[$j] += $carry; if($temp & 0x80) { $carry = 0x01; } else { $carry = 0; } } } for ($j = 0; $j < 10; ++$j) { $bigint1[$j] = $bigresult[$j]; } } function verify_ttcode($code) { global $bigint1; global $bigint2; global $karts; global $characters; global $courses; for ($i = 0; $i < 10; ++$i) { $bigint1[$i] = 0; $bigint2[$i] = 0; } $k = 16; $temp = 0; for ($i = 0; $i < $k; ++$i) { $j = $code[$i]; if(($j == ' ') || ($j == '-')) { ++$k; continue; } $j = lookup_digit($j); $bigint2[9] = 32; bigint_mul(); $bigint2[9] = $j; bigint_add(); } for($i=1;$i<10;++$i) { $bigint1[$i-1] ^= $bigint1[$i]; } if(verify_checksum($bigint1)==1) { echo "Time Trial Code Valid. Here are the results

"; $charkart = $bigint1[0] + (($bigint1[1] & 0x01) << 8); $racecourse = ($bigint1[1] & 0x3E) >> 1; $racetime = ($bigint1[1] >> 6) + ($bigint1[2] << 2) + ($bigint1[3] << 10); $racetime = sprintf("Time = %d:%2d:%3d
",$racetime/60000,($racetime/1000)%60,$racetime%1000); $racecourse = sprintf("Course = %s
",$courses[$racecourse]); $racechar = sprintf("Character = %s
",$characters[$charkart / 37]); $racekart = sprintf("Kart = %s
",$karts[$charkart % 37]); echo $racetime; echo $racecourse; echo $racechar; echo $racekart; if(($bigint1[5]+$bigint1[7])==0) { $racename = sprintf("First 2 Characters of Racer name = %c%c
",$bigint1[4],$bigint1[6]); } else { $racename = sprintf("First 2 Characters of Racer name = UTF-8[%2X%2X][%2X%2X]
",$bigint1[4],$bigint1[5],$bigint1[6],$bigint1[7]); } echo $racename; } else { echo "Time Trial Code Not Valid

"; echo "Check for typing errors. The code should be 4 groups of 4 characters.
"; } return 1; } ?> CaitSith2's Mario Kart DS Time trial code viewer/verifier Welcome to CaitSith2's Time trial code viewer/verifier.
Time Trial Code:

First off, to get a code, you need to go to the record screen
of the course you wish to show off. (So that your viewing your top record
of that course.)

Once you are there, push Up, Down, L, R, Y, A in that order.

This should pop up a code. This is the code you enter in here.

Time Trial Code:

Source code "; ?>