]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - avr/z80-if.c
new debug command: xx test. get freq command from single step branch.
[z180-stamp.git] / avr / z80-if.c
index 9452ad1f18801f4e9d14cc42ed1a27169b62a94c..5d888420ed0d282242d1e2e6aeec3771c9a8586c 100644 (file)
@@ -145,6 +145,15 @@ void z80_bus_request_or_exit(void)
 static zstate_t zstate;
 static volatile uint8_t timer;         /* used for bus timeout */
 
+#if 0
+static volatile uint16_t req_cycles_ovl;
+
+ISR(TIMER4_COMPB_vect)
+{
+       req_cycles_ovl++;
+}
+#endif
+
 /*---------------------------------------------------------*/
 /* 10Hz timer interrupt generated by OC5A                  */
 /*---------------------------------------------------------*/
@@ -352,6 +361,7 @@ zstate_t z80_bus_cmd(bus_cmd_t cmd)
                z80_dbus_set_in();
                z80_addrbus_set_in();
                z80_reset_active();
+               _delay_us(10);
                Z80_O_BUSREQ = 1;
                timer = BUS_TO;
                while (Z80_I_BUSACK == 0 && timer)
@@ -400,6 +410,7 @@ zstate_t z80_bus_cmd(bus_cmd_t cmd)
                        z80_dbus_set_in();
                        z80_addrbus_set_in();
                        z80_reset_active();
+                       _delay_us(10);
                        Z80_O_BUSREQ = 1;
                        timer = BUS_TO;
                        while (Z80_I_BUSACK == 0 && timer)