mirror of https://github.com/LIJI32/SameBoy.git
Writes affect the data bus too
This commit is contained in:
parent
7a390414ff
commit
c92a2c2131
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue