Add the contents of disk 1

- LHA -lh5/-lh6/-lh7 decoding with CRC checks (disk 1 is mostly lh5)
- Real track palettes and set names, read from each track file's header
- Camaro, plus the caravan as a towable trailer (Caravans option)
- Drivers' names, menu pictures and the original .set values per car
- Original sound effects (IFF 8SVX) through a new sample mixer: engine
  pitched with revs, tyre screech, crashes, backfire, horn, start beeps
- The original tune (OctaMED MMD1) through a new player; loudness tracks
  OpenMPT's render through the whole song. Music option in the menu
- Title picture (IFF ILBM) at the top of the menu
- skids unpack and skids music commands
- Gate crossings now judged on each car's whole movement per frame,
  including collision knocks; stalled computer cars are put back on the
  line after 8 seconds

The executable's game logic (handling, AI) is still not decoded.
This commit is contained in:
2026-10-19 20:24:33 +00:00
committed by Claude
parent f27bd2e993
commit 9d82d99c15
106 changed files with 2706 additions and 287 deletions
+110 -39
View File
@@ -1,33 +1,39 @@
# Super Skidmarks data formats
Notes from reverse engineering the AGA/CD32 release of *Super Skidmarks*
(Acid Software, 1995). Everything here was worked out from the data on disks
2–6. Disk 1, which holds the executable, is missing from this archive, so
anything that lives only in the executable (palettes, sound, handling) is
unknown. See [Gaps](#gaps).
(Acid Software, 1995), worked out from all six disks. The one thing not
yet decoded is the executable's game logic. See [Gaps](#gaps).
All multi-byte values are big-endian unless noted.
## Disks
Each disk is a standard 880 KB double-density ADF (1760 blocks of 512 bytes)
formatted as OFS (`DOS\0`). The `[HD]` in the file names refers to the
hard-drive-installable release, not high-density disks. Each disk holds a
single file:
Each disk is a standard 880 KB double-density ADF (1760 blocks of 512
bytes). Disk 1 is FFS (`DOS\1`); disks 2–6 are OFS (`DOS\0`). The `[HD]` in
the file names refers to the hard-drive-installable release.
| Disk | File | Contents |
|------|---------------|------------------------------------|
| 1 | `smcd32a.lha` | *missing* |
| Disk | Archive | Game files |
|------|---------------|------------|
| 1 | `smcd32a.lha` | Executables, `sfx/`, `gfx/`, the tune, `vehicles/*.set`, `Camaro.aga`, `caravan.aga` |
| 2 | `smcd32b.lha` | `vehicles/cow.aga`, `track/TRACK1` |
| 3 | `smcd32c.lha` | `track/TRACK2`, `vehicles/TRUCK.aga` |
| 4 | `smcd32d.lha` | `track/TRACK3`, `vehicles/PORSCHE.aga` |
| 5 | `smcd32e.lha` | `track/track4`, `vehicles/vw.aga` |
| 5 | `smcd32e.lha` | `track/track4`, `vehicles/vw.aga` |
| 6 | `smcd32f.lha` | `vehicles/F1.aga`, `Midget.aga`, `mini.aga`, `Police.aga` |
Each disk's archive stands on its own (the set isn't one archive split
across disks). They use level-0 headers and the `-lh0-` method (stored),
under a top-level `super_skidmarks_cd³²\` directory. Most members are
individually packed with CrunchMania.
Disk 1 also carries an Installer script that installs from all six disks,
and a few AmigaDOS commands.
Each archive stands on its own; the set isn't one archive split across
disks. They use level-0 headers under a top-level `super_skidmarks_cd³²\`
directory.
- **Compression:** disks 2–6 store their members (`-lh0-`), which are
themselves CrunchMania-packed. Disk 1 mostly uses `-lh5-` (LZSS with
static Huffman blocks, decoded by `src/formats/lzh.rs`).
- **Integrity:** every member is checked against its header CRC-16. One
file, `c/iconx` (an AmigaDOS utility the game doesn't use), fails its CRC
in this dump. The reference `lha` tool reports the same failure.
## CrunchMania
@@ -52,12 +58,25 @@ consumed to its first byte.
```
0x00 7 × u32 end offset of sections 0..6
0x1C … section 0: track-selector thumbnails (20622 bytes, raw)
0x1C … section 0: header for the whole file (20622 bytes, raw)
… sections 1..6: one track each, CrunchMania-packed
```
So the four files hold 24 tracks. Each track section unpacks to 281240
(`0x44A98`) bytes:
So the four files hold 24 tracks.
The last 142 bytes of section 0 hold:
| Offset | Size | Contents |
|--------|------|----------|
| 0 | 2 | File number (1–4) |
| 2 | 96 | The palette shared by the file's six tracks: 16 colours × R, G, B, each a `u16` from 0 to 15 (Amiga 12-bit colour) |
| 98 | 12 | Unknown |
| 110 | … | The name of the set of tracks, NUL-terminated |
The rest of section 0 is the track-selector thumbnails, which aren't
decoded.
Each track section unpacks to 281240 (`0x44A98`) bytes:
| Offset | Size | Contents |
|----------|--------|----------|
@@ -88,14 +107,15 @@ The stored start point is on the road for 14 of the 24 tracks read as screen
coordinates, and 10 read as world coordinates. It isn't used; the grid forms
up behind gate 0.
### Palette use
### Road and scenery
The track pixel indices are ordered from dark to light. Indices 0–7 are
scenery and 8–15 the driving surface, so the fourth bitplane is effectively
a road mask. The game uses it as such here: off-road means less grip and
Colours 8–15 are the driving surface on every track, so the fourth
bitplane is effectively a road mask. Off the road means less grip and
lower speed.
## Vehicles (`vehicles/*.aga`)
## Vehicles
### Sprite banks (`vehicles/*.aga`)
CrunchMania-packed, 409600 bytes unpacked:
25 tilt blocks × 32 headings × 512-byte frames.
@@ -112,27 +132,78 @@ A frame is a 64 × 32 AGA hardware sprite. Each line holds 8 bytes of plane
- **Heading:** frame 12 faces screen-right, and frames advance clockwise in
11.25° steps. In world terms, frame = 12 + (angle + 45°) / 11.25°.
- **Tilt:** block = roll × 5 + pitch, each in 0..4, with 2 = level.
Block 12 is the car on flat ground.
- **Tilt:** block = roll × 5 + pitch, each in 0..4, with 2 = level. Block
12 is the car on flat ground.
The caravan (`caravan.aga`) uses the same layout. It's a trailer with a tow
bar, not a car.
`Police.aga` reads as all zeros with one third-party ADF tool, but it's
intact when read directly from the disk image.
### Settings (`vehicles/*.set`)
- **Header:** the car's name and its driver's name, each followed by a
newline.
- **Settings:** 16 `u16` values. Eleven are used by the cars; the rest are
zero. The caravan's values differ in kind; two of them are −4.
- **Menu picture:** 512 bytes. A 64 × 32 picture in two bitplanes, plane 0
(256 bytes) then plane 1.
The settings are clearly handling values. The first is smallest for the
Cow, the second largest for the F1, and the Police car and Porsche are
nearly identical. What each one means lives in the executable and isn't
decoded yet.
## Sounds (`sfx/*.iff`, `gfx/*.iff`)
Uncompressed IFF 8SVX, 8-bit signed, mostly at Amiga rates (8363 Hz and
others). Looping sounds use the repeat part of `VHDR`. `gfx/` holds a few
extra and alternative sounds (`crash1`, `crash2`, `engine`, `motor`,
`screech`); `gfx/crash4.iff` isn't IFF.
## Pictures (`gfx/*.iff`)
IFF ILBM with ByteRun1 compression. `skidtoon.iff` is the 608 × 180,
16-colour title picture; `chat2`, `mouse` and `sign` are small odds and
ends. `ball.spr` (34816 bytes) is in another format and isn't decoded.
## Music (`sfx/tune.crn`)
A CrunchMania-packed OctaMED `MMD1` module: 4 tracks, 21 plain 8-bit
sample instruments, 70 blocks played in order. The main song is positions
0–65, ending with a jump back to the start. Positions 66–69 hold separate
short pieces that end with "stop".
The song uses these commands:
- `1`, `2` (slide up, slide down)
- `3` (portamento)
- `9` (speed)
- `B` (jump)
- `C` (volume, decimal)
- `D` (volume slide)
- `F00` (break), `F1` (play twice), `F2` (delay), `FD` (set pitch),
`FE` (stop)
`src/music.rs` plays these. Its loudness tracks OpenMPT's rendering of the
module second by second through the whole song (correlation 0.996 over the
first minute), and it loops at the same point.
## Executables
- **`SKIDMARKS_CD³²`** (237 KB): a single-hunk compiled Blitz Basic 2
program. It includes IFF ILBM/8SVX/ANIM loaders and a tracker replay
routine with note-period tables.
- **`skidmarks2`** (90 KB): a three-hunk program whose code is packed.
## Gaps
These almost certainly live on the missing disk 1:
- The main executable, and with it the real handling model, AI, rules,
menus and fonts. This port's versions are reconstructions.
- Colour palettes. Neither the track nor the vehicle files carry any. The
engine uses a reconstructed palette, and real ones can be dropped in as
`.pal` files (see the README).
- Sound effects and music.
- Any tracks or vehicles beyond the 24 and 8 above.
- **Game logic.** The handling, AI and rules in the executable aren't
decoded; this port's versions are reconstructions. Decoding the `.set`
values would be the first step towards the original handling.
- **Unknown data:** the 12 bytes after each track file's palette, the bit
pattern after the gates in each track section, the thumbnails, and
`ball.spr`.
The engine's own editable formats, which `skids extract` converts all of
the above into, are described in [assets/README.md](../assets/README.md).
If disk 1 turns up, put it next to the others and run `skids info`.
Anything in a `track/` or `vehicles/` directory inside its archive is
picked up automatically.