Cite as
chasmlol/excitebike64
Original
https://github.com/chasmlol/excitebike64
Pinned
chasmlol/excitebike64 @ 9cdb1944520a4c1a708bdd6a940979bac8c7a74f
Accessed
2026-10-22
Licence
none stated (the README says "No license has been chosen yet"); the game is Nintendo's
Credit
chasmlol's matching C decompilation of Excitebike 64 (Left Field Productions, 2000), which builds the LodgeNet hotel build, the US Rev 1 cartridge, and the European version from one tree. Names and comments quoted in excitebike64 claims are theirs.
Notes
The README lists each ROM's SHA-1 (US Rev 1, "Excitebike 64 (USA) (Rev 1)", c2fac422af135409c1b38569b309f9d452c81c35; LodgeNet 3a043dc4c8b1351ca56c3ab9bb061bd7fa99c312; Europe 5abfb6024f935ef5fe0067f39fd594c50697c749) and says all code is decompiled and matching, with 1223 of the game's 1234 functions named. LodgeNet is the reference build; where the versions differ the C has `#if VERSION == VERSION_...` blocks, and claims read the US Rev 1 branch. The repo also holds hand-written asm (asm/), build tools, per-version symbol tables (versions/), and the code images' initialized data as C (src/data/, mostly raw words). The atlas fetches src/, include/, docs/, and the README, and from src/data/ only game_800C2280.c, which holds the engine's heat rates and power scales as named floats. Bike physics are in src/game/bikenew.c, the engine and turbo heat in src/game/unnamed/s0_800358C0.c, and the CPU riders' time scale in src/game/unnamed/s0_80062F50.c. FRAME_RATE is 60 except in the European build (50).

Cited on

Claims (7)

In Excitebike 64's US Rev 1 build, engine_update_heat moves a rider's engine heat each bike update by a rate from sEngineHeatRates, picked by whether the heat is above 7000 and by the drive: Z (the turbo), else A (the throttle), else neither. At 7000 or below the rates are −20 with neither, +20 on the throttle, and +40 on the turbo; above 7000 they're −12, −8, and +20. A positive rate while Z is held is divided by the rider's turbo stat, which is 1.0 for CPU riders. The heat is held between 0 and 12000. Reaching 12000 sets overheated, and while it's set the rate is −20 whatever is held, until the heat is back to 7000 or below. At 60 updates a second, a turbo stat of 1.0 takes a cold engine to 12000 in 425 updates, about 7.1 seconds, and an overheat lasts 250 updates, about 4.2 seconds; the throttle alone holds the heat around 7000 (computed). While the rear wheel is on the ground and the event isn't stopped (EVENT_STOPPED), a surface flagged SURFACE_COOLS_ENGINE (commented "resets the engine heat") sets the heat to 0.src/game/unnamed/s0_800358C0.c L56–106src/data/game_800C2280.c L3999–4002src/game/unnamed/s0_800358C0.c L114–116src/game/unnamed/s0_800358C0.c L125src/game/unnamed/s0_800358C0.c L163–165include/structs/surface.h L16src/game/bikenew.c L349–352Code
In Excitebike 64's US Rev 1 build, engine_update scales the engine's torque by sTurboPowerScale (1.225) while Z, the turbo, is held, by sThrottlePowerScale (0.75) on A, the throttle, alone, and by sOverheatPowerScale (0.3) while the engine is overheated, whichever of the two is held. The scale applies only while the rear wheel is on the ground and the event isn't stopped (EVENT_STOPPED). With neither button held, or with either held while the event is stopped, the torque is −3728.4995 (commented "engine braking") above a speed of 1 and 0 below it. The turbo gives about 1.63 times the throttle's torque, and an overheated engine 0.4 times the throttle's and about 0.24 times the turbo's (computed).src/game/unnamed/s0_800358C0.c L190–206src/data/game_800C2280.c L4003–4005Code
In Excitebike 64's US Rev 1 build, bike_update_jump boosts a human rider who leaves the ground while riding and holding Z, the turbo, first pressed fewer than 10 updates earlier (turboPressFrame), on a jump whose predicted time in the air (landingTime, twice the vertical speed over gravity) is longer than a minimum: 0.25 seconds up to a takeoff speed of 10, 0.5 above 20, and linear between. Below a speed of 20 and while the engine isn't overheated, the bike's velocity is scaled so its speed gains 5, less half the speed above 10: 5 at 10 or less, 2.5 at 15, and nothing at 20. If the bike's pitch (rot[0]) is −0x17FF or more, its angular velocity also loses 2 times its right axis; the LodgeNet build subtracts 3, and the decompilers comment that "retail pitches the bike less". CPU riders get no takeoff boost.src/game/bikenew.c L2235–2250src/game/bikenew.c L2258–2285Code
In Excitebike 64's US Rev 1 build, bike_handle_landing runs when a wheel touches down. After 41 or more updates in the air (airFrames), it takes the front wheel's groundDist, the signed offset along the bike's up axis from the wheel's point on the bike to the ground plus 0.5, which grows as the ground comes nearer, less the rear wheel's, so the difference is negative when the rear wheel is nearer the ground. Below −2.0 the rider crashes at once (ANIM_CRASH_BACK); from −2.0 to under −0.8 that crash is queued (pendingCrash); from −0.8 to under −0.3 the landing is rough (roughLanding); from −0.3 to under 0.3 it's clean, and the bike's turning is stopped; from 0.3 to under 0.6 it's rough; from 0.6 up a crash is queued (ANIM_CRASH_FRONT). A queued crash becomes a rough landing when the impact, the bike's velocity along the two wheels' ground normals added together, is above −10. Whatever the wheels, a rider still in a trick animation after 11 or more updates in the air crashes. By the atlas's reading the wheel difference measures the bike's pitch against the ground it lands on.src/game/bikenew.c L1968–2017src/game/bikenew.c L2018–2024src/game/bikenew.c L2462–2463src/game/bikenew.c L470–533include/structs/rider.h L252include/structs/rider.h L47Code
In Excitebike 64's US Rev 1 build, a rough landing (roughLanding, commented "frames since a rough landing (more drag)") raises the bike's drag coefficient, the one multiplied by the square of its speed and applied against its velocity, to at least 7.0; otherwise it's 0.21 in the air and, on the ground, 0.21 times the rear wheel's surface drag, softened during a wheelie (wheelieTimer not 0) to (drag − 1) × 0.25 + 1. bike_update_jump adds each update's ticks to the counter, which starts at 1, and clears it at 60, so the extra drag lasts 59 updates, about a second (computed). On a surface whose drag is 1, that's about 33 times the usual coefficient (computed).src/game/bikenew.c L1546–1562src/game/bikenew.c L1581–1584src/game/bikenew.c L2226–2231include/structs/rider.h L401Code
In Excitebike 64's US Rev 1 build, bike_update_jump sets landingAssist (commented "the bike will land straight: pitched to the ground") on a falling bike more than 30 updates into a jump and not in a wheelie, once its predicted landing (landingTime) is under 0.25 seconds away: always for a CPU rider, and for a human when the pitch part of the misalignment between the bike's up axis and the landing point's ground normal, the dot product of their cross product with the bike's right axis, is smaller in size than 10 times the rider's landing stat. While it's set, bike_align_to_ground sets the bike's turning to a pitch toward the ground's slope at twice the angle over the time left plus 0.1 seconds, at most 2 radians a second; it returns without setting anything when the landing point's ground normal has a y below 0.5 or the angle's sine is 0. Either way, while the flag is set the player's air pitch input isn't read. For unit axes that dot product is at most 1, and the six profiles of floats at the head of sRiderStatsTable set landing from 0.25 to 5, so the human test passes for every one (computed); the code reads the stat nowhere else.src/game/bikenew.c L2429–2453src/game/bikenew.c L2088–2136src/game/bikenew.c L1641–1653src/game/height.c L585–586include/structs/rider.h L400src/game/bikenew.c L333–337src/data/game_800C2280.c L3725–3740Code
In Excitebike 64's US Rev 1 build, riders are rubber-banded through timeScale, which multiplies the length of each of a rider's physics steps (gPhysDeltaTime). After the countdown, outside time trial and with a human racing, race_update_riders steps each CPU rider's scale by 0.0002 per update toward a target: 1 plus its skill (spread evenly over about ±0.1 by race_init_ai_skills, and used when there are two or more CPU riders), less 0.1 when it's more than 64 ahead of the CPU riders' average raceDist, less the CPU pack's lead over the humans' average beyond 30, divided by 256 and held to ±0.15, all times the track's cpuSpeed for the difficulty (a finished rider targets 1, the Beat This cheat uses the hardest difficulty's cpuSpeed plus 0.05, and a duel 1.15 times the track's). The code's comment says "CPU riders slow down as their pack leads the humans by more than 30 m and speed up as it falls behind". A human's scale steps by 0.001 toward 1 plus their distance behind the humans' average (plus 16 when it's over 2) over 1024, held between 0.95 and 1.05. With one human the target is 1, and since the step has no dead zone the scale alternates between 1 and 1.001. Mario Kart 64 instead adds a force term toward 380 while a pacing flag is set (mk64/rubber-band).src/game/bikenew.c L2529–2530src/game/unnamed/s0_80062F50.c L541–601src/game/unnamed/s0_80062F50.c L788–807Code