mirror of
https://github.com/holub/mame
synced 2025-04-23 08:49:55 +03:00
a2bus_device and a2eauxslot_device: converted to devcb2 (nw)
This commit is contained in:
parent
98d70c64a6
commit
7030ff593e
@ -128,30 +128,6 @@ void a2bus_device::static_set_cputag(device_t &device, const char *tag)
|
||||
a2bus.m_cputag = tag;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_config_complete - perform any
|
||||
// operations now that the configuration is
|
||||
// complete
|
||||
//-------------------------------------------------
|
||||
|
||||
void a2bus_device::device_config_complete()
|
||||
{
|
||||
// inherit a copy of the static data
|
||||
const a2bus_interface *intf = reinterpret_cast<const a2bus_interface *>(static_config());
|
||||
if (intf != NULL)
|
||||
{
|
||||
*static_cast<a2bus_interface *>(this) = *intf;
|
||||
}
|
||||
|
||||
// or initialize to defaults if none provided
|
||||
else
|
||||
{
|
||||
memset(&m_out_irq_cb, 0, sizeof(m_out_irq_cb));
|
||||
memset(&m_out_nmi_cb, 0, sizeof(m_out_nmi_cb));
|
||||
memset(&m_out_inh_cb, 0, sizeof(m_out_inh_cb));
|
||||
}
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
@ -161,12 +137,18 @@ void a2bus_device::device_config_complete()
|
||||
//-------------------------------------------------
|
||||
|
||||
a2bus_device::a2bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, A2BUS, "Apple II Bus", tag, owner, clock, "a2bus", __FILE__)
|
||||
device_t(mconfig, A2BUS, "Apple II Bus", tag, owner, clock, "a2bus", __FILE__),
|
||||
m_out_irq_cb(*this),
|
||||
m_out_nmi_cb(*this),
|
||||
m_out_inh_cb(*this)
|
||||
{
|
||||
}
|
||||
|
||||
a2bus_device::a2bus_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
|
||||
device_t(mconfig, type, name, tag, owner, clock, shortname, source)
|
||||
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
|
||||
m_out_irq_cb(*this),
|
||||
m_out_nmi_cb(*this),
|
||||
m_out_inh_cb(*this)
|
||||
{
|
||||
}
|
||||
//-------------------------------------------------
|
||||
@ -178,9 +160,9 @@ void a2bus_device::device_start()
|
||||
m_maincpu = machine().device<cpu_device>(m_cputag);
|
||||
|
||||
// resolve callbacks
|
||||
m_out_irq_func.resolve(m_out_irq_cb, *this);
|
||||
m_out_nmi_func.resolve(m_out_nmi_cb, *this);
|
||||
m_out_inh_func.resolve(m_out_inh_cb, *this);
|
||||
m_out_irq_cb.resolve_safe();
|
||||
m_out_nmi_cb.resolve_safe();
|
||||
m_out_inh_cb.resolve_safe();
|
||||
|
||||
// clear slots
|
||||
for (int i = 0; i < 8; i++)
|
||||
@ -219,22 +201,22 @@ void a2bus_device::add_a2bus_card(int slot, device_a2bus_card_interface *card)
|
||||
|
||||
void a2bus_device::set_irq_line(int state)
|
||||
{
|
||||
m_out_irq_func(state);
|
||||
m_out_irq_cb(state);
|
||||
}
|
||||
|
||||
void a2bus_device::set_nmi_line(int state)
|
||||
{
|
||||
m_out_nmi_func(state);
|
||||
m_out_nmi_cb(state);
|
||||
}
|
||||
|
||||
void a2bus_device::set_inh_slotnum(int slot)
|
||||
{
|
||||
m_out_inh_func(slot);
|
||||
m_out_inh_cb(slot);
|
||||
}
|
||||
|
||||
// interrupt request from a2bus card
|
||||
WRITE_LINE_MEMBER( a2bus_device::irq_w ) { m_out_irq_func(state); }
|
||||
WRITE_LINE_MEMBER( a2bus_device::nmi_w ) { m_out_nmi_func(state); }
|
||||
WRITE_LINE_MEMBER( a2bus_device::irq_w ) { m_out_irq_cb(state); }
|
||||
WRITE_LINE_MEMBER( a2bus_device::nmi_w ) { m_out_nmi_cb(state); }
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE CONFIG A2BUS CARD INTERFACE
|
||||
|
@ -19,10 +19,18 @@
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MCFG_A2BUS_BUS_ADD(_tag, _cputag, _config) \
|
||||
MCFG_DEVICE_ADD(_tag, A2BUS, 0) \
|
||||
MCFG_DEVICE_CONFIG(_config) \
|
||||
#define MCFG_A2BUS_CPU(_cputag) \
|
||||
a2bus_device::static_set_cputag(*device, _cputag);
|
||||
|
||||
#define MCFG_A2BUS_OUT_IRQ_CB(_devcb) \
|
||||
devcb = &a2bus_device::set_out_irq_callback(*device, DEVCB2_##_devcb);
|
||||
|
||||
#define MCFG_A2BUS_OUT_NMI_CB(_devcb) \
|
||||
devcb = &a2bus_device::set_out_nmi_callback(*device, DEVCB2_##_devcb);
|
||||
|
||||
#define MCFG_A2BUS_OUT_INH_CB(_devcb) \
|
||||
devcb = &a2bus_device::set_out_inh_callback(*device, DEVCB2_##_devcb);
|
||||
|
||||
#define MCFG_A2BUS_SLOT_ADD(_nbtag, _tag, _slot_intf, _def_slot) \
|
||||
MCFG_DEVICE_ADD(_tag, A2BUS_SLOT, 0) \
|
||||
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
|
||||
@ -35,9 +43,6 @@
|
||||
MCFG_DEVICE_INPUT_DEFAULTS(_def_inp) \
|
||||
device_a2bus_card_interface::static_set_a2bus_tag(*device, _nbtag, _tag);
|
||||
|
||||
#define MCFG_A2BUS_BUS_REMOVE(_tag) \
|
||||
MCFG_DEVICE_REMOVE(_tag)
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
@ -65,26 +70,21 @@ protected:
|
||||
// device type definition
|
||||
extern const device_type A2BUS_SLOT;
|
||||
|
||||
// ======================> a2bus_interface
|
||||
|
||||
struct a2bus_interface
|
||||
{
|
||||
devcb_write_line m_out_irq_cb;
|
||||
devcb_write_line m_out_nmi_cb;
|
||||
devcb_write_line m_out_inh_cb;
|
||||
};
|
||||
|
||||
class device_a2bus_card_interface;
|
||||
// ======================> a2bus_device
|
||||
class a2bus_device : public device_t,
|
||||
public a2bus_interface
|
||||
class a2bus_device : public device_t
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
a2bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
a2bus_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
|
||||
|
||||
// inline configuration
|
||||
static void static_set_cputag(device_t &device, const char *tag);
|
||||
template<class _Object> static devcb2_base &set_out_irq_callback(device_t &device, _Object object) { return downcast<a2bus_device &>(device).m_out_irq_cb.set_callback(object); }
|
||||
template<class _Object> static devcb2_base &set_out_nmi_callback(device_t &device, _Object object) { return downcast<a2bus_device &>(device).m_out_nmi_cb.set_callback(object); }
|
||||
template<class _Object> static devcb2_base &set_out_inh_callback(device_t &device, _Object object) { return downcast<a2bus_device &>(device).m_out_inh_cb.set_callback(object); }
|
||||
|
||||
void add_a2bus_card(int slot, device_a2bus_card_interface *card);
|
||||
device_a2bus_card_interface *get_a2bus_card(int slot);
|
||||
@ -100,14 +100,13 @@ protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
virtual void device_config_complete();
|
||||
|
||||
|
||||
// internal state
|
||||
cpu_device *m_maincpu;
|
||||
|
||||
devcb_resolved_write_line m_out_irq_func;
|
||||
devcb_resolved_write_line m_out_nmi_func;
|
||||
devcb_resolved_write_line m_out_inh_func;
|
||||
devcb2_write_line m_out_irq_cb;
|
||||
devcb2_write_line m_out_nmi_cb;
|
||||
devcb2_write_line m_out_inh_cb;
|
||||
|
||||
device_a2bus_card_interface *m_device_list[8];
|
||||
const char *m_cputag;
|
||||
|
@ -66,29 +66,6 @@ void a2eauxslot_device::static_set_cputag(device_t &device, const char *tag)
|
||||
a2eauxslot.m_cputag = tag;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// device_config_complete - perform any
|
||||
// operations now that the configuration is
|
||||
// complete
|
||||
//-------------------------------------------------
|
||||
|
||||
void a2eauxslot_device::device_config_complete()
|
||||
{
|
||||
// inherit a copy of the static data
|
||||
const a2eauxslot_interface *intf = reinterpret_cast<const a2eauxslot_interface *>(static_config());
|
||||
if (intf != NULL)
|
||||
{
|
||||
*static_cast<a2eauxslot_interface *>(this) = *intf;
|
||||
}
|
||||
|
||||
// or initialize to defaults if none provided
|
||||
else
|
||||
{
|
||||
memset(&m_out_irq_cb, 0, sizeof(m_out_irq_cb));
|
||||
memset(&m_out_nmi_cb, 0, sizeof(m_out_nmi_cb));
|
||||
}
|
||||
}
|
||||
|
||||
//**************************************************************************
|
||||
// LIVE DEVICE
|
||||
//**************************************************************************
|
||||
@ -98,12 +75,16 @@ void a2eauxslot_device::device_config_complete()
|
||||
//-------------------------------------------------
|
||||
|
||||
a2eauxslot_device::a2eauxslot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
|
||||
device_t(mconfig, A2EAUXSLOT, "Apple IIe AUX Bus", tag, owner, clock, "a2eauxslot", __FILE__)
|
||||
device_t(mconfig, A2EAUXSLOT, "Apple IIe AUX Bus", tag, owner, clock, "a2eauxslot", __FILE__),
|
||||
m_out_irq_cb(*this),
|
||||
m_out_nmi_cb(*this)
|
||||
{
|
||||
}
|
||||
|
||||
a2eauxslot_device::a2eauxslot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
|
||||
device_t(mconfig, type, name, tag, owner, clock, shortname, source)
|
||||
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
|
||||
m_out_irq_cb(*this),
|
||||
m_out_nmi_cb(*this)
|
||||
{
|
||||
}
|
||||
//-------------------------------------------------
|
||||
@ -115,8 +96,8 @@ void a2eauxslot_device::device_start()
|
||||
m_maincpu = machine().device<cpu_device>(m_cputag);
|
||||
|
||||
// resolve callbacks
|
||||
m_out_irq_func.resolve(m_out_irq_cb, *this);
|
||||
m_out_nmi_func.resolve(m_out_nmi_cb, *this);
|
||||
m_out_irq_cb.resolve_safe();
|
||||
m_out_nmi_cb.resolve_safe();
|
||||
|
||||
// clear slot
|
||||
m_device = NULL;
|
||||
@ -142,17 +123,17 @@ void a2eauxslot_device::add_a2eauxslot_card(device_a2eauxslot_card_interface *ca
|
||||
|
||||
void a2eauxslot_device::set_irq_line(int state)
|
||||
{
|
||||
m_out_irq_func(state);
|
||||
m_out_irq_cb(state);
|
||||
}
|
||||
|
||||
void a2eauxslot_device::set_nmi_line(int state)
|
||||
{
|
||||
m_out_nmi_func(state);
|
||||
m_out_nmi_cb(state);
|
||||
}
|
||||
|
||||
// interrupt request from a2eauxslot card
|
||||
WRITE_LINE_MEMBER( a2eauxslot_device::irq_w ) { m_out_irq_func(state); }
|
||||
WRITE_LINE_MEMBER( a2eauxslot_device::nmi_w ) { m_out_nmi_func(state); }
|
||||
WRITE_LINE_MEMBER( a2eauxslot_device::irq_w ) { m_out_irq_cb(state); }
|
||||
WRITE_LINE_MEMBER( a2eauxslot_device::nmi_w ) { m_out_nmi_cb(state); }
|
||||
|
||||
//**************************************************************************
|
||||
// DEVICE CONFIG A2EAUXSLOT CARD INTERFACE
|
||||
|
@ -18,10 +18,15 @@
|
||||
// INTERFACE CONFIGURATION MACROS
|
||||
//**************************************************************************
|
||||
|
||||
#define MCFG_A2EAUXSLOT_BUS_ADD(_tag, _cputag, _config) \
|
||||
MCFG_DEVICE_ADD(_tag, A2EAUXSLOT, 0) \
|
||||
MCFG_DEVICE_CONFIG(_config) \
|
||||
#define MCFG_A2EAUXSLOT_CPU(_cputag) \
|
||||
a2eauxslot_device::static_set_cputag(*device, _cputag);
|
||||
|
||||
#define MCFG_A2EAUXSLOT_OUT_IRQ_CB(_devcb) \
|
||||
devcb = &a2eauxslot_device::set_out_irq_callback(*device, DEVCB2_##_devcb);
|
||||
|
||||
#define MCFG_A2EAUXSLOT_OUT_NMI_CB(_devcb) \
|
||||
devcb = &a2eauxslot_device::set_out_nmi_callback(*device, DEVCB2_##_devcb);
|
||||
|
||||
#define MCFG_A2EAUXSLOT_SLOT_ADD(_nbtag, _tag, _slot_intf, _def_slot) \
|
||||
MCFG_DEVICE_ADD(_tag, A2EAUXSLOT_SLOT, 0) \
|
||||
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
|
||||
@ -29,9 +34,6 @@
|
||||
#define MCFG_A2EAUXSLOT_SLOT_REMOVE(_tag) \
|
||||
MCFG_DEVICE_REMOVE(_tag)
|
||||
|
||||
#define MCFG_A2EAUXSLOT_BUS_REMOVE(_tag) \
|
||||
MCFG_DEVICE_REMOVE(_tag)
|
||||
|
||||
//**************************************************************************
|
||||
// TYPE DEFINITIONS
|
||||
//**************************************************************************
|
||||
@ -59,26 +61,22 @@ protected:
|
||||
// device type definition
|
||||
extern const device_type A2EAUXSLOT_SLOT;
|
||||
|
||||
// ======================> a2eauxslot_interface
|
||||
|
||||
struct a2eauxslot_interface
|
||||
{
|
||||
devcb_write_line m_out_irq_cb;
|
||||
devcb_write_line m_out_nmi_cb;
|
||||
};
|
||||
|
||||
class device_a2eauxslot_card_interface;
|
||||
|
||||
// ======================> a2eauxslot_device
|
||||
class a2eauxslot_device : public device_t,
|
||||
public a2eauxslot_interface
|
||||
class a2eauxslot_device : public device_t
|
||||
{
|
||||
public:
|
||||
// construction/destruction
|
||||
a2eauxslot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||
a2eauxslot_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
|
||||
|
||||
// inline configuration
|
||||
static void static_set_cputag(device_t &device, const char *tag);
|
||||
|
||||
template<class _Object> static devcb2_base &set_out_irq_callback(device_t &device, _Object object) { return downcast<a2eauxslot_device &>(device).m_out_irq_cb.set_callback(object); }
|
||||
template<class _Object> static devcb2_base &set_out_nmi_callback(device_t &device, _Object object) { return downcast<a2eauxslot_device &>(device).m_out_nmi_cb.set_callback(object); }
|
||||
|
||||
void add_a2eauxslot_card(device_a2eauxslot_card_interface *card);
|
||||
device_a2eauxslot_card_interface *get_a2eauxslot_card();
|
||||
|
||||
@ -92,13 +90,12 @@ protected:
|
||||
// device-level overrides
|
||||
virtual void device_start();
|
||||
virtual void device_reset();
|
||||
virtual void device_config_complete();
|
||||
|
||||
// internal state
|
||||
cpu_device *m_maincpu;
|
||||
|
||||
devcb_resolved_write_line m_out_irq_func;
|
||||
devcb_resolved_write_line m_out_nmi_func;
|
||||
devcb2_write_line m_out_irq_cb;
|
||||
devcb2_write_line m_out_nmi_cb;
|
||||
|
||||
device_a2eauxslot_card_interface *m_device;
|
||||
const char *m_cputag;
|
||||
|
@ -227,19 +227,19 @@ Apple 3.5 and Apple 5.25 drives - up to three devices
|
||||
#define PADDLE_SENSITIVITY 10
|
||||
#define PADDLE_AUTOCENTER 0
|
||||
|
||||
WRITE8_MEMBER(apple2_state::a2bus_irq_w)
|
||||
WRITE_LINE_MEMBER(apple2_state::a2bus_irq_w)
|
||||
{
|
||||
m_maincpu->set_input_line(M6502_IRQ_LINE, data);
|
||||
m_maincpu->set_input_line(M6502_IRQ_LINE, state);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(apple2_state::a2bus_nmi_w)
|
||||
WRITE_LINE_MEMBER(apple2_state::a2bus_nmi_w)
|
||||
{
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, data);
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, state);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(apple2_state::a2bus_inh_w)
|
||||
WRITE_LINE_MEMBER(apple2_state::a2bus_inh_w)
|
||||
{
|
||||
m_inh_slot = data;
|
||||
m_inh_slot = state;
|
||||
apple2_update_memory();
|
||||
}
|
||||
|
||||
@ -948,21 +948,6 @@ static const cassette_interface apple2_cassette_interface =
|
||||
NULL
|
||||
};
|
||||
|
||||
static const struct a2bus_interface a2bus_intf =
|
||||
{
|
||||
// interrupt lines
|
||||
DEVCB_DRIVER_MEMBER(apple2_state,a2bus_irq_w),
|
||||
DEVCB_DRIVER_MEMBER(apple2_state,a2bus_nmi_w),
|
||||
DEVCB_DRIVER_MEMBER(apple2_state,a2bus_inh_w)
|
||||
};
|
||||
|
||||
static const struct a2eauxslot_interface a2eauxbus_intf =
|
||||
{
|
||||
// interrupt lines
|
||||
DEVCB_DRIVER_MEMBER(apple2_state,a2bus_irq_w),
|
||||
DEVCB_DRIVER_MEMBER(apple2_state,a2bus_nmi_w)
|
||||
};
|
||||
|
||||
static SLOT_INTERFACE_START(apple2_slot0_cards)
|
||||
SLOT_INTERFACE("lang", A2BUS_LANG) /* Apple II Language Card */
|
||||
SLOT_INTERFACE_END
|
||||
@ -1052,7 +1037,11 @@ static MACHINE_CONFIG_START( apple2_common, apple2_state )
|
||||
MCFG_AY3600_DATA_READY_CB(WRITELINE(apple2_state, ay3600_data_ready_w))
|
||||
|
||||
/* slot devices */
|
||||
MCFG_A2BUS_BUS_ADD("a2bus", "maincpu", a2bus_intf)
|
||||
MCFG_DEVICE_ADD("a2bus", A2BUS, 0)
|
||||
MCFG_A2BUS_CPU("maincpu")
|
||||
MCFG_A2BUS_OUT_IRQ_CB(WRITELINE(apple2_state, a2bus_irq_w))
|
||||
MCFG_A2BUS_OUT_NMI_CB(WRITELINE(apple2_state, a2bus_nmi_w))
|
||||
MCFG_A2BUS_OUT_INH_CB(WRITELINE(apple2_state, a2bus_inh_w))
|
||||
MCFG_A2BUS_SLOT_ADD("a2bus", "sl0", apple2_slot0_cards, "lang")
|
||||
MCFG_A2BUS_SLOT_ADD("a2bus", "sl1", apple2_cards, NULL)
|
||||
MCFG_A2BUS_SLOT_ADD("a2bus", "sl2", apple2_cards, NULL)
|
||||
@ -1112,7 +1101,10 @@ static MACHINE_CONFIG_DERIVED( apple2e, apple2_common )
|
||||
MCFG_A2BUS_SLOT_REMOVE("sl0")
|
||||
MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl0", A2BUS_LANG, NULL)
|
||||
|
||||
MCFG_A2EAUXSLOT_BUS_ADD(AUXSLOT_TAG, "maincpu", a2eauxbus_intf)
|
||||
MCFG_DEVICE_ADD(AUXSLOT_TAG, A2EAUXSLOT, 0)
|
||||
MCFG_A2EAUXSLOT_CPU("maincpu")
|
||||
MCFG_A2EAUXSLOT_OUT_IRQ_CB(WRITELINE(apple2_state, a2bus_irq_w))
|
||||
MCFG_A2EAUXSLOT_OUT_NMI_CB(WRITELINE(apple2_state, a2bus_nmi_w))
|
||||
MCFG_A2EAUXSLOT_SLOT_ADD(AUXSLOT_TAG, "aux", apple2eaux_cards, "ext80") // default to an extended 80-column card
|
||||
|
||||
MACHINE_CONFIG_END
|
||||
@ -1193,7 +1185,7 @@ static MACHINE_CONFIG_DERIVED( apple2c, apple2ee )
|
||||
MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_DISKIING, NULL)
|
||||
|
||||
MCFG_A2EAUXSLOT_SLOT_REMOVE("aux")
|
||||
MCFG_A2EAUXSLOT_BUS_REMOVE(AUXSLOT_TAG)
|
||||
MCFG_DEVICE_REMOVE(AUXSLOT_TAG)
|
||||
|
||||
MCFG_RAM_MODIFY(RAM_TAG)
|
||||
MCFG_RAM_DEFAULT_SIZE("128K")
|
||||
|
@ -264,9 +264,9 @@ WRITE8_MEMBER(apple2gs_state::adbmicro_p3_out)
|
||||
}
|
||||
#endif
|
||||
|
||||
WRITE8_MEMBER(apple2gs_state::a2bus_irq_w)
|
||||
WRITE_LINE_MEMBER(apple2gs_state::a2bus_irq_w)
|
||||
{
|
||||
if (data)
|
||||
if (state)
|
||||
{
|
||||
apple2gs_add_irq(IRQ_SLOT);
|
||||
}
|
||||
@ -276,25 +276,17 @@ WRITE8_MEMBER(apple2gs_state::a2bus_irq_w)
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(apple2gs_state::a2bus_nmi_w)
|
||||
WRITE_LINE_MEMBER(apple2gs_state::a2bus_nmi_w)
|
||||
{
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, data);
|
||||
m_maincpu->set_input_line(INPUT_LINE_NMI, state);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(apple2gs_state::a2bus_inh_w)
|
||||
WRITE_LINE_MEMBER(apple2gs_state::a2bus_inh_w)
|
||||
{
|
||||
m_inh_slot = data;
|
||||
m_inh_slot = state;
|
||||
apple2_update_memory();
|
||||
}
|
||||
|
||||
static const struct a2bus_interface a2bus_intf =
|
||||
{
|
||||
// interrupt lines
|
||||
DEVCB_DRIVER_MEMBER(apple2gs_state,a2bus_irq_w),
|
||||
DEVCB_DRIVER_MEMBER(apple2gs_state,a2bus_nmi_w),
|
||||
DEVCB_DRIVER_MEMBER(apple2gs_state,a2bus_inh_w)
|
||||
};
|
||||
|
||||
static SLOT_INTERFACE_START(apple2_cards)
|
||||
SLOT_INTERFACE("diskii", A2BUS_DISKII) /* Disk II Controller Card */
|
||||
SLOT_INTERFACE("mockingboard", A2BUS_MOCKINGBOARD) /* Sweet Micro Systems Mockingboard */
|
||||
@ -385,7 +377,11 @@ static MACHINE_CONFIG_START( apple2gs, apple2gs_state )
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
|
||||
|
||||
/* slot devices */
|
||||
MCFG_A2BUS_BUS_ADD("a2bus", "maincpu", a2bus_intf)
|
||||
MCFG_DEVICE_ADD("a2bus", A2BUS, 0)
|
||||
MCFG_A2BUS_CPU("maincpu")
|
||||
MCFG_A2BUS_OUT_IRQ_CB(WRITELINE(apple2gs_state, a2bus_irq_w))
|
||||
MCFG_A2BUS_OUT_NMI_CB(WRITELINE(apple2gs_state, a2bus_nmi_w))
|
||||
MCFG_A2BUS_OUT_INH_CB(WRITELINE(apple2gs_state, a2bus_inh_w))
|
||||
MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl0", A2BUS_LANG, NULL)
|
||||
MCFG_A2BUS_SLOT_ADD("a2bus", "sl1", apple2_cards, NULL)
|
||||
MCFG_A2BUS_SLOT_ADD("a2bus", "sl2", apple2_cards, NULL)
|
||||
|
@ -47,14 +47,6 @@ static SLOT_INTERFACE_START(apple3_cards)
|
||||
SLOT_INTERFACE("applicard", A2BUS_APPLICARD) /* PCPI Applicard */
|
||||
SLOT_INTERFACE_END
|
||||
|
||||
static const struct a2bus_interface a2bus_intf =
|
||||
{
|
||||
// interrupt lines
|
||||
// DEVCB_DRIVER_MEMBER(apple3_state,a2bus_irq_w),
|
||||
// DEVCB_DRIVER_MEMBER(apple3_state,a2bus_nmi_w)
|
||||
DEVCB_NULL,
|
||||
DEVCB_NULL
|
||||
};
|
||||
|
||||
static MACHINE_CONFIG_START( apple3, apple3_state )
|
||||
/* basic machine hardware */
|
||||
@ -97,7 +89,11 @@ static MACHINE_CONFIG_START( apple3, apple3_state )
|
||||
MCFG_AY3600_DATA_READY_CB(WRITELINE(apple3_state, ay3600_data_ready_w))
|
||||
|
||||
/* slot bus */
|
||||
MCFG_A2BUS_BUS_ADD("a2bus", "maincpu", a2bus_intf)
|
||||
MCFG_DEVICE_ADD("a2bus", A2BUS, 0)
|
||||
MCFG_A2BUS_CPU("maincpu")
|
||||
//MCFG_A2BUS_OUT_IRQ_CB(WRITELINE(apple3_state, a2bus_irq_w))
|
||||
//MCFG_A2BUS_OUT_NMI_CB(WRITELINE(apple3_state, a2bus_nmi_w))
|
||||
//MCFG_A2BUS_OUT_INH_CB(WRITELINE(apple3_state, a2bus_inh_w))
|
||||
MCFG_A2BUS_SLOT_ADD("a2bus", "sl1", apple3_cards, NULL)
|
||||
MCFG_A2BUS_SLOT_ADD("a2bus", "sl2", apple3_cards, NULL)
|
||||
MCFG_A2BUS_SLOT_ADD("a2bus", "sl3", apple3_cards, NULL)
|
||||
|
@ -323,9 +323,9 @@ public:
|
||||
DECLARE_VIDEO_START(apple2c);
|
||||
UINT32 screen_update_apple2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
TIMER_DEVICE_CALLBACK_MEMBER(apple2_interrupt);
|
||||
DECLARE_WRITE8_MEMBER(a2bus_irq_w);
|
||||
DECLARE_WRITE8_MEMBER(a2bus_nmi_w);
|
||||
DECLARE_WRITE8_MEMBER(a2bus_inh_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(a2bus_irq_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(a2bus_nmi_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(a2bus_inh_w);
|
||||
DECLARE_READ_LINE_MEMBER(ay3600_shift_r);
|
||||
DECLARE_READ_LINE_MEMBER(ay3600_control_r);
|
||||
DECLARE_WRITE_LINE_MEMBER(ay3600_data_ready_w);
|
||||
|
@ -195,9 +195,9 @@ public:
|
||||
TIMER_CALLBACK_MEMBER(apple2gs_clock_tick);
|
||||
TIMER_CALLBACK_MEMBER(apple2gs_qsecond_tick);
|
||||
TIMER_CALLBACK_MEMBER(apple2gs_scanline_tick);
|
||||
DECLARE_WRITE8_MEMBER(a2bus_irq_w);
|
||||
DECLARE_WRITE8_MEMBER(a2bus_nmi_w);
|
||||
DECLARE_WRITE8_MEMBER(a2bus_inh_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(a2bus_irq_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(a2bus_nmi_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(a2bus_inh_w);
|
||||
DECLARE_READ8_MEMBER(apple2gs_read_vector);
|
||||
|
||||
// ADB MCU and ADB GLU stuff
|
||||
|
Loading…
Reference in New Issue
Block a user