"3840 colors" — RGB channel-split blend across two backgrounds
Port of krom (Peter Lemon)'s HiColor3840 demo (PeterLemon/SNES, PPU/Blend/HiColor/HiColor3840). The trick: the image's green+blue channels live on BG1 as a 240-color Mode 3 layer (main screen); the red channel lives on BG2 as a 16-level 4bpp layer (sub screen); color math ADDs them back together per pixel — 240 x 16 = "3840 colors" from a static screen, no HDMA and no IRQ.
This is the corpus's first pure colormath dogfood: the audit rated colormath.h "good primitives" on inspection; this port proves SetSource/SetOp/Enable against a reference.
- SNES Concepts
- RGB channel splitting across main/sub screens
- colorMathSetSource(SUBSCREEN) + colorMathSetOp(ADD) + colorMathEnable(BG1|BACKDROP) — CGWSEL $02 / CGADSUB $21
- Mode 3: 8bpp BG1 + 4bpp BG2 sharing VRAM
- What to Observe
- A shaded color wheel with full-RGB depth. Mentally split it: BG1 alone would have no red at all, BG2 alone is a pure red ramp.
- Modules Used
- console, dma, background, colormath
- See also
- https://github.com/PeterLemon/SNES — original demo
-
colormath.h