Interactive tutorial + palette pipeline overhaul#25
Open
Conversation
Single-page interactive tutorial (docs/tutorial.html) teaching how ChromA emulates a Game Boy on a Game Boy Advance: - Side-by-side GB/GBA hardware diagrams - Interactive register mapping (Z80 → ARM) with animated connectors - Memory map comparator with highlighted connections - Tile format conversion demo showing 2bpp bitplane interleaving - 2D scanline beam visualization with PPU mode phases - HiDPI canvas rendering for Retina displays - Tutorial link added to docs/index.html footer Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Overhauls the palette pipeline: - Remove gamma correction (5 brightness levels) and gbc_palette2 staging buffer. transfer_palette_ reads from pal_before (128-byte frame-start snapshot taken at GB line 0). - Wire up the previously dead pal_split infrastructure. ff69_w_tail records palette snapshots when the scanline changes (up to 8 splits). VCount interrupts patch PALRAM at split boundaries for mid-frame palette changes. - DMA3 always armed with counter-based mode selection: ≤4 writes/GBA-frame: 1-word PALRAM self-refresh (no-op) >4 writes/GBA-frame: 64-word per-scanline buffer replay Counter cleared at GBA VBlank to avoid 2:1 frame ratio race. - Remove line 75 palette copy (no longer needed). Hercules GBC: title screen per-scanline colors (no flicker), gameplay has correct colors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Overhauls the palette pipeline: 1. Remove gamma correction (5 brightness levels). 2. Remove gbc_palette2 staging buffer and line 75 copy. transfer_palette_ reads from pal_before (128-byte frame-start snapshot taken at GB line 0). 3. Wire up the previously dead pal_split infrastructure. ff69_w_tail records palette snapshots when the scanline changes (up to 8 splits). VCount interrupts patch PALRAM at split boundaries for mid-frame palette changes. 4. DMA3 always armed with counter-based mode selection: - ≤4 writes/GBA-frame: 1-word PALRAM self-refresh (no-op) - >4 writes/GBA-frame: 64-word per-scanline buffer replay Counter cleared at GBA VBlank. The threshold discriminates games that tolerate EWRAM DMA per HBlank (per-scanline palette games) from those that don't (64-word EWRAM DMA overruns HBlank for normal games). This is a GBA hardware constraint, not a heuristic. Hercules GBC: title screen per-scanline colors (no flicker), gameplay has correct colors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1aba99c to
8352d56
Compare
Replaces verbose palette delivery explanation with concise breakdown of all 4 DMA channels per HBlank (DMA0: scroll+BG 6w, DMA1: DISPCNT 1w, DMA2: WIN0H 1w, DMA3: palette 1w/64w). Explains counter-based mode selection, why 64-word can't be universal (EWRAM too slow, no source-reload), and why a counter not a flag (2:1 frame race). Event log now shows all 4 DMA channels during HBlank. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three changes:
1. Interactive tutorial (
docs/tutorial.html)Single-page guide teaching how ChromA emulates GB on GBA:
2. Palette pipeline overhaul
gbc_palette2staging buffer and line 75 copy —transfer_palette_reads directly frompal_before(128-byte frame-start snapshot)ff69_w_tailrecords up to 8 mid-frame splits, VCount interrupts patch PALRAM at split boundaries3. Test improvements
build/chroma.elf.mapTest plan
🤖 Generated with Claude Code