diff options
author | mamehaze <mamehaze@users.noreply.github.com> | 2015-03-13 17:28:15 +0000 |
---|---|---|
committer | mamehaze <mamehaze@users.noreply.github.com> | 2015-03-13 17:28:15 +0000 |
commit | 820ec98714cb229971830ac53df8e40dd12010ab (patch) | |
tree | 006747d4293f0367f57ea36af01a65436b0ee10a | |
parent | bf16d575e4d30b52c6be894a551b29bc8aca1c13 (diff) |
v53: provide access to the interrupt lines (nw)
-rw-r--r-- | src/emu/cpu/nec/v53.c | 29 | ||||
-rw-r--r-- | src/emu/cpu/nec/v53.h | 7 |
2 files changed, 30 insertions, 6 deletions
diff --git a/src/emu/cpu/nec/v53.c b/src/emu/cpu/nec/v53.c index feae9eb20f6..c43db72d35e 100644 --- a/src/emu/cpu/nec/v53.c +++ b/src/emu/cpu/nec/v53.c @@ -447,11 +447,34 @@ READ8_MEMBER(v53_base_device::get_pic_ack) return 0; } -WRITE_LINE_MEMBER( v53_base_device::upd71059_irq_w) + + +// the external interface provides no external access to the usual IRQ line of the V33, everything goes through the interrupt controller +void v53_base_device::execute_set_input(int irqline, int state) +{ + switch (irqline) + { + case INPUT_LINE_IRQ0: m_v53icu->ir0_w(state); break; + case INPUT_LINE_IRQ1: m_v53icu->ir1_w(state); break; + case INPUT_LINE_IRQ2: m_v53icu->ir2_w(state); break; + case INPUT_LINE_IRQ3: m_v53icu->ir3_w(state); break; + case INPUT_LINE_IRQ4: m_v53icu->ir4_w(state); break; + case INPUT_LINE_IRQ5: m_v53icu->ir5_w(state); break; + case INPUT_LINE_IRQ6: m_v53icu->ir6_w(state); break; + case INPUT_LINE_IRQ7: m_v53icu->ir7_w(state); break; + + case INPUT_LINE_NMI: nec_common_device::execute_set_input(irqline, state); break; + case NEC_INPUT_LINE_POLL: nec_common_device::execute_set_input(irqline, state); break; + } +} + +// for hooking the interrupt controller output up to the core +WRITE_LINE_MEMBER(v53_base_device::internal_irq_w) { - printf("upd71059_irq_w %d\n", state); + nec_common_device::execute_set_input(0, state); } + static MACHINE_CONFIG_FRAGMENT( v53 ) MCFG_DEVICE_ADD("pit", PIT8254, 0) // functionality identical to uPD71054 @@ -481,7 +504,7 @@ static MACHINE_CONFIG_FRAGMENT( v53 ) MCFG_AM9517A_OUT_DACK_3_CB(WRITELINE(v53_base_device, dma_dack3_trampoline_w)) - MCFG_PIC8259_ADD( "upd71059pic", WRITELINE(v53_base_device, upd71059_irq_w), VCC, READ8(v53_base_device,get_pic_ack)) + MCFG_PIC8259_ADD( "upd71059pic", WRITELINE(v53_base_device, internal_irq_w), VCC, READ8(v53_base_device,get_pic_ack)) MCFG_DEVICE_ADD("v53scu", V53_SCU, 0) MCFG_I8251_TXD_HANDLER(WRITELINE(v53_base_device, scu_txd_trampoline_cb)) diff --git a/src/emu/cpu/nec/v53.h b/src/emu/cpu/nec/v53.h index 3eec840fcd8..dbaa7778773 100644 --- a/src/emu/cpu/nec/v53.h +++ b/src/emu/cpu/nec/v53.h @@ -235,14 +235,16 @@ public: DECLARE_READ8_MEMBER(get_pic_ack); - DECLARE_WRITE_LINE_MEMBER(upd71059_irq_w); + DECLARE_WRITE_LINE_MEMBER(internal_irq_w); + protected: // device-level overrides virtual machine_config_constructor device_mconfig_additions() const; virtual void device_start(); virtual void device_reset(); - + virtual void execute_set_input(int inputnum, int state); + required_device<pit8253_device> m_v53tcu; required_device<upd71071_v53_device> m_v53dmau; required_device<pic8259_device> m_v53icu; @@ -286,7 +288,6 @@ protected: - }; |