Skip to content

Commit c7da8d2

Browse files
committed
fixed 64p monochriome mode, added fallback render mode
1 parent ea1d6a3 commit c7da8d2

3 files changed

Lines changed: 235 additions & 117 deletions

File tree

AGENTS.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,22 @@ Vector policy currently used in `SerumData`:
131131
## Load flow
132132
Entry point: `Serum_Load(altcolorpath, romname, flags)`.
133133

134+
Requested-output mode:
135+
- `FLAG_REQUEST_FALLBACK` extends single-plane extra-resolution requests.
136+
- If the caller requests only the extra-resolution output plane
137+
(`FLAG_REQUEST_64P_FRAMES` for 32p source content, or
138+
`FLAG_REQUEST_32P_FRAMES` for 64p source content), libserum enters an
139+
extra-preferred runtime mode.
140+
- In that mode without `FLAG_REQUEST_FALLBACK`, runtime renders only the extra
141+
plane and skips original-plane frame/rotation preparation entirely.
142+
- In that mode with `FLAG_REQUEST_FALLBACK`, runtime first tries the extra
143+
plane for each matched frame/scene frame; if that frame has no complete extra
144+
payload (frame/background/sprite coverage), runtime renders only the original
145+
plane as fallback for that call.
146+
- Authoring/update load flows may still widen internal load flags so both
147+
planes remain available for `.cROMc` regeneration, but runtime output
148+
behavior must continue to follow the caller's original request flags.
149+
134150
1. Reset all runtime state via `Serum_free()`.
135151
2. On real-machine runtime (`is_real_machine()==true`):
136152
- do not scan or apply `*.pup.csv`
@@ -299,6 +315,19 @@ Main phases:
299315
6. Optional sprite overlays.
300316
7. Configure color rotations and return next timer.
301317

318+
Preferred-extra runtime mode:
319+
- When load flags request only the extra output plane, `Colorize_Framev2`
320+
treats extra resolution as the preferred render target.
321+
- If `FLAG_REQUEST_FALLBACK` is not set, original-resolution output is not
322+
colorized for matched frames in that mode.
323+
- If `FLAG_REQUEST_FALLBACK` is set, original-resolution output is colorized
324+
only on calls where `CheckExtraFrameAvailable(frameId)` fails; otherwise the
325+
original plane stays untouched for that frame.
326+
- Rotation setup follows the same policy: only planes actually rendered on the
327+
current call receive fresh rotation tables/timers; inactive planes are reset
328+
so `Serum_Rotate()` does not keep rotating stale original-resolution output
329+
while extra-resolution output is active.
330+
302331
Dynamic-shadow hot path:
303332
- `CheckDynaShadow(...)` receives pre-fetched per-frame shadow vectors
304333
(`dynashadowsdir*`, `dynashadowscol*`) from `Colorize_Framev2` instead of
@@ -358,6 +387,11 @@ Flags (from `serum.h`):
358387
recompose the scene between rotations.
359388
- Foreground scenes still stop color rotations when they start immediately;
360389
background scenes do not.
390+
- In preferred-extra runtime mode, scene rendering follows the same per-frame
391+
extra-first policy as normal frame colorization: if a scene frame has extra
392+
content, only the extra plane is prepared for that call; original-plane scene
393+
rendering is used only as `FLAG_REQUEST_FALLBACK` fallback when the extra
394+
scene frame is incomplete/unavailable.
361395

362396
## cROMc persistence
363397
Current concentrate version: **6**.

0 commit comments

Comments
 (0)