mirror of
https://github.com/holub/mame
synced 2025-10-04 16:34:53 +03:00
v53: provide access to the interrupt lines (nw)
This commit is contained in:
parent
bf16d575e4
commit
820ec98714
@ -447,11 +447,34 @@ READ8_MEMBER(v53_base_device::get_pic_ack)
|
|||||||
return 0;
|
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)
|
||||||
{
|
{
|
||||||
printf("upd71059_irq_w %d\n", 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)
|
||||||
|
{
|
||||||
|
nec_common_device::execute_set_input(0, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static MACHINE_CONFIG_FRAGMENT( v53 )
|
static MACHINE_CONFIG_FRAGMENT( v53 )
|
||||||
|
|
||||||
MCFG_DEVICE_ADD("pit", PIT8254, 0) // functionality identical to uPD71054
|
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_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_DEVICE_ADD("v53scu", V53_SCU, 0)
|
||||||
MCFG_I8251_TXD_HANDLER(WRITELINE(v53_base_device, scu_txd_trampoline_cb))
|
MCFG_I8251_TXD_HANDLER(WRITELINE(v53_base_device, scu_txd_trampoline_cb))
|
||||||
|
@ -235,14 +235,16 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
DECLARE_READ8_MEMBER(get_pic_ack);
|
DECLARE_READ8_MEMBER(get_pic_ack);
|
||||||
DECLARE_WRITE_LINE_MEMBER(upd71059_irq_w);
|
DECLARE_WRITE_LINE_MEMBER(internal_irq_w);
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// device-level overrides
|
// device-level overrides
|
||||||
virtual machine_config_constructor device_mconfig_additions() const;
|
virtual machine_config_constructor device_mconfig_additions() const;
|
||||||
virtual void device_start();
|
virtual void device_start();
|
||||||
virtual void device_reset();
|
virtual void device_reset();
|
||||||
|
virtual void execute_set_input(int inputnum, int state);
|
||||||
|
|
||||||
required_device<pit8253_device> m_v53tcu;
|
required_device<pit8253_device> m_v53tcu;
|
||||||
required_device<upd71071_v53_device> m_v53dmau;
|
required_device<upd71071_v53_device> m_v53dmau;
|
||||||
required_device<pic8259_device> m_v53icu;
|
required_device<pic8259_device> m_v53icu;
|
||||||
@ -286,7 +288,6 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user