# HG changeset patch # User Michael Pavone # Date 1420350881 28800 # Node ID 687c1dd3bcb94c2edb773e4271cc4342c52e922e # Parent 41a399c11ef1b3567069be1b88b73fc2a2cc8759 Fake busack when Z80 is disabled diff -r 41a399c11ef1 -r 687c1dd3bcb9 blastem.c --- a/blastem.c Sat Jan 03 21:35:23 2015 -0800 +++ b/blastem.c Sat Jan 03 21:54:41 2015 -0800 @@ -514,6 +514,8 @@ dputs("bus requesting Z80"); if (z80_enabled) { z80_assert_busreq(gen->z80, context->current_cycle); + } else { + gen->z80->busack = 1; } } else { if (gen->z80->busreq) { @@ -528,6 +530,8 @@ } if (z80_enabled) { z80_clear_busreq(gen->z80, context->current_cycle); + } else { + gen->z80->busack = 0; } } } else if (location == 0x1200) { @@ -616,7 +620,7 @@ } } else { if (location == 0x1100) { - value = z80_enabled ? !z80_get_busack(gen->z80, context->current_cycle) : 0; + value = z80_enabled ? !z80_get_busack(gen->z80, context->current_cycle) : !gen->z80->busack; dprintf("Byte read of BUSREQ returned %d @ %d (reset: %d)\n", value, context->current_cycle, gen->z80->reset); } else if (location == 0x1200) { value = !gen->z80->reset;