# Astra cartridge compatibility core

This extends the existing Astra RTC/MBC7 core with two focused corrections:

- core/graphics/lcd.ts: the transfer-data branch checks MIN_CYCLES_TRANSFER_DATA_LCD_MODE instead of repeating MIN_CYCLES_SPRITES_LCD_MODE. The duplicate condition made STAT mode 3 unreachable and left GTA2 polling forever.
- core/memory/readTraps.ts: CGB BGPD/OBPD reads return the palette byte selected by BGPI/OBPI. Pokemon Pinball reads its palettes back before fading in; returning only the last IO write made the game fade to black.

Only the eight new catalog cartridges use this binary (core ID wasmboy-astra-lcd1). Existing games retain their previous cores and save formats. These are targeted compatibility corrections, not cycle-accurate PPU timing.

Rebuild: npm ci --ignore-scripts, then npm run build. Compiler: pinned AssemblyScript 0.15.1. Copy the resulting wasmboy-astra.wasm as wasmboy-astra-lcd.wasm. Original RTC/MBC7 extensions and GPL-3.0-or-later licensing remain intact; see README-ASTRA.md and LICENSE. No ROMs are included in this source archive.

Validation: tests/added-cartridge-tests.cjs boots all eight supplied files, checks ROM byte identity and state/frame restoration. tests/compatibility-core-tests.cjs tests indexed palette readback and reachable STAT mode 3. Browser QA checks Pinball rendering and direct controls. See qa/ for results.
