Skip to content

v0.1.29

@monteslu monteslu tagged this 03 Jun 20:48
Extends the active-bank capture (0.1.28, NES) to Game Boy / Game Boy Color —
the other platform with a 16-bit PC + a separate ROM-bank register, where a
$4000-$7FFF pc was bank-ambiguous.

- gambatte-memory.h: add Memory::romdev_romOffset(pc) — resolves a CPU addr to
  an absolute ROM-file offset via the LIVE bank (cart_.rmem(pc>>12) is host_ptr -
  area_base, like NES Page[]). cpu.cpp: the WRITE hook records it; libretro.cpp's
  watchpoint_get fills out6 with the offset. Host reads 6 u32s (already
  backward-compatible). findWriter returns prgOffset + bank for GB too.
  Verified: GB $967 → bank 0 (ROM0, correct).

SCOPE — honest: bank disambiguation now covers NES + GB/GBC. NOT needed on
SNES (24-bit PBPC already includes the bank), Genesis (m68k flat 24-bit ROM
address), or C64 (program runs in RAM). STILL NOT DONE: SMS/GG — they DO have
the 16-bit-PC + sega-mapper-paging problem, but gpgx's SMS ROM base is buried in
the cart_hw mapper and needs more digging; findWriter there still returns the
exact pc, just not the bank yet.

Bump romdev-core-gambatte 0.3.0 → 0.4.0, pin romdev-mcp. Tests 433.
Assets 2
Loading