From 522819b0f42be6869a5ae27ea47ca6b0b1c042a9 Mon Sep 17 00:00:00 2001 From: mariuszw1 Date: Tue, 9 Nov 2010 21:02:38 +0000 Subject: [PATCH] Fixed problems with i2cmem. Cubo CD32 games now save and load settings properly. [Mariusz Wojcieszek] --- src/emu/machine/i2cmem.c | 5 ++--- src/mame/drivers/cubocd32.c | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/emu/machine/i2cmem.c b/src/emu/machine/i2cmem.c index b6967c57556..1c84ee5d58d 100644 --- a/src/emu/machine/i2cmem.c +++ b/src/emu/machine/i2cmem.c @@ -367,7 +367,6 @@ void i2cmem_device::set_sda_line( int state ) { verboselog( this, 1, "stop\n" ); m_state = STATE_IDLE; - m_byteaddr = 0; } else { @@ -570,7 +569,7 @@ READ_LINE_DEVICE_HANDLER( i2cmem_sda_read ) int i2cmem_device::read_sda_line() { - int res = m_sdar & m_sdaw & 1; + int res = m_sdar & 1; verboselog( this, 2, "read sda %d\n", res ); @@ -584,7 +583,7 @@ int i2cmem_device::read_sda_line() int i2cmem_device::address_mask() { - return ( 1 << m_config.m_address_bits ) - 1; + return (m_config.m_data_size - 1); } int i2cmem_device::select_device() diff --git a/src/mame/drivers/cubocd32.c b/src/mame/drivers/cubocd32.c index a7ec13e403f..691c2be9a5f 100644 --- a/src/mame/drivers/cubocd32.c +++ b/src/mame/drivers/cubocd32.c @@ -41,7 +41,6 @@ ToDo: - remove the hack needed to make inputs working - - settings are not saved Stephh's notes (based on the game M68EC020 code and some tests) :