Hot Wheels Turbo Racing reference
What is true about Hot Wheels Turbo Racing for the PlayStation (Stormfront
Studios / Electronic Arts, 1999, SLUS-00964), written for someone who wants to
write a parser or a subsystem. Generated by hwtr-re docs index - edit the
pages, not this file.
The worklog is the other half: it says how each of these was
worked out. status below is the honesty knob - solid means every field is
accounted for, partial means named unknowns remain, guess means a hypothesis
nobody has knocked down yet. discs says which releases the page has been
checked against: US, EU, or all.
The disc
Tracks, the file system, boot, and what sits where on the CD.
| Page | Status | Discs | Covers |
|---|---|---|---|
| The CD, its tracks and its file system | solid | US | US every track, SYSTEM.CNF, every file in the ISO 9660 file system, SLUS_009.64, CCCPSX.EXE header |
File formats
The containers and record layouts.
| Page | Status | Discs | Covers |
|---|---|---|---|
| The BIG archive | solid | US | US CCCPSX.BIG and the 12 BIG archives nested in it; US CCCPSX.EXE:0x800cd574 "\CCCPSX.BIG;1" |
| The best line (BLD) | guess | US | US |
| Cars (BMF, CAR, SHD, CWH, FXP, DECALS) | partial | US | US every |
| Track textures (GLM, GLB) | solid | US | US |
| Track collision (SCP) | guess | US | US |
| TIM images | solid | US | US PSXLEGAL.TIM, PSXRFA1.TIM, every *TIM member of CCCPSX.BIG (575 distinct files) |
| VAB sound banks | partial | US | US every *VH and *VB member of CCCPSX.BIG (499 banks, 1829 samples); US CCCPSX.EXE:0x8001a0c4 the bank loader |
| The world model (WLD, DLW, WLB) | partial | US | US |
Engine
How the game works, subsystem by subsystem.
| Page | Status | Discs | Covers |
|---|---|---|---|
| How the program is put together | partial | US | US CCCPSX.EXE:0x8009fc10 _start, 0x80010a5c main, 0x8005fa00 game_init, 0x8005fb3c, 0x8002881c, 0x8001bd88, 0x80019870, 0x8001e3b4, interface tables 0x8011df28, 0x8012fcdc, 0x8012fd30, 0x8012fe54 |
| The attract race | partial | US | US CCCPSX.EXE:0x8009b254, 0x8009b1e0, 0x8009b578, 0x8009b510, 0x80088428, 0x80036830 camera_load, 0x800369e4 camera_step (modes 2 to 4), 0x8003a690 director, 0x80021390, 0x8002137c, 0x800644c0, 0x800be934 camera ranges, 0x800bea3c demo views, 0x800d0e20 demo view count, 0x800d2608 demo flag, 0x800d2632 no-players flag |
| The car's lights (exhaust glows, headlights, tail lights, darkening) | solid | US | US CCCPSX.EXE:0x80029fb0 car_draw_glows, 0x8002a81c car_draw_beams, 0x8002ad48 car_fade_light, 0x8002bb0c car_aim_lights, 0x8002bad0 car_set_glow, 0x80021f60 car_upload_lamp_clut, 0x800291b4 car_light_mask, 0x80028fb0 car_effect_matrix, 0x80010678 quad_list_draw, 0x80022cd0 fxp_parse |
| The car object and its physics step | partial | US | US CCCPSX.EXE:0x80128fcc the car array, 0x800d263c the car count, 0x8004064c cars_update, 0x8003fbe4 car_update, 0x800427a8 car_physics, 0x80040a90 update_wheels, 0x80041af0 aero, 0x80060138 drivetrain, 0x80044fc4 wheel spin, 0x8003d71c air control, 0x8004b478 unstick, 0x80136a18 the tuning bytes |
| The car's wheels and shadow as drawn | solid | US | US CCCPSX.EXE:0x80049ecc car_pose, 0x80020a14 wheel_pose, 0x80020888 car_set_pose, 0x80021830 shadow_plane, 0x80029478 shadow_draw, 0x80028b34 shadow_prims, 0x800be00c shadow_reach, 0x800bdd48 shadow_places, 0x800bdde8 shadow_columns |
| Cheats (the button codes and the race options) | partial | US | US CCCPSX.EXE:0x8007f87c code_apply, 0x8007f710 cheat_code, 0x8007f79c car_code, 0x800bee6c cheat_codes, 0x800d1004 car_codes, 0x80088370 car_name_to_id, 0x80086ad0 code_press, 0x80086a70 codes_clear, 0x80086aa0 codes_clear_2, 0x80136c70 codes, 0x8008cff4 menu_pad, 0x8008d12c menu_pad_2, 0x80013ff8 cheat_on, 0x80013f00 race_setup_apply, 0x800d2468 cheats, 0x80021888 car_bind_state, 0x80022064 car_draw, 0x80022cd0 fxp_parse, 0x8002bdb4 effects_init, 0x80012a10 tim_upload, 0x800d244c tim_fill_on |
| Controls and the pad | partial | US | US CCCPSX.EXE:0x8001bec0 controls_frame, 0x8001bf1c, 0x8001c998, 0x8001cee4 controls_read_analog, 0x8001d9ec curve, 0x8001b170 action_level, 0x8011b2b8 action_levels, 0x8001d320 controls_init, 0x8001c344 controls_read_port, 0x8001c480, 0x8001cee4, 0x8001abe8 controls_action_held, 0x8011b388 pad_buffer, 0x8011b3d8 control_mapping, 0x800bdc08 control_mapping_default, interface table 0x8012fcdc, 0x8001b7b4 motors_road, 0x8001b934 motors_jolt, 0x8001ccc4 motors_fade, 0x8005fba8 race_controls_frame, 0x8005fd4c wall_jolt, 0x8005fed0 pair_jolt, 0x800d0e2c jolt_wait, 0x8006545c hud_button, 0x80034940 race_controls |
| The race's effects: puffs, skid marks, sparks | partial | US | US CCCPSX.EXE:0x8002bdb4 effects_init, 0x8002c0dc pool_init, 0x8002c2b8 pool_alloc, 0x8002f354 particles_update, 0x8002f618 pool_draw, 0x8002b888 trails_emit, 0x80029230 trail_push, 0x800303cc skid_segment_spawn, 0x80030fc8 dust_puff_spawn, 0x8003119c spark_puff_spawn, 0x8002e9f8 collision_sparks, 0x8002c32c spark_spawn, 0x80049ecc car_pose, 0x80068540 view_setup, 0x800d25c0 0x800d25c8 0x800d25d0 0x800d25d8 pools, 0x8011ec2c trails, 0x800d0d98 fx_enable, 0x80028b34 effects_on, 0x800d2578 fps, 0x800d0b68 frame_count, 0x8002e128 flash_draw, 0x800d0db6 puff_shrink |
| Flying wheels (a player's wreck throws its wheels) | solid | US | US CCCPSX.EXE:0x8007c9b0 wheels_throw, 0x801323f4 flying_wheels, 0x8007c894 flying_step, 0x8004d798 object_add, 0x8004da1c object_remove, 0x8007da78 flying_remove, 0x8006dc08 contact_impulse, 0x8007c7a0 flying_init, 0x8007c824 flying_clear |
| The PsyQ libraries as linked | partial | US | US CCCPSX.EXE:0x8009fc10 _start, 0x8009fdb8 VSyncCallback, 0x800a38cc VSync, 0x800a05a0 DrawSync, 0x800a20d0 the libgpu queue, 0x800a4d18 CdInit, 0x800a4e18 CdSearchFile, 0x800a589c CdControl, 0x800a5b0c CdControlB, 0x800a4b18 CdRead, 0x800a4c18 CdReadSync, 0x800a5e00 CdPosToInt, 0x800a5cfc CdIntToPos, 0x800a8778, 0x800a9184, 0x800a8524 libmcrd, 0x800a77c4 PadInitDirect, 0x800a2d28 printf, 0x800c8690 _ramsize |
| The chase camera on loops | solid | US | US CCCPSX.EXE:0x8005e984 loop_axes, 0x800369e4 camera_step |
| Power-ups (the track's pickups) | partial | US | US CCCPSX.EXE:0x80067418 pickups_load, 0x800671a8, 0x80067b64 pickup_power_up, 0x80067ac4 pick, 0x80067f98 pickup_take, 0x80067d50 power_ups_drop, 0x800679b0 power_ups_step, 0x80068130, 0x80065520 power_up_apply, 0x80065ecc power_up_remove, 0x80067708, 0x80067dfc power_up_icon, 0x800672a0, 0x800d0e9c pickups, 0x800d0ea0 pickup_count, 0x800d2698 power_up_list, 0x80061c00 list_add, 0x80061cac list_remove, 0x80067c3c, 0x80067c98, 0x8006122c race_time, 0x800d0e34, 0x8012ff04 held, 0x800d0ea6 unlockable, 0x800d0eaa unlocked |
| The race's sound: engines, hits and tyres | partial | US | US CCCPSX.EXE:0x8001924c sound_race_init, 0x8001a73c effects_table, 0x8011aec0 effects, 0x80019870 iface_sound_fill, 0x80019abc voice_alloc, 0x800354ac sound_frame, 0x80045a84 car_sound_input, 0x80017928 mixer_one, 0x80035a88 contact_sound, 0x80035c7c pair_sound, 0x80016280 impact_on, 0x80016820 scrape_on, 0x800169a8 scrape_off, 0x80016a18 crash_on, 0x80016490 tyres_on, 0x800167b0 tyres_off, 0x80015b88 tyres_volume, 0x80015bcc scrape_volume, 0x800364cc race_sound_off, 0x80036634 pause_sound_off, 0x80016004 engine_off, 0x80016078 wreck_on, 0x800161f4 wreck_off, 0x80015b44 wreck_volume, 0x80016c0c crash_off, 0x80016404 impact_off, 0x8001a824 voice_key, 0x8001a8dc voice_off, 0x8003bebc camera_shake, 0x80036484 commentary_ask, 0x80019754 dialog_play, 0x800d2628 commentary, 0x8011a840 car_sound, 0x80128e94 car_sound_state, 0x800be888 tyre_effects, 0x800be8a4 contact_effects, 0x800bea6c ground_priority, 0x800d0c28 tyre_voices, 0x800d0c2c scrape_voices |
| The race's results: snapshots and the table | partial | US | US CCCPSX.EXE:0x8007fe48 snapshot_init, 0x8007fe7c snapshot_reset, 0x8007feb0 snapshot_take, 0x80080014 snapshot_count, 0x80080020 snapshot_put_back, 0x8004a8fc, 0x8004aef8, 0x8003b610, 0x8003bafc, 0x8007e6e0, 0x8007ec08, 0x8006ba48, 0x8007f6f8, 0x80064b8c hud_draw, 0x80064b64 hud_mode, 0x8006452c, 0x80064040, 0x80064294, 0x800644c0, 0x80063ab4, 0x80063bc4, 0x8009b5b8, 0x80135a18 snapshot buffer, 0x800d2718 snapshot count, 0x800d271c bytes used, 0x800d2720 last taken, 0x800d2688 standings order, 0x801399b0 player names, 0x80033aa0 standings, 0x80061824 car_result, 0x800d0e48 lap_length, 0x800d25f8 points, 0x800d0e69 fastest_car, 0x800d0e54 time_left_from |
| The rigid body and its integrator | partial | US | US CCCPSX.EXE:0x8006c504 integrate, 0x80071bc0 align, 0x8003d5cc damp_spin, 0x80025be4 orthonormalize, 0x80026884 and 0x800273ec the 64x16-bit matrix products, 0x80026650 vec_length |
| Sound levels (the music, the menu's effects, the sliders) | solid | US | US CCCPSX.EXE:0x80014b6c music_level, 0x800a5c58 CdMix, 0x800abc08 cd_attenuation, 0x80015908 menu_effect, 0x8001a6dc effects_level, 0x8001a728 voice_level, 0x80092fd0 options_slide, 0x8009311c options_slide, 0x80088828 card_settings, 0x8008a184 default_settings, 0x800d2488 music_level_kept, 0x80015d04 reverb_depth_ease, 0x80015cc0 ease, 0x800a66d4 SsUtSetReverbDepth, 0x800a6b94 voices_reverb, 0x800a70c8 SsUtSetReverbType, 0x800a70a8 SsUtReverbOn, 0x800a6648 SsUtReverbOff, 0x80019f7c sound_pause, 0x800d0c40 reverb_depth, 0x800d24d4 reverb_sounding, 0x800d24d3 sound_paused |
| The table-driven state machines | solid | US | US CCCPSX.EXE:0x8006ba60 fsm_init, 0x8006baac fsm_post, 0x8006bb18 fsm_tick, 0x800c5bdc fsm_main, 0x800c6640 fsm_second |
| The stunt announcement | solid | US | US CCCPSX.EXE:0x80064dec stunt_announce, 0x80064724 stunt_text, 0x80063c70 slide_left, 0x80063e5c slide_right, 0x80064d44 text_width, 0x80080d6c stunt_name, 0x800bead0 hud_player, 0x800bf114 stunt_names |
| Keeping bodies inside the track (the walls stages) | solid | US | US CCCPSX.EXE:0x800536b4 ground, 0x80054964 walls, 0x800572f0 computer_walls, 0x8012c6ec contacts, 0x800d2674 contact_count, 0x800d2670 computer_objects |
| The track's sounds (sources, spots, knocks and triggers) | solid | US | US CCCPSX.EXE:0x8011aab0 world_sounds, 0x80016c98 world_alloc, 0x80016d0c world_place, 0x80016e2c world_level, 0x80016e54 world_key, 0x80016d5c world_stop, 0x80017208 world_mute, 0x80019abc voice_alloc, 0x8011aca0 voice_held, 0x800350d4 race_sound_start, 0x800215e0 world_sound_count, 0x800215f4 world_sound_get, 0x8007f5e0 anim_of_sound, 0x8007f59c anim_place, 0x800d0df4 track_sources, 0x80128ef4 spots, 0x80036174 spots_init, 0x80036270 spot_sound, 0x80036474 spot_place, 0x80036424 spot_stop, 0x800d0fd8 trigger_spots, 0x8006a4cc trigger_spots_follow, 0x8006a424 trigger_spots_stop, 0x80036758 race_sound_resume |
Content
What is actually on the disc.
| Page | Status | Discs | Covers |
|---|---|---|---|
| What is on the disc | partial | US | US CCCPSX.BIG (all 3409 members), SCREENS.BIG::ENGLISHHWT, SCREENS.BIG::ENGCARSCDT, the 13 CD-DA tracks |
Cut and missing content
Content the game names, references or half-carries but does not ship whole, one page per item.
| Page | Status | Discs | Covers |
|---|---|---|---|
| The FCity world | guess | US | US CCCPSX.EXE:0x800d0b7c "FCity", 0x80011310 the world colour picker |
| Haunted Highway 1 | partial | US | US SCREENS.BIG::ENGLISHHWT line 15; US CCCPSX.EXE:0x800c5c0c, 0x800c5c4c |
| The Physics Test world | partial | US | US SCREENS.BIG::ENGLISHHWT lines 3, 12-14; US CCCPSX.EXE:0x800d0b74 "PTest", 0x80011310 the world colour picker |
Content1
Cut3
- The FCity world A world name, FCity, that only one piece of code knows.
- Haunted Highway 1 The first Haunted track is named in the text but has an empty slot in both of the executable's track tables, and no archive.
- The Physics Test world A fifth world, "PTest", with three tracks named "Physics Test 1-3".
Disc1
Engine20
- How the program is put together CCCPSX.EXE is C compiled with the PsyQ toolchain, linked with the PsyQ libraries (1997).
- The attract race Left alone for 30 seconds on the title (state 48) or the main menu (0x80088428: state 64 entered more than 30 s ago, event 37 to state 77), the front end sets up a race of computer cars and shows it with a TV-style director until it ends or a button is pressed.
- The car's lights (exhaust glows, headlights, tail lights, darkening) A car has four kinds of light.
- The car object and its physics step Every car in a race is one 0x930-byte record in an array at 0x80128fcc; the number in use is the word at 0x800d263c.
- The car's wheels and shadow as drawn A car's full model has one child node per wheel (4, or 6 on TOWJAM), each with a 32-byte wheel record that holds its mount at half scale (see the car format).
- Cheats (the button codes and the race options) A player's cheats are a word in their profile (+0x3c).
- Controls and the pad The controls module publishes itself in the interface table at 0x8012fcdc (21 slots, filled by 0x8001bd88) and reads the controllers through PsyQ's libpad, which polls both ports from the vertical blank interrupt.
- The race's effects: puffs, skid marks, sparks Dust, smoke, skid marks, sparks and debris live in four rings of 56-byte records.
- Flying wheels (a player's wreck throws its wheels) When a player's car wrecks (flag 1 on the car), its wheels come off.
- The PsyQ libraries as linked What the game expects of the console, through the Sony libraries linked into CCCPSX.EXE (1997 versions, by their $Id strings: sys.c 1.135, intr.c 1.76, bios.c 1.86).
- The chase camera on loops A zone whose flags have both 0x8000 and 0x1000 set (0x9000) is part of a loop.
- Power-ups (the track's pickups) Each pickup on a track names a power-up (<name>.PUP, 180 bytes, in the track's archive) or "Random".
- The race's sound: engines, hits and tyres During a race every sound but the music goes through the sound interface table at 0x8012fe54, filled by 0x80019870.
- The race's results: snapshots and the table When a race ends, race_frame (0x80033ed8) works out the standings (0x80033aa0), sets the race phase (0x800d0de9) to 3 and the "draw mode" byte (0x800d246c, through iface_general+0x120) to 2.
- The rigid body and its integrator Cars carry a rigid body at +0x30; the car's position, velocity, rotation, angular velocity and its force and torque sums are the body's fields (see the car object).
- Sound levels (the music, the menu's effects, the sliders) Three levels set how loud the game is.
- The table-driven state machines The game's flow, front end and race alike, is data: state records with lists of functions to run on entering, on every tick, and on leaving, and a list of event transitions.
- The stunt announcement When a player's car lands a stunt, stunt_announce (0x80064dec) is called with the car's player number, the points (0 when the race does not score), the stunt and the turbos won.
- Keeping bodies inside the track (the walls stages) Two stages of the collision step (0x8005148c) push bodies back inside their zones.
- The track's sounds (sources, spots, knocks and triggers) Besides the cars, the race plays sounds of the track's own.
Formats8
- The BIG archive CCCPSX.BIG holds all of the game's data.
- The best line (BLD) Loaded during "LOADING BEST LINE.." by bestline_load (0x8007b19c): the racing line the computer cars follow, inferred from the loader's progress string.
- Cars (BMF, CAR, SHD, CWH, FXP, DECALS) Each of the 41 cars is four files, identical in all 12 archives: .BMF (three detail levels of model, handling, effect points), .CAR (a copy of the full model for the front end), .TIM (the skin, see TIM) and .SHD (the shadow, a 4bpp 64 x 64 TIM with 16 colours).
- Track textures (GLM, GLB) Raw VRAM uploads: each file is two rectangles of halfwords that glm_load (0x80024604) passes to LoadImage, palettes first.
- Track collision (SCP) "%s%d.scp", loaded during "LOADING COLLIS..".
- TIM images Sony's standard texture file.
- VAB sound banks Sony's standard SPU sound bank, as two files: the header .VH (programs, tones, sample sizes) and the body .VB (the samples, PS-ADPCM).
- The world model (WLD, DLW, WLB) One format for three files per track: .WLD the track, .DLW the same track exported mirrored (left and right swapped), .WLB the sky.