hphybrid: Add offset to interrupt callback to distinguish IRH from IRL (nw)

This commit is contained in:
AJR 2020-04-23 12:48:10 -04:00
parent 822e051896
commit 9ce4560ee3
4 changed files with 12 additions and 8 deletions

View File

@ -1326,8 +1326,8 @@ void hp_hybrid_cpu_device::check_for_interrupts()
standard_irq_callback(irqline);
// Get interrupt vector in low byte
uint8_t vector = m_int_func();
// Get interrupt vector in low byte (level is available on PA3)
uint8_t vector = m_int_func(BIT(m_flags , HPHYBRID_IRH_BIT) ? 1 : 0);
uint8_t new_PA;
// Get highest numbered 1

View File

@ -192,7 +192,7 @@ private:
DECLARE_READ16_MEMBER(hp64k_rear_sw_r);
uint8_t int_cb();
uint8_t int_cb(offs_t offset);
void hp64k_update_irl(void);
DECLARE_WRITE16_MEMBER(hp64k_irl_mask_w);
@ -527,9 +527,13 @@ READ16_MEMBER(hp64k_state::hp64k_rear_sw_r)
return m_rear_panel_sw->read() | 0x0020;
}
uint8_t hp64k_state::int_cb()
uint8_t hp64k_state::int_cb(offs_t offset)
{
return m_irl_mask & m_irl_pending;
if (offset == 0) {
return (m_irl_mask & m_irl_pending);
} else {
return 0xff;
}
}
void hp64k_state::hp64k_update_irl(void)

View File

@ -70,9 +70,9 @@ void hp98x5_io_sys_device::device_reset()
update_dmar();
}
uint8_t hp98x5_io_sys_device::int_r()
uint8_t hp98x5_io_sys_device::int_r(offs_t offset)
{
if ((m_irq_pending & 0xff00) == 0) {
if (offset == 0) {
return m_irq_pending & 0xff;
} else {
return m_irq_pending >> 8;

View File

@ -29,7 +29,7 @@ public:
auto flg() { return m_flg_handler.bind(); }
auto dmar() { return m_dmar_handler.bind(); }
uint8_t int_r();
uint8_t int_r(offs_t offset);
void pa_w(uint8_t data);
void set_irq(uint8_t sc , int state);