Mercurial > repos > blastem
changeset 677:687c1dd3bcb9
Fake busack when Z80 is disabled
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 03 Jan 2015 21:54:41 -0800 |
parents | 41a399c11ef1 |
children | a7971650c04e |
files | blastem.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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;