git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

commit c92a2c21314549a90268314991bc31d6790ac9e6
parent 7a390414ff9e0ebd1023e10d5c6d49562f9c79b9
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Fri,  6 Jan 2023 18:46:58 +0200

Writes affect the data bus too

Diffstat:
MCore/memory.c6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/Core/memory.c b/Core/memory.c @@ -1736,6 +1736,12 @@ void GB_write_memory(GB_gameboy_t *gb, uint16_t addr, uint8_t value) if (unlikely(gb->n_watchpoints)) { GB_debugger_test_write_watchpoint(gb, addr, value); } + if (bus_for_addr(gb, addr) == GB_BUS_MAIN && addr < 0xFF00) { + gb->data_bus = value; + } + else { + gb->data_bus = 0xFF; + } if (unlikely(gb->write_memory_callback)) { if (!gb->write_memory_callback(gb, addr, value)) return;

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.