summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Michael Zapf <Michael.Zapf@mizapf.de>2017-05-27 23:54:42 +0200
committer Michael Zapf <Michael.Zapf@mizapf.de>2017-05-27 23:55:58 +0200
commit77712cd87acc9cf3dbc93e4149aa62d6855db633 (patch)
tree3db7a8877ee03ad0128483fd804173f3a1d411c2
parent8b06899895811bed98689cef079852c6c2e84889 (diff)
ti99: Change ioport default to peb for ti99_4ev, also add evpc automatically
-rw-r--r--src/devices/bus/ti99/internal/ioport.cpp4
-rw-r--r--src/devices/bus/ti99/internal/ioport.h5
-rw-r--r--src/devices/bus/ti99/peb/peribox.cpp58
-rw-r--r--src/devices/bus/ti99/peb/peribox.h14
-rw-r--r--src/mame/drivers/ti99_4x.cpp2
5 files changed, 65 insertions, 18 deletions
diff --git a/src/devices/bus/ti99/internal/ioport.cpp b/src/devices/bus/ti99/internal/ioport.cpp
index 8602bcd8028..3cb53f6f560 100644
--- a/src/devices/bus/ti99/internal/ioport.cpp
+++ b/src/devices/bus/ti99/internal/ioport.cpp
@@ -171,3 +171,7 @@ SLOT_INTERFACE_START( ti99_io_port )
SLOT_INTERFACE("peb", TI99_PERIBOX)
SLOT_INTERFACE_END
+SLOT_INTERFACE_START( ti99_io_port_ev )
+ SLOT_INTERFACE("peb", TI99_PERIBOX_EV)
+SLOT_INTERFACE_END
+
diff --git a/src/devices/bus/ti99/internal/ioport.h b/src/devices/bus/ti99/internal/ioport.h
index e6e5737acc2..79c7d371c62 100644
--- a/src/devices/bus/ti99/internal/ioport.h
+++ b/src/devices/bus/ti99/internal/ioport.h
@@ -87,11 +87,16 @@ private:
DECLARE_DEVICE_TYPE_NS(TI99_IOPORT, bus::ti99::internal, ioport_device)
SLOT_INTERFACE_EXTERN(ti99_io_port);
+SLOT_INTERFACE_EXTERN(ti99_io_port_ev);
#define MCFG_IOPORT_ADD( _tag ) \
MCFG_DEVICE_ADD(_tag, TI99_IOPORT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(ti99_io_port, nullptr, false)
+#define MCFG_IOPORT_ADD_WITH_PEB( _tag ) \
+ MCFG_DEVICE_ADD(_tag, TI99_IOPORT, 0) \
+ MCFG_DEVICE_SLOT_INTERFACE(ti99_io_port_ev, "peb", false)
+
#define MCFG_IOPORT_EXTINT_HANDLER( _extint ) \
devcb = &bus::ti99::internal::ioport_device::static_set_extint_callback( *device, DEVCB_##_extint );
diff --git a/src/devices/bus/ti99/peb/peribox.cpp b/src/devices/bus/ti99/peb/peribox.cpp
index b4a83b75e46..3fc6531c017 100644
--- a/src/devices/bus/ti99/peb/peribox.cpp
+++ b/src/devices/bus/ti99/peb/peribox.cpp
@@ -201,6 +201,9 @@ CRUCLK* 51||52 DBIN
// This is a device that plugs into the slot "ioport" of the console
DEFINE_DEVICE_TYPE_NS(TI99_PERIBOX, bus::ti99::peb, peribox_device, "peribox", "Peripheral expansion box")
+// Peripheral box which has a EVPC card in slot 2 (for use with the ti99_4ev)
+DEFINE_DEVICE_TYPE_NS(TI99_PERIBOX_EV, bus::ti99::peb, peribox_ev_device, "peribox_ev", "Peripheral expansion box with EVPC")
+
// Peripheral box which hosts the SGCPU card in slot 1
DEFINE_DEVICE_TYPE_NS(TI99_PERIBOX_SG, bus::ti99::peb, peribox_sg_device, "peribox_sg", "Peripheral expansion box SGCPU")
@@ -489,7 +492,6 @@ void peribox_device::device_config_complete()
SLOT_INTERFACE_START( peribox_slot )
SLOT_INTERFACE("32kmem", TI99_32KMEM)
- SLOT_INTERFACE("evpc", TI99_EVPC )
SLOT_INTERFACE("myarcmem", TI99_MYARCMEM)
SLOT_INTERFACE("samsmem", TI99_SAMSMEM)
SLOT_INTERFACE("pcode", TI99_P_CODE)
@@ -520,6 +522,48 @@ machine_config_constructor peribox_device::device_mconfig_additions() const
}
/****************************************************************************
+ A variant of the box used for the TI-99/4A with EVPC.
+*****************************************************************************/
+
+peribox_ev_device::peribox_ev_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
+ : peribox_device(mconfig, TI99_PERIBOX_EV, tag, owner, clock)
+{
+ m_address_prefix = 0x70000;
+}
+
+SLOT_INTERFACE_START( peribox_slotv )
+ SLOT_INTERFACE("32kmem", TI99_32KMEM)
+ SLOT_INTERFACE("evpc", TI99_EVPC )
+ SLOT_INTERFACE("myarcmem", TI99_MYARCMEM)
+ SLOT_INTERFACE("samsmem", TI99_SAMSMEM)
+ SLOT_INTERFACE("pcode", TI99_P_CODE)
+ SLOT_INTERFACE("hsgpl", TI99_HSGPL)
+ SLOT_INTERFACE("tirs232", TI99_RS232)
+ SLOT_INTERFACE("speech", TI99_SPEECH)
+ SLOT_INTERFACE("horizon", TI99_HORIZON)
+ SLOT_INTERFACE("ide", TI99_IDE)
+ SLOT_INTERFACE("usbsm", TI99_USBSM)
+ SLOT_INTERFACE("bwg", TI99_BWG)
+ SLOT_INTERFACE("hfdc", TI99_HFDC)
+ SLOT_INTERFACE("tifdc", TI99_FDC)
+SLOT_INTERFACE_END
+
+MACHINE_CONFIG_START( peribox_ev_device )
+ MCFG_PERIBOX_SLOT_ADD_DEF( PEBSLOT2, peribox_slotv, "evpc" )
+ MCFG_PERIBOX_SLOT_ADD( PEBSLOT3, peribox_slotv )
+ MCFG_PERIBOX_SLOT_ADD( PEBSLOT4, peribox_slotv )
+ MCFG_PERIBOX_SLOT_ADD( PEBSLOT5, peribox_slotv )
+ MCFG_PERIBOX_SLOT_ADD( PEBSLOT6, peribox_slotv )
+ MCFG_PERIBOX_SLOT_ADD( PEBSLOT7, peribox_slotv )
+ MCFG_PERIBOX_SLOT_ADD( PEBSLOT8, peribox_slotv )
+MACHINE_CONFIG_END
+
+machine_config_constructor peribox_ev_device::device_mconfig_additions() const
+{
+ return MACHINE_CONFIG_NAME( peribox_ev_device );
+}
+
+/****************************************************************************
A variant of the box used for the Geneve.
*****************************************************************************/
@@ -585,17 +629,9 @@ SLOT_INTERFACE_START( peribox_slotp )
SLOT_INTERFACE("tifdc", TI99_FDC)
SLOT_INTERFACE_END
-SLOT_INTERFACE_START( peribox_ev_slot )
- SLOT_INTERFACE("evpc", TI99_EVPC)
-SLOT_INTERFACE_END
-
-SLOT_INTERFACE_START( peribox_hs_slot )
- SLOT_INTERFACE("hsgpl", TI99_HSGPL)
-SLOT_INTERFACE_END
-
MACHINE_CONFIG_START( peribox_sg_device )
- MCFG_PERIBOX_SLOT_ADD_DEF( PEBSLOT2, peribox_ev_slot, "evpc" )
- MCFG_PERIBOX_SLOT_ADD_DEF( PEBSLOT3, peribox_hs_slot, "hsgpl" )
+ MCFG_PERIBOX_SLOT_ADD_DEF( PEBSLOT2, peribox_slotp, "evpc" )
+ MCFG_PERIBOX_SLOT_ADD_DEF( PEBSLOT3, peribox_slotp, "hsgpl" )
MCFG_PERIBOX_SLOT_ADD( PEBSLOT4, peribox_slotp )
MCFG_PERIBOX_SLOT_ADD( PEBSLOT5, peribox_slotp )
MCFG_PERIBOX_SLOT_ADD( PEBSLOT6, peribox_slotp )
diff --git a/src/devices/bus/ti99/peb/peribox.h b/src/devices/bus/ti99/peb/peribox.h
index 6d9078110dd..182c5aac909 100644
--- a/src/devices/bus/ti99/peb/peribox.h
+++ b/src/devices/bus/ti99/peb/peribox.h
@@ -122,24 +122,25 @@ protected:
};
/*
- Variation for Geneve.
+ Variation for ti99_4ev. We put the EVPC in slot 2.
*/
-class peribox_gen_device : public peribox_device
+class peribox_ev_device : public peribox_device
{
public:
- peribox_gen_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ peribox_ev_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
virtual machine_config_constructor device_mconfig_additions() const override;
};
+
/*
- Variation for TI-99/8
+ Variation for Geneve.
*/
-class peribox_998_device : public peribox_device
+class peribox_gen_device : public peribox_device
{
public:
- peribox_998_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ peribox_gen_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
protected:
virtual machine_config_constructor device_mconfig_additions() const override;
@@ -257,6 +258,7 @@ protected:
} } } // end namespace bus::ti99::peb
DECLARE_DEVICE_TYPE_NS(TI99_PERIBOX, bus::ti99::peb, peribox_device)
+DECLARE_DEVICE_TYPE_NS(TI99_PERIBOX_EV, bus::ti99::peb, peribox_ev_device)
DECLARE_DEVICE_TYPE_NS(TI99_PERIBOX_SLOT, bus::ti99::peb, peribox_slot_device)
DECLARE_DEVICE_TYPE_NS(TI99_PERIBOX_SG, bus::ti99::peb, peribox_sg_device)
DECLARE_DEVICE_TYPE_NS(TI99_PERIBOX_GEN, bus::ti99::peb, peribox_gen_device)
diff --git a/src/mame/drivers/ti99_4x.cpp b/src/mame/drivers/ti99_4x.cpp
index 217bb3ee91c..4d9bd6e4dee 100644
--- a/src/mame/drivers/ti99_4x.cpp
+++ b/src/mame/drivers/ti99_4x.cpp
@@ -1150,7 +1150,7 @@ static MACHINE_CONFIG_START( ti99_4ev_60hz )
MCFG_SOFTWARE_LIST_ADD("cart_list_ti99", "ti99_cart")
// Input/output port
- MCFG_IOPORT_ADD( TI99_IOPORT_TAG )
+ MCFG_IOPORT_ADD_WITH_PEB( TI99_IOPORT_TAG )
MCFG_IOPORT_EXTINT_HANDLER( WRITELINE(ti99_4x_state, extint) )
MCFG_IOPORT_READY_HANDLER( DEVWRITELINE(DATAMUX_TAG, bus::ti99::internal::datamux_device, ready_line) )