Skip to content

Batch full-view reconstructed background bindings into source spans - #149

Merged
mstan merged 4 commits into
mainfrom
perf/background-spans-20261027
Oct 29, 2026
Merged

mstan merged 4 commits into
mainfrom
perf/background-spans-20261027

Conversation

@mstan

@mstan mstan commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

MMX's reconstructed backgrounds resolve scene coordinates, tiles, private CHR and palettes for each output pixel. Bind these resources once per source span, ending spans at tile, native-view, resource-phase and scene-mapping boundaries. Preserve the independent scalar mapper for reference and imported menus/Rush ceiling, and the existing mosaic path.

MMX_NATIVE_BG_SPANS defaults OFF pending the owner's bundled playtest approval. The candidate is title-owned scene/asset policy using the existing shared row planner. No new persistent cache, serialized field or netplay protocol change is introduced. Benchmark/replay identity records the selection.

Measured on the i5-4670 NAS using matched 4,200-frame Highway workloads with audio emulation active and dummy output:

Profile Median process-CPU reduction Evidence
16:9 / 342px 12.8% Five balanced OFF/ON pairs, all positive (10.2–13.7%).
32:9 / 682px 34.7% Five balanced OFF/ON pairs, all positive (33.0–35.5%).
Custom 4:3 / 256px Neutral/inconclusive Five mixed pairs, median 0%.
Stock Neutral/inconclusive Initial and repeated five-pair batches, A/A controls and canonical-main controls retained; no reproducible regression.

Primary OFF/ON binaries use identical clean source 7e55826, effective engine 147b55e, and UI 7c635c6. A separate unmodified current-main e5d1308 comparison confirmed 13.1% at 16:9 and 34.0% at 32:9 (one pair each), with five stock pairs remaining mixed/neutral. Those confirmation runs are labelled separately. Background CPU was present; raw resource observations, ordering and repeated controls are retained. These are process-CPU results, not Xbox or FPS predictions, and must not be added to earlier package percentages.

Validation passes: native scenes; 1,536 scalar-compared full-width background rows; non-aligned CHR/palette phase checks; 512 randomized composition rows; Windows/Linux fixtures; eight captured view/HUD comparisons; all four ROM-backed Magic Carpet cases; current-build save/load/rewind/replay and fresh-process replay for both arms. A new real-ROM rollback test varies rendering width/count across resimulation and verifies identical rollback state. Paired rendered images and available full custom captures match. CI passes at review head ef821a3; runtime source is unchanged from measured 7e55826.

Relative to canonical current main, adoption adds 8,064 text bytes and 64 read-only-data bytes; data/BSS are unchanged and there is no new persistent cache. Same-source selector-only text cost is 6,464 bytes.

Tracking: beads-8wg.1.150, roadmap beads-49cy, campaign beads-2wy8.1. Machine-readable samples, identities, configurations, images and gate logs: G:/Temp/Codex/snesrecomp/background-spans-20261027/campaign-results.json and evidence/. Final NAS export: 771 files verified by CRC and individual SHA-256. No original-Xbox or cross-build netplay qualification is claimed. Owner playtest/default promotion and merge remain pending.

@mstan
mstan marked this pull request as ready for review October 29, 2026 01:54
@mstan
mstan merged commit 90916f7 into main Oct 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant