Previous 199869 Revisions Next

r17809 Wednesday 12th September, 2012 at 01:24:33 UTC by Angelo Salese
Place-holder
[src/emu]emu.mak
[src/emu/machine]seibu_cop.c* seibu_cop.h*
[src/mame/etc]template_device.h

trunk/src/mame/etc/template_device.h
r17808r17809
66
77#pragma once
88
9#ifndef __xxxDEV_H__
10#define __xxxDEV_H__
9#ifndef __seibu_copDEV_H__
10#define __seibu_copDEV_H__
1111
1212
1313
r17808r17809
1515//  INTERFACE CONFIGURATION MACROS
1616//**************************************************************************
1717
18#define MCFG_XXX_ADD(_tag,_freq) \
19   MCFG_DEVICE_ADD(_tag, xxx, _freq) \
18#define MCFG_SEIBU_COP_ADD(_tag,_freq) \
19   MCFG_DEVICE_ADD(_tag, SEIBU_COP, _freq) \
2020
2121
2222//**************************************************************************
2323//  TYPE DEFINITIONS
2424//**************************************************************************
2525
26// ======================> xxx_device
26// ======================> seibu_cop_device
2727
28class xxx_device :   public device_t
28class seibu_cop_device :   public device_t
2929{
3030public:
3131   // construction/destruction
32   xxx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
32   seibu_cop_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
3333
3434   // I/O operations
3535   DECLARE_WRITE8_MEMBER( write );
r17808r17809
4444
4545
4646// device type definition
47extern const device_type XXX;
47extern const device_type SEIBU_COP;
4848
4949
5050
trunk/src/emu/emu.mak
r17808r17809
250250   $(EMUMACHINE)/scsidev.o      \
251251   $(EMUMACHINE)/scsihd.o      \
252252   $(EMUMACHINE)/secflash.o   \
253   $(EMUMACHINE)/seibu_cop.o   \
253254   $(EMUMACHINE)/smc91c9x.o   \
254255   $(EMUMACHINE)/tc009xlvc.o   \
255256   $(EMUMACHINE)/timekpr.o      \
trunk/src/emu/machine/seibu_cop.c
r0r17809
1/***************************************************************************
2
3Template for skeleton device
4
5***************************************************************************/
6
7#include "emu.h"
8#include "machine/seibu_cop.h"
9
10
11
12//**************************************************************************
13//  GLOBAL VARIABLES
14//**************************************************************************
15
16// device type definition
17const device_type SEIBU_COP = &device_creator<seibu_cop_device>;
18
19
20//**************************************************************************
21//  LIVE DEVICE
22//**************************************************************************
23
24//-------------------------------------------------
25//  seibu_cop_device - constructor
26//-------------------------------------------------
27
28seibu_cop_device::seibu_cop_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
29   : device_t(mconfig, SEIBU_COP, "seibu_cop", tag, owner, clock)
30{
31
32}
33
34
35//-------------------------------------------------
36//  device_config_complete - perform any
37//  operations now that the configuration is
38//  complete
39//-------------------------------------------------
40
41void seibu_cop_device::device_config_complete()
42{
43   // inherit a copy of the static data
44   const seibu_cop_interface *intf = reinterpret_cast<const seibu_cop_interface *>(static_config());
45   if (intf != NULL)
46      *static_cast<seibu_cop_interface *>(this) = *intf;
47
48   // or initialize to defaults if none provided
49   else
50   {
51      memset(&m_in_mreq_cb, 0, sizeof(m_in_mreq_cb));
52      memset(&m_out_mreq_cb, 0, sizeof(m_out_mreq_cb));
53   }
54}
55
56//-------------------------------------------------
57//  device_validity_check - perform validity checks
58//  on this device
59//-------------------------------------------------
60
61void seibu_cop_device::device_validity_check(validity_checker &valid) const
62{
63}
64
65
66//-------------------------------------------------
67//  device_start - device-specific startup
68//-------------------------------------------------
69
70void seibu_cop_device::device_start()
71{
72
73}
74
75
76//-------------------------------------------------
77//  device_reset - device-specific reset
78//-------------------------------------------------
79
80void seibu_cop_device::device_reset()
81{
82}
83
84
85//**************************************************************************
86//  READ/WRITE HANDLERS
87//**************************************************************************
88
89READ8_MEMBER( seibu_cop_device::read )
90{
91   return 0;
92}
93
94WRITE8_MEMBER( seibu_cop_device::write )
95{
96}
trunk/src/emu/machine/seibu_cop.h
r0r17809
1/***************************************************************************
2
3Template for skeleton device
4
5***************************************************************************/
6
7#pragma once
8
9#ifndef __SEIBU_COPDEV_H__
10#define __SEIBU_COPDEV_H__
11
12
13
14//**************************************************************************
15//  INTERFACE CONFIGURATION MACROS
16//**************************************************************************
17
18#define MCFG_SEIBU_COP_ADD(_tag,_freq) \
19   MCFG_DEVICE_ADD(_tag, SEIBU_COP, _freq) \
20
21#define SEIBU_COP_INTERFACE(_name) \
22   const seibu_cop_interface (_name) =
23
24
25struct seibu_cop_interface
26{
27   // memory accessors
28   devcb_read8         m_in_mreq_cb;
29   devcb_write8      m_out_mreq_cb;
30};
31
32
33//**************************************************************************
34//  TYPE DEFINITIONS
35//**************************************************************************
36
37// ======================> seibu_cop_device
38
39class seibu_cop_device :   public device_t,
40                     public seibu_cop_interface
41{
42public:
43   // construction/destruction
44   seibu_cop_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
45
46   // I/O operations
47   DECLARE_WRITE8_MEMBER( write );
48   DECLARE_READ8_MEMBER( read );
49
50protected:
51   // device-level overrides
52   virtual void device_config_complete();
53   virtual void device_validity_check(validity_checker &valid) const;
54   virtual void device_start();
55   virtual void device_reset();
56
57private:
58   devcb_resolved_read8      m_in_mreq_func;
59   devcb_resolved_write8      m_out_mreq_func;
60};
61
62
63// device type definition
64extern const device_type SEIBU_COP;
65
66
67
68//**************************************************************************
69//  GLOBAL VARIABLES
70//**************************************************************************
71
72
73
74#endif

Previous 199869 Revisions Next


© 1997-2024 The MAME Team