SOURCE DOCUMENT · 24 OCTOBER 2026
Plate-appearance reconstruction
# Plate-appearance resolution: recovered kernels and explicit gaps
Static research, 2026-10-24. Original ATR SHA-256 `2f94eb9a5fa06408c46ad24cf5b8d7398de195d7354f5734dea48c03045cca75`. No game patch, emulator operation, or Atari instruction execution.
## Status: this is not yet the complete engine
The new `PLATE_APPEARANCE_ENGINE.py` is a functioning **conditional state-transition engine**, composed with the unchanged `MATCHUP_CALCULATOR.py`. It calculates exact rational probabilities for reviewed branches, exposes continuation states and preserves the entire probability mass of unresolved branches. It does not invent the missing runner/throw calculations.
Substantial new closure is established: ordinary walks, strikeouts, triples, HR scoring; restricted single/double/groundball states; the HBP/balk/passed-ball/wild-pitch family; error-family state changes given effective fielding ratings; lineout double-play and popup/foul gates; and the previously recovered bunt, pitchout and intentional-walk diversions. With bases empty and supplied fielding ratings, all ten families have known **scoring/base/out transitions**. Some class-6 air-out labels remain unresolved as flyout versus lineout. With runners on first/second, several single/double/air-out/groundball branches still lack a verified complete joint translation.
Therefore `complete_game_state` and `complete_categories` are separate flags. A result can have exact scoring/base transitions but an `air_out_unspecified` component. `require_complete=True` refuses either unresolved transitions, an unexpanded continuation tail, or unresolved out taxonomy. This is a research engine with auditable coverage, not a claim that every requested final probability has already been recovered.
## Evidence and assumptions
Reused the saved assembly, instruction index, xrefs, existing math, bunt, positioning and fatigue reports. Only relevant handler/helper regions were decoded locally; the full reference was not regenerated. Existing instruction/data boundaries and inline operands were respected. All new mathematical claims refer to the original bytes; tests check key anchors directly against the ATR.
Resident address A has zero-based ATR offset A+`$7C10`; arithmetic addresses `$0C00–$11FF` use A+`$2110`. The appendix records semantic branch/RNG call sites by original address. Renderer and OS subgraphs are named boundaries, not falsely declared cycle-complete.
All numeric probabilities below require **independent uniform raw bytes at material RANDOM reads**, including rejection loops, positive acceptance probability and stable supplied record/header/action inputs. `$1091` returns `floor((bound+1)*R/256)` for the bounds used here; buckets are not automatically uniform. Tables use the original descending scans. No software PRNG, POKEY cycle model or hardware correlation model has been invented. A non-IID hardware model is explicitly rejected by the API.
Confirmed means locally supported instructions/state operations; conditional means a probability under these assumptions; unresolved means some required dependency, joint distribution or semantic classification remains missing. No modern baseball rule is added to repair a strange original result.
## 1. Shared state and runner operations
`$B1` offense, `$B2` defense, `$B3` combined action, `$DB` initial class, `$A8` outs, `$D6` base mask (1 first/2 second/4 third). Native roster slots are `$B4…$B8` (batter,first,second,third,home staging); parallel display identities `$B9…$BD` must not be confused with roster indices. `$1D0A…$1D0D` cache batter/runner speeds. `$CA/$CB` are retained count-related bytes; they are not a complete pitch-by-pitch modern count model.
`$31F8` consumes one inline byte: X=low3bits, Y=(byte>>3)&7; bit7 selects helper. `$313E` shifts the group above boundary X by Y bases; `$3173` moves the specified player from slot X for Y steps, recursively forcing occupied destinations. `$3228` credits a staged home runner only when `$A8<3`, then removes that staging slot. `$3262/$3272` remove retired identities/graphics; at exactly three outs the native code can retain stale slots. The Python representation clears/strands bases at an inning-ending out and never calls a transient slot write a live batter reach.
| Inline byte | Reviewed interpretation / use |
|---|---|
| `$08` | All, including batter, forward one |
| `$09` | Existing runners forward one; batter stays at plate |
| `$10` | All, including batter, forward two |
| `$11` | Existing runners forward two |
| `$88` | Batter forward one, force occupied destinations; ordinary walk |
| `$90` | Batter forward two, force destinations |
| `$98` | Batter forward three, force destinations; triple at `$646B` |
| `$A0` | Batter forward four, force destinations; HR at `$57D0/$583E` |
| `$0A` | Group above boundary2 forward one; single extra advance `$5FCD` |
| `$8B` | Player in slot3 advances one, forcing destination; air-out advance `$52FE` |
**Byte verification matters:** the triple operand is `$98`, not `$18`. Both would suggest three bases superficially, but they select different helpers. The final triple projection scores all existing runners and places the batter third; the implementation does not substitute a guessed opcode/operand for the native byte.
The representation tracks runner identities/speeds, meaningful bases, outs, scored/retired identities, movements, batting score byte, hit/error counters and E0/tenure counters. Retired player/runner identities are distinct from the event name: a double plus a runner thrown out must not be reduced to a batter groundout. Unknown such transitions retain unresolved mass.
## 2. Ten handler traces
### Class 0 — ordinary walk, `$647C`
Increment E0 and `$04C4+A6`; `$6487` samples the descending table at `$3561` (`03 02 00`). Its branches and `$47BE` draws choose wording/animation; all converge at `$64B6 -> $31F8/$88`. Batter first, only forced runners advance, loaded bases score one, no out. There is no recovered second “ball four succeeds” roll. This family is a completed walk on this path; its **overall PA frequency** still differs from its one-selection mass when earlier selections can continue.
### Class 1 — strikeout, `$633C`
`$633C` increments outs once. Table `$3568` (`03 02 00`) and `$6345/$6354` distinguish narration. `$6372` removes the batter. `$6377–$63AD` are occupied-base/third-out display conditions and catcher/ball animation, not dropped-third-strike chances. No runner advancement or additional out was recovered here. E0/tenure do not increment. The engine resolves this for every base mask; a third out strands runners, scores none on this path and ends the PA.
### Class 2 — single family, `$5E4E`
Hit and exposure counters increment before subtypes. Defense<6 selects `$356B=04 02 00`; defense>=6 selects `$356E=04 01 00`. `$5E74` dispatches `$5F62,$5FD2,$5E7D` with exact conditional byte counts:
| Entry | Normal | Corners/infield |
|---|---:|---:|
| `$5F62` | 51/256 | 51/256 |
| `$5FD2` | 102/256 | 153/256 |
| `$5E7D` | 103/256 | 52/256 |
`$5F62`: trajectory/rejection checks `$5F6F/$5F75`, raw draw at `$5F83` split by85/170, and eventual `$5FB7/$08`. `$5FBB–$5FCD` can advance the group above second again based on outs, offense4 and trajectory D7.
`$5FD2`: table `$3571=09 07 00` dispatches `$6008,$6023,$5FE0` with masses25/256,51/256,180/256. Its field/throw branches include `$6010`, `$6037`, `$6042`; it eventually reaches `$6087/$08` or shared `$6587`.
`$5E7D`: trajectory/animation, `$5E94` checks D7=3, `$5E98` samples a four-way table, and `$5EA5/$5EB4` compare base mask/combined action. The sign test at `$5EC8` changes the throw sequence; `$5EFE/$5F1D` advance existing runners two and `$5F02/$5F21` force the batter first. Other dispatches reach `$6587`.
`$6587–$6634` depends on offense, D8/D7, occupied first/second, outs and runner speeds. It can advance one/two bases or call `$64BB` to risk an out, then forces the batter first. Therefore with existing runners a selected single is not just “everyone advances one”; a final outcome can include a credited hit and a runner out. Full translation of that joint closure is unresolved.
**Closed subset:** if neither first nor second is occupied, all reviewed paths put the batter first, score any runner on third, add no outs and credit one single-family hit. No optional throw can retire an existing first/second runner that is absent. The engine labels `single` only for this explicitly closed state subset, not for arbitrary initial single selections.
### Class 3 — double family, `$4D83`
Credits one hit/exposure. Table `$3574=04 03 00` dispatches `$4E27,$4DA8,$4E8D` with51/256,51/256,154/256.
* `$4DA8`: choose D9 from `$4E25` using raw bit0; `$4DC0` has85/170 narration/throw splits. With first occupied, `$4E08` sign selects between two-base advancement and `$5054` runner attempt; otherwise `$4E0D/$10`.
* `$4E27`: two bounded narration draws `$4E2E/$4E3F`, then `$4E67/$4E70` tests first occupancy and a sign bit to choose `$4FB3` or `$5054`.
* `$4E8D`: trajectory rejection of D9=$54; D9=$49/$5D takes `$4ECA`; otherwise `$3577=09 08 04 03 00` dispatches five subentries `$4F7D,$4F6C,$4F27,$4F05,$4EE8`, conditional masses25,26,102,26,77 out of256.
* `$4F27` can choose `$5054` when first is occupied using threshold51. `$4FB3/$4FFB` distinguishes occupied first, D7=4 and offense. Inline runner sequences at `$500B/$500F,$5016,$503E/$504A` are materially different. `$5054` reaches `$64BB` and can produce an extra runner out or score.
**Closed subset:** with first unoccupied, reviewed exits converge to batter second; existing runners on second/third score; no out. With first occupied, actual advancement/throw fate needs the joint D7/D8/metadata and rating/speed calculation, so the module retains the whole class mass as unresolved. It does not manufacture a “double success probability.”
### Class 4 — triple family, `$63B5`
Credits hit/exposure. Trajectory selection `$63D0`, raw threshold85 at `$63DB`, masked-bit narration draw `$63FA`, and D8 comparison with90 at `$6414/$644B` determine paths/throws. Both arms converge at `$6461` and `$646B/$98`, then presentation `$4AC2` and return. No further out/advance contest is present in those arms. Final projection: batter third, all previous runners score, no outs, one triple. Speed/fielding effects cannot be inferred from a described throw that never changes this projection.
### Class 5 — HR family, `$5707`
Credits hit/exposure. `$5715` chooses trajectory; `$571A` samples bound4. For D9=$54, `$5727/$572B` reject some draws by returning to `$5710`, which resamples the trajectory too. Thus a naive uniform outfield-trajectory calculation is incorrect.
After `$5735 -> $307F` metadata remapping, D9=$49/$5D goes to `$576A`; other cases test speed>=4 and R<10 at `$5749–$5757` for the `$57D5` inside-the-park presentation. Raw85/170, sign, bound1 and comparison with `$DC` select further descriptions at `$575A,$576A,$576F,$5781,$578D,$57B7`.
**All reviewed paths converge to** `$57D0/$A0` or `$583E/$A0`: batter and all existing runners score, no out, one HR. The code closes the **aggregate scoring/HR** transition. It does not yet report exact over-fence versus inside-the-park subtype probabilities: those require the rejection/remapping joint distribution. Batter speed affects a real subtype branch but not the aggregate final scoring state here.
### Class 6 — mixed outs, `$5B51`
`$357C=09 08 04 00`, draw U=floor(10R/256), dispatches:
| Entry | U | Exact byte mass | Play family |
|---|---|---:|---|
| `$5B67` | 9 | 25/256 | Lineout; possible first-base double-off |
| `$5C0D` | 8 | 26/256 | Pop-up/foul family |
| `$5259` | 4…7 | 102/256 | Air-out cleanup plus further trajectory/tag-up handling |
| `$5CBA` | 0…3 | 103/256 | Shared groundball resolver |
**Lineout:** one out at `$5B6C`. Third out bypasses double-off decisions. Otherwise first must be occupied, D8<50, and offense0/1 at `$5BA6–$5BB7`. `$4886` with carry set selects positions3…6 in equal raw-byte buckets; only3/4 pass D8<50. The sign test `$5BB9` then gates the attempt; `$5BD8` or `$5BEF` supplies the final sign test before `$5BF9` adds another out and removes first. Under IID bytes, conditional double-play probability=1/2×1/2×1/2=**1/8** if first occupied and fewer than two outs, else zero for the implemented offense0. Other runners hold. Within class6, multiply by25/256.
**Pop/foul:** `$5C1D` R>=85 gives fair popout, one out and runners hold. R<85 enters foul path `$5C51`, increments CB at `$5C56`, samples bound4 for a field/location value, then `$5C73` sign determines catch versus uncaught. Catch adds one out through `$5C34`; uncaught clears C3 at `$5CAE`, increments CB **again** at `$5CB1`, and returns with batter active. Conditional on this pop/foul family:
```
fair popout = 171/256
caught foul = 85/512
uncaught foul continuation = 85/512
```
Uncaught ordinary foul therefore changes CB by2, not1. It is not automatically a third-strike out; no such check exists in this path. Caught foul changes CB by1. CB byte wrap is retained. This matters if a player later changes to bunt, whose foul path does compare the retained counter.
**Air-out family `$5259`:** already adds one out/removes batter, then `$3580=04 03 00` selects `$5395,$5303,$5298` (51,51,154 out of256). Subpaths include bloopers, lines/fly descriptions, trajectory rejections, depth conditions, first-/third-runner animations, threshold153 at `$52EE` and optional `$64BB` tag-up risk. With no runners—or an inning-ending out—the scoring/base projection is known. The API calls it `air_out_unspecified`; a universal flyout/lineout taxonomy is **not** assigned from that entry or its random adjectives alone. With runners and fewer than two outs, the full transition is unresolved.
### Class 7 — HBP/interruption, `$506C`
Exposure counters increment **before** the branch. With no runners, jump directly to `$507E`: HBP, force advancement `$5097/$88`, completed PA. With runners, `$5077` R>=219 selects HBP (37/256). R<219 enters `$509C`: C3=0, batter stays active. `$50A2` R>=192 selects balk; otherwise the passed-ball/wild-pitch path uses a second byte threshold51 at `$50D6`. Text records752…755 identify time/balk/PB/WP; the final ADC selects PB for51 bytes and WP for205.
Conditional on class7 with runners:
```
HBP, terminal = 37/256
balk, continuation = (219/256)*(64/256)
passed ball, continuation = (219/256)*(192/256)*(51/256)
wild pitch, continuation = (219/256)*(192/256)*(205/256)
```
All three continuations advance **existing runners** one base through `$50F3/$09` and leave the batter at the plate. Third can score, but this does not complete the PA. Foul/ball bytes are not changed on these arms. Exposure counters still rise. The module resolves all masks, including repeated interruptions followed by re-selection with the changed base state. It does not count three advance events as three HBP PAs.
### Class 8 — error family, `$50F8`
This is a weighted rejection sampler, not a test that can turn the initial error class into a clean out. First draw `U24=floor(24R/256)` and descend Y from8 using table `$524F+Y`; accepted candidates are positions3…9. Exact candidate raw-byte masses are:
| Position | 3 first | 4 second | 5 third | 6 short | 7 LF | 8 CF | 9 RF |
|---|---:|---:|---:|---:|---:|---:|---:|
| Candidate count /256 | 32 | 64 | 32 | 64 | 22 | 21 | 21 |
`$510B -> $4683` gets effective fielding rating r in0…3; table `$524D` gives thresholds `[10,9,7,5]`. The next U10 must be below that threshold or the **whole fielder selection repeats** at `$511F`. Passing byte counts are `[256,231,180,128]`. Under IID rejection draws:
```
P(fielder=p | error accepted) = candidate_count[p]*pass_count[r[p]]
/ sum_over_positions(candidate_count*pass_count)
```
Then `$5127` increments defensive errors. Positions3…6 eventually use `$51A0/$51E1/$08`: all advance one including batter. Other raw splits/throw wording in those paths change no recovered outs/advancement result. Positions7…9 use `$5247/$10`: all advance two. No hit/exposure increment occurs in this error family. **Fielding ratings change error location and one-/two-base mix, not whether class8 eventually credits an error.**
The engine requires the effective `$4683` return per fielding position; it never supplies guessed default ratings. `effective_fielding_rating(record,position)` translates the selected fielder's record16 rating bits and record18 position nibbles (`$46B0–$46CC,$3E1E`), including generic IF10/OF11 and unqualified0. Lineup/header selection must supply the correct fielder record; the module does not infer it from an unrelated hitter/pitcher input.
If all effective ratings are equal, rejection preserves the candidate mix: 3/4 one-base errors,1/4 two-base errors. If infield ratings0 and outfield3, two-base-error conditional mass is1/7. If ratings are missing, the complete initial error-class mass remains unresolved rather than silently assuming “average defense.”
### Class 9 — groundballs, `$5CBA`
An out is provisionally added at `$5CC2`. `$5CCE` R<32 chooses pitcher context; otherwise `$48B9` chooses an infielder/trajectory, with extra rejection near `$5CD8` for the saved context. `$5CFC–$5E4A` route by outs, base mask, offense and B3. Key material paths are:
* Empty bases: first-base cleanup `$549D/$54C2`, always one batter out. Closed.
* With two outs and first empty: cleanup ends inning, batter out, no runs. Closed. With first occupied, force-versus-batter-out identity still needs the joint route; not silently labeled a batter groundout.
* `$5526`: `R&3` gives1/4 force path `$54E4`,1/2 `$5613` potential DP,1/4 first-base cleanup.
* `$5613`: first-baseman context tests U10 against `$4683(A=2)`; other contexts use ratings queried with A3/A5 and batter speed. Let k=7/8/9 for rating sum below/equal/above4; threshold=(k−speed) mod256. U10<threshold leads to `$56AB` DP; other side `$5664` retires the lead runner instead. Exact probability must include which contexts reach this routine.
* `$559D` distinguishes corners-in; `$55FA` combined-action parity distinguishes infield-in in some first+third contexts. These are actual transition effects, not only display masks.
* `$6636` cancels the provisional out, builds a threshold from third-runner speed plus trajectory/base-mask bonuses, and compares U10 at `$6678`. Success can score the runner with batter reaching; failure restores an out. Further loaded-base branches `$66A8–$6700` can retire lead runner and/or batter using another fielding/rating decision.
Full routing details are also preserved in `SURPRISE_BUNT_GAME_THEORY.md`. The new module intentionally leaves occupied-first/other live-runner joint groundball distributions unresolved. Knowing one local U10 threshold does not establish the probability of entering its context or justify multiplying unrelated marginal draws.
## 3. Shared runner-attempt calculation, important unresolved joint input
`$64BB` derives an effective fielder/rating through the position mapping at `$657D` and `$4683`. For r>0, threshold=(selected runner speed+4−r) mod256. For r=0 and speed1…5, the native lookup gives `[8,8,9,10,10]`. `$6558` samples U10; below threshold is safe, otherwise `$656C` adds an out and removes home staging or third. The comparison is precise; the state being tested depends on entry through class3, class6, single subtypes and prior `$09/$11/$328E` operations.
`$6587` also has a two-out speed+4 test, command-specific safe/aggressive choices, a speed5 special branch, and a raw threshold51 before some throws. These are genuine speed/fielding/outs effects. They have not been collapsed into a universal “runner advances with probability p” function. Missing closure is specifically the **joint trajectory/metadata, selected runner, preparatory movement and rating lookup**, not an arbitrary unknown constant to fill in.
## 4. Variables: outcome effects versus presentation
| Variable/input | Material effect established | Limit |
|---|---|---|
| Batter speed | Bunt gate; groundball DP threshold; HR subtype branch | HR aggregate scoring still converges; not a universal batting-average factor |
| Runner speeds | `$64BB/$6587/$6636` extra advances/home plays | Need actual runner identity, not batter speed reused |
| Effective fielding ratings | Error fielder rejection/mix; DP/throw success | Need selected fielders/lineup, not an invented team average |
| Handedness | No separate coefficient in the newly closed state kernels | Graphics/trajectory context elsewhere does not establish global handedness irrelevance |
| Defense6/7 | Initial single bonus; subtype tables; groundball branches | Same direct bunt penalty, different swing routes |
| Outs | Third-out suppression/stranding; double-play eligibility; tag-up/advance routing | Native temporary out increments must be accounted for once |
| Base mask and runner identities | Forces, HBP vs interruptions, double-offs, runner attempts | A hit plus runner out is not an ordinary batter out |
| Offense command | Diversions, runner-risk strategy, bunt/sacrifice/steal/hit-and-run | General offense1…4 not yet implemented as full action kernels |
| Ordinary pitch1…4 | No distinct coefficient in the reviewed kernels; initial math equal at fixed records | Full live timing/alias equivalence remains unproved |
| CA/CB and C3 | Pitchout state; continuation retention; foul/bunt interactions | Printed count is not a separate pitch-level simulator |
| E0/tenure, hits/errors, score | Authoritative updates; can influence later AI management | Fixed-action conditional solver freezes external substitutions/management |
| D7/D8/D9, DC/DD, animation context | Trajectory/fielding/throw inputs in several handlers | Cannot blanket-label commentary harmless |
In particular `$47BE` consumes random bytes for variants and `$47F6` writes DC/DD. `$307F` reads those message/animation indices and can remap D8/D9. Some presentation choices therefore feed later routing. Conversely the many narrative branches in walk/K/triple/HR do not change their proved aggregate state projection. “All narration is cosmetic” and “every random draw changes batting probability” are both wrong.
Graphics and animation routines also read hardware randomness, notably near `$2015/$201F/$2031/$2042`. They affect phase/correlation even when no additional mathematical coefficient changes. The engine integrates equivalent narrative branches under the IID assumption; it does not preserve CPU-cycle execution.
## 5. Continuations and action dispatch
`$3F86–$3F94` retains count bytes when C3 is clear and the batter remains active, resetting when selecting a new batter. `$4760` advances batting order according to the turn-completion flag. The Python APIs distinguish `pa_complete=False`, partial advancement/runs and unresolved mass; they never reclassify a continuation as a completed PA.
Pitchout defense5 for supported offense0/5/6 bypasses initial class selection at `$4714 -> $5A62`. CA0/1 walk threshold0; CA2 threshold9 passes231/256 bytes; CA3 threshold10 passes all bytes. Failures increase CA and clear C3; success forces runners via `$5A99/$88`. CA>3 is outside the reviewed table and remains unresolved. These special walks bypass ordinary walk exposure increments.
Defense8 intentional walk branches earlier at `$41AB -> $5A3F`, forces runners and completes the PA, also without ordinary walk counter increments. Offense3 steals have a different earlier diversion; the API does not incorrectly treat every defense5 matchup as the same pitchout kernel when offense3 is selected.
Offense5/6 bunt gates and outcome tree are reused mathematically from the preserved bunt research and tested against `BUNT_ALGORITHMS.py`. The local adapter avoids changing that module's older import convention. It maps credited hits, sacrifices, FCs, third-runner lineout DPs and fouls into runner states. It additionally preserves the actual raw CB increment/comparison for inherited CB>2, including255→0 wrap. Sacrifice with empty bases remains invalid original input, not a newly invented restriction.
`resolve_plate_appearance` is a **fixed-policy** calculation: the same actions and initial record/header masses are supplied after every continuation. It does not assume the original AI necessarily leaves the same pitcher in after an exposure event, or solve the two-player decision at every intermediate count/base state.
It also assumes the outer driver does not end the game between selections. `$3EF2–$3F55` checks outs/inning/scores after handlers; a runner scoring on an interruption can end the game while the batter's PA has not completed. The current state does not include opponent score/inning/walkoff eligibility and does not invent that game-level termination. Use these conditional PA kernels in a nonterminal game context, or add the original driver before evaluating such game situations. A score byte alone is insufficient for win probability.
For bases-empty offense0, the only recovered continuation is the uncaught foul. Its conditional class6 probability is1105/65536. If initial class6 mass is m6, p=m6*1105/65536. Remaining probability-relevant state is unchanged under the fixed-input/IID model. The solver sums geometric re-selections exactly: each terminal or unresolved absorbing branch mass is divided by1−p. CB/CA are marginalized/reset for terminal new-batter states; this is not a claim about the distribution of the last raw CB byte.
For other states, the solver expands a specified number of selections. Any remaining continuation is returned as `continuation_horizon`, **not normalized away**. Equivalent state paths are combined exactly with Fractions; accumulated runs/retired identities and event/exposure counters are preserved. Callers can value intermediate runs plus the continuation state in a future game-theory calculation rather than assuming the batter finished.
## 6. Concrete distributions and boundaries
### Original static fixture, bases empty, zero outs, all effective ratings2
Use the saved CAREW/FELLER fixture, common header and normal defense: initial counts `[25,14,62,13,4,4,121,4,6,3]`. These are disk fixtures, not a live-game validation. Supply effective fielding returns2 at all nine positions as an **explicit game-state assumption**.
One-selection foul-continuation mass is `133705/16777216` =0.796943902969%. Geometric re-selection gives the following exact conditional PA marginals; bases empty implies no pre-existing runner advances/runs. A triple leaves batter third; double second; single/walk/HBP first; HR scores one; an error leaves batter first with conditional probability3/4 or second with1/4. Every resolved out adds one out.
| Completed event / known state family | Exact probability | Percentage (conditional IID model) |
|---|---|---:|
| walk | 1638400/16643511 | 9.84407677% |
| strikeout | 917504/16643511 | 5.51268299% |
| single | 4063232/16643511 | 24.41331039% |
| double | 851968/16643511 | 5.11891992% |
| triple | 262144/16643511 | 1.57505228% |
| home_run | 262144/16643511 | 1.57505228% |
| lineout | 774400/16643511 | 4.65286441% |
| pop_out | 59774/1849279 | 3.23228675% |
| foul_out | 133705/16643511 | 0.80334612% |
| air_out_unspecified | 1053184/5547837 | 18.98368680% |
| groundout | 3387136/16643511 | 20.35109058% |
| hit_by_pitch | 262144/16643511 | 1.57505228% |
| error | 131072/5547837 | 2.36257842% |
These sum to100% under the stated model, with `complete_game_state=True`, but `complete_categories=False`: the `air_out_unspecified` component is **not** silently called flyout or lineout. It cannot answer the requested fully separated flyout/lineout percentages yet. This is more specific than calling all later behavior unknown, and narrower than claiming a complete scoring taxonomy.
If fielding ratings are omitted, initial error mass6/256 remains unresolved; the completed-PA unresolved mass is larger after accounting for foul re-selections. The program never renormalizes the other outcomes to hide it.
### Same fixture with first occupied
At zero outs and with effective ratings supplied, known completed/continuation/unresolved one-selection masses are:
| Component | Exact mass | Percentage |
|---|---|---:|
| Known completed | 4957367/16777216 | 29.54820991% |
| Known continuation | 357961/16777216 | 2.13361382% |
| Unresolved transition | 44773/65536 | 68.31817627% |
Unresolved pieces are the full initial single62/256, double13/256, mixed-air contribution `(121/256)*(102/256)`, mixed-ground contribution `(121/256)*(103/256)`, and direct groundball3/256. Each returned `Unresolved` entry includes addresses and a reason. There are still exact conditional walk/K/triple/HR/error/HBP/pop/lineout transitions; they are **partial unconditional contributions**, not a complete normalized final-PA distribution.
## 7. API and future strategy matrix
```python
from reverse_engineering.MATCHUP_CALCULATOR import (
BatterStats, PitcherStats, STORED_BASELINES, calculate_matchup,
)
from reverse_engineering.PLATE_APPEARANCE_ENGINE import (
Runner, GameState, Actions, resolve_selection, resolve_plate_appearance,
)
initial = calculate_matchup(
BatterStats(626,175,83,187,31,8,45),
PitcherStats('174.1',154,37,174),
STORED_BASELINES['stored-common'], ip_policy='floor',
)
state = GameState(Runner('batter',5), fielding_ratings=(2,)*9)
step = resolve_selection(state, Actions(0,1), initial)
pa = resolve_plate_appearance(state, Actions(0,1), initial)
print(pa.to_dict()) # explicit completeness flags and exact fractions
```
Interfaces:
* `resolve_initial_class(c,state,actions)` conditions on a class; it does not resample the initial byte.
* `resolve_selection(state,actions,initial)` returns one accepted-action kernel. `initial` is a `MatchupResult` or ten byte counts summing256, not six weights. A supplied result's defensive position must match the action.
* `resolve_plate_appearance(...,max_selections=8,require_complete=False)` returns exact known terminal marginals and explicit unresolved/remaining continuation masses. `require_complete=True` raises `IncompleteEngineError` with the result attached when requested completeness is unavailable.
* Each `WeightedOutcome` includes probability, event kind, projected state, scored/retired IDs, movement destinations, PA-completion flag, credited hit bases, added errors and evidence sites. `Distribution.event_probabilities()` includes completed events only and may sum below1. It is never a conditional-on-resolved renormalization.
* `complete_game_state` excludes unresolved transitions and outstanding continuations. `complete_categories` additionally excludes the unresolved air-out taxonomy. An `air_out_unspecified` is a known completed out/state, not a new Atari rule.
* Terminal states mark `batter_active=False`; choose the actual next batter, reset/retain relevant inning state and mark them active before another PA. The module does not invent a batting order or silently start a new half-inning. In `resolve_selection` raw count changes are retained; terminal PA marginals project the new-batter count reset.
Supported action configurations are swing0 with defense1…4/6/7, existing sacrifice5/surprise6 kernels, and the reviewed pitchout5/IBB8 diversions. Other offense1…4 entries return unresolved rather than guessed matrix values, subject to original empty-base input restrictions. These explicit action keys and joint state outcomes are suitable for a future strategy/payoff matrix **once its missing cells are recovered**. The present module computes neither run expectancy nor win probability and does not select optimal plays.
## 8. What still prevents general completion
| Missing closure | Exact sites | Required state/evidence |
|---|---|---|
| Single runner advances/throw outcomes with first or second | `$5EA5,$5EB4,$5FBB,$6037,$6587,$64BB` | Joint trajectory/remap, selected runner, speeds, effective rating and preparatory movement |
| Double with first occupied | `$4E02,$4E67,$4F5F,$4FFB,$5054,$64BB` | Which gap/trajectory/throw route, first-runner destination/retirement, outs |
| Air-out tag-up and exact fly/line classification | `$528F,$5298,$5303,$5395,$52D3,$52EE,$64BB` | D7/D8/DC remap, action, actual runner attempt, defensible taxonomy |
| General groundball joint kernel | `$5CFC–$5E4A,$5526,$55A9,$559D,$5613,$6636–$6700` | Base/outs/actions, trajectory rejection, lookup returns, speed tests and sequencing |
| HR subtype frequency | `$5710,$5727,$5735,$5749,$576A` | Accepted trajectory distribution after rejection and `$307F` remap; aggregate HR scoring already closed |
| Full lineup-to-fielding lookup integration | `$4683,$3E1E`, header positions and player indices | Actual defending lineup/header and raw selected player records |
| General offense1…4 | `$4708,$6092`, shared helpers | Action-specific steal/hit-and-run/running policy, count/base state |
| Outer game termination and pitcher/lineup policy | `$3EF2–$3F55,$3A94,$594C` | Inning/opponent score, game-end eligibility and intervening AI/human decisions |
| Live randomness / full effective-address proof | `$D20A`, renderer/interrupt/loading boundaries | CPU-cycle state, POKEY configuration, alias and runtime overlay traces |
The appended ledgers expose every conditional branch and RNG call in the scoped semantic handler graph, including unresolved branches. Those addresses are not a claim that every branch has a verified final-state formula. Original-byte traceability is kept separate from semantic completion.
## 9. Validation and targeted debugger comparisons
Static tests cover all base masks for forces/triples/HR, third-out suppression and stranding, restricted hit closures, HBP/advance continuations, CB changes, lineout DP1/8, weighted error rejection, fielding-bit extraction, exact geometric foul sums, counter/score updates, pitchout/IBB diversions, prior bunt-probability agreement, invalid inputs and retained unknown masses. Key original operands/tables are checked directly against the fingerprinted ATR. This is **not** native emulator validation.
Next Altirra experiments, not performed:
1. At `$475D/$4770`, force/capture each class for every base mask and outs0/1/2. Break at runner calls `$31F8`, scoring `$3228`, removals `$3262`, hit/error/outs increments and return `$4760`. Record actual player IDs and raw slots separately from graphics.
2. Class6: force descending-table boundary values3/4,7/8,8/9; force popup R84/85 and foul sign127/128. Watch CB at `$5C56/$5CB1` and C3. Verify uncaught foul retains the batter with CB+2, including overflow; do not infer a third-strike rule from narration.
3. Class7: with empty/occupied bases, test R218/219, then R191/192, PB/WP50/51. Watch force88 versus group09, scoring, C3 and E0/tenure. Verify runners can score while batter remains active.
4. Errors: capture candidate index, effective rating and U10 at `$5107/$510B/$511A`; test gate boundaries for r0…3. Verify failed gate redraws a fielder, and all accepted paths increment an error. Compare infield/outfield09/10 advancement with two outs and runners on all bases.
5. Singles/doubles: systematically log all entries to `$6587/$64BB` with D6/D7/D8/D9/DC/DD, C5/C7/C8, speeds and rating return. Force local U10 just below/at threshold. Resolve exactly which player has already moved before a throw and which is removed on failure.
6. Groundballs: force pitcher/nonpitcher raw31/32, each base mask, code559D defense6 versus7, DP gates and loaded home-play branches. Watch provisional A8 increment/cancel to avoid adding a phantom out or suppressing/crediting the wrong run.
7. HR/triple: verify both final A0 calls and triple98. Capture accepted/rejected D9=$54 trajectories and DC-based `$307F` remap; compare speed3/4. Test whether the subtype changes any authoritative state beyond the proved aggregate, rather than counting animation as an extra random contest.
8. Animation/alias audit: log all RANDOM reads with cycles and all writes to authoritative state from display routines. Replay supplied decision bytes separately from live timing; only then assess independence assumptions or ordinary-pitch equivalence.
Validation: all 17 new tests pass. Full discovery ran 70 tests: 69 passed; the sole failure is the previously documented frozen RESEARCH_INDEX.md hash in test_bunt_algorithms.py after the user-authorized index updates. That old test/manifest were preserved rather than rewritten. Existing arithmetic/fixture/calculator/reference checks pass. New checks include all 8 base masks and 3 out states, exact conditional kernels, prior bunt-model agreement, eight original table/operand byte groups and package-import/report example use. Scoped ledgers retain 394 conditional-branch and 111 RNG-call entries counted across classes with shared-site repetitions; these are not execution-coverage statistics. No native debugger comparison has yet been performed.
## Appendix A. Scoped semantic graph and branch/RNG ledgers
The following are generated from the existing saved bytes using the research decoder only. Conditional branch operands, inline data skips, direct tail jumps and the known dispatch tables are followed. Common runner operations, arithmetic, rating lookup and presentation routines are explicit boundaries; they are explained above or in prior references. Renderer internals/OS/interrupts are not expanded, so this is not a whole-machine execution graph. `$307F,$4886,$48B9,$48E2,$64BB,$6587` and shared groundball helpers are included where reachable.
For each listed native instruction, ATR offset is address+`$7C10`. Each ledger preserves the opcode bytes and branch target; it does not fabricate instructions across data/unknown dispatches. The additional RANDOM calls inside `$47BE` (`$47D3`) and rendering remain shared timing draws even when omitted from per-handler material-call lists. The initial draw at `$0CDA` is outside these post-selection ledgers.
### Class 0, entry $647C
26 instruction starts in this scoped graph; 2 conditional branch sites; 1 material/helper RNG call sites. Repeated sites in shared helpers are deliberately repeated per class.
Boundary targets: $10A6, $21D6, $31F8, $47BE, $47F6.
No unresolved direct/table edge inside the stated scope; semantic boundary calls remain outside this graph.
| Native call site | ATR offset | Bytes | RNG helper |
|---|---|---|---|
| $6487 | $00E097 | 20 A6 10 | $10A6, descending table |
Conditional branches (native address: original bytes, instruction, target):
~~~text
648C: F0 14 BEQ 64A2
6498: F0 0D BEQ 64A7
~~~
### Class 1, entry $633C
48 instruction starts in this scoped graph; 5 conditional branch sites; 1 material/helper RNG call sites. Repeated sites in shared helpers are deliberately repeated per class.
Boundary targets: $10A6, $21D6, $2E71, $3262, $47BE, $47F6.
No unresolved direct/table edge inside the stated scope; semantic boundary calls remain outside this graph.
| Native call site | ATR offset | Bytes | RNG helper |
|---|---|---|---|
| $6342 | $00DF52 | 20 A6 10 | $10A6, descending table |
Conditional branches (native address: original bytes, instruction, target):
~~~text
6347: F0 15 BEQ 635E
6354: F0 0D BEQ 6363
6379: D0 32 BNE 63AD
637F: F0 2C BEQ 63AD
63AB: 10 DE BPL 638B
~~~
### Class 2, entry $5E4E
467 instruction starts in this scoped graph; 50 conditional branch sites; 17 material/helper RNG call sites. Repeated sites in shared helpers are deliberately repeated per class.
Boundary targets: $0EF0, $0F49, $1034, $1091, $10A2, $10A6, $23F5, $2E71, $2EDF, $3129, $313E, $31F8, $3228, $3262, $328E, $32B2, $339A, $33A9, $3406, $3447, $4683, $47BE, $47F6, $4836, $48AB, $4932, $4AC2.
No unresolved direct/table edge inside the stated scope; semantic boundary calls remain outside this graph.
| Native call site | ATR offset | Bytes | RNG helper |
|---|---|---|---|
| $488A | $00C49A | 20 91 10 | $1091, bounded scaler |
| $4898 | $00C4A8 | 20 91 10 | $1091, bounded scaler |
| $48A4 | $00C4B4 | 20 91 10 | $1091, bounded scaler |
| $48BB | $00C4CB | 20 91 10 | $1091, bounded scaler |
| $48D3 | $00C4E3 | 20 91 10 | $1091, bounded scaler |
| $5E6D | $00DA7D | 20 A6 10 | $10A6, descending table |
| $5E9A | $00DAAA | 20 91 10 | $1091, bounded scaler |
| $5EC8 | $00DAD8 | 20 A2 10 | $10A2, raw byte |
| $5F83 | $00DB93 | 20 A2 10 | $10A2, raw byte |
| $5FD6 | $00DBE6 | 20 A6 10 | $10A6, descending table |
| $6037 | $00DC47 | 20 A2 10 | $10A2, raw byte |
| $6042 | $00DC52 | 20 A2 10 | $10A2, raw byte |
| $6527 | $00E137 | 20 A2 10 | $10A2, raw byte |
| $6558 | $00E168 | 20 91 10 | $1091, bounded scaler |
| $65CB | $00E1DB | 20 91 10 | $1091, bounded scaler |
| $65F3 | $00E203 | 20 A2 10 | $10A2, raw byte |
| $6614 | $00E224 | 20 A2 10 | $10A2, raw byte |
Conditional branches (native address: original bytes, instruction, target):
~~~text
3088: D0 0A BNE 3094
308F: F0 04 BEQ 3095
3092: 10 F8 BPL 308C
309C: B0 01 BCS 309F
4894: 90 0C BCC 48A2
48CF: F0 01 BEQ 48D2
48E9: 90 01 BCC 48EC
48F6: F0 04 BEQ 48FC
48F9: 10 F8 BPL 48F3
5E67: 90 04 BCC 5E6D
5E96: F0 0D BEQ 5EA5
5EAC: D0 03 BNE 5EB1
5EB2: 10 F5 BPL 5EA9
5EBB: D0 03 BNE 5EC0
5EC1: 10 F5 BPL 5EB8
5ECB: 30 1E BMI 5EEB
5F73: F0 F2 BEQ 5F67
5F79: F0 EC BEQ 5F67
5F88: 90 07 BCC 5F91
5F8C: B0 0C BCS 5F9A
5FBF: F0 0C BEQ 5FCD
5FC5: F0 06 BEQ 5FCD
5FCB: 90 04 BCC 5FD1
5FEC: F0 F7 BEQ 5FE5
6014: 90 F7 BCC 600D
603A: 30 2D BMI 6069
6040: D0 1A BNE 605C
6045: 30 08 BMI 604F
64DB: D0 09 BNE 64E6
64F5: F0 12 BEQ 6509
64F9: F0 2C BEQ 6527
6501: F0 16 BEQ 6519
652A: 30 08 BMI 6534
6546: 10 04 BPL 654C
655D: B0 08 BCS 6567
6572: 10 01 BPL 6575
6590: F0 10 BEQ 65A2
6596: 90 0A BCC 65A2
659A: 90 4D BCC 65E9
65A0: 90 47 BCC 65E9
65B8: F0 2F BEQ 65E9
65BE: D0 13 BNE 65D3
65D1: 90 0C BCC 65DF
65D5: F0 29 BEQ 6600
65D9: F0 18 BEQ 65F3
65DD: F0 0A BEQ 65E9
65F8: 90 E5 BCC 65DF
6607: 90 0B BCC 6614
6619: 90 06 BCC 6621
6625: 90 01 BCC 6628
~~~
### Class 3, entry $4D83
426 instruction starts in this scoped graph; 36 conditional branch sites; 15 material/helper RNG call sites. Repeated sites in shared helpers are deliberately repeated per class.
Boundary targets: $0EF0, $0F49, $1034, $1091, $10A2, $10A6, $23F5, $2E71, $2EDF, $3129, $31F8, $3228, $3262, $328E, $32B2, $339A, $33A9, $4683, $47BE, $47F6, $4836, $48AB, $4932.
No unresolved direct/table edge inside the stated scope; semantic boundary calls remain outside this graph.
| Native call site | ATR offset | Bytes | RNG helper |
|---|---|---|---|
| $488A | $00C49A | 20 91 10 | $1091, bounded scaler |
| $4898 | $00C4A8 | 20 91 10 | $1091, bounded scaler |
| $48A4 | $00C4B4 | 20 91 10 | $1091, bounded scaler |
| $4D98 | $00C9A8 | 20 A6 10 | $10A6, descending table |
| $4DAD | $00C9BD | 20 A2 10 | $10A2, raw byte |
| $4DC0 | $00C9D0 | 20 A2 10 | $10A2, raw byte |
| $4E08 | $00CA18 | 20 A2 10 | $10A2, raw byte |
| $4E2E | $00CA3E | 20 91 10 | $1091, bounded scaler |
| $4E3F | $00CA4F | 20 91 10 | $1091, bounded scaler |
| $4E70 | $00CA80 | 20 A2 10 | $10A2, raw byte |
| $4EB6 | $00CAC6 | 20 A6 10 | $10A6, descending table |
| $4ECA | $00CADA | 20 A2 10 | $10A2, raw byte |
| $4F5F | $00CB6F | 20 A2 10 | $10A2, raw byte |
| $6527 | $00E137 | 20 A2 10 | $10A2, raw byte |
| $6558 | $00E168 | 20 91 10 | $1091, bounded scaler |
Conditional branches (native address: original bytes, instruction, target):
~~~text
3088: D0 0A BNE 3094
308F: F0 04 BEQ 3095
3092: 10 F8 BPL 308C
309C: B0 01 BCS 309F
4894: 90 0C BCC 48A2
48E9: 90 01 BCC 48EC
48F6: F0 04 BEQ 48FC
48F9: 10 F8 BPL 48F3
4DC5: 90 25 BCC 4DEC
4DC9: 90 17 BCC 4DE2
4E06: F0 05 BEQ 4E0D
4E0B: 30 05 BMI 4E12
4E48: 90 02 BCC 4E4C
4E6B: D0 03 BNE 4E70
4E73: 10 03 BPL 4E78
4E9E: F0 F2 BEQ 4E92
4EAC: F0 1C BEQ 4ECA
4EB0: F0 18 BEQ 4ECA
4ECD: 30 0A BMI 4ED9
4F15: B0 08 BCS 4F1F
4F4B: B0 12 BCS 4F5F
4F64: B0 03 BCS 4F69
4FB6: B0 43 BCS 4FFB
4FCD: 10 04 BPL 4FD3
4FFF: F0 0A BEQ 500B
5003: F0 31 BEQ 5036
5007: F0 2D BEQ 5036
5009: 90 0B BCC 5016
64DB: D0 09 BNE 64E6
64F5: F0 12 BEQ 6509
64F9: F0 2C BEQ 6527
6501: F0 16 BEQ 6519
652A: 30 08 BMI 6534
6546: 10 04 BPL 654C
655D: B0 08 BCS 6567
6572: 10 01 BPL 6575
~~~
### Class 4, entry $63B5
167 instruction starts in this scoped graph; 11 conditional branch sites; 5 material/helper RNG call sites. Repeated sites in shared helpers are deliberately repeated per class.
Boundary targets: $0EF0, $0F49, $1034, $1091, $10A2, $23F5, $2E71, $2EDF, $3129, $31F8, $339A, $33A9, $47BE, $47F6, $48AB, $4932, $4AC2.
No unresolved direct/table edge inside the stated scope; semantic boundary calls remain outside this graph.
| Native call site | ATR offset | Bytes | RNG helper |
|---|---|---|---|
| $488A | $00C49A | 20 91 10 | $1091, bounded scaler |
| $4898 | $00C4A8 | 20 91 10 | $1091, bounded scaler |
| $48A4 | $00C4B4 | 20 91 10 | $1091, bounded scaler |
| $63DB | $00DFEB | 20 A2 10 | $10A2, raw byte |
| $63FA | $00E00A | 20 A2 10 | $10A2, raw byte |
Conditional branches (native address: original bytes, instruction, target):
~~~text
3088: D0 0A BNE 3094
308F: F0 04 BEQ 3095
3092: 10 F8 BPL 308C
309C: B0 01 BCS 309F
4894: 90 0C BCC 48A2
48E9: 90 01 BCC 48EC
48F6: F0 04 BEQ 48FC
48F9: 10 F8 BPL 48F3
63E0: 90 4B BCC 642D
6418: F0 10 BEQ 642A
644F: F0 10 BEQ 6461
~~~
### Class 5, entry $5707
210 instruction starts in this scoped graph; 21 conditional branch sites; 10 material/helper RNG call sites. Repeated sites in shared helpers are deliberately repeated per class.
Boundary targets: $0EF0, $0F49, $1034, $1091, $10A2, $23F5, $2E71, $2EDF, $3129, $31F8, $339A, $33A9, $3406, $47BE, $47F6, $4836, $48AB, $4932.
No unresolved direct/table edge inside the stated scope; semantic boundary calls remain outside this graph.
| Native call site | ATR offset | Bytes | RNG helper |
|---|---|---|---|
| $488A | $00C49A | 20 91 10 | $1091, bounded scaler |
| $4898 | $00C4A8 | 20 91 10 | $1091, bounded scaler |
| $48A4 | $00C4B4 | 20 91 10 | $1091, bounded scaler |
| $571A | $00D32A | 20 91 10 | $1091, bounded scaler |
| $5750 | $00D360 | 20 A2 10 | $10A2, raw byte |
| $575A | $00D36A | 20 A2 10 | $10A2, raw byte |
| $576A | $00D37A | 20 A2 10 | $10A2, raw byte |
| $5771 | $00D381 | 20 91 10 | $1091, bounded scaler |
| $578D | $00D39D | 20 A2 10 | $10A2, raw byte |
| $57B7 | $00D3C7 | 20 A2 10 | $10A2, raw byte |
Conditional branches (native address: original bytes, instruction, target):
~~~text
3088: D0 0A BNE 3094
308F: F0 04 BEQ 3095
3092: 10 F8 BPL 308C
309C: B0 01 BCS 309F
4894: 90 0C BCC 48A2
48E9: 90 01 BCC 48EC
48F6: F0 04 BEQ 48FC
48F9: 10 F8 BPL 48F3
5725: D0 08 BNE 572F
5729: 90 E5 BCC 5710
572D: B0 E1 BCS 5710
5744: F0 24 BEQ 576A
5747: 10 F8 BPL 5741
574E: 90 0A BCC 575A
5755: B0 03 BCS 575A
575F: B0 03 BCS 5764
5766: 90 3A BCC 57A2
5768: B0 23 BCS 578D
576D: 30 EB BMI 575A
5790: 30 08 BMI 579A
57BA: 30 0A BMI 57C6
~~~
### Class 6, entry $5B51
1031 instruction starts in this scoped graph; 150 conditional branch sites; 36 material/helper RNG call sites. Repeated sites in shared helpers are deliberately repeated per class.
Boundary targets: $0EF0, $0F49, $1034, $1091, $10A2, $10A6, $23F5, $2E71, $2EDF, $3129, $31F8, $3228, $3262, $328E, $32A2, $32B2, $339A, $33A9, $3406, $3447, $4683, $47BE, $47F6, $4836, $48AB, $4932.
No unresolved direct/table edge inside the stated scope; semantic boundary calls remain outside this graph.
| Native call site | ATR offset | Bytes | RNG helper |
|---|---|---|---|
| $488A | $00C49A | 20 91 10 | $1091, bounded scaler |
| $4898 | $00C4A8 | 20 91 10 | $1091, bounded scaler |
| $48A4 | $00C4B4 | 20 91 10 | $1091, bounded scaler |
| $48BB | $00C4CB | 20 91 10 | $1091, bounded scaler |
| $48D3 | $00C4E3 | 20 91 10 | $1091, bounded scaler |
| $5288 | $00CE98 | 20 A6 10 | $10A6, descending table |
| $52B3 | $00CEC3 | 20 A2 10 | $10A2, raw byte |
| $52EE | $00CEFE | 20 A2 10 | $10A2, raw byte |
| $531E | $00CF2E | 20 A2 10 | $10A2, raw byte |
| $5347 | $00CF57 | 20 A2 10 | $10A2, raw byte |
| $5395 | $00CFA5 | 20 A2 10 | $10A2, raw byte |
| $53C0 | $00CFD0 | 20 A2 10 | $10A2, raw byte |
| $53F3 | $00D003 | 20 A2 10 | $10A2, raw byte |
| $545F | $00D06F | 20 91 10 | $1091, bounded scaler |
| $54DD | $00D0ED | 20 A2 10 | $10A2, raw byte |
| $54F8 | $00D108 | 20 A2 10 | $10A2, raw byte |
| $5526 | $00D136 | 20 A2 10 | $10A2, raw byte |
| $55C7 | $00D1D7 | 20 A2 10 | $10A2, raw byte |
| $5602 | $00D212 | 20 A2 10 | $10A2, raw byte |
| $5623 | $00D233 | 20 91 10 | $1091, bounded scaler |
| $565D | $00D26D | 20 91 10 | $1091, bounded scaler |
| $5667 | $00D277 | 20 A2 10 | $10A2, raw byte |
| $56B0 | $00D2C0 | 20 A2 10 | $10A2, raw byte |
| $5B55 | $00D765 | 20 A6 10 | $10A6, descending table |
| $5BB9 | $00D7C9 | 20 A2 10 | $10A2, raw byte |
| $5BD8 | $00D7E8 | 20 A2 10 | $10A2, raw byte |
| $5BEF | $00D7FF | 20 A2 10 | $10A2, raw byte |
| $5C1D | $00D82D | 20 A2 10 | $10A2, raw byte |
| $5C5A | $00D86A | 20 91 10 | $1091, bounded scaler |
| $5C73 | $00D883 | 20 A2 10 | $10A2, raw byte |
| $5CCE | $00D8DE | 20 A2 10 | $10A2, raw byte |
| $6527 | $00E137 | 20 A2 10 | $10A2, raw byte |
| $6558 | $00E168 | 20 91 10 | $1091, bounded scaler |
| $6678 | $00E288 | 20 91 10 | $1091, bounded scaler |
| $66AE | $00E2BE | 20 A2 10 | $10A2, raw byte |
| $66CB | $00E2DB | 20 91 10 | $1091, bounded scaler |
Conditional branches (native address: original bytes, instruction, target):
~~~text
3088: D0 0A BNE 3094
308F: F0 04 BEQ 3095
3092: 10 F8 BPL 308C
309C: B0 01 BCS 309F
4894: 90 0C BCC 48A2
48CF: F0 01 BEQ 48D2
48E9: 90 01 BCC 48EC
48F6: F0 04 BEQ 48FC
48F9: 10 F8 BPL 48F3
525F: D0 07 BNE 5268
52B1: F0 05 BEQ 52B8
52B6: 30 ED BMI 52A5
52CB: F0 35 BEQ 5302
52D1: F0 2F BEQ 5302
52D7: B0 1F BCS 52F8
52E1: 90 1F BCC 5302
52E5: F0 07 BEQ 52EE
52E9: D0 03 BNE 52EE
52F3: 90 03 BCC 52F8
52FC: F0 04 BEQ 5302
531C: D0 29 BNE 5347
5323: F0 22 BEQ 5347
534C: B0 03 BCS 5351
5353: 90 19 BCC 536E
539A: B0 03 BCS 539F
53A1: 90 25 BCC 53C8
53B2: F0 04 BEQ 53B8
53B6: D0 F0 BNE 53A8
53C3: 30 44 BMI 5409
53E6: B0 0B BCS 53F3
5427: F0 EF BEQ 5418
542A: 10 F8 BPL 5424
5468: 90 02 BCC 546C
5476: D0 0D BNE 5485
54A4: D0 0F BNE 54B5
54E2: 90 DE BCC 54C2
54FD: 90 14 BCC 5513
5501: 90 08 BCC 550B
552B: D0 03 BNE 5530
5532: 90 03 BCC 5537
553B: D0 03 BNE 5540
555F: D0 0D BNE 556E
558A: D0 03 BNE 558F
5591: D0 03 BNE 5596
5598: D0 03 BNE 559D
55A1: D0 03 BNE 55A6
55AD: D0 03 BNE 55B2
55B9: D0 03 BNE 55BE
55BF: 10 F5 BPL 55B6
55C5: 90 0B BCC 55D2
55CA: 10 03 BPL 55CF
55D4: D0 03 BNE 55D9
55DB: D0 03 BNE 55E0
55E4: D0 03 BNE 55E9
55EB: D0 03 BNE 55F0
55F2: D0 03 BNE 55F7
55FD: 90 03 BCC 5602
5605: 10 03 BPL 560A
5617: D0 18 BNE 5631
5629: 90 03 BCC 562E
5644: 90 0C BCC 5652
5646: F0 05 BEQ 564D
5662: 90 47 BCC 56AB
566A: 30 25 BMI 5691
566E: 90 0D BCC 567D
56B5: B0 03 BCS 56BA
5B93: D0 07 BNE 5B9C
5BA9: 90 5D BCC 5C08
5BAF: B0 57 BCS 5C08
5BB3: F0 04 BEQ 5BB9
5BB7: D0 4F BNE 5C08
5BBC: 30 08 BMI 5BC6
5BCA: F0 19 BEQ 5BE5
5BDB: 30 26 BMI 5C03
5BF2: 30 0F BMI 5C03
5C11: F0 05 BEQ 5C18
5C22: 90 2D BCC 5C51
5C3A: D0 04 BNE 5C40
5C76: 30 13 BMI 5C8B
5CD3: 90 1C BCC 5CF1
5CDD: D0 0C BNE 5CEB
5CE3: D0 F0 BNE 5CD5
5D00: D0 0A BNE 5D0C
5D04: D0 03 BNE 5D09
5D10: D0 1E BNE 5D30
5D14: D0 03 BNE 5D19
5D1B: D0 03 BNE 5D20
5D22: B0 03 BCS 5D27
5D2B: F0 03 BEQ 5D30
5D32: 90 09 BCC 5D3D
5D38: B0 03 BCS 5D3D
5D41: D0 12 BNE 5D55
5D45: F0 0E BEQ 5D55
5D49: F0 0A BEQ 5D55
5D4D: D0 03 BNE 5D52
5D57: F0 07 BEQ 5D60
5D5B: F0 03 BEQ 5D60
5D64: F0 75 BEQ 5DDB
5D6A: D0 03 BNE 5D6F
5D71: D0 03 BNE 5D76
5D78: D0 15 BNE 5D8F
5D7C: D0 03 BNE 5D81
5D83: D0 03 BNE 5D88
5D8A: D0 03 BNE 5D8F
5D91: D0 0E BNE 5DA1
5D95: D0 03 BNE 5D9A
5D9C: D0 03 BNE 5DA1
5DA3: D0 07 BNE 5DAC
5DA7: D0 03 BNE 5DAC
5DAE: F0 08 BEQ 5DB8
5DB2: F0 04 BEQ 5DB8
5DB6: D0 23 BNE 5DDB
5DBA: D0 03 BNE 5DBF
5DC1: D0 03 BNE 5DC6
5DC8: D0 03 BNE 5DCD
5DCF: D0 03 BNE 5DD4
5DD6: D0 03 BNE 5DDB
5DDD: D0 03 BNE 5DE2
5DE7: D0 2E BNE 5E17
5DED: B0 28 BCS 5E17
5DF1: D0 03 BNE 5DF6
5DF8: D0 03 BNE 5DFD
5DFF: D0 03 BNE 5E04
5E06: D0 03 BNE 5E0B
5E0F: D0 03 BNE 5E14
5E19: D0 03 BNE 5E1E
5E20: D0 03 BNE 5E25
5E29: 90 0A BCC 5E35
5E2D: D0 03 BNE 5E32
5E37: F0 03 BEQ 5E3C
5E3E: D0 03 BNE 5E43
5E45: D0 03 BNE 5E4A
64DB: D0 09 BNE 64E6
64F5: F0 12 BEQ 6509
64F9: F0 2C BEQ 6527
6501: F0 16 BEQ 6519
652A: 30 08 BMI 6534
6546: 10 04 BPL 654C
655D: B0 08 BCS 6567
6572: 10 01 BPL 6575
664E: F0 0B BEQ 665B
6652: B0 07 BCS 665B
6658: 90 01 BCC 665B
665F: F0 01 BEQ 6662
667D: B0 0A BCS 6689
6694: F0 12 BEQ 66A8
66AC: D0 07 BNE 66B5
66B1: 30 1F BMI 66D2
66B3: 10 3A BPL 66EF
66D0: B0 1D BCS 66EF
~~~
### Class 7, entry $506C
57 instruction starts in this scoped graph; 4 conditional branch sites; 3 material/helper RNG call sites. Repeated sites in shared helpers are deliberately repeated per class.
Boundary targets: $10A2, $21D6, $2E71, $31F8, $33A9, $3447, $47BE, $47F6.
No unresolved direct/table edge inside the stated scope; semantic boundary calls remain outside this graph.
| Native call site | ATR offset | Bytes | RNG helper |
|---|---|---|---|
| $5077 | $00CC87 | 20 A2 10 | $10A2, raw byte |
| $50A2 | $00CCB2 | 20 A2 10 | $10A2, raw byte |
| $50D6 | $00CCE6 | 20 A2 10 | $10A2, raw byte |
Conditional branches (native address: original bytes, instruction, target):
~~~text
5075: F0 07 BEQ 507E
507C: 90 1E BCC 509C
50A7: 90 0D BCC 50B6
50C4: B0 0A BCS 50D0
~~~
### Class 8, entry $50F8
174 instruction starts in this scoped graph; 14 conditional branch sites; 7 material/helper RNG call sites. Repeated sites in shared helpers are deliberately repeated per class.
Boundary targets: $1034, $1091, $10A2, $2E71, $3129, $31F8, $32B2, $33A9, $3406, $3447, $4683, $47BE, $47F6, $48AB, $4932.
No unresolved direct/table edge inside the stated scope; semantic boundary calls remain outside this graph.
| Native call site | ATR offset | Bytes | RNG helper |
|---|---|---|---|
| $488A | $00C49A | 20 91 10 | $1091, bounded scaler |
| $4898 | $00C4A8 | 20 91 10 | $1091, bounded scaler |
| $48A4 | $00C4B4 | 20 91 10 | $1091, bounded scaler |
| $50FA | $00CD0A | 20 91 10 | $1091, bounded scaler |
| $5117 | $00CD27 | 20 91 10 | $1091, bounded scaler |
| $5137 | $00CD47 | 20 91 10 | $1091, bounded scaler |
| $5153 | $00CD63 | 20 A2 10 | $10A2, raw byte |
Conditional branches (native address: original bytes, instruction, target):
~~~text
4894: 90 0C BCC 48A2
48E9: 90 01 BCC 48EC
48F6: F0 04 BEQ 48FC
48F9: 10 F8 BPL 48F3
5102: B0 03 BCS 5107
5105: D0 F8 BNE 50FF
511D: 90 03 BCC 5122
5146: 90 03 BCC 514B
514D: F0 56 BEQ 51A5
5151: F0 52 BEQ 51A5
5156: 30 4D BMI 51A5
5174: F0 02 BEQ 5178
51B1: F0 05 BEQ 51B8
522E: F0 0F BEQ 523F
~~~
### Class 9, entry $5CBA
551 instruction starts in this scoped graph; 101 conditional branch sites; 16 material/helper RNG call sites. Repeated sites in shared helpers are deliberately repeated per class.
Boundary targets: $0F49, $1034, $1091, $10A2, $2E71, $31F8, $3262, $328E, $33A9, $3406, $3447, $4683, $47BE, $47F6, $4932.
No unresolved direct/table edge inside the stated scope; semantic boundary calls remain outside this graph.
| Native call site | ATR offset | Bytes | RNG helper |
|---|---|---|---|
| $48BB | $00C4CB | 20 91 10 | $1091, bounded scaler |
| $48D3 | $00C4E3 | 20 91 10 | $1091, bounded scaler |
| $545F | $00D06F | 20 91 10 | $1091, bounded scaler |
| $54DD | $00D0ED | 20 A2 10 | $10A2, raw byte |
| $54F8 | $00D108 | 20 A2 10 | $10A2, raw byte |
| $5526 | $00D136 | 20 A2 10 | $10A2, raw byte |
| $55C7 | $00D1D7 | 20 A2 10 | $10A2, raw byte |
| $5602 | $00D212 | 20 A2 10 | $10A2, raw byte |
| $5623 | $00D233 | 20 91 10 | $1091, bounded scaler |
| $565D | $00D26D | 20 91 10 | $1091, bounded scaler |
| $5667 | $00D277 | 20 A2 10 | $10A2, raw byte |
| $56B0 | $00D2C0 | 20 A2 10 | $10A2, raw byte |
| $5CCE | $00D8DE | 20 A2 10 | $10A2, raw byte |
| $6678 | $00E288 | 20 91 10 | $1091, bounded scaler |
| $66AE | $00E2BE | 20 A2 10 | $10A2, raw byte |
| $66CB | $00E2DB | 20 91 10 | $1091, bounded scaler |
Conditional branches (native address: original bytes, instruction, target):
~~~text
48CF: F0 01 BEQ 48D2
48E9: 90 01 BCC 48EC
48F6: F0 04 BEQ 48FC
48F9: 10 F8 BPL 48F3
5468: 90 02 BCC 546C
5476: D0 0D BNE 5485
54A4: D0 0F BNE 54B5
54E2: 90 DE BCC 54C2
54FD: 90 14 BCC 5513
5501: 90 08 BCC 550B
552B: D0 03 BNE 5530
5532: 90 03 BCC 5537
553B: D0 03 BNE 5540
555F: D0 0D BNE 556E
558A: D0 03 BNE 558F
5591: D0 03 BNE 5596
5598: D0 03 BNE 559D
55A1: D0 03 BNE 55A6
55AD: D0 03 BNE 55B2
55B9: D0 03 BNE 55BE
55BF: 10 F5 BPL 55B6
55C5: 90 0B BCC 55D2
55CA: 10 03 BPL 55CF
55D4: D0 03 BNE 55D9
55DB: D0 03 BNE 55E0
55E4: D0 03 BNE 55E9
55EB: D0 03 BNE 55F0
55F2: D0 03 BNE 55F7
55FD: 90 03 BCC 5602
5605: 10 03 BPL 560A
5617: D0 18 BNE 5631
5629: 90 03 BCC 562E
5644: 90 0C BCC 5652
5646: F0 05 BEQ 564D
5662: 90 47 BCC 56AB
566A: 30 25 BMI 5691
566E: 90 0D BCC 567D
56B5: B0 03 BCS 56BA
5CD3: 90 1C BCC 5CF1
5CDD: D0 0C BNE 5CEB
5CE3: D0 F0 BNE 5CD5
5D00: D0 0A BNE 5D0C
5D04: D0 03 BNE 5D09
5D10: D0 1E BNE 5D30
5D14: D0 03 BNE 5D19
5D1B: D0 03 BNE 5D20
5D22: B0 03 BCS 5D27
5D2B: F0 03 BEQ 5D30
5D32: 90 09 BCC 5D3D
5D38: B0 03 BCS 5D3D
5D41: D0 12 BNE 5D55
5D45: F0 0E BEQ 5D55
5D49: F0 0A BEQ 5D55
5D4D: D0 03 BNE 5D52
5D57: F0 07 BEQ 5D60
5D5B: F0 03 BEQ 5D60
5D64: F0 75 BEQ 5DDB
5D6A: D0 03 BNE 5D6F
5D71: D0 03 BNE 5D76
5D78: D0 15 BNE 5D8F
5D7C: D0 03 BNE 5D81
5D83: D0 03 BNE 5D88
5D8A: D0 03 BNE 5D8F
5D91: D0 0E BNE 5DA1
5D95: D0 03 BNE 5D9A
5D9C: D0 03 BNE 5DA1
5DA3: D0 07 BNE 5DAC
5DA7: D0 03 BNE 5DAC
5DAE: F0 08 BEQ 5DB8
5DB2: F0 04 BEQ 5DB8
5DB6: D0 23 BNE 5DDB
5DBA: D0 03 BNE 5DBF
5DC1: D0 03 BNE 5DC6
5DC8: D0 03 BNE 5DCD
5DCF: D0 03 BNE 5DD4
5DD6: D0 03 BNE 5DDB
5DDD: D0 03 BNE 5DE2
5DE7: D0 2E BNE 5E17
5DED: B0 28 BCS 5E17
5DF1: D0 03 BNE 5DF6
5DF8: D0 03 BNE 5DFD
5DFF: D0 03 BNE 5E04
5E06: D0 03 BNE 5E0B
5E0F: D0 03 BNE 5E14
5E19: D0 03 BNE 5E1E
5E20: D0 03 BNE 5E25
5E29: 90 0A BCC 5E35
5E2D: D0 03 BNE 5E32
5E37: F0 03 BEQ 5E3C
5E3E: D0 03 BNE 5E43
5E45: D0 03 BNE 5E4A
664E: F0 0B BEQ 665B
6652: B0 07 BCS 665B
6658: 90 01 BCC 665B
665F: F0 01 BEQ 6662
667D: B0 0A BCS 6689
6694: F0 12 BEQ 66A8
66AC: D0 07 BNE 66B5
66B1: 30 1F BMI 66D2
66B3: 10 3A BPL 66EF
66D0: B0 1D BCS 66EF
~~~
Preservation check: among 49 pre-existing research/application/report/disk files fingerprinted for this task, only the requested RESEARCH_INDEX.md update differs. The original ATR, MATCHUP_CALCULATOR.py, all prior modules/tests/reports and original applications match their pre-task SHA-256 values. The three requested files are the only additions.