summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Angelo Salese <angelosa@users.noreply.github.com>2011-11-30 23:48:28 +0000
committer Angelo Salese <angelosa@users.noreply.github.com>2011-11-30 23:48:28 +0000
commit086a5e453ec458e50b9faa652e8892521c84f267 (patch)
treee6671c147e6b63b84b0e5cd22c5de9a15b6a728d
parent0d9dca196425731355a489e19576b4e2743770ff (diff)
Added a template for devices (new model) in etc/ folder, nw
-rw-r--r--.gitattributes2
-rw-r--r--src/emu/machine/v3021.c2
-rw-r--r--src/emu/machine/v3021.h4
-rw-r--r--src/mame/etc/template_device.c76
-rw-r--r--src/mame/etc/template_device.h61
5 files changed, 142 insertions, 3 deletions
diff --git a/.gitattributes b/.gitattributes
index f24b5857dc7..59eb15deafc 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -2996,6 +2996,8 @@ src/mame/drivers/zodiack.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/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/includes/1942.h svneol=native#text/plain
src/mame/includes/1943.h svneol=native#text/plain
diff --git a/src/emu/machine/v3021.c b/src/emu/machine/v3021.c
index 35d1a201d6b..b14b26dd840 100644
--- a/src/emu/machine/v3021.c
+++ b/src/emu/machine/v3021.c
@@ -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)
diff --git a/src/emu/machine/v3021.h b/src/emu/machine/v3021.h
index 3ba3f06581b..9a8bec9c3b2 100644
--- a/src/emu/machine/v3021.h
+++ b/src/emu/machine/v3021.h
@@ -10,8 +10,8 @@
#pragma once
-#ifndef __rtc9701DEV_H__
-#define __rtc9701DEV_H__
+#ifndef __v3021DEV_H__
+#define __v3021DEV_H__
diff --git a/src/mame/etc/template_device.c b/src/mame/etc/template_device.c
new file mode 100644
index 00000000000..d5c150cee32
--- /dev/null
+++ b/src/mame/etc/template_device.c
@@ -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 )
+{
+}
diff --git a/src/mame/etc/template_device.h b/src/mame/etc/template_device.h
new file mode 100644
index 00000000000..b7f017b550c
--- /dev/null
+++ b/src/mame/etc/template_device.h
@@ -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