Home - DustStormPettigrew/LibLR1 GitHub Wiki
LibLR1 Wiki — Binary Format Reference
A consolidated reference for the binary keyword-encoded data formats used by LEGO Racers (1999, High Voltage Software).
LibLR1 is the C# parsing library that reads and writes these formats. Originally created by Will Kirkby (origamiguy), forked and maintained at DustStormPettigrew/LibLR1.
Scope
This wiki documents formats that use LibLR1's token-based binary encoding — the shared serialization layer where data is prefixed by single-byte type tokens. If a file can be loaded by BinaryFileHelper.Decompress() and parsed via LRBinaryReader, it belongs here.
Formats with independent encodings (SRF string tables, BMP image data) are also documented here since their parsers live in LibLR1, but their encoding sections note the differences.
Core Architecture
- Binary Encoding — The token-based serialization format (Token enum, type system, compression)
- Primitive Types — LRVector2, LRVector3, LRQuaternion, LRColor, LRRect, Fract8Bit, Fract16Bit
Format Reference
3D Geometry & Scene
| Ext |
Name |
R/W |
Description |
| GDB |
3D Model |
R/W |
Mesh geometry — vertices (normal or colored), polygons, materials, meta |
| WDB |
3D Scene |
R |
Scene graph — references TDB/MDB/ADB/GDB/SDB/BDB/MAB/BVB; defines static models, animated models, cameras, lights, billboards |
| BVB |
Collision Mesh |
R |
Physics collision geometry — vertices, polygons with material index, polygon ranges |
| TDB |
Texture List |
R/W |
Named texture entries with bitmap/color flags |
| MDB |
Material List |
R/W |
Named materials — ambient/diffuse color, texture name, alpha, boolean flags |
| TMB |
Material Physics |
— |
No LibLR1 class yet |
| MAB |
Material Animations |
R/W |
Material frame sequences and animation definitions (offset, length, speed) |
| BDB |
Bounding Data |
R |
Bounding boxes and unknown spatial data; referenced by WDB |
Skeleton & Animation
| Ext |
Name |
R/W |
Description |
| SDB |
Skeleton Structure |
R/W |
Named bone hierarchy — position (Vector3), transform (Quaternion), parent reference |
| ADB |
Skeletal Animation |
R/W |
Animation data — position offsets, quaternion transforms, time offsets, pointer table, named animation meta |
Track & Racing
| Ext |
Name |
R/W |
Description |
| RAB |
Track Header |
R |
Track manifest — references to scene, collision, powerups, skybox, hazards, checkpoints, sounds, emitters |
| CPB |
Checkpoint Layout |
R |
Checkpoint array — direction normal, timing data, location |
| PWB |
Powerup Layout |
R/W |
Color bricks (position + color) and white bricks (position only) |
| HZB |
Hazards |
— |
No LibLR1 class yet |
| SKB |
Skybox Gradient |
R |
Named gradient sets — 3 RGB colors per gradient, preferred set selection |
| EMB |
Particle Emitters |
— |
No LibLR1 class yet |
| SPB |
Start Positions |
— |
No LibLR1 class yet (empty file) |
AI & Pathing
| Ext |
Name |
R/W |
Description |
| RRB |
NPC Path |
R/W |
AI path nodes using Fract16Bit/Fract8Bit delta positions and quaternion rotations |
| GHB |
Ghost Path |
R |
Time-trial ghost — initial position/rotation + Fract16Bit/Fract8Bit node array |
| GCB |
Unknown (Geometry?) |
R |
Compact vertex data (Fract16/8) + named model sets with polygon arrays |
Race Structure & NPC
| Ext |
Name |
R/W |
Description |
| CRB |
Circuit Listing |
R/W |
Named circuits — player list, circuit number, unlock condition |
| RCB |
Race Listing |
R/W |
Named tracks — folder, circuit, position, mirror flag, theme, mascot |
| CCB |
NPC Car List |
R/W |
Named cars with string refs and a position vector |
| DDB |
NPC Driver List |
R/W |
Named drivers with string refs and many integer properties |
Cutscenes
| Ext |
Name |
R/W |
Description |
| CDB |
Cutscene |
R |
Scene references + named cutscenes with cameras, models, events, lights (frame-based timing) |
Menu & UI
| Ext |
Name |
R/W |
Description |
| MIB |
Menu Interface |
R/W |
UI layout — image items, text items, scene views, text buttons; hierarchical positioning |
| LSB |
Loading Screen |
R/W |
Loading screen — image name, icon positions, ordinal |
Independent Encodings (non-token formats)
| Ext |
Name |
R/W |
Description |
| SRF |
String Resources |
R/W |
UCS-2 string table with offset array — does NOT use token encoding |
| BMP |
Bitmap |
R |
Custom RLE-compressed image — 4-bit palette, 8-bit palette, or direct RGB |
Partially Decoded / Unknown
| Ext |
Name |
Notes |
| TIB |
Timer Binary |
Array of structs with int properties; has a 0x2B bodge workaround |
| TRB |
Unknown |
Array of structs with Vec3, float, int, string, bool properties |
Not Yet Implemented in LibLR1
From the Binary Editor's format list, these have no LibLR1 class:
| Ext |
Binary Editor Name |
| CMB |
(unknown) |
| CEB |
Cutscene Events |
| EMB |
Particle Emitter List |
| EVB |
(unknown) |
| FDB |
Fonts |
| HZB |
Hazards |
| IDB |
2D Image List |
| LEB |
Lego Brick List |
| LRS |
Save File |
| MSB |
(unknown) |
| PCB |
(unknown) |
| SPB |
Start Positions |
| TGB |
(unknown) |
| TMB |
Material Physics Properties |
Documented Elsewhere
| Format |
Repo |
Notes |
| JAM |
JAM-Extractor (fork planned) |
Archive container |
| ALP / TUN |
TUN tool (planned) |
Audio formats |
| TGA |
N/A |
Standard Targa |
| PLY |
TBD |
Export format |
Game Versions
- 1999 release — Original with SafeDisc DRM; contains dev code for extracted-file loading
- 2001 release (Valusoft) — Removed extracted-file loading; can be patched with empty
LEGO.JAM
Community Credits
| Contributor |
Key Contributions |
| Will Kirkby (origamiguy / dead_name) |
Created LibLR1 and LR1BinaryEditor; decoded the binary keyword format |
| Cyrem |
Founded LR1 modding research on RRU; SRF Editor |
| JrMasterModelBuilder |
JAM file extractor |
| grappigegovert |
GDB to PLY converter; GDB File Viewer; track editor |
| Fluffy Cupcake |
Empty JAM discovery; vertex color tools |
| Jimbob |
MDB material research |
| Laupetin |
Lego-Racers-Mod with format dumping |
| Sluicer |
BMP RLE decompression algorithm |
External Resources