mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
Amiga: Connect Zorro interrupts in the Amiga 500 drivers and
reinitialize Zorro devices on reset to stop them from disappearing on soft reset.
This commit is contained in:
parent
0c94dbe055
commit
a461b4e1dc
@ -146,6 +146,13 @@
|
||||
|
||||
#include "emu.h"
|
||||
|
||||
//**************************************************************************
|
||||
// CONSTANTS / MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define EXP_SLOT_TAG "exp"
|
||||
#define ZORROBUS_TAG "zorrobus"
|
||||
|
||||
|
||||
//**************************************************************************
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
@ -159,9 +166,9 @@
|
||||
// ======================> expansion slot
|
||||
|
||||
#define MCFG_EXPANSION_SLOT_ADD(_cputag, _slot_intf, _def_slot) \
|
||||
MCFG_DEVICE_ADD("exp", EXP_SLOT, 0) \
|
||||
MCFG_DEVICE_ADD(EXP_SLOT_TAG, EXP_SLOT, 0) \
|
||||
zorro_device::set_cputag(*device, _cputag); \
|
||||
MCFG_ZORRO_SLOT_ADD("exp", "slot", _slot_intf, _def_slot)
|
||||
MCFG_ZORRO_SLOT_ADD(EXP_SLOT_TAG, "slot", _slot_intf, _def_slot)
|
||||
|
||||
// callbacks
|
||||
#define MCFG_EXPANSION_SLOT_OVR_HANDLER(_devcb) \
|
||||
@ -179,11 +186,11 @@
|
||||
// ======================> zorro 2 bus
|
||||
|
||||
#define MCFG_ZORRO2_ADD(_cputag) \
|
||||
MCFG_DEVICE_ADD("zorrobus", ZORRO2, 0) \
|
||||
MCFG_DEVICE_ADD(ZORROBUS_TAG, ZORRO2, 0) \
|
||||
zorro_device::set_cputag(*device, _cputag);
|
||||
|
||||
#define MCFG_ZORRO2_SLOT_ADD(_tag, _slot_intf, _def_slot) \
|
||||
MCFG_ZORRO_SLOT_ADD("zorrobus", _tag, _slot_intf, _def_slot)
|
||||
MCFG_ZORRO_SLOT_ADD(ZORROBUS_TAG, _tag, _slot_intf, _def_slot)
|
||||
|
||||
#define MCFG_ZORRO2_OVR_HANDLER(_devcb) \
|
||||
devcb = &zorro_device::set_ovr_handler(*device, DEVCB_##_devcb);
|
||||
|
@ -60,6 +60,7 @@ public:
|
||||
a2000_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
amiga_state(mconfig, type, tag),
|
||||
m_rtc(*this, "u65"),
|
||||
m_zorro(*this, ZORROBUS_TAG),
|
||||
m_zorro2_int2(0),
|
||||
m_zorro2_int6(0)
|
||||
{ }
|
||||
@ -74,6 +75,8 @@ public:
|
||||
DECLARE_WRITE16_MEMBER( clock_w );
|
||||
|
||||
protected:
|
||||
virtual void machine_reset();
|
||||
|
||||
// amiga_state overrides
|
||||
virtual bool int2_pending();
|
||||
virtual bool int6_pending();
|
||||
@ -81,6 +84,7 @@ protected:
|
||||
private:
|
||||
// devices
|
||||
required_device<msm6242_device> m_rtc;
|
||||
required_device<zorro2_device> m_zorro;
|
||||
|
||||
// internal state
|
||||
int m_zorro2_int2;
|
||||
@ -91,20 +95,29 @@ class a500_state : public amiga_state
|
||||
{
|
||||
public:
|
||||
a500_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
amiga_state(mconfig, type, tag)
|
||||
//m_side_int2(0),
|
||||
//m_side_int6(0)
|
||||
amiga_state(mconfig, type, tag),
|
||||
m_side(*this, EXP_SLOT_TAG),
|
||||
m_side_int2(0),
|
||||
m_side_int6(0)
|
||||
{ }
|
||||
|
||||
DECLARE_DRIVER_INIT( pal );
|
||||
DECLARE_DRIVER_INIT( ntsc );
|
||||
|
||||
protected:
|
||||
virtual void machine_reset();
|
||||
|
||||
// amiga_state overrides
|
||||
virtual bool int2_pending();
|
||||
virtual bool int6_pending();
|
||||
|
||||
private:
|
||||
// devices
|
||||
required_device<exp_slot_device> m_side;
|
||||
|
||||
// internal state
|
||||
//int m_side_int2;
|
||||
//int m_side_int6;
|
||||
int m_side_int2;
|
||||
int m_side_int6;
|
||||
};
|
||||
|
||||
class cdtv_state : public amiga_state
|
||||
@ -180,9 +193,10 @@ class a500p_state : public amiga_state
|
||||
public:
|
||||
a500p_state(const machine_config &mconfig, device_type type, const char *tag) :
|
||||
amiga_state(mconfig, type, tag),
|
||||
m_rtc(*this, "u9")
|
||||
//m_side_int2(0),
|
||||
//m_side_int6(0)
|
||||
m_rtc(*this, "u9"),
|
||||
m_side(*this, EXP_SLOT_TAG),
|
||||
m_side_int2(0),
|
||||
m_side_int6(0)
|
||||
{ }
|
||||
|
||||
DECLARE_READ16_MEMBER( clock_r );
|
||||
@ -192,14 +206,20 @@ public:
|
||||
DECLARE_DRIVER_INIT( ntsc );
|
||||
|
||||
protected:
|
||||
virtual void machine_reset();
|
||||
|
||||
// amiga_state overrides
|
||||
virtual bool int2_pending();
|
||||
virtual bool int6_pending();
|
||||
|
||||
private:
|
||||
// devices
|
||||
required_device<msm6242_device> m_rtc;
|
||||
required_device<exp_slot_device> m_side;
|
||||
|
||||
// internal state
|
||||
//int m_side_int2;
|
||||
//int m_side_int6;
|
||||
int m_side_int2;
|
||||
int m_side_int6;
|
||||
};
|
||||
|
||||
class a600_state : public amiga_state
|
||||
@ -557,6 +577,15 @@ WRITE16_MEMBER( a1000_state::write_protect_w )
|
||||
m_maincpu->space(AS_PROGRAM).nop_write(0xfc0000, 0xffffff);
|
||||
}
|
||||
|
||||
void a2000_state::machine_reset()
|
||||
{
|
||||
// base reset
|
||||
amiga_state::machine_reset();
|
||||
|
||||
// reset zorro devices
|
||||
m_zorro->reset();
|
||||
}
|
||||
|
||||
WRITE_LINE_MEMBER( a2000_state::zorro2_int2_w )
|
||||
{
|
||||
m_zorro2_int2 = state;
|
||||
@ -579,6 +608,25 @@ bool a2000_state::int6_pending()
|
||||
return m_cia_1_irq || m_zorro2_int6;
|
||||
}
|
||||
|
||||
void a500_state::machine_reset()
|
||||
{
|
||||
// base reset
|
||||
amiga_state::machine_reset();
|
||||
|
||||
// reset side expansion slot device
|
||||
m_side->reset();
|
||||
}
|
||||
|
||||
bool a500_state::int2_pending()
|
||||
{
|
||||
return m_cia_0_irq || m_side_int2;
|
||||
}
|
||||
|
||||
bool a500_state::int6_pending()
|
||||
{
|
||||
return m_cia_1_irq || m_side_int6;
|
||||
}
|
||||
|
||||
void cdtv_state::machine_start()
|
||||
{
|
||||
// start base machine
|
||||
@ -623,6 +671,25 @@ WRITE32_MEMBER( a3000_state::motherboard_w )
|
||||
logerror("motherboard_w(%06x): %08x & %08x\n", offset, data, mem_mask);
|
||||
}
|
||||
|
||||
void a500p_state::machine_reset()
|
||||
{
|
||||
// base reset
|
||||
amiga_state::machine_reset();
|
||||
|
||||
// reset side expansion slot device
|
||||
m_side->reset();
|
||||
}
|
||||
|
||||
bool a500p_state::int2_pending()
|
||||
{
|
||||
return m_cia_0_irq || m_side_int2;
|
||||
}
|
||||
|
||||
bool a500p_state::int6_pending()
|
||||
{
|
||||
return m_cia_1_irq || m_side_int6;
|
||||
}
|
||||
|
||||
bool a600_state::int2_pending()
|
||||
{
|
||||
return m_cia_0_irq || m_gayle_int2;
|
||||
|
Loading…
Reference in New Issue
Block a user