diff options
author | Leo C | 2018-09-08 20:31:49 +0200 |
---|---|---|
committer | Leo C | 2018-09-08 20:31:49 +0200 |
commit | 7dda03f3ce376f35d080325551ccdca6c7414061 (patch) | |
tree | 1204654386929636f3f69487f570ad5e8e275f81 /avr/z80-if.c | |
parent | 89826c563e38a30d5bfc589905eb1202fa14b751 (diff) | |
download | z180-stamp-7dda03f3ce376f35d080325551ccdca6c7414061.zip |
bool reset_polarity --> Stat & S_RESET_POLARITY
Diffstat (limited to 'avr/z80-if.c')
-rw-r--r-- | avr/z80-if.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/avr/z80-if.c b/avr/z80-if.c index 7a953f0..9452ad1 100644 --- a/avr/z80-if.c +++ b/avr/z80-if.c @@ -144,7 +144,6 @@ void z80_bus_request_or_exit(void) static zstate_t zstate; static volatile uint8_t timer; /* used for bus timeout */ -static bool reset_polarity; /*---------------------------------------------------------*/ /* 10Hz timer interrupt generated by OC5A */ @@ -207,7 +206,7 @@ static void z80_dbus_set_out(void) static void z80_reset_active(void) { - if (reset_polarity) + if (Stat & S_RESET_POLARITY) Z80_O_RST = 1; else Z80_O_RST = 0; @@ -215,7 +214,7 @@ static void z80_reset_active(void) static void z80_reset_inactive(void) { - if (reset_polarity) + if (Stat & S_RESET_POLARITY) Z80_O_RST = 0; else Z80_O_RST = 1; @@ -255,7 +254,10 @@ void z80_setup_bus(void) DDR_SS = (DDR_SS & ~_BV(WAIT)) | _BV(RUN) | _BV(STEP); } - reset_polarity = Z80_I_RST; + if (Z80_I_RST) + Stat |= S_RESET_POLARITY; + else + Stat &= ~S_RESET_POLARITY; z80_reset_active(); DDR_RST |= _BV(RST); |