summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/backfire.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2013-07-29 07:34:22 +0000
committer Aaron Giles <aaron@aarongiles.com>2013-07-29 07:34:22 +0000
commitef3fdf419561d4c237630d1aeb4a31be91708ceb (patch)
treea042b7cf6bd4fd6afda13bd9a2d9e4652c5b0352 /src/mame/drivers/backfire.c
parentb25cb902d5f6fdadf9485b1a3ab60f4762246300 (diff)
Rewrite serial EEPROM devices, breaking them out into separate chips of
the proper size and protocol. Update all drivers, removing custom implementations, and replacing them with standard ones. Moved core read, write, erase functionality into the EEPROM base class a simulated delays in write/erase cycles. Still some more testing/verification work left to do.
Diffstat (limited to 'src/mame/drivers/backfire.c')
-rw-r--r--src/mame/drivers/backfire.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mame/drivers/backfire.c b/src/mame/drivers/backfire.c
index 168e972af67..e8eb46d39dd 100644
--- a/src/mame/drivers/backfire.c
+++ b/src/mame/drivers/backfire.c
@@ -60,7 +60,7 @@ public:
required_device<deco16ic_device> m_deco_tilegen1;
required_device<deco16ic_device> m_deco_tilegen2;
- required_device<serial_eeprom_device> m_eeprom;
+ required_device<eeprom_serial_93cxx_device> m_eeprom;
/* memory */
UINT16 m_pf1_rowscroll[0x0800/2];
@@ -197,7 +197,7 @@ READ32_MEMBER(backfire_state::backfire_eeprom_r)
{
/* some kind of screen indicator? checked by backfirea set before it will boot */
int backfire_screen = machine().rand() & 1;
- return ((m_eeprom->read_bit() << 24) | m_io_in0->read()
+ return ((m_eeprom->do_read() << 24) | m_io_in0->read()
| ((m_io_in2->read() & 0xbf) << 16)
| ((m_io_in3->read() & 0x40) << 16)) ^ (backfire_screen << 26) ;
}
@@ -205,14 +205,14 @@ READ32_MEMBER(backfire_state::backfire_eeprom_r)
READ32_MEMBER(backfire_state::backfire_control2_r)
{
// logerror("%08x:Read eprom %08x (%08x)\n", space.device().safe_pc(), offset << 1, mem_mask);
- return (m_eeprom->read_bit() << 24) | m_io_in1->read() | (m_io_in1->read() << 16);
+ return (m_eeprom->do_read() << 24) | m_io_in1->read() | (m_io_in1->read() << 16);
}
#ifdef UNUSED_FUNCTION
READ32_MEMBER(backfire_state::backfire_control3_r)
{
// logerror("%08x:Read eprom %08x (%08x)\n", space.device().safe_pc(), offset << 1, mem_mask);
- return (m_eeprom->read_bit() << 24) | m_io_in2->read() | (m_io_in2->read() << 16);
+ return (m_eeprom->do_read() << 24) | m_io_in2->read() | (m_io_in2->read() << 16);
}
#endif
@@ -222,9 +222,9 @@ WRITE32_MEMBER(backfire_state::backfire_eeprom_w)
logerror("%s:write eprom %08x (%08x) %08x\n",machine().describe_context(),offset<<1,mem_mask,data);
if (ACCESSING_BITS_0_7)
{
- m_eeprom->set_clock_line(BIT(data, 1) ? ASSERT_LINE : CLEAR_LINE);
- m_eeprom->write_bit(BIT(data, 0));
- m_eeprom->set_cs_line(BIT(data, 2) ? CLEAR_LINE : ASSERT_LINE);
+ m_eeprom->clk_write(BIT(data, 1) ? ASSERT_LINE : CLEAR_LINE);
+ m_eeprom->di_write(BIT(data, 0));
+ m_eeprom->cs_write(BIT(data, 2) ? ASSERT_LINE : CLEAR_LINE);
}
}
@@ -499,7 +499,7 @@ static MACHINE_CONFIG_START( backfire, backfire_state )
MCFG_CPU_PROGRAM_MAP(backfire_map)
MCFG_CPU_VBLANK_INT_DRIVER("lscreen", backfire_state, deco32_vbl_interrupt) /* or is it "rscreen?" */
- MCFG_EEPROM_93C46_ADD("eeprom")
+ MCFG_EEPROM_SERIAL_93C46_ADD("eeprom")
/* video hardware */