mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
x2212: added support for the 2210 (64x4)
This commit is contained in:
parent
93188e310b
commit
cbd26a0902
@ -30,6 +30,7 @@ ADDRESS_MAP_END
|
|||||||
|
|
||||||
// device type definition
|
// device type definition
|
||||||
const device_type X2212 = &device_creator<x2212_device>;
|
const device_type X2212 = &device_creator<x2212_device>;
|
||||||
|
const device_type X2210 = &device_creator<x2210_device>;
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// x2212_device - constructor
|
// x2212_device - constructor
|
||||||
@ -47,6 +48,17 @@ x2212_device::x2212_device(const machine_config &mconfig, const char *tag, devic
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
x2212_device::x2212_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
|
||||||
|
: 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)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
// static_set_auto_save - configuration helper
|
// static_set_auto_save - configuration helper
|
||||||
@ -70,6 +82,19 @@ void x2212_device::device_start()
|
|||||||
|
|
||||||
m_sram = m_addrspace[0];
|
m_sram = m_addrspace[0];
|
||||||
m_e2prom = m_addrspace[1];
|
m_e2prom = m_addrspace[1];
|
||||||
|
|
||||||
|
SIZE_DATA = 0x100;
|
||||||
|
}
|
||||||
|
|
||||||
|
void x2210_device::device_start()
|
||||||
|
{
|
||||||
|
save_item(NAME(m_store));
|
||||||
|
save_item(NAME(m_array_recall));
|
||||||
|
|
||||||
|
m_sram = m_addrspace[0];
|
||||||
|
m_e2prom = m_addrspace[1];
|
||||||
|
|
||||||
|
SIZE_DATA = 0x40;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -225,3 +250,9 @@ WRITE_LINE_MEMBER( x2212_device::recall )
|
|||||||
recall();
|
recall();
|
||||||
m_array_recall = (state != 0);
|
m_array_recall = (state != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
x2210_device::x2210_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
|
||||||
|
: x2212_device(mconfig, X2210, "X2210", tag, owner, clock, "x2210", __FILE__)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
@ -25,6 +25,13 @@
|
|||||||
MCFG_DEVICE_ADD(_tag, X2212, 0) \
|
MCFG_DEVICE_ADD(_tag, X2212, 0) \
|
||||||
x2212_device::static_set_auto_save(*device);
|
x2212_device::static_set_auto_save(*device);
|
||||||
|
|
||||||
|
#define MCFG_X2210_ADD(_tag) \
|
||||||
|
MCFG_DEVICE_ADD(_tag, X2210, 0)
|
||||||
|
|
||||||
|
#define MCFG_X2210_ADD_AUTOSAVE(_tag) \
|
||||||
|
MCFG_DEVICE_ADD(_tag, X2210, 0) \
|
||||||
|
x2212_device::static_set_auto_save(*device);
|
||||||
|
|
||||||
|
|
||||||
//**************************************************************************
|
//**************************************************************************
|
||||||
// TYPE DEFINITIONS
|
// TYPE DEFINITIONS
|
||||||
@ -40,6 +47,7 @@ class x2212_device : public device_t,
|
|||||||
public:
|
public:
|
||||||
// construction/destruction
|
// construction/destruction
|
||||||
x2212_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
x2212_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||||
|
x2212_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
|
||||||
|
|
||||||
// inline configuration helpers
|
// inline configuration helpers
|
||||||
static void static_set_auto_save(device_t &device);
|
static void static_set_auto_save(device_t &device);
|
||||||
@ -67,7 +75,7 @@ protected:
|
|||||||
virtual void nvram_read(emu_file &file);
|
virtual void nvram_read(emu_file &file);
|
||||||
virtual void nvram_write(emu_file &file);
|
virtual void nvram_write(emu_file &file);
|
||||||
|
|
||||||
static const int SIZE_DATA = 0x100;
|
int SIZE_DATA;
|
||||||
|
|
||||||
// configuration state
|
// configuration state
|
||||||
bool m_auto_save;
|
bool m_auto_save;
|
||||||
@ -84,9 +92,20 @@ protected:
|
|||||||
bool m_array_recall;
|
bool m_array_recall;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class x2210_device : public x2212_device
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
x2210_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// device-level overrides
|
||||||
|
virtual void device_start();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// device type definition
|
// device type definition
|
||||||
extern const device_type X2212;
|
extern const device_type X2212;
|
||||||
|
extern const device_type X2210;
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user