summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus
diff options
context:
space:
mode:
author smf- <smf-@users.noreply.github.com>2020-05-06 10:51:16 +0100
committer smf- <smf-@users.noreply.github.com>2020-05-06 10:54:06 +0100
commitd3196bd99159f077316cf71e8536f41f75769ab0 (patch)
tree0c076ca632c161b863cb4e8128b960800567374d /src/devices/bus
parent505e8a4310736f28fff5bff41702d9780c69a4cc (diff)
Fixed regression in peps0615 introduced in 635f469c7dd0b5166455bafeddb0e898b1081165, the game writes to the page buffer then sends a spurious start condition before the stop condition that writes the buffer. [smf]
Created i2cmem sub classes for all used device types, fixed the buffer sizes that were wrong, removed the methods for modifying the data & buffer sizes and changed the drivers to use the correct types. [smf] Switched aa310 & ertictac over to use device/machine/pcf8583.cpp, which is not currently based on i2cmem.cpp but might be worth merging in the future. [smf]
Diffstat (limited to 'src/devices/bus')
-rw-r--r--src/devices/bus/bbc/1mhzbus/datacentre.cpp3
-rw-r--r--src/devices/bus/ekara/rom.cpp8
-rw-r--r--src/devices/bus/jakks_gamekey/rom.cpp2
-rw-r--r--src/devices/bus/megadrive/jcart.cpp2
4 files changed, 7 insertions, 8 deletions
diff --git a/src/devices/bus/bbc/1mhzbus/datacentre.cpp b/src/devices/bus/bbc/1mhzbus/datacentre.cpp
index 8cac8ab9a55..71ea5c50767 100644
--- a/src/devices/bus/bbc/1mhzbus/datacentre.cpp
+++ b/src/devices/bus/bbc/1mhzbus/datacentre.cpp
@@ -82,8 +82,7 @@ void bbc_datacentre_device::device_add_mconfig(machine_config &config)
ATA_INTERFACE(config, m_ide).options(ata_devices, "hdd", "hdd", false);
m_ide->irq_handler().set(FUNC(bbc_datacentre_device::irq_w));
- /* 24LC512 - 512Kb I2C Serial EEPROM */
- I2CMEM(config, m_nvram).set_page_size(128).set_data_size(0x10000);
+ I2C_24C512(config, m_nvram); // 24LC512
/* import floppy images - delayed to allow RAMFS to initialise before import */
QUICKLOAD(config, "import0", "ssd,dsd,img", attotime::from_seconds(1)).set_load_callback(FUNC(bbc_datacentre_device::quickload_cb<0>));
diff --git a/src/devices/bus/ekara/rom.cpp b/src/devices/bus/ekara/rom.cpp
index f55fd325d2a..de65f3abeb2 100644
--- a/src/devices/bus/ekara/rom.cpp
+++ b/src/devices/bus/ekara/rom.cpp
@@ -148,21 +148,21 @@ bool ekara_rom_i2c_24c08_epitch_device::is_write_access_not_rom(void)
void ekara_rom_i2c_24c08_epitch_device::device_add_mconfig(machine_config &config)
{
- I2CMEM(config, "i2cmem", 0).set_page_size(16).set_data_size(0x400); // 24C08
+ I2C_24C08(config, "i2cmem", 0);
}
// i2c 24lc04
void ekara_rom_i2c_24lc04_device::device_add_mconfig(machine_config &config)
{
- I2CMEM(config, "i2cmem", 0).set_page_size(16).set_data_size(0x200); // 24LC04
+ I2C_24C04(config, "i2cmem", 0); // 24LC04
}
// i2c 24lc02
void ekara_rom_i2c_24lc02_device::device_add_mconfig(machine_config &config)
{
- I2CMEM(config, "i2cmem", 0).set_page_size(16).set_data_size(0x100); // 24LC02
+ I2C_24C02(config, "i2cmem", 0); // 24LC02
}
// i2c 24lc02 with direct IO port access
@@ -206,7 +206,7 @@ READ_LINE_MEMBER(ekara_rom_i2c_24lc02_gc0010_device::read_sda )
void ekara_rom_i2c_24lc02_gc0010_device::device_add_mconfig(machine_config &config)
{
- I2CMEM(config, "i2cmem", 0)/*.set_page_size(16)*/.set_data_size(0x100); // 24LC02
+ I2C_24C02(config, "i2cmem", 0); // 24LC02
}
diff --git a/src/devices/bus/jakks_gamekey/rom.cpp b/src/devices/bus/jakks_gamekey/rom.cpp
index 0ca9b7024d9..c18d24d06ba 100644
--- a/src/devices/bus/jakks_gamekey/rom.cpp
+++ b/src/devices/bus/jakks_gamekey/rom.cpp
@@ -96,7 +96,7 @@ WRITE16_MEMBER(jakks_gamekey_rom_i2c_base_device::write_cart_seeprom)
void jakks_gamekey_rom_i2c_24lc04_device::device_add_mconfig(machine_config &config)
{
- I2CMEM(config, "i2cmem", 0)/*.set_page_size(16)*/.set_data_size(0x200); // 24LC04
+ I2C_24C04(config, "i2cmem", 0); // 24LC04
}
diff --git a/src/devices/bus/megadrive/jcart.cpp b/src/devices/bus/megadrive/jcart.cpp
index 76f38ff0dd3..80ade82bd86 100644
--- a/src/devices/bus/megadrive/jcart.cpp
+++ b/src/devices/bus/megadrive/jcart.cpp
@@ -88,7 +88,7 @@ void md_seprom_codemast_device::device_add_mconfig(machine_config &config)
void md_seprom_mm96_device::device_add_mconfig(machine_config &config)
{
- I2C_24C16A(config, m_i2cmem);
+ I2C_24C16(config, m_i2cmem); // 24C16A
}