Skip to content

vehicle-dynamics-5

Choose a tag to compare

@lamb2k lamb2k released this 22 Nov 19:06
· 32 commits to main since this release
cc18a63

The half-pipe road shape in sh2z_vd_step2: a trough, the pipe's ground with the top open (it was treated as an open road).

  • Change: SH2Z_VD_SHAPE_HALF_PIPE takes the pipe's height, up vector, radial clamp and joins. The body leaves the surface when road_up . disp - tube.pipe_rim + sin(22.5 deg) * radius >= 0 (radius tapered by the share over a join), on the whole span rather than only over a join. Gravity acts along the road's up everywhere, also over a join, where the pipe blends it.
  • API: none changed. The shape is selected by the node's shape byte; the constants are the existing pipe_rim and the rule's fixed sin(22.5 deg). sh2z_vd_step (no tubes) is unchanged and still treats a half-pipe as open road.
  • Objects: 49 of the 51 SH-2 objects are byte-identical to the previous main's; the two tube objects change (sh2zam_vehicle_dynamics2.o and sh2zam_vehicle_contact2.o). No libc memcpy, memset or memmove.
  • Evidence: HOST: vehicle_dynamics2_exact, 438 checks under GCC, Clang and ASan/UBSan, with a rim oracle over a 360-position sweep, and 10 of 10 mutation controls caught. MODELLED: two new instruction-model scenarios, half_pipe_floor (mean 8,940.4 cycles a tick) and half_pipe_join (8,981.6), every tick checked word for word against the host build in the pinned Yabause interpreter; flat RAM, not Saturn timing. The existing step2 scenarios keep their ticks and results and move by about 0.2% at most in cycles, because the step2 object changed. CI on the merged head passes (host, SH-2 cross compile with the libc check, math lab, docs). No console run. Validation record.
  • Known, not changed: airborne_up overflows a signed integer when the gravity up vector is exactly (0, -1, 0); it predates this change and is shared by the tube shapes.
  • Merge: PR #78, merge cc18a63.
  • Guide: saturn/VEHICLE_DYNAMICS.md.