From 9eb63608eaee50228c5160e9e856b841c9c6b9c6 Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Tue, 22 Dec 2020 04:02:30 +0100 Subject: [PATCH] Make sure we release the bus and data lines, also reset after ROM programming is done --- Src/control.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Src/control.c b/Src/control.c index af86441..a55c551 100644 --- a/Src/control.c +++ b/Src/control.c @@ -87,6 +87,14 @@ void control_program_eeprom(uint8_t* data, uint16_t length) { send_memrq(0); } + enable_address_out(0); + + // Release the bus again + send_busrq(0); + + // Restart the z80 + control_reset(); + printf("\n"); } @@ -234,6 +242,9 @@ void cycle() { had_ioreq = 0; } + // @todo We are forgetting to set this somewhere + enable_data_out(0); + if (has_memrq()) { handle_memrq(); } else if (has_ioreq() && !has_m1()) {