summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/x2212.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/x2212.cpp')
-rw-r--r--src/devices/machine/x2212.cpp39
1 files changed, 15 insertions, 24 deletions
diff --git a/src/devices/machine/x2212.cpp b/src/devices/machine/x2212.cpp
index abd92ad1b7e..a78e5992246 100644
--- a/src/devices/machine/x2212.cpp
+++ b/src/devices/machine/x2212.cpp
@@ -31,38 +31,29 @@ ADDRESS_MAP_END
//**************************************************************************
// device type definition
-const device_type X2212 = device_creator<x2212_device>;
-const device_type X2210 = device_creator<x2210_device>;
+DEFINE_DEVICE_TYPE(X2212, x2212_device, "x2212", "Xicor X2212 256x4 NVRAM")
+DEFINE_DEVICE_TYPE(X2210, x2210_device, "x2210", "Xicor X2210 64x4 NVRAM")
//-------------------------------------------------
// x2212_device - constructor
//-------------------------------------------------
x2212_device::x2212_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : device_t(mconfig, X2212, "X2212 NVRAM", tag, owner, clock, "x2212", __FILE__),
- device_memory_interface(mconfig, *this),
- device_nvram_interface(mconfig, *this),
- m_auto_save(false),
- m_sram_space_config("SRAM", ENDIANNESS_BIG, 8, 8, 0, *ADDRESS_MAP_NAME(x2212_sram_map)),
- m_e2prom_space_config("E2PROM", ENDIANNESS_BIG, 8, 8, 0, *ADDRESS_MAP_NAME(x2212_e2prom_map)),
- m_store(false),
- m_array_recall(false),
- m_size_data(0x100),
- m_default_data(*this, DEVICE_SELF, 0x100)
+ : x2212_device(mconfig, X2212, tag, owner, clock, 0x100)
{
}
-x2212_device::x2212_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, uint32_t clock, const char *shortname, const char *source, int size_data)
- : device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- device_memory_interface(mconfig, *this),
- device_nvram_interface(mconfig, *this),
- m_auto_save(false),
- m_sram_space_config("SRAM", ENDIANNESS_BIG, 8, 8, 0, *ADDRESS_MAP_NAME(x2212_sram_map)),
- m_e2prom_space_config("E2PROM", ENDIANNESS_BIG, 8, 8, 0, *ADDRESS_MAP_NAME(x2212_e2prom_map)),
- m_store(false),
- m_array_recall(false),
- m_size_data(size_data),
- m_default_data(*this, DEVICE_SELF, size_data)
+x2212_device::x2212_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int size_data)
+ : device_t(mconfig, type, tag, owner, clock)
+ , device_memory_interface(mconfig, *this)
+ , device_nvram_interface(mconfig, *this)
+ , m_auto_save(false)
+ , m_sram_space_config("SRAM", ENDIANNESS_BIG, 8, 8, 0, *ADDRESS_MAP_NAME(x2212_sram_map))
+ , m_e2prom_space_config("E2PROM", ENDIANNESS_BIG, 8, 8, 0, *ADDRESS_MAP_NAME(x2212_e2prom_map))
+ , m_store(false)
+ , m_array_recall(false)
+ , m_size_data(size_data)
+ , m_default_data(*this, DEVICE_SELF, size_data)
{
}
@@ -240,6 +231,6 @@ WRITE_LINE_MEMBER( x2212_device::recall )
x2210_device::x2210_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : x2212_device(mconfig, X2210, "X2210", tag, owner, clock, "x2210", __FILE__, 0x40)
+ : x2212_device(mconfig, X2210, tag, owner, clock, 0x40)
{
}