mirror of
https://github.com/holub/mame
synced 2025-05-10 00:01:52 +03:00
Added a template for devices (new model) in etc/ folder, nw
This commit is contained in:
parent
0d9dca1964
commit
086a5e453e
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -2996,6 +2996,8 @@ src/mame/drivers/zodiack.c svneol=native#text/plain
|
|||||||
src/mame/drivers/zr107.c svneol=native#text/plain
|
src/mame/drivers/zr107.c svneol=native#text/plain
|
||||||
src/mame/etc/fd1094dp.c svneol=native#text/plain
|
src/mame/etc/fd1094dp.c svneol=native#text/plain
|
||||||
src/mame/etc/jrcrypt.c svneol=native#text/plain
|
src/mame/etc/jrcrypt.c svneol=native#text/plain
|
||||||
|
src/mame/etc/template_device.c svneol=native#text/plain
|
||||||
|
src/mame/etc/template_device.h svneol=native#text/plain
|
||||||
src/mame/etc/template_driver.c svneol=native#text/plain
|
src/mame/etc/template_driver.c svneol=native#text/plain
|
||||||
src/mame/includes/1942.h svneol=native#text/plain
|
src/mame/includes/1942.h svneol=native#text/plain
|
||||||
src/mame/includes/1943.h svneol=native#text/plain
|
src/mame/includes/1943.h svneol=native#text/plain
|
||||||
|
@ -28,7 +28,7 @@ const device_type v3021 = &device_creator<v3021_device>;
|
|||||||
//**************************************************************************
|
//**************************************************************************
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// rtc9701_device - constructor
|
// v3021_device - constructor
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
v3021_device::v3021_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
v3021_device::v3021_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifndef __rtc9701DEV_H__
|
#ifndef __v3021DEV_H__
|
||||||
#define __rtc9701DEV_H__
|
#define __v3021DEV_H__
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
76
src/mame/etc/template_device.c
Normal file
76
src/mame/etc/template_device.c
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
|
||||||
|
Template for skeleton device
|
||||||
|
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
#include "emu.h"
|
||||||
|
#include "machine/xxx.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// GLOBAL VARIABLES
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
// device type definition
|
||||||
|
const device_type xxx = &device_creator<xxx_device>;
|
||||||
|
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// LIVE DEVICE
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// rtc9701_device - constructor
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
xxx_device::xxx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||||
|
: device_t(mconfig, xxx, "xxx", tag, owner, clock)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// device_validity_check - perform validity checks
|
||||||
|
// on this device
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
bool xxx_device::device_validity_check(emu_options &options, const game_driver &driver) const
|
||||||
|
{
|
||||||
|
bool error = false;
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// device_start - device-specific startup
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void xxx_device::device_start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------
|
||||||
|
// device_reset - device-specific reset
|
||||||
|
//-------------------------------------------------
|
||||||
|
|
||||||
|
void xxx_device::device_reset()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// READ/WRITE HANDLERS
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
READ8_MEMBER( xxx_device::read )
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
WRITE8_MEMBER( xxx_device::write )
|
||||||
|
{
|
||||||
|
}
|
61
src/mame/etc/template_device.h
Normal file
61
src/mame/etc/template_device.h
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
/***************************************************************************
|
||||||
|
|
||||||
|
v3021.h
|
||||||
|
|
||||||
|
EM Microelectronic-Marin SA Ultra Low Power 32kHz CMOS RTC (DIP8)
|
||||||
|
|
||||||
|
Serial Real Time Clock
|
||||||
|
|
||||||
|
***************************************************************************/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifndef __xxxDEV_H__
|
||||||
|
#define __xxxDEV_H__
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// INTERFACE CONFIGURATION MACROS
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
#define MCFG_XXX_ADD(_tag,_freq) \
|
||||||
|
MCFG_DEVICE_ADD(_tag, xxx, _freq) \
|
||||||
|
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// TYPE DEFINITIONS
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
// ======================> v3021_device
|
||||||
|
|
||||||
|
class xxx_device : public device_t
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// construction/destruction
|
||||||
|
xxx_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 bool device_validity_check(emu_options &options, const game_driver &driver) const;
|
||||||
|
virtual void device_start();
|
||||||
|
virtual void device_reset();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// device type definition
|
||||||
|
extern const device_type xxx;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//**************************************************************************
|
||||||
|
// GLOBAL VARIABLES
|
||||||
|
//**************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user