File tree Expand file tree Collapse file tree 3 files changed +14
-16
lines changed Expand file tree Collapse file tree 3 files changed +14
-16
lines changed Original file line number Diff line number Diff line change @@ -789,11 +789,9 @@ void z80_device::execute_set_input(int inputnum, int state)
789
789
switch (inputnum)
790
790
{
791
791
case Z80_INPUT_LINE_BUSRQ:
792
- m_busrq_state = state;
793
- if (state != CLEAR_LINE)
792
+ if (m_busrq_state == CLEAR_LINE && state != CLEAR_LINE)
794
793
set_service_attention<SA_BUSRQ, 1 >();
795
- else
796
- set_service_attention<SA_BUSRQ, 0 >();
794
+ m_busrq_state = state;
797
795
break ;
798
796
799
797
case INPUT_LINE_NMI:
Original file line number Diff line number Diff line change @@ -140,13 +140,12 @@ class z80_device : public cpu_device, public z80_daisy_chain_interface
140
140
devcb_write_line m_busack_cb;
141
141
142
142
static constexpr u8 SA_BUSRQ = 0 ;
143
- static constexpr u8 SA_BUSACK = 1 ;
144
- static constexpr u8 SA_NMI_PENDING = 2 ;
145
- static constexpr u8 SA_IRQ_ON = 3 ;
146
- static constexpr u8 SA_HALT = 4 ;
147
- static constexpr u8 SA_AFTER_EI = 5 ;
148
- static constexpr u8 SA_AFTER_LDAIR = 6 ;
149
- static constexpr u8 SA_NSC800_IRQ_ON = 7 ;
143
+ static constexpr u8 SA_NMI_PENDING = 1 ;
144
+ static constexpr u8 SA_IRQ_ON = 2 ;
145
+ static constexpr u8 SA_HALT = 3 ;
146
+ static constexpr u8 SA_AFTER_EI = 4 ;
147
+ static constexpr u8 SA_AFTER_LDAIR = 5 ;
148
+ static constexpr u8 SA_NSC800_IRQ_ON = 6 ;
150
149
u8 m_service_attention; // bitmap for required handling in service step
151
150
152
151
PAIR16 m_prvpc;
Original file line number Diff line number Diff line change @@ -1048,17 +1048,18 @@ ffff
1048
1048
if (m_busrq_state) { // SA_BUSRQ
1049
1049
if (!m_busack_state) {
1050
1050
m_busack_state = 1;
1051
- set_service_attention<SA_BUSACK, 1>();
1052
1051
m_busack_cb(1);
1053
1052
}
1054
1053
if (m_icount > 0)
1055
1054
m_icount = 0;
1056
1055
m_ref = 0xffff00;
1057
1056
return;
1058
- } else if (m_busack_state) { // SA_BUSACK
1059
- m_busack_state = 0;
1060
- set_service_attention<SA_BUSACK, 0>();
1061
- m_busack_cb(0);
1057
+ } else {
1058
+ set_service_attention<SA_BUSRQ, 0>();
1059
+ if (m_busack_state) {
1060
+ m_busack_state = 0;
1061
+ m_busack_cb(0);
1062
+ }
1062
1063
}
1063
1064
@check_interrupts
1064
1065
set_service_attention<SA_AFTER_EI, 0>();
You can’t perform that action at this time.
0 commit comments