In Ridge Racer's Japanese release (SLPS-00001), car_simulate (func_80019CF4) runs one of four handlers each update by the car's state at offset 0xB4: 0 func_80026E7C, 1 func_80027734, 2 func_80027F60, 3 func_80028294, which the atlas reads as grip, slide, slide recovery, and the start. In state 0 the heading turns a fifth of the way to the steering's target each update, and the car moves only along its heading: the code keeps the forward part of its velocity and drops the sideways part. | src/fn/func_80019CF4.c L204–211src/fn/func_80026E7C.c L23–32 | Code |
In Ridge Racer's Japanese release (SLPS-00001), a car in grip (state 0, func_80026E7C) enters a slide (state 1) in two ways. Pressing the accelerator again after lifting off: the code counts the updates the accelerator stays below half (0x80) without a fresh brake press, and on the update the accelerator is pressed again it multiplies the count by the car's speed; a speed above 960 and a product above the car's threshold start the slide. Or a fresh brake press with the accelerator off: the car's sideways velocity times its speed over 64, above the threshold at a speed above 320. The threshold is 14 times a value from the car model's spec table. The product that started the slide becomes the slide's budget (D_801732F0), and the car's yaw rate (D_8012CFE0) is set against its sideways velocity: at least twice it on the accelerator, once on the brake. | src/fn/func_80026E7C.c L33–61src/fn/func_80019CF4.c L41–44src/fn/func_80019CF4.c L91–97src/fn/func_80019CF4.c L162–166src/fn/func_8001AA60.c L91 | Code |
In Ridge Racer's Japanese release (SLPS-00001), a car in a slide (state 1, func_80027734) turns its heading by its yaw rate over 256 each update, with the yaw rate held within ±0x3600, so at most 54 of the 4,096 units of a full turn (computed: about 4.7°). While the slide's budget is above 0, a term from Phys 0x54 (w54), which the atlas reads as the steering target, adds to the yaw rate and the budget drains each update by 0x40, by the square of the slip angle (heading against direction of travel) over 65,536, by (0x3600 − |yaw rate|)/64, and by 4 times the brake value, with more drained below a speed of 400, below half the car's spec speed, or at a slip under 0x80 with a slow yaw. Once the budget is spent, the yaw rate falls to 15/16 each update, and the slide ends on the first update it starts below 0x1000. | src/fn/func_80027734.c L34–69src/fn/func_80019C6C.c L8–18 | Code |
| In Ridge Racer's Japanese release (SLPS-00001), when a slide ends (func_80027734) the car's direction of travel snaps to its heading and its speed is multiplied by 1 − w²/2²⁰, where w is the slip angle between them folded to at most a quarter turn: a slide that ends at 45° keeps 75% of its speed and one at 90° keeps none (computed). The part taken off keeps moving the car along its old direction in state 2 (func_80027F60), shrinking to 31/32 each update with the leftover angle, and the car returns to grip (state 0) when both reach 0. | src/fn/func_80027734.c L71–80src/fn/func_80027F60.c L26–41 | Code |
In Ridge Racer's Japanese release (SLPS-00001), car_simulate gives a car in a slide (state 1) an eighth of the engine drive it gets in the other states, and lets its speed fall by 0.4% an update instead of 6%. The slide handler (func_80027734) then scales that drive by (0x200 − w)/0x200 for a slip angle w up to a quarter turn: full drive with no slip, none at 45°, and a pull against the motion beyond (computed). func_80026CA8 adds the drive along the heading, but the slide handler saves the direction of travel before the call and restores it after, so in a slide the drive changes only the speed. | src/fn/func_80019CF4.c L191–198src/fn/func_80027734.c L85–91src/fn/func_80026CA8.c L12–16 | Code |
In Ridge Racer's Japanese release (SLPS-00001), the player's car starts a race in state 3 (func_80028294). When the grid phase ends at race update 211 and the race begins, func_8001B284 reads the rev counter shown on the tachometer (D_801D7800, the car's revs smoothed and held between 500 and 10000) and sets a counter to 1000 plus its distance below 7500, or 1000 plus six times its distance above 7500, in which case it also halves the engine field at car offset 0xB0. In state 3 the car moves a quarter of what its speed would carry it, and the counter falls each update by the accelerator plus the brake plus 8; at 10 or below the car goes to grip (state 0). With the accelerator held on a digital pad (0x100), revs of 7500 give 4 updates of this, 5000 give 14, and 10000 give 61 (computed). | src/fn/func_8001AA60.c L65src/fn/func_80014C2C.c L130–134src/fn/func_8001B284.c L10–17src/fn/func_8001B0CC.c L31–35src/fn/func_80028294.c L27–41 | Code |
In Ridge Racer's Japanese release (SLPS-00001), the computer car in entity slot 0 takes its target speed from func_80022C40 during the race (when its field 0x60 is 0 and the game state isn't 0x1A). Unless its mode field 0xAA is 2: when it's on an earlier lap than the player, or on the same lap and behind the player by more than a margin, its target is 1.01 times its field 0x10C; when it's on a later lap, or more than 0x600 ahead on the same lap, its target is 80% of the lower of the usual target and its field 0xF8. The margin is 0x800, or 0x300 times the player's lap count when D_801D35D0 is 0. Between the two the target is left as it was. When D_801D35D0 is 0 and the player is on the last lap, the target is held to field 0xF8. | src/fn/func_80022C40.c L10–27src/fn/func_80022C40.c L40–46src/fn/func_80022F88.c L101–104src/fn/func_800217F4.c L70–76src/fn/func_80025268.c L47–49src/fn/func_8001384C.c L87–94 | Code |
In Ridge Racer's Japanese release (SLPS-00001), a lap's time is counted in race updates and converted to milliseconds as if 30 updates were a second: whole seconds times 1000, plus the remaining updates times 100/3. When the player crosses the line from the race direction, the finished lap gets a random 0 to 31 ms added (rand() & 0x1F) before it's compared with the course's best lap. Backing over the line and crossing again doesn't count a lap: the code counts each backward crossing and spends one on the next forward one. The race time is the sum of the laps. | src/fn/func_8001FBC0.c L3–4src/fn/func_80014C2C.c L170–177src/fn/func_80013D40.c L20–45src/fn/func_8001483C.c L31–37 | Code |
In Ridge Racer's Japanese release (SLPS-00001), the race clock (D_8012CD20) starts at the course's row of a table (D_8005E90C) times 30 and falls by 1 each race update in phases 2 and 3. Each row also holds a lap bonus and two checkpoint bonuses. Crossing the line to start laps 2 up to the last adds the lap bonus times 30 (another field when D_801733B8 is set). On the course run in its usual direction (D_801733B8 clear), crossing the first checkpoint adds the first checkpoint bonus times 30, and on courses 3 and up a second checkpoint adds the second bonus times 30; backing over a checkpoint and crossing again pays once. While the clock is below 30 the pad is ignored and the car gets no accelerator or brake. Below −59, before the results, the race ends as over. | src/fn/func_8001384C.c L88–91src/fn/func_80013D40.c L35–41src/fn/func_8001483C.c L61–65src/fn/func_800140A4.c L16–24src/fn/func_80014280.c L16–21src/fn/func_80014C2C.c L215–220src/fn/func_80019CF4.c L41–85 | Code |