acdream/docs/research/2026-07-02-r2-motiontable/Q0-pins.md
Erik dc54a3e41f docs(R2-Q0): motion-table research base + ambiguity pins
- r2-motiontable-decomp.md: 1,603-line verbatim extraction — full
  CMotionTable (GetObjectSequence all 4 class branches, get_link,
  is_allowed, re_modify, StopSequenceMotion, SetDefaultState, wrappers),
  the free functions (add/combine/subtract_motion, change_cycle_speed,
  same_sign), all 16 MotionTableManager members (pending_animations,
  add_to_queue, remove_redundant_links with the 0xb0000000/0x70000000
  block masks, truncate, AnimationDone vs CheckForCompletedMotions,
  PerformMovement with the 0x41000003 stop sentinel), MotionState's
  full modifier-stack/action-FIFO cast, verbatim struct layouts +
  constants table. BN mistypings identified (SurfInfo lookups are
  style_defaults/links hashes).
- r2-ace-motiontable.md: ACE cross-ref with the two-tracker headline
  (MotionTableManager UPSTREAM of MotionInterp — never merged) + 5
  flagged ACE oddities.
- r2-port-plan.md: 17 gaps (H1-H17), keep list, Q0-Q6 commit sequence,
  the MotionDone->R3 boundary contract.
- Q0-pins.md: A1/A2 pinned to ACE's reading (three corroborations;
  cdb confirmation folds into the next live session), A3 outTicks
  decode, A4 ACE-oddity adjudications (the Action-branch double-count
  is an ACE bug — do not copy), A5 Bitfield check at Q2.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 20:29:26 +02:00

43 lines
2.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# R2-Q0 — ambiguity pins and ACE-oddity adjudications
The verbatim extraction is `r2-motiontable-decomp.md` (1,603 lines, line-anchored);
the port plan with the full ambiguity table is `r2-port-plan.md` §0. This note
records the PINNED resolutions the Q1Q5 ports code against.
## Pinned
- **A1 — `get_link` branch predicate: PINNED to ACE's reading** ("EITHER speed
negative → swapped-key branch"). Three independent corroborations: ACE
`MotionTable.cs:395-426`; the working adapter's field-validated `GetLink`
(the reversed-key branch fixed the Ready→WalkBackward glitch); call-site arg
roles. The BN "both negative" reading is the same x87-flag-noise class as
`is_newer`'s garbled setcc and the R1 hook-direction swap. cdb confirmation
(bp `CMotionTable::get_link`, Ready→WalkBackward vs Ready→WalkForward)
folds into the next live retail session — non-blocking.
- **A2 — Branch-2 `signedSpeed`: PINNED to ACE** (`SubstateMod < 0 &&
speedMod > 0 → -speedMod`, the single-direction flip) pending the same cdb
session (golden: a Walk()→Walk(+) flip).
- **A3 — outTicks** = sum of each appended MotionData's `num_anims` (+ base
cycle in Branch 1/2) 1. The `action_head` rendering in BN is the packed
`num_anims` byte (decomp's own note).
- **A4 — ACE oddities adjudicated:** (1) Action-branch numAnims double-count =
ACE BUG, do not copy (retail sums outHop + actionLink [+ returnHop] only);
(2) `change_cycle_speed` old≈0 silent no-op = RETAIL (port verbatim,
including the gap); (3) `GetLinkData` 0xFFFF mask = ACE-only helper, not
ported; (4) `StopObjectCompletely` return = `finalStopOk ? 1 :
anyModifierStopOk`, port verbatim; (5) `re_modify` snapshot = deep-copied
MotionState used ONLY as the loop-termination bound — C# port deep-copies,
pops both, terminates on snapshot empty.
- **A5 — `MotionData.Bitfield`** (bit1 = substate-gated for `is_allowed`,
bit0 = clear-modifiers-on-entry): confirm on DatReaderWriter
`Types.MotionData` with a one-line Humanoid-table test at Q2.
## Q0 cdb capture (pending, non-blocking)
One live session feeds all R2 goldens: bp GetObjectSequence / get_link /
StopSequenceMotion / add_to_queue / remove_redundant_links /
truncate_animation_list / AnimationDone / CheckForCompletedMotions with
arg+ret logging (pattern `tools/cdb/l2g-observer.cdb`); protocol per
`r2-port-plan.md` §0. Until then Q2/Q3 rest on dat fixtures + synthetic
state tables + the archived 2026-05-03 walk→run trace golden (quoted in the
old Fix B comment block).