OpenTPW

Controller reference primitives#

This standalone .NET8 console project has no package/project dependencies and is not linked into production. It uses the existing interpreted controller-contracts.json, never original executable or COS bytes.

dotnet run --project tools/ppc-analysis/lanes/rides/controllers/ControllersWitness.csproj
dotnet run --configuration Release --project tools/ppc-analysis/lanes/rides/controllers/ControllersWitness.csproj

Proof anchors are 15313d2/controller-native.json, the39 native command contracts and37 PC-used command/callsite groups. The exact Mac SHA and function offsets are recorded there. Controller memory strides are not serialized-file strides. Shared TPI metadata at 7f2a6b2, tools/tpi-compare/format_questions.py and docs/TPI-COMPARISON.md, groups all80 COS files into16 equal-body groups after offset132, five languages each. It also finds no TrackInfo/Direction key in369 parsed SAM inputs. This identifies comparison boundaries and missing schema evidence; it does not decode tracks.

The helper implements the following bounded observations:

Nineteen synthetic cases cover full/empty, held counts, wraps, configured-limit changes, clamping/distribution, multiple riders per vehicle, reverse order, BUMP63/64 boundaries, all39 command directions, unavailable results, and typed COS/track-position/direction/physical-seat diagnostics, interpolation endpoints, uphill/downhill/floor behavior, a fused-rounding regression and mixed-precision distance. Input bounds and snapshot validation are evidence-tool policy. Full coaster/cart motion, original track data layouts, save linkage, complete controller lifecycle and Windows runtime equivalence remain unqualified.

The native boarding function0x3e2f8 removes guests FIFO from the pending ring, but car selection starts from an RNG-derived candidate and scans with wrap for available allowance. The ring helper therefore does not establish car/seat order. TOUR14 parameter0 changes positive occupancy into negative occupancy for type1 entries unless controller+52==3, connecting the already qualified reverse departure-slot arithmetic to an actual transition. Neither observation is a complete controller/admission implementation.

seat-native.json additionally pins the producer that filters20-byte runtime model attribute records by mask0x80 into carDefinition+44, one-based matching ordinal to raw index; +48 is the count. These are attribute indices, not hierarchy node IDs. The corpus tool reuses the existing PC model reader to record14 declared model bindings and selected attribute indices, unchanged between baseline and verified Patch2 despite two changed model identities. Per-train capacity+760 sums front/centre/rear role counts, then fleet capacity +792 multiplies by maximum trains. Two passenger-ID buffers per car remain separate from two-person seating. Native/file loader linkage, transforms and host visual ownership remain unsupported by this reference project.

Round6 independent review corrected the earlier MIN interpretation of the query and first capacity selection. controller-native.json now pins the comparison registers and selected pointers. Counterexample regressions failed before the fixes and pass in Debug/Release, including distinct definition/train upper caps. Global0 is used for the10/3 distribution example.

TopologyAuxiliaryOrdering.Check supplies one necessary serializer ordering prerequisite: exactly one ordinal2 node, with every preceding node filtered by descriptor flag0x10. The saver encounters the auxiliary block during its walk; the loader reads that single block before ordinary records. Ordinal2 may itself be filtered or visible. Missing/duplicate ordinal2 or any visible predecessor returns typed unsupported. Three synthetic groups test those boundaries. Passing checks only byte-placement ordering, not native initial nodes, count/storage bounds, nonempty saves, hierarchy or a decoder. No graph construction guarantee is asserted.

Source: tools/ppc-analysis/lanes/rides/controllers/README.md in the project repository.