From d08ebf6013e0cd5a74da8224d14eb7ca0f9e9606 Mon Sep 17 00:00:00 2001 From: Angelo Salese Date: Wed, 12 Sep 2012 01:24:33 +0000 Subject: Place-holder --- src/emu/emu.mak | 1 + src/emu/machine/seibu_cop.c | 96 ++++++++++++++++++++++++++++++++++++++++++ src/emu/machine/seibu_cop.h | 74 ++++++++++++++++++++++++++++++++ src/mame/etc/template_device.h | 16 +++---- 4 files changed, 179 insertions(+), 8 deletions(-) create mode 100644 src/emu/machine/seibu_cop.c create mode 100644 src/emu/machine/seibu_cop.h (limited to 'src') diff --git a/src/emu/emu.mak b/src/emu/emu.mak index 67d9bb9bde0..4e65cda9391 100644 --- a/src/emu/emu.mak +++ b/src/emu/emu.mak @@ -250,6 +250,7 @@ EMUMACHINEOBJS = \ $(EMUMACHINE)/scsidev.o \ $(EMUMACHINE)/scsihd.o \ $(EMUMACHINE)/secflash.o \ + $(EMUMACHINE)/seibu_cop.o \ $(EMUMACHINE)/smc91c9x.o \ $(EMUMACHINE)/tc009xlvc.o \ $(EMUMACHINE)/timekpr.o \ diff --git a/src/emu/machine/seibu_cop.c b/src/emu/machine/seibu_cop.c new file mode 100644 index 00000000000..588062471e5 --- /dev/null +++ b/src/emu/machine/seibu_cop.c @@ -0,0 +1,96 @@ +/*************************************************************************** + +Template for skeleton device + +***************************************************************************/ + +#include "emu.h" +#include "machine/seibu_cop.h" + + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +// device type definition +const device_type SEIBU_COP = &device_creator; + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// seibu_cop_device - constructor +//------------------------------------------------- + +seibu_cop_device::seibu_cop_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, SEIBU_COP, "seibu_cop", tag, owner, clock) +{ + +} + + +//------------------------------------------------- +// device_config_complete - perform any +// operations now that the configuration is +// complete +//------------------------------------------------- + +void seibu_cop_device::device_config_complete() +{ + // inherit a copy of the static data + const seibu_cop_interface *intf = reinterpret_cast(static_config()); + if (intf != NULL) + *static_cast(this) = *intf; + + // or initialize to defaults if none provided + else + { + memset(&m_in_mreq_cb, 0, sizeof(m_in_mreq_cb)); + memset(&m_out_mreq_cb, 0, sizeof(m_out_mreq_cb)); + } +} + +//------------------------------------------------- +// device_validity_check - perform validity checks +// on this device +//------------------------------------------------- + +void seibu_cop_device::device_validity_check(validity_checker &valid) const +{ +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void seibu_cop_device::device_start() +{ + +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void seibu_cop_device::device_reset() +{ +} + + +//************************************************************************** +// READ/WRITE HANDLERS +//************************************************************************** + +READ8_MEMBER( seibu_cop_device::read ) +{ + return 0; +} + +WRITE8_MEMBER( seibu_cop_device::write ) +{ +} diff --git a/src/emu/machine/seibu_cop.h b/src/emu/machine/seibu_cop.h new file mode 100644 index 00000000000..7b883540faf --- /dev/null +++ b/src/emu/machine/seibu_cop.h @@ -0,0 +1,74 @@ +/*************************************************************************** + +Template for skeleton device + +***************************************************************************/ + +#pragma once + +#ifndef __SEIBU_COPDEV_H__ +#define __SEIBU_COPDEV_H__ + + + +//************************************************************************** +// INTERFACE CONFIGURATION MACROS +//************************************************************************** + +#define MCFG_SEIBU_COP_ADD(_tag,_freq) \ + MCFG_DEVICE_ADD(_tag, SEIBU_COP, _freq) \ + +#define SEIBU_COP_INTERFACE(_name) \ + const seibu_cop_interface (_name) = + + +struct seibu_cop_interface +{ + // memory accessors + devcb_read8 m_in_mreq_cb; + devcb_write8 m_out_mreq_cb; +}; + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + +// ======================> seibu_cop_device + +class seibu_cop_device : public device_t, + public seibu_cop_interface +{ +public: + // construction/destruction + seibu_cop_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // I/O operations + DECLARE_WRITE8_MEMBER( write ); + DECLARE_READ8_MEMBER( read ); + +protected: + // device-level overrides + virtual void device_config_complete(); + virtual void device_validity_check(validity_checker &valid) const; + virtual void device_start(); + virtual void device_reset(); + +private: + devcb_resolved_read8 m_in_mreq_func; + devcb_resolved_write8 m_out_mreq_func; +}; + + +// device type definition +extern const device_type SEIBU_COP; + + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + + + +#endif diff --git a/src/mame/etc/template_device.h b/src/mame/etc/template_device.h index b7eb0632cee..5718f7832f9 100644 --- a/src/mame/etc/template_device.h +++ b/src/mame/etc/template_device.h @@ -6,8 +6,8 @@ Template for skeleton device #pragma once -#ifndef __xxxDEV_H__ -#define __xxxDEV_H__ +#ifndef __seibu_copDEV_H__ +#define __seibu_copDEV_H__ @@ -15,21 +15,21 @@ Template for skeleton device // INTERFACE CONFIGURATION MACROS //************************************************************************** -#define MCFG_XXX_ADD(_tag,_freq) \ - MCFG_DEVICE_ADD(_tag, xxx, _freq) \ +#define MCFG_SEIBU_COP_ADD(_tag,_freq) \ + MCFG_DEVICE_ADD(_tag, SEIBU_COP, _freq) \ //************************************************************************** // TYPE DEFINITIONS //************************************************************************** -// ======================> xxx_device +// ======================> seibu_cop_device -class xxx_device : public device_t +class seibu_cop_device : public device_t { public: // construction/destruction - xxx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + seibu_cop_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // I/O operations DECLARE_WRITE8_MEMBER( write ); @@ -44,7 +44,7 @@ protected: // device type definition -extern const device_type XXX; +extern const device_type SEIBU_COP; -- cgit v1.2.3