summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/nes/bandai.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/nes/bandai.cpp')
-rw-r--r--src/devices/bus/nes/bandai.cpp40
1 files changed, 21 insertions, 19 deletions
diff --git a/src/devices/bus/nes/bandai.cpp b/src/devices/bus/nes/bandai.cpp
index ff87be980d5..1dd82f1747d 100644
--- a/src/devices/bus/nes/bandai.cpp
+++ b/src/devices/bus/nes/bandai.cpp
@@ -205,7 +205,7 @@ void nes_fjump2_device::pcb_reset()
-------------------------------------------------*/
-WRITE8_MEMBER(nes_oekakids_device::nt_w)
+void nes_oekakids_device::nt_w(offs_t offset, uint8_t data)
{
int page = ((offset & 0xc00) >> 10);
@@ -220,7 +220,7 @@ WRITE8_MEMBER(nes_oekakids_device::nt_w)
m_nt_access[page][offset & 0x3ff] = data;
}
-READ8_MEMBER(nes_oekakids_device::nt_r)
+uint8_t nes_oekakids_device::nt_r(offs_t offset)
{
int page = ((offset & 0xc00) >> 10);
@@ -253,7 +253,7 @@ void nes_oekakids_device::ppu_latch(offs_t offset)
#endif
}
-WRITE8_MEMBER(nes_oekakids_device::write_h)
+void nes_oekakids_device::write_h(offs_t offset, uint8_t data)
{
LOG_MMC(("oeka kids write_h, offset: %04x, data: %02x\n", offset, data));
@@ -308,7 +308,7 @@ void nes_fcg_device::device_timer(emu_timer &timer, device_timer_id id, int para
}
}
-WRITE8_MEMBER(nes_fcg_device::fcg_write)
+void nes_fcg_device::fcg_write(offs_t offset, uint8_t data)
{
LOG_MMC(("lz93d50_write, offset: %04x, data: %02x\n", offset, data));
@@ -346,12 +346,12 @@ WRITE8_MEMBER(nes_fcg_device::fcg_write)
}
}
-WRITE8_MEMBER(nes_fcg_device::write_m)
+void nes_fcg_device::write_m(offs_t offset, uint8_t data)
{
LOG_MMC(("lz93d50 write_m, offset: %04x, data: %02x\n", offset, data));
if (m_battery.empty() && m_prgram.empty())
- fcg_write(space, offset & 0x0f, data, mem_mask);
+ fcg_write(offset & 0x0f, data);
else if (!m_battery.empty())
m_battery[offset] = data;
else
@@ -361,7 +361,7 @@ WRITE8_MEMBER(nes_fcg_device::write_m)
// FCG board does not access regs in 0x8000-0xffff space!
// only later design lz93d50 (and its variants do)!
-WRITE8_MEMBER(nes_lz93d50_24c01_device::write_h)
+void nes_lz93d50_24c01_device::write_h(offs_t offset, uint8_t data)
{
LOG_MMC(("lz93d50_24c01 write_h, offset: %04x, data: %02x\n", offset, data));
@@ -373,12 +373,12 @@ WRITE8_MEMBER(nes_lz93d50_24c01_device::write_h)
m_i2c_dir = BIT(data, 7);
break;
default:
- fcg_write(space, offset & 0x0f, data, mem_mask);
+ fcg_write(offset & 0x0f, data);
break;
}
}
-READ8_MEMBER(nes_lz93d50_24c01_device::read_m)
+uint8_t nes_lz93d50_24c01_device::read_m(offs_t offset)
{
LOG_MMC(("lz93d50 EEPROM read, offset: %04x\n", offset));
if (m_i2c_dir)
@@ -391,13 +391,15 @@ READ8_MEMBER(nes_lz93d50_24c01_device::read_m)
// SERIAL I2C DEVICE
//-------------------------------------------------
-MACHINE_CONFIG_START(nes_lz93d50_24c01_device::device_add_mconfig)
- MCFG_24C01_ADD("i2cmem")
-MACHINE_CONFIG_END
+void nes_lz93d50_24c01_device::device_add_mconfig(machine_config &config)
+{
+ I2C_24C01(config, m_i2cmem);
+}
-MACHINE_CONFIG_START(nes_lz93d50_24c02_device::device_add_mconfig)
- MCFG_24C02_ADD("i2cmem")
-MACHINE_CONFIG_END
+void nes_lz93d50_24c02_device::device_add_mconfig(machine_config &config)
+{
+ I2C_24C02(config, m_i2cmem);
+}
/*-------------------------------------------------
@@ -428,19 +430,19 @@ void nes_fjump2_device::set_prg()
prg16_cdef(prg_base | 0x0f);
}
-READ8_MEMBER(nes_fjump2_device::read_m)
+uint8_t nes_fjump2_device::read_m(offs_t offset)
{
LOG_MMC(("fjump2 read_m, offset: %04x\n", offset));
return m_battery[offset & (m_battery.size() - 1)];
}
-WRITE8_MEMBER(nes_fjump2_device::write_m)
+void nes_fjump2_device::write_m(offs_t offset, uint8_t data)
{
LOG_MMC(("fjump2 write_m, offset: %04x, data: %02x\n", offset, data));
m_battery[offset & (m_battery.size() - 1)] = data;
}
-WRITE8_MEMBER(nes_fjump2_device::write_h)
+void nes_fjump2_device::write_h(offs_t offset, uint8_t data)
{
LOG_MMC(("fjump2 write_h, offset: %04x, data: %02x\n", offset, data));
@@ -458,7 +460,7 @@ WRITE8_MEMBER(nes_fjump2_device::write_h)
set_prg();
break;
default:
- fcg_write(space, offset & 0x0f, data, mem_mask);
+ fcg_write(offset & 0x0f, data);
break;
}
}