summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/cpu/s2650/s2650.c19
-rw-r--r--src/emu/cpu/s2650/s2650.h4
2 files changed, 13 insertions, 10 deletions
diff --git a/src/emu/cpu/s2650/s2650.c b/src/emu/cpu/s2650/s2650.c
index ecc1a6a0437..0d3325c8be2 100644
--- a/src/emu/cpu/s2650/s2650.c
+++ b/src/emu/cpu/s2650/s2650.c
@@ -17,6 +17,8 @@
#include "s2650.h"
#include "s2650cpu.h"
+#define S2650_SENSE_LINE INPUT_LINE_IRQ1
+
/* define this to have some interrupt information logged */
#define VERBOSE 0
@@ -913,16 +915,19 @@ void s2650_device::device_reset()
void s2650_device::execute_set_input(int irqline, int state)
{
- if (irqline == 1)
+ switch (irqline)
{
+ case INPUT_LINE_IRQ0:
+ m_irq_state = state;
+ break;
+
+ case S2650_SENSE_LINE:
if (state == CLEAR_LINE)
s2650_set_sense(0);
else
s2650_set_sense(1);
- return;
+ break;
}
-
- m_irq_state = state;
}
void s2650_device::s2650_set_flag(int state)
@@ -946,11 +951,9 @@ void s2650_device::s2650_set_sense(int state)
set_psu(m_psu & ~SI);
}
-int s2650_device::s2650_get_sense()
+WRITE_LINE_MEMBER(s2650_device::write_sense)
{
- /* OR'd with Input to allow for external connections */
-
- return (((m_psu & SI) ? 1 : 0) | ((m_io->read_byte(S2650_SENSE_PORT) & SI) ? 1 : 0));
+ set_input_line(S2650_SENSE_LINE, state);
}
void s2650_device::execute_run()
diff --git a/src/emu/cpu/s2650/s2650.h b/src/emu/cpu/s2650/s2650.h
index c9da52f3cc5..1ba21d8fcc5 100644
--- a/src/emu/cpu/s2650/s2650.h
+++ b/src/emu/cpu/s2650/s2650.h
@@ -31,6 +31,8 @@ public:
// construction/destruction
s2650_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
+ DECLARE_WRITE_LINE_MEMBER(write_sense);
+
protected:
// device-level overrides
virtual void device_start();
@@ -94,8 +96,6 @@ private:
void s2650_set_flag(int state);
int s2650_get_flag();
void s2650_set_sense(int state);
- int s2650_get_sense();
-
};