diff options
author | 2016-02-13 12:45:39 +0100 | |
---|---|---|
committer | 2016-02-13 12:46:29 +0100 | |
commit | a30effe1a79085a0327da54c9774acfacccc1e69 (patch) | |
tree | b966dac8632a010b20f4e33087793d59b67fc53e | |
parent | ebe987034ad2def64df67525f2fcf8eb265f5154 (diff) |
Amiga: Fixed expansion port interrupts, DMAC WIP
-rw-r--r-- | src/devices/bus/amiga/zorro/zorro.h | 4 | ||||
-rw-r--r-- | src/devices/machine/dmac.cpp | 39 | ||||
-rw-r--r-- | src/devices/machine/dmac.h | 2 | ||||
-rw-r--r-- | src/mame/drivers/amiga.cpp | 17 |
4 files changed, 42 insertions, 20 deletions
diff --git a/src/devices/bus/amiga/zorro/zorro.h b/src/devices/bus/amiga/zorro/zorro.h index fb14b7f09ca..7a37e334ada 100644 --- a/src/devices/bus/amiga/zorro/zorro.h +++ b/src/devices/bus/amiga/zorro/zorro.h @@ -166,8 +166,10 @@ #define MCFG_EXPANSION_SLOT_ADD(_cputag, _slot_intf, _def_slot) \ MCFG_DEVICE_ADD(EXP_SLOT_TAG, EXP_SLOT, 0) \ + device_t *temp = device; \ zorro_device::set_cputag(*device, _cputag); \ - MCFG_ZORRO_SLOT_ADD(EXP_SLOT_TAG, "slot", _slot_intf, _def_slot) + MCFG_ZORRO_SLOT_ADD(EXP_SLOT_TAG, "slot", _slot_intf, _def_slot) \ + device = temp; // callbacks #define MCFG_EXPANSION_SLOT_OVR_HANDLER(_devcb) \ diff --git a/src/devices/machine/dmac.cpp b/src/devices/machine/dmac.cpp index 34992fc4f5c..ba1167eb2d5 100644 --- a/src/devices/machine/dmac.cpp +++ b/src/devices/machine/dmac.cpp @@ -145,6 +145,8 @@ void dmac_device::check_interrupts() // any interrupts pending? if (m_istr & ISTR_INT_MASK) m_istr |= ISTR_INT_P; + else + m_istr &= ~ISTR_INT_P; } else m_istr &= ~ISTR_INT_P; @@ -202,18 +204,19 @@ READ16_MEMBER( dmac_device::register_read ) case 0x48: case 0x49: - case 0x50: - case 0x58: - case 0x59: - case 0x5a: - case 0x5b: - case 0x5c: - case 0x5e: - case 0x5f: data = m_scsi_read_handler(offset); if (VERBOSE) - logerror("%s('%s'): read scsi data @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask); + logerror("%s('%s'): read scsi register @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask); + + break; + + case 0x50: + case 0x51: + case 0x52: + case 0x53: + if (VERBOSE) + logerror("%s('%s'): read xt register @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask); break; @@ -306,20 +309,20 @@ WRITE16_MEMBER( dmac_device::register_write ) case 0x48: case 0x49: - case 0x50: - case 0x58: - case 0x59: - case 0x5a: - case 0x5b: - case 0x5c: - case 0x5e: - case 0x5f: if (VERBOSE) - logerror("%s('%s'): write scsi data @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask); + logerror("%s('%s'): write scsi register @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask); m_scsi_write_handler(offset, data, 0xff); break; + case 0x50: + case 0x51: + case 0x52: + case 0x53: + if (VERBOSE) + logerror("%s('%s'): write xt register @ %02x %04x [mask = %04x]\n", shortname(), basetag(), offset, data, mem_mask); + break; + case 0x70: if (VERBOSE) logerror("%s('%s'): write dma start strobe %04x [mask = %04x]\n", shortname(), basetag(), data, mem_mask); diff --git a/src/devices/machine/dmac.h b/src/devices/machine/dmac.h index 2d86c427013..8580b4c86ab 100644 --- a/src/devices/machine/dmac.h +++ b/src/devices/machine/dmac.h @@ -128,7 +128,7 @@ private: ISTR_FE_FLG = 0x001 // fifo-empty flag }; - static const int ISTR_INT_MASK = 0x1fc; + static const int ISTR_INT_MASK = 0x1ec; // callbacks devcb_write_line m_cfgout_handler; diff --git a/src/mame/drivers/amiga.cpp b/src/mame/drivers/amiga.cpp index edca3b6b9b9..f89e0536569 100644 --- a/src/mame/drivers/amiga.cpp +++ b/src/mame/drivers/amiga.cpp @@ -103,6 +103,9 @@ public: DECLARE_DRIVER_INIT( pal ); DECLARE_DRIVER_INIT( ntsc ); + DECLARE_WRITE_LINE_MEMBER( side_int2_w ); + DECLARE_WRITE_LINE_MEMBER( side_int6_w ); + protected: virtual void machine_reset() override; @@ -616,6 +619,18 @@ void a500_state::machine_reset() m_side->reset(); } +WRITE_LINE_MEMBER( a500_state::side_int2_w ) +{ + m_side_int2 = state; + update_int2(); +} + +WRITE_LINE_MEMBER( a500_state::side_int6_w ) +{ + m_side_int6 = state; + update_int6(); +} + bool a500_state::int2_pending() { return m_cia_0_irq || m_side_int2; @@ -1457,6 +1472,8 @@ static MACHINE_CONFIG_DERIVED_CLASS( a500, amiga_base, a500_state ) // cpu slot MCFG_EXPANSION_SLOT_ADD("maincpu", a500_expansion_cards, nullptr) + MCFG_EXPANSION_SLOT_INT2_HANDLER(WRITELINE(a500_state, side_int2_w)) + MCFG_EXPANSION_SLOT_INT6_HANDLER(WRITELINE(a500_state, side_int6_w)) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED_CLASS( a500n, a500, a500_state ) |