Skip to content

Render native GSC battler-row OAM from copied picture tiles - #361

Draft
Roxas2712 wants to merge 59 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/upstream-gen2-battler-rows
Draft

Roxas2712 wants to merge 59 commits into
UNDERdecoded:mainfrom
Roxas2712:codex/upstream-gen2-battler-rows

Conversation

@Roxas2712

@Roxas2712 Roxas2712 commented Oct 28, 2026 •

Copy link
Copy Markdown

The GSC VM registers battler head/feet texture descriptors, but the native OAM renderer rejects entries carrying battler. Actual animation objects therefore have no pixels despite correct command/object state. The OAM palette pass also mutates outer indexed shader uniforms that graphics push/pop cannot restore.

Snapshot the existing screen-owned picture at the actual battlergfx command and render the copied one/two-row cells with genuine OAM coordinates, flips and palettes. Keep OBJ color-zero transparency separate from BG remapping; preserve custom RGB alpha, crop selection, pending Transform and replacement picture ownership. Retained runners keep their own copied art. Restore the caller's indexed palette uniforms, including draw failure. Drawing adds no image decode, upload, GPU readback or animation tick.

Builds cumulatively on #202/#356/#357/#358/#359/#360; the new change starts after 80a33201e6d4e7f08366970912a870fe7ca2c708. No API aliases or second combat/animation owner, no mod edits, no ROM pixels committed. Fork review: Roxas2712#266.

Validation:

  • Final adapted head 74be6ecd25ed77eefda9fb94fabd0d3e74a7ed24: 66178 checks in 18 groups, including 16907 native row-copy/draw checks across Gold/Silver/Crystal. The stronger palette fixture reproduces 96 mismatches before the scope fix and passes afterward.
  • Final fork head 40a28903ab371816c608889eb0e9759a73c28eb4: 182049 checks in 34 groups passed.
  • Fresh actual Crystal-ROM import/state comparisons on VM-identical fork aed24a60: 2804 cases /355718 steps plus 10880 replacement-picture and 512 doll-sheet pixels. The two known pinned-reference Transform/Minimize picture-state errors use the primary ASM oracle; other command/object/OAM/BG state remains compared. This does not qualify GPU output of copied battler rows.

No new GPU, full unchanged-client, Windows or packaged-release qualification. Primary sources and limits: docs/native-gen2-battler-rows.md.

Contributions by Roxas2712. Existing Cedric and Gen1Recomp interpreter/object-drawing licences and attribution remain intact. Original contributions are offered to Cedric / UNDERdecoded under LICENSE-ROXAS2712.md, including its visible-credit conditions; that permission does not narrow earlier grants or license third-party work. See NOTICE.md and compat/gen1-gsc/.

Versioned GPU pixel fixture added at final adapted head 0626de1c. The fork fixture at 2aa97ddd passed72 real native BattleState/VM/OAM GPU cases and6637212 pixel/state checks on each of Metal2.1 andOpenGL4.1 (AppleM3). This GPU run is on the fork source, not an independent adapted-upstream GPU qualification. Only GPU test sources changed after the CPU-qualified engine heads40/74; no new runtime delta. Unchanged-mod/OS-window/Windows/release acceptance remains open.

Maarten Paus and others added 30 commits October 25, 2026 00:54
…nto codex/upstream-gen2-palette-register
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