From 54b05196ee4f7bd0b8c267c75ea71be66bc3c2a3 Mon Sep 17 00:00:00 2001 From: Dirk Best Date: Sat, 20 Apr 2024 00:43:49 +0200 Subject: [PATCH] i2cmem: Add 24C128 and 24C256 variants --- src/devices/machine/i2cmem.cpp | 12 ++++++++++++ src/devices/machine/i2cmem.h | 6 +++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/devices/machine/i2cmem.cpp b/src/devices/machine/i2cmem.cpp index 625ecb1cabe..1197eb00c0c 100644 --- a/src/devices/machine/i2cmem.cpp +++ b/src/devices/machine/i2cmem.cpp @@ -75,6 +75,8 @@ DEFINE_DEVICE_TYPE(I2C_X2404P, i2c_x2404p_device, "x2404p", "X2404P I2C Memor DEFINE_DEVICE_TYPE(I2C_24C08, i2c_24c08_device, "24c08", "24C08 I2C Memory") DEFINE_DEVICE_TYPE(I2C_24C16, i2c_24c16_device, "24c16", "24C16 I2C Memory") DEFINE_DEVICE_TYPE(I2C_24C64, i2c_24c64_device, "24c64", "24C64 I2C Memory") +DEFINE_DEVICE_TYPE(I2C_24C128, i2c_24c128_device, "24c128", "24C128 I2C Memory") +DEFINE_DEVICE_TYPE(I2C_24C256, i2c_24c256_device, "24c256", "24C256 I2C Memory") DEFINE_DEVICE_TYPE(I2C_24C512, i2c_24c512_device, "24c512", "24C512 I2C Memory") //************************************************************************** @@ -183,6 +185,16 @@ i2c_24c64_device::i2c_24c64_device(const machine_config &mconfig, const char *ta { } +i2c_24c128_device::i2c_24c128_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + i2cmem_device(mconfig, I2C_24C128, tag, owner, clock, 0, 64, 0x4000) +{ +} + +i2c_24c256_device::i2c_24c256_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + i2cmem_device(mconfig, I2C_24C256, tag, owner, clock, 0, 64, 0x8000) +{ +} + i2c_24c512_device::i2c_24c512_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) : i2cmem_device(mconfig, I2C_24C512, tag, owner, clock, 0, 128, 0x10000) { diff --git a/src/devices/machine/i2cmem.h b/src/devices/machine/i2cmem.h index 07aebfa78ab..f907a96d1b1 100644 --- a/src/devices/machine/i2cmem.h +++ b/src/devices/machine/i2cmem.h @@ -115,9 +115,11 @@ DECLARE_I2C_DEVICE(x2404p); DECLARE_I2C_DEVICE(24c08); DECLARE_I2C_DEVICE(24c16); DECLARE_I2C_DEVICE(24c64); +DECLARE_I2C_DEVICE(24c128); +DECLARE_I2C_DEVICE(24c256); DECLARE_I2C_DEVICE(24c512); -// device type definition +// device type declaration DECLARE_DEVICE_TYPE(I2C_X24C01, i2c_x24c01_device) DECLARE_DEVICE_TYPE(I2C_24C01, i2c_24c01_device) DECLARE_DEVICE_TYPE(I2C_PCF8570, i2c_pcf8570_device) @@ -130,6 +132,8 @@ DECLARE_DEVICE_TYPE(I2C_X2404P, i2c_x2404p_device) DECLARE_DEVICE_TYPE(I2C_24C08, i2c_24c08_device) DECLARE_DEVICE_TYPE(I2C_24C16, i2c_24c16_device) DECLARE_DEVICE_TYPE(I2C_24C64, i2c_24c64_device) +DECLARE_DEVICE_TYPE(I2C_24C128, i2c_24c128_device) +DECLARE_DEVICE_TYPE(I2C_24C256, i2c_24c256_device) DECLARE_DEVICE_TYPE(I2C_24C512, i2c_24c512_device) #endif // MAME_MACHINE_I2CMEM_H