gameboy-rust/crates/gba-core/tests
0xrsydn 4e4dde742d fix(memory): return the Game Pak address pattern beyond the ROM chip
CPU and DMA reads past the supplied image returned Unmapped and stopped the
machine; a second game's boot code reads 0x09fe20f8 past a 16 MiB image. The
Game Pak shares data lines with the low address lines, so where no chip drives
the bus a read returns the halfword address, (A >> 1) & 0xffff, per lane
(GBATEK; mGBA uses the same pattern).

The chip is the image size rounded up to a power of two. Bytes between a
trimmed image's end and that boundary are unknown and stay diagnostic, as do
host reads and instruction fetches. Two truncation fixtures move into that gap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HhfHfHEuzv2AUTd6erW1gU
2026-10-14 14:28:41 +07:00
..
bios fix(memory): ignore CPU and DMA writes to the Game Pak ROM windows 2026-10-14 14:28:41 +07:00
cartridge_gpio feat(cartridge): implement RTC calendar transfers and clock updates 2026-10-07 05:59:29 +07:00
dma fix(memory): ignore CPU and DMA writes to unused I/O addresses 2026-10-14 14:28:41 +07:00
effects refactor: split into gameboy-rust workspace with core, demos, and desktop crates 2026-10-05 16:09:46 +07:00
mosaic refactor: split into gameboy-rust workspace with core, demos, and desktop crates 2026-10-05 16:09:46 +07:00
pulse_sound feat(audio): implement PSG pulse channel 2 2026-10-07 02:33:41 +07:00
scanlines refactor: split into gameboy-rust workspace with core, demos, and desktop crates 2026-10-05 16:09:46 +07:00
sprites refactor: split into gameboy-rust workspace with core, demos, and desktop crates 2026-10-05 16:09:46 +07:00
window_tracking refactor: split into gameboy-rust workspace with core, demos, and desktop crates 2026-10-05 16:09:46 +07:00
affine_backgrounds.rs fix(video): ignore enable bits for backgrounds a mode lacks 2026-10-14 14:28:41 +07:00
affine_tracking.rs refactor: split into gameboy-rust workspace with core, demos, and desktop crates 2026-10-05 16:09:46 +07:00
audio_capture.rs feat(audio): capture transactional fixed-rate stereo samples 2026-10-07 07:16:42 +07:00
bios.rs fix(memory): ignore CPU and DMA writes to the Game Pak ROM windows 2026-10-14 14:28:41 +07:00
bitmap_modes.rs fix(video): ignore enable bits for backgrounds a mode lacks 2026-10-14 14:28:41 +07:00
cartridge_gpio.rs feat(cartridge): implement RTC calendar transfers and clock updates 2026-10-07 05:59:29 +07:00
core.rs refactor: split into gameboy-rust workspace with core, demos, and desktop crates 2026-10-05 16:09:46 +07:00
direct_sound.rs feat(audio): add single-bank wave channel playback 2026-10-07 06:58:46 +07:00
display.rs fix(memory): ignore CPU and DMA writes to unused I/O addresses 2026-10-14 14:28:41 +07:00
dma.rs fix(memory): ignore CPU and DMA writes to unused I/O addresses 2026-10-14 14:28:41 +07:00
effects.rs refactor: split into gameboy-rust workspace with core, demos, and desktop crates 2026-10-05 16:09:46 +07:00
exceptions.rs refactor: split into gameboy-rust workspace with core, demos, and desktop crates 2026-10-05 16:09:46 +07:00
flash.rs feat(cartridge): implement transactional Flash programming and erase 2026-10-07 08:36:12 +07:00
flash_write.rs feat(cartridge): implement transactional Flash programming and erase 2026-10-07 08:36:12 +07:00
graphics.rs fix(video): ignore enable bits for backgrounds a mode lacks 2026-10-14 14:28:41 +07:00
halt.rs fix(memory): ignore CPU and DMA writes to unused I/O addresses 2026-10-14 14:28:41 +07:00
inactive_devices.rs feat(audio): add single-bank wave channel playback 2026-10-07 06:58:46 +07:00
keypad.rs fix(memory): ignore CPU and DMA writes to unused I/O addresses 2026-10-14 14:28:41 +07:00
machine.rs fix(memory): ignore CPU and DMA writes to unused I/O addresses 2026-10-14 14:28:41 +07:00
memory.rs refactor: split into gameboy-rust workspace with core, demos, and desktop crates 2026-10-05 16:09:46 +07:00
mosaic.rs refactor: split into gameboy-rust workspace with core, demos, and desktop crates 2026-10-05 16:09:46 +07:00
mosaic_tracking.rs refactor: split into gameboy-rust workspace with core, demos, and desktop crates 2026-10-05 16:09:46 +07:00
noise_sound.rs feat(audio): implement PSG noise channel 4 2026-10-07 02:54:57 +07:00
prefetch_cancellation.rs fix(timers): apply machine accesses at bus completion 2026-10-06 21:52:09 +07:00
pulse_sound.rs feat(audio): implement PSG pulse channel 2 2026-10-07 02:33:41 +07:00
rom_bus.rs fix(memory): return the Game Pak address pattern beyond the ROM chip 2026-10-14 14:28:41 +07:00
save_state.rs feat(core): add whole-machine save states with F5/F9 window slots 2026-10-14 14:28:41 +07:00
scanlines.rs refactor: split into gameboy-rust workspace with core, demos, and desktop crates 2026-10-05 16:09:46 +07:00
serial_control.rs feat(serial): support disconnected Joybus configuration and local registers 2026-10-07 06:38:04 +07:00
serial_external.rs fix(memory): ignore CPU and DMA writes to unused I/O addresses 2026-10-14 14:28:41 +07:00
serial_internal.rs feat(serial): clock disconnected normal transfers and completion IRQs 2026-10-07 04:23:07 +07:00
serial_joybus.rs feat(serial): support disconnected Joybus configuration and local registers 2026-10-07 06:38:04 +07:00
serial_multiplayer.rs feat(serial): model disconnected multiplayer configuration 2026-10-07 05:06:49 +07:00
sprite_budget.rs refactor: split into gameboy-rust workspace with core, demos, and desktop crates 2026-10-05 16:09:46 +07:00
sprite_pipeline.rs refactor: split into gameboy-rust workspace with core, demos, and desktop crates 2026-10-05 16:09:46 +07:00
sprites.rs refactor: split into gameboy-rust workspace with core, demos, and desktop crates 2026-10-05 16:09:46 +07:00
sram.rs feat(cartridge): add 32 KiB SRAM save memory 2026-10-14 14:28:41 +07:00
stop.rs fix(memory): ignore CPU and DMA writes to unused I/O addresses 2026-10-14 14:28:41 +07:00
tiles.rs fix(video): read BG maps and tiles through the 128 KiB VRAM mirror window 2026-10-07 10:11:51 +07:00
timer_prescaler.rs fix(timers): retain shared free-running prescaler phase 2026-10-06 22:07:49 +07:00
timers.rs fix(timers): retain shared free-running prescaler phase 2026-10-06 22:07:49 +07:00
timing.rs feat(cartridge): add explicit Flash identification and banked reads 2026-10-07 06:25:43 +07:00
video_bus_cpu.rs test(memory): integrate pinned public memory compatibility suite 2026-10-05 21:19:32 +07:00
wave_sound.rs feat(audio): add single-bank wave channel playback 2026-10-07 06:58:46 +07:00
window_tracking.rs refactor: split into gameboy-rust workspace with core, demos, and desktop crates 2026-10-05 16:09:46 +07:00