svi318: add the sv602 single slot expander

This commit is contained in:
Dirk Best 2016-03-20 12:19:19 +01:00
parent 3d676688cc
commit 6c9aaf6979
10 changed files with 159 additions and 25 deletions

View File

@ -2601,6 +2601,8 @@ if (BUSES["SVI_EXPANDER"]~=null) then
MAME_DIR .. "src/devices/bus/svi3x8/expander/modules.h",
MAME_DIR .. "src/devices/bus/svi3x8/expander/sv601.cpp",
MAME_DIR .. "src/devices/bus/svi3x8/expander/sv601.h",
MAME_DIR .. "src/devices/bus/svi3x8/expander/sv602.cpp",
MAME_DIR .. "src/devices/bus/svi3x8/expander/sv602.h",
}
end

View File

@ -10,4 +10,5 @@
SLOT_INTERFACE_START( svi_expander_modules )
SLOT_INTERFACE("sv601", SV601)
SLOT_INTERFACE("sv602", SV602)
SLOT_INTERFACE_END

View File

@ -13,6 +13,7 @@
#include "emu.h"
#include "sv601.h"
#include "sv602.h"
SLOT_INTERFACE_EXTERN( svi_expander_modules );

View File

@ -9,13 +9,6 @@
#include "sv601.h"
//**************************************************************************
// CONSTANTS/MACROS
//**************************************************************************
#define VERBOSE 0
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
@ -32,13 +25,13 @@ static MACHINE_CONFIG_FRAGMENT( sv601 )
MCFG_SVI_SLOT_INT_HANDLER(WRITELINE(sv601_device, int_w))
MCFG_SVI_SLOT_ROMDIS_HANDLER(WRITELINE(sv601_device, romdis_w))
MCFG_SVI_SLOT_RAMDIS_HANDLER(WRITELINE(sv601_device, ramdis_w))
MCFG_SVI_SLOT_ADD("0", NULL)
MCFG_SVI_SLOT_ADD("1", NULL)
MCFG_SVI_SLOT_ADD("2", NULL)
MCFG_SVI_SLOT_ADD("3", NULL)
MCFG_SVI_SLOT_ADD("4", NULL)
MCFG_SVI_SLOT_ADD("5", NULL)
MCFG_SVI_SLOT_ADD("6", NULL)
MCFG_SVI_SLOT_ADD("0", svi_slot_cards, NULL)
MCFG_SVI_SLOT_ADD("1", svi_slot_cards, NULL)
MCFG_SVI_SLOT_ADD("2", svi_slot_cards, NULL)
MCFG_SVI_SLOT_ADD("3", svi_slot_cards, NULL)
MCFG_SVI_SLOT_ADD("4", svi_slot_cards, NULL)
MCFG_SVI_SLOT_ADD("5", svi_slot_cards, NULL)
MCFG_SVI_SLOT_ADD("6", svi_slot_cards, NULL)
MACHINE_CONFIG_END
machine_config_constructor sv601_device::device_mconfig_additions() const
@ -70,14 +63,6 @@ void sv601_device::device_start()
{
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
void sv601_device::device_reset()
{
}
//**************************************************************************
// IMPLEMENTATION

View File

@ -47,7 +47,6 @@ public:
protected:
virtual machine_config_constructor device_mconfig_additions() const override;
virtual void device_start() override;
virtual void device_reset() override;
private:
required_device<svi_slot_bus_device> m_slotbus;

View File

@ -0,0 +1,77 @@
// license:GPL-2.0+
// copyright-holders:Dirk Best
/***************************************************************************
SV-602 Single Slot Expander for SVI-318/328
***************************************************************************/
#include "sv602.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
const device_type SV602 = &device_creator<sv602_device>;
//-------------------------------------------------
// machine_config_additions - device-specific
// machine configurations
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( sv602 )
MCFG_SVI_SLOT_BUS_ADD
MCFG_SVI_SLOT_INT_HANDLER(WRITELINE(sv602_device, int_w))
MCFG_SVI_SLOT_ROMDIS_HANDLER(WRITELINE(sv602_device, romdis_w))
MCFG_SVI_SLOT_RAMDIS_HANDLER(WRITELINE(sv602_device, ramdis_w))
MCFG_SVI_SLOT_ADD("0", sv602_slot_cards, NULL)
MACHINE_CONFIG_END
machine_config_constructor sv602_device::device_mconfig_additions() const
{
return MACHINE_CONFIG_NAME( sv602 );
}
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// sv602_device - constructor
//-------------------------------------------------
sv602_device::sv602_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, SV601, "SV-602 Single Slot Expander", tag, owner, clock, "sv602", __FILE__),
device_svi_expander_interface(mconfig, *this),
m_slotbus(*this, "slotbus")
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void sv602_device::device_start()
{
}
//**************************************************************************
// IMPLEMENTATION
//**************************************************************************
WRITE_LINE_MEMBER( sv602_device::int_w ) { m_expander->int_w(state); }
WRITE_LINE_MEMBER( sv602_device::romdis_w ) { m_expander->romdis_w(state); }
WRITE_LINE_MEMBER( sv602_device::ramdis_w ) { m_expander->ramdis_w(state); }
READ8_MEMBER( sv602_device::mreq_r ) { return m_slotbus->mreq_r(space, offset); }
WRITE8_MEMBER( sv602_device::mreq_w ) { m_slotbus->mreq_w(space, offset, data); }
READ8_MEMBER( sv602_device::iorq_r ) { return m_slotbus->iorq_r(space, offset); }
WRITE8_MEMBER( sv602_device::iorq_w ) { m_slotbus->iorq_w(space, offset, data); }
void sv602_device::bk21_w(int state) { m_slotbus->bk21_w(state); }
void sv602_device::bk22_w(int state) { m_slotbus->bk22_w(state); }
void sv602_device::bk31_w(int state) { m_slotbus->bk31_w(state); }
void sv602_device::bk32_w(int state) { m_slotbus->bk32_w(state); }

View File

@ -0,0 +1,58 @@
// license:GPL-2.0+
// copyright-holders:Dirk Best
/***************************************************************************
SV-602 Single Slot Expander for SVI-318/328
***************************************************************************/
#pragma once
#ifndef __SVI3X8_EXPANDER_SV602_H__
#define __SVI3X8_EXPANDER_SV602_H__
#include "emu.h"
#include "expander.h"
#include "bus/svi3x8/slot/slot.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> sv602_device
class sv602_device : public device_t, public device_svi_expander_interface
{
public:
// construction/destruction
sv602_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// from slots
WRITE_LINE_MEMBER( int_w );
WRITE_LINE_MEMBER( romdis_w );
WRITE_LINE_MEMBER( ramdis_w );
// from host
virtual DECLARE_READ8_MEMBER( mreq_r ) override;
virtual DECLARE_WRITE8_MEMBER( mreq_w ) override;
virtual DECLARE_READ8_MEMBER( iorq_r ) override;
virtual DECLARE_WRITE8_MEMBER( iorq_w ) override;
virtual void bk21_w(int state) override;
virtual void bk22_w(int state) override;
virtual void bk31_w(int state) override;
virtual void bk32_w(int state) override;
protected:
virtual machine_config_constructor device_mconfig_additions() const override;
virtual void device_start() override;
private:
required_device<svi_slot_bus_device> m_slotbus;
};
// device type definition
extern const device_type SV602;
#endif // __SVI3X8_EXPANDER_SV602_H__

View File

@ -16,3 +16,13 @@ SLOT_INTERFACE_START( svi_slot_cards )
SLOT_INTERFACE("sv806", SV806)
SLOT_INTERFACE("sv807", SV807)
SLOT_INTERFACE_END
// The single slot expander doesn't support the disk controller, since
// it requires its own power supply to power the disk drives
SLOT_INTERFACE_START( sv602_slot_cards )
SLOT_INTERFACE("sv802", SV802)
SLOT_INTERFACE("sv803", SV803)
SLOT_INTERFACE("sv805", SV805)
SLOT_INTERFACE("sv806", SV806)
SLOT_INTERFACE("sv807", SV807)
SLOT_INTERFACE_END

View File

@ -20,5 +20,6 @@
#include "sv807.h"
SLOT_INTERFACE_EXTERN( svi_slot_cards );
SLOT_INTERFACE_EXTERN( sv602_slot_cards );
#endif // __SVI3X8_SLOT_CARDS_H__

View File

@ -49,9 +49,9 @@
#define MCFG_SVI_SLOT_BUS_ADD \
MCFG_DEVICE_ADD("slotbus", SVI_SLOT_BUS, 0)
#define MCFG_SVI_SLOT_ADD(_tag, _def_slot) \
#define MCFG_SVI_SLOT_ADD(_tag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, SVI_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(svi_slot_cards, _def_slot, false) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false) \
svi_slot_device::set_bus(*device, owner, "slotbus");
#define MCFG_SVI_SLOT_INT_HANDLER(_devcb) \