isbx: Added a placeholder for the Intel iSBX bus. [Curt Coder]

This commit is contained in:
Curt Coder 2013-10-20 09:39:59 +00:00
parent dfadf49eba
commit 361552f41b
8 changed files with 251 additions and 1 deletions

3
.gitattributes vendored
View File

@ -356,6 +356,9 @@ src/emu/attotime.c svneol=native#text/plain
src/emu/attotime.h svneol=native#text/plain
src/emu/audit.c svneol=native#text/plain
src/emu/audit.h svneol=native#text/plain
src/emu/bus/bus.mak svneol=native#text/plain
src/emu/bus/isbx/isbx.c svneol=native#text/plain
src/emu/bus/isbx/isbx.h svneol=native#text/plain
src/emu/cheat.c svneol=native#text/plain
src/emu/cheat.h svneol=native#text/plain
src/emu/clifront.c svneol=native#text/plain

24
src/emu/bus/bus.mak Normal file
View File

@ -0,0 +1,24 @@
###########################################################################
#
# bus.mak
#
# Rules for building bus cores
#
# Copyright Nicola Salmoria and the MAME Team.
# Visit http://mamedev.org for licensing and usage restrictions.
#
###########################################################################
BUSSRC = $(EMUSRC)/bus
BUSOBJ = $(EMUOBJ)/bus
#-------------------------------------------------
#
#@src/emu/bus/isbx.h,BUSES += ISBX
#-------------------------------------------------
ifneq ($(filter ISBX,$(BUSES)),)
BUSOBJS += $(BUSOBJ)/isbx/isbx.o
endif

92
src/emu/bus/isbx/isbx.c Normal file
View File

@ -0,0 +1,92 @@
// license:BSD-3-Clause
// copyright-holders:Curt Coder
/**********************************************************************
Intel iSBX bus emulation
Copyright MESS Team.
Visit http://mamedev.org for licensing and usage restrictions.
**********************************************************************/
#include "isbx.h"
//**************************************************************************
// DEVICE DEFINITIONS
//**************************************************************************
const device_type ISBX_SLOT = &device_creator<isbx_slot_device>;
//**************************************************************************
// DEVICE C64_EXPANSION CARD INTERFACE
//**************************************************************************
//-------------------------------------------------
// device_isbx_card_interface - constructor
//-------------------------------------------------
device_isbx_card_interface::device_isbx_card_interface(const machine_config &mconfig, device_t &device)
: device_slot_card_interface(mconfig, device)
{
m_slot = dynamic_cast<isbx_slot_device *>(device.owner());
}
//-------------------------------------------------
// ~device_isbx_card_interface - destructor
//-------------------------------------------------
device_isbx_card_interface::~device_isbx_card_interface()
{
}
//**************************************************************************
// LIVE DEVICE
//**************************************************************************
//-------------------------------------------------
// isbx_slot_device - constructor
//-------------------------------------------------
isbx_slot_device::isbx_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, ISBX_SLOT, "iSBX bus slot", tag, owner, clock, "isbx_slot", __FILE__),
device_slot_interface(mconfig, *this)
{
}
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
void isbx_slot_device::device_start()
{
m_card = dynamic_cast<device_isbx_card_interface *>(get_card_device());
}
//-------------------------------------------------
// device_reset - device-specific reset
//-------------------------------------------------
void isbx_slot_device::device_reset()
{
if (get_card_device())
{
get_card_device()->reset();
}
}
//-------------------------------------------------
// SLOT_INTERFACE( isbx_cards )
//-------------------------------------------------
SLOT_INTERFACE_START( isbx_cards )
SLOT_INTERFACE_END

105
src/emu/bus/isbx/isbx.h Normal file
View File

@ -0,0 +1,105 @@
// license:BSD-3-Clause
// copyright-holders:Curt Coder
/**********************************************************************
Intel iSBX bus emulation
Copyright MESS Team.
Visit http://mamedev.org for licensing and usage restrictions.
**********************************************************************
1 2
GND 3 4 +5V
RESET 5 6
MA2 7 8 MPST/
MA1 9 10
MA0 11 12 MINTR1
/IOWRT 13 14
/IORD 15 16 MWAIT/
GND 17 18 +5V
MD7 19 20 MCS1/
MD6 21 22 MCS0/
MD5 23 24
MD4 25 26 TDMA
MD3 27 28 OPT1
MD2 29 30 OPT0
MD1 31 32 MDACK/
MD0 33 34 MDRQT
GND 35 36 +5V
MDE 37 38 MDF
MDC 39 40 MDD
MDA 41 42 MDB
MD8 43 44 MD9
**********************************************************************/
#pragma once
#ifndef __ISBX_SLOT__
#define __ISBX_SLOT__
#include "emu.h"
//**************************************************************************
// INTERFACE CONFIGURATION MACROS
//**************************************************************************
#define MCFG_ISBX_SLOT_ADD(_tag, _slot_intf, _def_slot) \
MCFG_DEVICE_ADD(_tag, ISBX_SLOT, 0) \
MCFG_DEVICE_SLOT_INTERFACE(_slot_intf, _def_slot, false)
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> isbx_slot_device
class device_isbx_card_interface;
class isbx_slot_device : public device_t,
public device_slot_interface
{
public:
// construction/destruction
isbx_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
protected:
// device-level overrides
virtual void device_start();
virtual void device_reset();
device_isbx_card_interface *m_card;
};
// ======================> device_isbx_card_interface
class device_isbx_card_interface : public device_slot_card_interface
{
friend class isbx_slot_device;
public:
// construction/destruction
device_isbx_card_interface(const machine_config &mconfig, device_t &device);
virtual ~device_isbx_card_interface();
protected:
isbx_slot_device *m_slot;
};
// device type definition
extern const device_type ISBX_SLOT;
// slot devices
SLOT_INTERFACE_EXTERN( isbx_cards );
#endif

View File

@ -14,6 +14,7 @@ EMUSRC = $(SRC)/emu
EMUOBJ = $(OBJ)/emu
EMUAUDIO = $(EMUOBJ)/audio
EMUBUS = $(EMUOBJ)/bus
EMUDRIVERS = $(EMUOBJ)/drivers
EMULAYOUT = $(EMUOBJ)/layout
EMUMACHINE = $(EMUOBJ)/machine
@ -26,6 +27,8 @@ OBJDIRS += \
$(EMUOBJ)/debug \
$(EMUOBJ)/debugint \
$(EMUOBJ)/audio \
$(EMUOBJ)/bus \
$(EMUOBJ)/bus/isbx \
$(EMUOBJ)/drivers \
$(EMUOBJ)/machine \
$(EMUOBJ)/layout \
@ -209,11 +212,17 @@ include $(EMUSRC)/video/video.mak
include $(EMUSRC)/machine/machine.mak
#-------------------------------------------------
# bus core objects
#-------------------------------------------------
include $(EMUSRC)/bus/bus.mak
#-------------------------------------------------
# core optional library
#-------------------------------------------------
$(LIBOPTIONAL): $(CPUOBJS) $(SOUNDOBJS) $(VIDEOOBJS) $(MACHINEOBJS)
$(LIBOPTIONAL): $(CPUOBJS) $(SOUNDOBJS) $(VIDEOOBJS) $(MACHINEOBJS) $(BUSOBJS)
#-------------------------------------------------
# additional dependencies

View File

@ -258,6 +258,8 @@ static MACHINE_CONFIG_START( compis, compis_state )
MCFG_I8274_ADD(I8274_TAG, XTAL_16MHz/4, mpsc_intf)
MCFG_RS232_PORT_ADD(RS232_A_TAG, rs232a_intf, default_rs232_devices, NULL)
MCFG_RS232_PORT_ADD(RS232_B_TAG, rs232b_intf, default_rs232_devices, NULL)
MCFG_ISBX_SLOT_ADD(ISBX_0_TAG, isbx_cards, NULL)
MCFG_ISBX_SLOT_ADD(ISBX_1_TAG, isbx_cards, NULL)
MCFG_COMPIS_KEYBOARD_ADD(NULL)
/* software lists */
@ -299,6 +301,8 @@ static MACHINE_CONFIG_START( compis2, compis_state )
MCFG_I8274_ADD(I8274_TAG, XTAL_16MHz/4, mpsc_intf)
MCFG_RS232_PORT_ADD(RS232_A_TAG, rs232a_intf, default_rs232_devices, NULL)
MCFG_RS232_PORT_ADD(RS232_B_TAG, rs232b_intf, default_rs232_devices, NULL)
MCFG_ISBX_SLOT_ADD(ISBX_0_TAG, isbx_cards, NULL)
MCFG_ISBX_SLOT_ADD(ISBX_1_TAG, isbx_cards, NULL)
MCFG_COMPIS_KEYBOARD_ADD(NULL)
/* software lists */

View File

@ -13,6 +13,7 @@
#define COMPIS_H_
#include "emu.h"
#include "bus/isbx/isbx.h"
#include "cpu/i86/i186.h"
#include "cpu/mcs48/mcs48.h"
#include "formats/cpis_dsk.h"
@ -33,6 +34,8 @@
#define RS232_A_TAG "rs232a"
#define RS232_B_TAG "rs232b"
#define CASSETTE_TAG "cassette"
#define ISBX_0_TAG "isbx0"
#define ISBX_1_TAG "isbx1"
class compis_state : public driver_device
{
@ -51,6 +54,8 @@ public:
m_fdc(*this, "i8272a"),
m_crtc(*this, "upd7220"),
m_cassette(*this, CASSETTE_TAG),
m_isbx0(*this, ISBX_0_TAG),
m_isbx1(*this, ISBX_1_TAG),
m_video_ram(*this, "video_ram")
{ }
@ -66,6 +71,8 @@ public:
required_device<i8272a_device> m_fdc;
required_device<upd7220_device> m_crtc;
required_device<cassette_image_device> m_cassette;
required_device<isbx_slot_device> m_isbx0;
required_device<isbx_slot_device> m_isbx1;
DECLARE_WRITE8_MEMBER(vram_w);
DECLARE_READ8_MEMBER(compis_ppi_port_b_r);

View File

@ -472,6 +472,12 @@ MACHINES += Z8536
MACHINES += SECFLASH
MACHINES += PCCARD
#-------------------------------------------------
# specify available bus cores
#-------------------------------------------------
BUSES += ISBX
#-------------------------------------------------
# this is the list of driver libraries that
# comprise MESS plus messdriv.o which contains