Commit Graph

54 Commits

Author SHA1 Message Date
gamer147
3c8aed1c16 Fix ADV transition and nested input lifecycles 2026-07-29 18:16:09 -04:00
gamer147
7cb0e879e5 Fix skip completion for visual transitions 2026-07-29 17:09:37 -04:00
gamer147
835b0e28cd Implement movie mask transition opcode 2026-07-29 16:01:00 -04:00
gamer147
7ab2ed87da Document final opcode investigations 2026-07-29 15:08:05 -04:00
gamer147
21549759a4 Implement tiled surface edge opcode 2026-07-29 14:03:51 -04:00
gamer147
bab3c051d2 Implement cyclic animation reset opcode 2026-07-29 10:52:21 -04:00
gamer147
9b3fc89b72 Implement cyclic scale opcode 2026-07-29 00:06:56 -04:00
gamer147
3f4124bbb8 Implement looping SFX and immediate rotation opcodes 2026-07-28 23:45:48 -04:00
gamer147
77a4687f39 Fix ADV config opacity and text lifetime 2026-07-28 12:21:32 -04:00
gamer147
da34e6ad15 Fix FIELD movement sprite ghosting 2026-07-27 11:34:40 -04:00
gamer147
9c99254a9a Fix ADV and BUNKI animation polish 2026-07-27 11:15:41 -04:00
gamer147
b8bbd5c1eb Complete native numbered-save round trips 2026-07-24 23:25:54 -04:00
gamer147
d099a073a8 Match native surface persistence policy 2026-07-24 20:28:59 -04:00
gamer147
001a5706f6 Implement native layout-3 save restoration 2026-07-24 16:23:01 -04:00
gamer147
838f6d4245 Profile and optimize retained rendering 2026-07-22 14:19:20 -04:00
gamer147
740e10c550 Harden movie playback lifecycle and diagnostics 2026-07-22 09:44:57 -04:00
gamer147
7a957a318d Implement DEBUGMAP combat frontier 2026-07-21 19:30:56 -04:00
gamer147
a93d3b64bf Implement numeric HUD rendering 2026-07-21 15:54:13 -04:00
gamer147
274744e9b6 Implement movie surface stop-time queries 2026-07-21 14:43:24 -04:00
gamer147
ff39c7f3f9 Render DEBUGMAP tiled field surfaces 2026-07-21 13:02:02 -04:00
gamer147
12e5073918 Implement ADV system menu input routing 2026-07-21 11:16:50 -04:00
gamer147
c84952e7d7 Implement root reload and title debug launcher 2026-07-20 22:32:49 -04:00
gamer147
d4510242d6 Land SYSTEM4-rooted Godot boot 2026-07-20 18:13:32 -04:00
gamer147
d1af8e3b07 Implement detached object animation control 2026-07-20 14:53:34 -04:00
gamer147
ae157da04c Implement retained graphics lifecycle ops 2026-07-20 14:29:41 -04:00
gamer147
f5663ec595 Reverse shared SAVE.DAT integer opcodes 2026-07-20 13:33:27 -04:00
gamer147
8c7c7158a7 Fix retained background lifecycle 2026-07-12 00:00:45 -04:00
gamer147
b6cd571165 Fix AE001H cyclic color blending 2026-07-11 22:21:10 -04:00
gamer147
aa14ad6b3d Fix AE001H translation target query 2026-07-11 21:40:16 -04:00
gamer147
ca562da209 Fix AE001H spritesheet animation 2026-07-11 20:37:26 -04:00
gamer147
2a49a0697c fix(gfx): restore third CG glow 2026-07-11 20:05:51 -04:00
gamer147
9f1fcb5602 Optimize static wait presentation 2026-07-11 13:56:30 -04:00
gamer147
0c55d5e8a4 Fix ADV chrome one-shot blending 2026-07-11 13:28:31 -04:00
gamer147
36960d4118 Implement SC0000 movie playback lifecycle 2026-07-11 12:27:51 -04:00
gamer147
85a66afe20 Fix native retained presentation batching 2026-07-10 21:37:42 -04:00
gamer147
8731d6389c Implement native 0x202 color interpolation 2026-07-10 20:49:28 -04:00
gamer147
d6d1be984e Implement ADV foreground transition lifecycle 2026-07-10 18:49:53 -04:00
gamer147
768863b48e feat: add affine rotation rendering and timeline diagnostics 2026-07-10 17:54:33 -04:00
gamer147
4d225618f9 fix: align animation pacing and transforms with native 2026-07-10 15:41:17 -04:00
gamer147
5427e9d776 feat: split native scale and translation channels 2026-07-10 10:28:11 -04:00
gamer147
f2797d5ab7 feat: model ADV coroutines and retained effect teardown 2026-07-10 09:45:43 -04:00
gamer147
68d52f218a diag+docs: confirm grey-BG root cause = unfilled slot-table (label_125bd via stubbed coroutine op 0x140)
Traced end-to-end (AGE_DIAG_SETTEX): set-texture slot=G[0x62452] <- query-gfx-object?
(-1 for unregistered CG handles) -> fallback lookup-array-2d(rec[s3]=G[0x3239])=0
because the slot table is never filled: label_125bd (SC0000 0x50f, slots 4..13) is
gated behind the scene-coroutine framework (0x140 coroutine-yield, stubbed). Adds
env-gated VM set-texture/query slot diagnostics + GfxState.IsRegistered.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 23:55:50 -04:00
gamer147
1a502d5adc fix: color-op alpha (0x202/0x203/0x232) is TINT STRENGTH, not object opacity
Root cause (evidence: gfx-log) of the opening-CG grey background: a CG drawn with
(alpha=0, color=white) means 'no tint' = fully opaque, but slice-A conflated the
color alpha with object opacity -> the CG rendered transparent. RenderObject now
carries TintStrength separately from Alpha (opacity); resolution keeps textured
objects opaque. Tests updated to the evidence-based semantics.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 23:41:03 -04:00
gamer147
81a878cd0b feat: port anim interpolator (ping-pong spritesheet cell + color glow) on nowMs
BlendMath.PingPong + SnapshotVisibleObjects(nowMs); no-arg overload keeps
headless callers deterministic (parity held, 76/76 + sweep 284/13).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 22:05:00 -04:00
gamer147
370ea10b6d feat: add src-rect (spritesheet) + animated-color channel fields/mutators
Adapted to Task-1 RE: position is a direct V24 set (not ping-pong); the
oscillating channels are src-rect scroll (0x231/0x239) and color glow (0x232).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 22:02:46 -04:00
gamer147
488e86b2b8 feat: resolve per-object alpha/tint/blend into RenderObject (colorkey retained)
0x202/0x203 now route through GfxState.SetObjectColor (sets HasColor);
SnapshotVisibleObjects resolves Alpha/Tint/BlendKind. Drops the stale
'alpha deferred' trace stub — alpha/tint is now consumed by the compositor.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 19:06:34 -04:00
gamer147
12b066edfa fix(gfx): serialize GetOrCreate/Register/Release on _lock (compositor race)
Once sleep paces the VM thread, the main-thread compositor's SnapshotVisibleObjects
truly overlaps VM-thread _objects/_registry writes. GetOrCreate/Register/Release were
unlocked -> 'Destination array is not long enough' under concurrent enumeration.
_lock is re-entrant so BindDraw/EraseRange (already locked) stay correct. 52 green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 09:01:13 -04:00
gamer147
f15561a410 feat(gfx): surface anim channel to the compositor via RenderObject.AnimState
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 23:39:18 -04:00
gamer147
4c7f35c61c feat(gfx): GfxState animation-channel model (per-object transform + global clock)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 23:34:52 -04:00
gamer147
1b8c8c6ac7 fix(gfx): op 0x215 query registry is separate from the geometry store
The retained-mode "2nd CG renders off-screen" bug: GfxState conflated two
distinct native structures. It assigned a fabricated AcquireSlot() slot on
every GetOrCreate (called by all geometry/draw ops) and returned it from
QuerySlot (op 0x215). But Ghidra (gfx_op_0x215_register_query @0x42a0b0 /
gfx_op_0x1a2_registry_insert @0x42d360) shows 0x215 does map.find(handle) over
a registry populated ONLY by op 0x1a2 -- it never allocates a slot.

So a CG handle (never 0x1a2-registered) read back as "existing", took the
existing branch of label_12649, ran get-texture-size on the wrong slot (0),
got size 0, and computed dst = pos(0,0) - (w/2,h) = (-400,-600) -> off-screen.
The real engine returns -1 -> the fresh branch -> anchor from the INIT2 arrays
-> dst=(0,0).

Fix: GfxState keeps a separate _registry (HashSet) populated only by
Register() (op 0x1a2); QuerySlot returns the handle if registered else -1, and
no longer consults the geometry store or invents slots. Drop AcquireSlot /
GfxObject.Slot / the free-list.

Verified: Age.Cli gfx --boot SC0000.BIN -> all event CGs dst=(0,0), zero
(-400,-600) draws; Godot --boot pages 1/2/4 render opening CGs full-screen;
engine 44/44; sweep parity 284 exit / 13 STEP-LIMIT unchanged.

Docs: engine-re.md (query-registry-vs-geometry-store section), opcodes.toml
0x1a2/0x215 rebuilt; Ghidra helpers gfx_registry_map_find/hash_insert
annotated + saved. Tests rewritten to the native contract.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 22:09:11 -04:00