OpenTPW

PowerPC evidence: format decoder mechanics#

2026-10-09. Static reading of the Feral Mac PowerPC build (Sim Theme Park); the original program was not run. Original .data files, the HFS image, extracted assets, expanded sections and disassembly stay outside this repository. Facts below are Mac-build facts unless a PC/Patch 2 variant check is stated; Mac static evidence alone does not prove PC runtime behaviour.

Reproduce#

From the repository root, with Python 3 and no third-party packages:

python3 -m unittest discover -s tools/ppc-analysis/lanes/formats -p 'test_*.py' -v
python3 -I tools/ppc-analysis/lanes/formats/format_witness.py /Users/sander/server/game-assets/mac-feral/bin
python3 -I tools/ppc-analysis/lanes/formats/corpus_check.py /Users/sander/server/game-assets/theme-park-world/Data
python3 -I tools/ppc-analysis/lanes/formats/corpus_check.py /Users/sander/server/game-assets/theme-park-world-patch2/Data
# C# parser (synthetic) and corpus cross-check of the decoders in "Implemented in the parser"
dotnet test source/OpenTPW.Tests --filter "FullyQualifiedName~Md2|FullyQualifiedName~ObjectVertexAnimation"
OPENTPW_GAME_PATH=/Users/sander/server/game-assets/theme-park-world dotnet test source/OpenTPW.Tests --filter "FullyQualifiedName~Md2|FullyQualifiedName~ObjectVertexAnimation"
# two dynamic vertex buffers read back from Metal (macOS)
OPENTPW_NATIVE_SHADER_TESTS=1 dotnet test source/OpenTPW.Tests --filter "FullyQualifiedName~NativeDynamicVertexBuffers"
ContainerSHA-256
SimThemePark.data04809cd4ccee5433c7fb0b7c93d32f6a7aa629c1849181c0b7906415e5e295f5
libraries/engine_shared.datac549123f647dcf33c3e2c3d515bffe2cfcb19d11680f743f02ca42bb09dbd73b
libraries/ltms_shared.data2b0f7ac92c1f8b67761d271dd5832fca1bd19a8dd8d494b7b89b6ffa693e6ee8

Offsets are section offsets (code = section 0, data = section 1). TOC bases: SimThemePark 0x8000 (main vector), engine_shared 0x8000 (export vectors). All Mac loaders byte-swap little-endian files, so the Mac build consumes the same byte layout as the PC files.

Variant checks#

InputMac HFS copy vs PC baselinePatch 2
levels/jungle/Easymode.TPWIbyte-identical (6d89303d…)not changed
levels/jungle/rides/wateride.wad (both 207.201 members)byte-identical (77c6a09f…)not changed
levels/*/terrain.wad base.map, terrain.map, base.MD2decoded members identical (77/80, 92/95, 103/106, 73/76 members equal; only three .wct differ)not changed
MD2 corpus invariants below—all counts identical (2,118 members)

The Mac data:Language:American fonts differ from PC English files (locale), so BF4 statements below are code facts, not corpus comparisons.

MD2 (M3D2)#

Loader gating (engine_shared LoadM3D2Header, code 0x3f9d8)#

The loader opens the file ("rb"), reads it whole, byte-swaps the header, checks magic 0x1CD15D46 (addis −7377 / cmplwi 23878 at 0x3fc38), then gates on the major word (+4) and minor word (+8). Status labels are printed as "%s (Label)" from a table at code 0x44101:

Condition (in order)LabelResult
magic mismatchBadFileTypeNULL
major > 221OldCodeNULL
major < 221 and argument bit 1 clearDeadMeshNULL
argument bit 2 clear and trailer pointer (+0x98) ≠ 0Master is AnimNULL
argument bit 2 set and trailer pointer = 0Anim is MasterNULL
trailer and minor > 203OldCodeheader returned, trailer pointer and header flag 0x20 cleared
trailer and minor < 203DeadAnimheader returned, trailer pointer cleared, header word 0x30 zeroed
no trailer and major < 221OldMeshheader returned
otherwiseOkheader returned

The application imports it through one glue stub with exactly two call sites: 0x58f04 passes flags 0, 0x99ad8 passes 2 or 6. No call site sets bit 1, so in this build every major-207 member, including wr_tunnel.md2 and wr_tunnelm.md2 (Mac copies byte-identical to PC), is refused with DeadMesh before any layout is interpreted. OpenTPW's rejection of 207.201 matches the Mac loader; no 207.201 layout needs to be supported for parity with this build. Model: models.load_status; corpus: 2,116 Ok, 2 DeadMesh (baseline and Patch 2).

Header/trailer field roles from the swap and relocation code#

Header u32 fields 0x00–0x14, 0x2C and 0x30 and u16 0x34–0x4A are swapped; 0x40bc8 relocates 0x4C–0x7C, 0x98 (trailer) and 0xAC (a table swapped with the same routine as animation position headers, 0x40664); 0x9C is overwritten with the header's own address at load. Trailer (72 bytes): words 0–2 u32, 12–28 nine u16, 32–68 pointers relocated by 0x4123c. The trailer helpers (call site → callee, pointer, count) establish:

Trailer pointerCountHelperContent
+32 (word 8)u16 +120x40664position headers (16-byte)
+36 (word 9)u16 +140x41604scale keys (u16 tick, u16, 3×f32), 192 files
+40 (word 10)u16 +160x4171crotation keys (20-byte)
+44 (word 11)u16 +180x413b464-byte records
+48 (word 12)u16 +24 (word 6 low half, previously "opaque")0x412e0texture-frame tracks: 8-byte {u16 slot, u16 count, ptr→count × (u16 tick, u16 frame)}, 229 files
+56 (word 14)u16 +260x417c4node list (u16)
+52 (word 13)—relocated onlyzero in corpus

Texture-frame tracks: the clip update 0xa56f8 calls 0xa4160 only when trailer word 0 bit 0x2 is set (bt eq skip at 0xa5768) and global option bit 0x8 (+16396 of the global block) is clear (bf eq skip at 0xa5778; the word is only ever stored as 0, see "Gate inputs"). 0xa4160 scans each track from its last key backwards and takes the first key with tick ≤ trunc(time) (so of two equal ticks the later entry wins; none found → slot unchanged); when the frame differs it stores it in that slot's 8-byte runtime entry (array pointed to by instance +80) and sets the entry's dirty bit 0x400. Corpus: trailer word 0 bit 0x2 is set exactly in the 229 files that have tracks (1,278/1,278 agree); 459 tracks (4 with a repeated tick), 458 index a slot of the paired base model with every frame below that slot's frame count (one track has no in-range slot).

Record (64 bytes) pointers relocated by 0x41574: +24 position header, +28 rotation keys, +32 scale keys, +36 path-parameter block, +44 0x10000 block, +48 u16 list (count u16 +22), +52 easing curves. +40 (vertex block) is relocated by 0x41a98 only after the 0x4000 test; +60 is swapped but not relocated and +56 is left untouched.

Record sampler (SimThemePark 0xa4f68)#

Inputs: player state (float time +32, float duration +28), instance (the geometry M3D2 header), node state (the record's runtime +60 word: a mesh or dummy record of that header), record. If time > the player's duration (clip duration, not the record's +12) the record is skipped. Then, in order:

Key search (0xa3ff0, kinds 1/2/4 = strides 4/20/16): tick = trunc(time) via the runtime double→unsigned routine 0x1c3fbc (negative → 0). It takes the last key with key.tick ≤ tick; if none, the channel is left unchanged. At the last key a wrapping search pairs with key 0, otherwise with itself at tick + 1. Fraction = (time − tick₀)/(tick₁ − tick₀). Rotation interpolation (0xa820c) then overrides the partner index to min(i + 1, count − 1), so a final rotation key holds. Model: find_key, rotation_pair.

Easing (0xa50d4): an index of 0xFFFF means none; otherwise the 8-byte curve at +52 + 8·index is evaluated as s = fraction × 8.999995 (single precision, literal at TOC 0x5198), segment i = trunc(s), local s − i, linear between 0 / b0 (i = 0), b[i−1] / b[i] (1 ≤ i ≤ 7) or b7 / 1.0 (i ≥ 8), bytes divided by 255.0. This proves the "(0,0), eight samples, (1,1)" reading and adds the 8.999995 scale. Model: ease.

Rotation interpolation (0xa820c): with global option bit 0x2 (+16396 of the global block at data 0x1577c0) clear it calls table-sine slerp 0xa7fc8 (threshold 0.001 on 1 ± dot, no sign flip of the second quaternion); with the bit set the components are blended linearly, (1 − t)·a + (t·b). Either result goes through 0xa7ef8, a quaternion-to-matrix conversion using s = 2/|q|², which normalises the blended quaternion implicitly. The only store to the option word writes 0 at setup (see "Gate inputs"), so the original uses the table slerp; OpenTPW's slerp does not reproduce its sine table.

Bézier (0xa85ac): with k = trunc(t), s = t − k, i = base + 3k, the cubic Bézier over P[i−1], P[i], P[i+1], P[i+2] (indices modulo the point count in header u16 +4). With base = 3·key + 1 this is exactly P[3k] … P[3k+3], confirming the existing P0, (C, C, P)… reading. Model: bezier.

Instance, node state and clip bind (identities)#

Animation clock: 30 ticks per second (proven for this build)#

So, at speed 1.0 and an unscaled scene clock, MD2 ticks advance at 30 per second. Clock A's rate, its hold and the pause callers are traced in "Scene clock controls" below.

Clock selection (proven for this build)#

Witness md2_channel_clock_selector (259 checks); reference model clip_clock_reference.py with its tests.

Requirements for a faithful reimplementation (Mac build; not a PC claim):

  1. Two scene clocks, sampled once per update and shared by every channel. A is rate-scaled and can be held; B is unscaled. Pause, resume and toggle act on both.

  2. A per-channel selector fixed before the channel's start time is taken. Start, AnimTime and the elapsed difference use the same clock, and the difference is unsigned, so mixing clocks wraps (reference test).

  3. The selector is a property of the object's channels, set at creation and copied to instances. It is not derived from the clip, the model file or the placement.

  4. A's rate is not a ticks-per-second value. It scales whole-millisecond accumulation from the last read, so a rate change does not rescale time already elapsed. The truncation also makes rate 1.5 differ from 45 ticks/s (both are reference tests). OpenTPW's per-animator TicksPerSecond is therefore not this mechanism, and treating it as game speed would be a separate, unproven choice. The rate's setters are now known (below), but that does not make a custom ticks-per-second value equal the original speed.

  5. Frozen channels (0x2/0x4) ignore the clock for AnimTime but not for NoPauseAnimTime.

Scene clock controls (proven for this build)#

Witness md2_scene_clock_controls (317 checks); the reference model clip_clock_reference.py adds the rate steps, the hold and the release.

Not implied: none of this sets a game speed for OpenTPW. The original range is 0.25–2.0 in ×1.25 steps on accumulated milliseconds, behind unidentified key bindings. A per-animator ticks-per-second value is not equivalent (see requirement 4), and PC key bindings and UI routes are unknown.

Instances and placement (proven for this build, partly)#

Face-normal routes (proven for this build, partly)#

Witness md2_normal_recompute_routes (106 checks); corpus counts from corpus_check.py (geometry_checks; PC base and Patch 2 identical).

Clip lifecycle: loop replay and cursor reset (proven for this build)#

Channel fields are labelled by the debug dump near 0x1c98fa: AnimID +4, SubAnim +8, StartAnimTime +16, AnimTime +20, NoPauseAnimTime +24, TotalAnimFrames +28, AnimFrame +32, DeferredAnimID +36, DeferredSubAnim +40 (12 = none).

So with r4 = 1 the cursor at every sample equals a fresh search from key 0: between binds AnimFrame does not decrease (unless the untraced scene-clock rate is negative), and the search only moves forward. This assumes the cursor (stored in the clip's group, +16) and the flag (in the header's mesh record) are not shared with another object sampling the same clip at a different time; whether clips and headers are per object was not traced.

Vertex animation (record +40)#

Quantised groups (flag 0x4000 clear; 1,736 records). Block (44 bytes): u16 flags, u16 groups, u16, u16 count2, u16 (+10 pad), ptr groups (+12), ptr pairs (+16, count2 × (u16, u16)), vec3 offset (+20), vec3 scale (+32). Group (20 bytes): u16 keys, u16 vertices, ptr→u16[vertices] vertex indices, ptr→u16[keys] ticks, ptr→keys×vertices packed words, u32 runtime key cursor.

12-byte variant (flag 0x4000 set; 30 records, plane_anim etc.). Block {ptr, u32 count, ptr→count × 3 u32}; the first pointer is relocated but not swapped. Its consumer is not in the record sampler and was not found.

0x10000 block (record +44, one 20-byte header): {u32 n, ptr→n × (u16, u16), u32 m, ptr→u16[m], ptr→2m u32}. Consumer not traced.

MAP (TP2M terrain attributes)#

TPWS/TPWI save payload#

Section framing is a trailing delimiter (correction)#

The save writer 0x11cb60 calls each subsystem writer and then writes its 4-byte tag (byte-swapped constant; e.g. WRLD is stored as DLRW), logging "<Name>: saved %d bytes". The bytes before a tag belong to that tag's subsystem. docs/TPWS-PAYLOAD.md currently reads each tag as the start of the following data; that attribution is shifted by one section.

Delimiter (file bytes)WriterBlock (Easymode bytes)Notes
—0x10bc1c action recording8 + 1,171u32 mLoadedPublishedPark, u32 recording_size, recording
DLRW0x105d3c Worldrest of the 1,495,462-byte prefixworld vars, control manager, macro AI, map, things
CSPS0xb7f54 Scripts5,452starts TPCS
TRAP0x9c2c0 Particles76,252starts LCTP
SSEM0x116a20 MessageCentre266
KOLC0x10e944 Clock8two 4-byte timer fields (values consistent with milliseconds)
TNAV0x127ac8 VanillaTime4raw LbTime_GetClock() at save time (the value previously called "pointer-like")
SYSG0x1c2e00 GameSystem364-byte fields
SYSR0x5ae70 RideSystem17,526the placed-object records attributed to "SYSG" today
KART0x1a424 TrackRides44chunk headers {1,12,44}, {2,32,32}, then build __TIME__ + __DATE__\0 (PC file: 20:25:29Oct 21 1999; the Mac writer emits its own build stamp)
RYLF0x674bc FlyingRides452starts FLY_
ESSR0xb3868 RSSE scripts10,856starts with its own RSSE
EMAK0x2cb90 Camera403×4 + 12 + 12 + 4
SAOC0x394b8 Coasters164×4
SVDA0x78c8 (tag ADVS)372starts ADV_; log label reuses "Coasters"
NUOS0xbbad0 Sound1,445cat_* paths
STHC0x10e5a8 + 0x10e788 Cheat2
CSDA0xcfd4 / 0xe834 AdvisorScoring4
(none)0x18f7384 (zero)final untagged block; log label reuses "UI"

Payload offset 0 is the action record, so the "untagged prefix" is action recording + World, not a separate header. Model: split_sections.

Labelled schemas (debug labels passed to the save helpers)#

Helper widths (bytes written by each helper's LbFile_Write): 0xbefc 2, 0xc90c/0xc7f8/0xc6e4/0xcd1b0/0x10a4a4/0xcdf5c/0xd8ecc 4, 0xcabc4 1, 0xcde50/0xcdd44/0xce070 2, 0xcd704 12.

World vars (Easymode offset 1,179–1,243): version 4 (=2), mArrivalVehicle_Size1..3 2 each, mBankAccount 2, mCurrentArrivalVehicle 2, mGameTick 4 (=755), mMechanicHQ, mParkAnalyser 2, mParkClosed 4, mNumberOfVisitorsToDate 4, mParkGates, mTrafficLights 2, mRandomSeed 4, mResearchLab, mStaffHQ, mTagSystem, mUIMsgReceiver, mWeather 2 each, mWorldState 4, mFirstHandyman, mFirstMechanic, mFirstEntertainer, mFirstGuard, mFirstResearcher, mFirstObject 2 each. The 2-byte fields hold small distinct thing indices in the fixture (e.g. gates 11, lights 12). Then mControlManager, mMacroAI, mMap, Used Thing Head/Next and thingmodel blocks follow (not decoded here).

Cell grid (map writer 0xd6c90, 16,384 cells, X-fastest): per cell a status byte (bit 1 map cell, bit 2 track cell, bit 4 region-effect cell) followed by the flagged sub-records. Shared cell base (29 bytes): mDirection 1, mFlags 2, mMeshInstance 4, mNeighbours 1, mOverlapCounter 2, mParentID 2, mTileData 12, mType 4, mHoardingNeighbours 1. Map cell = base + mLitter 4, mLitterCollector 2, mLitterScript 4, mLitterScript 4, mPylonIndex 2, mStatusFlags 1, mTimeMarkedForLitterCollection 4, mWho 2 (52). Track cell = base + mSegmentNumber 2 (31). Region-effect cell = mpEffect[5], 5 × u16 (10). Hence 1 + 52 + 31 = 84 and +10 = 94 bytes — the two observed record sizes. This names the previously opaque offsets:

Record offsetFieldFormer observation
+0status (3 = map+track, 7 = +region effect)"type byte"
+2map mFlags low byte0x40/0x00 regions
+8map mNeighbourspath connection bits
+11/+12map mParentID (u16)"+12 ≠ 0 occupied" (49 nonzero cells)
+13, +17, +21map mTileData bytes 0, 4, 8path bit, PathTex index, orientation
+25map mType (u32)1 = path on exactly the 78 tile-bit-0 cells; 2 = water (240)
+46map mStatusFlagsMAP attribute byte
+56track mMeshInstance"running index"
+77track mType12/25 fence-like values
+82track mSegmentNumberFF FF
+84…mpEffect[0..4]the 11×11 camera patterns are mpEffect[3]

corpus_check.py parses all 16,384 cells from 6,765 to 1,385,521 with this model (16,134 × 84 + 250 × 94). The meaning of individual status/flag bits and of the other subsystem blocks remains open.

MTR#

No Mac container references MTR: no .mtr/.MTR string and no AF 15 59 2E magic in either byte order in any code/data section of all 16 containers, and the Mac data volume has no .mtr file (it does ship bankrupt/congrats/paused.MD2). Static evidence that the Mac build never loads MTR; a PC runtime file-access trace would still be needed for the PC build.

BF4 fonts (ltms_shared)#

TGQ/TQI movies#

The Mac build has no TQI decoder: it imports QuickTime (NewMovieFromFile, StartMovie, …), names Data:Movies:<name>.mov, and its data volume ships .mov files (plus bfj.mov, BFj2.mov). No pIQT/SCHl constant occurs in any container. The PC TP.ICD (baseline and Patch 2) keeps section names such as IDCT_DAT, TQIA_DAT and LBMPEG_D, but its .text and .data are high-entropy (7.99 and 7.34 bits/byte) and were not decoded. The residual IDCT rounding therefore cannot be resolved from either binary statically here.

Implemented in the parser (source/OpenTPW.Files/Formats/Model)#

Parser and sampling helpers; the runtime use is in the next section.

Proof aboveC#
quantised block, groups, key-major packed wordsModelVertexAnimation, ModelVertexGroup (ModelAnimationTrack.VertexAnimation)
signed 10:10:10, fused q·scale + offsetModelVertexAnimation.Unpack, Dequantise
cursor search, cur·(1 − t) + next·tModelVertexGroup.AdvanceKey (kept cursor), FindKey (reset cursor), ApplyAnimatedGroups(time, positions, add)
group 0 padded lower/upper vectorsSampleBounds
static group (key 0)ApplyStaticGroup(positions, add)
texture-frame tracks and their gateModelAnimation.TextureFrameTracks, TextureFramesEnabled, ModelTextureFrameTrack.FrameAt
0x20000 toggle listModelAnimationTrack.NodeFlagToggles, SampleNodeFlag
easing scale 8.999995, (1 − s)·lo + (s·hi)ModelAnimationTrack.Ease, EaseScale
key search: before the first key → unchanged (null); last rotation/scale key holdsSampleTranslation/Rotation/Scale (the player substitutes the stored node component for null)
scale (1 − t)·a + (t·b)SampleScale
set-mode pose (static key 0, then animated groups) and its preconditionsModelVertexAnimation.ApplyPose, GetPoseLimitation
header flag 0x4ModelFile.RelativeAnimationFlag

Explicitly unsupported (not decoded, reported by ModelAnimationTrack.UnsupportedFlags, 1,122 corpus records): the 12-byte vertex layout (0x4000), the 0x10000 block, 0x2000 and the path parameters (0x200/0x400). HasUndecodedPayload keeps its earlier meaning ("more than rigid tracks"). Rejected as malformed: a missing bounds or static group, a group-0 vertex count below 2, an animated group with fewer than 2 keys or non-increasing ticks, a static group without keys, non-finite offset/scale, and pointers or counts outside the payload. Sampling a vertex group past its last tick, NaN times, and negative times for the TRS channels throw instead of guessing. The C# corpus test checks 1,736 decoded blocks, 1,735 paired (virtual pair, coverage, whole-clip sampling, 713,683 bracketed animated keys and none outside), 2,536 toggle lists, 1,278 clip gates and 459 texture-frame tracks; these agree with corpus_check.py.

Runtime integration (objects)#

ObjectAnimator keeps per instance one position array per mesh and fills it from the winning clip's vertex track (same most-recent-channel rule as the node matrices, an OpenTPW choice) with ApplyPose at the channel tick; without one the mesh shows its stored positions. Equivalence argument: when GetPoseLimitation is null the static and animated groups write every position of the mesh, so the array equals the original's after its set-mode passes since the bind. The kept cursor is replaced by a fresh search from key 0, which equals it on the r4 = 1 update path (see "Clip lifecycle"): the loop replay rebinds and resets it. The channel clock follows the trace at speed 1.0: per instance a clock in whole milliseconds (accumulated Advance time, floored), a start per channel, the single-precision frame, the last key at exactly the duration, and a looping replay strictly past the end from the capped carry truncated to whole milliseconds, once per Advance (one object update). A non-looping clip is marked finished only past its end; the hold itself stays RIDES-003. A test on the synthetic clip pins 999/1000/1000.5/1100 ms on a 30-tick clip (29.97, 30, 30, 3), one 2,500 ms update (30, then 3 after 100 ms), the 10-tick drift (0 at 334 ms, 9.99 at 667 ms) and the strict non-looping end; it fails against 6382736 (frame 0 at 1,000 ms). Not modelled: the object-list path (r4 = 0) that keeps cursors across a wrap and replays without a bind (unsupported; a separate profile would need the kept-cursor sampler AdvanceKey), object flag 0x8000, speeds other than 1.0, and per-object ownership of clip and header state. How the original's scene clock reaches whole milliseconds (0xa6f70 stores the integer result of 0x10e844) belongs to the clock lane. There is also no clock selector. Every animator accumulates its own Advance time, which matches clock A at rate 1 with no pause or hold. The advisor's clock B is not distinguished, and the instance TicksPerSecond is not clock A's rate (see "Clock selection", requirement 4). A model whose meshes share a node is rejected (a parsed model gives mesh i node i; a track drives one mesh record). When a mesh loses its track the animator shows the stored positions, except on fixed items (ObjectCatalogEntry.IsFixedItem, passed by OriginalObjectRuntime), which keep the last pose; this is the copy-back gate above with the option word at 0 and the creator flags of the catalog loader. In the catalog only the fantasy gates' three clips (gatese, gatesm, gatess) give a fixed item a vertex track (baseline and Patch 2); the corpus test checks that StopAll keeps their pose and restores every other object's stored mesh. Played: 599 of the 609 catalog clips that carry vertex tracks; the 10 others hold only the 12-byte layout (23 tracks) and are listed in VertexLimitations with the stored mesh shown. Also listed instead of guessed: relative-animation models, blocks that do not list every position once, and groups that end before the clip (none in the catalog).

ObjectRenderParts.WritePositions maps positions through the corner order into the part's own vertex array (engine axes; stored normals kept), and OriginalObject refreshes a fixed-size Dynamic vertex buffer (Model.UpdateVertices) through the frame command list only when the mesh's pose version changes. The parsed ModelFile is shared through the model cache and is never written. Tests: two Belly Bounce instances at ticks 30 and 105 hold different poses, each equal to a direct sample; the shared positions are unchanged; each Build gets its own arrays; stopping one instance restores its stored mesh only; a Metal readback of two dynamic buffers keeps each instance's upload over three frames with no buffer growth. Native jungle smoke (baseline and Patch 2 data) passes, 3,808 frames each; it does not assert vertex-animated pixels.

Not wired, because the runtime binding is not proven: group-0 bounds (no consumer of the mesh-record bounds traced), node-flag toggles (bit 0x10's consumer), texture-frame tracks (the header slot entries are identified, but the engine's frame-to-texture use and option bit 0x8 at run time are not), the 0x10000 block, and add mode (relative-animation models: per-update base restore through 0xa5894 without a new clip, add, then face normals by 0xa772c; traced but not implemented). Stored normals are kept after a vertex pass, which matches the 0xa7960 path for set-mode models; the 0xa78ec and renderer routes are open.

Code replacement handoffs (root to verify and integrate)#

  1. MD2 animation runtime: vertex tracks are wired for objects (section above; docs/MD2-MODELS.md updated). Still open: texture-frame tracks to texture slot frames, the 0x20000 bit, group-0 bounds, once their consumers are known. Keep 30 ticks/s but cite this proof. Gate PC claims behind a PC capture.

  2. Fidelity register / RIDES-001: tick rate is proven (Mac, speed 1.0); the loop policy is traced (replay past the end with a carried start, see "Clip lifecycle"); clock selection is traced (only the advisor uses clock B; see "Clock selection"). Clock A's rate is traced: 1.0 by default, and 0.25–2.0 in ×1.25 steps only through three key handlers. The hold is a 31 ms fixed step used while loading and during screenshot capture (see "Scene clock controls"). The physical keys, the dispatcher and the PC bindings remain open. This is not a basis for treating a per-animator ticks-per-second value as the original game speed. The stored-mesh rule after a vertex clip is now derived (fixed items keep the last pose; see "Gate inputs"), so the stored-mesh approximation entry proposed in 2760acb is withdrawn; it was never registered, and no register change is needed for it.

  3. TPWS (SavePayloadLayout, TPWS-PAYLOAD.md, importer naming): treat tags as trailing delimiters; rename sections by owner (RideSystem holds the placed objects); adopt the cell schema and world-var names; the importer's offsets (+8, +11/12, +13, +25, +46, +82) keep working but can use field names.

  4. MAP: document OpaqueHeaderValues as ignored by the original loader; terrain.map unused by the Mac terrain loader.

  5. MTR: mark "not loaded by the Mac build".

  6. BF4: optional exact-blend mode reproducing the C < D lag; current alpha mapping is weight-equivalent for C ≥ D.

Unresolved, with exact dependencies#

Source: docs/reverse/PPC-formats.md in the project repository.