From b963a48cdf1e6f37a6bb64a07dde9428e827e0b5 Mon Sep 17 00:00:00 2001 From: Aaron Giles Date: Sat, 27 Jul 2013 03:28:25 +0000 Subject: [PATCH] Split eeprom.c into a base class base_eeprom_device and a serial-specific subclass serial_eeprom_device. Moved the latter into its own file eepromser.c and significantly cleaned up/simplified the code. The new code should be functionally the same as the previous code, but expect that to change soon. As a side-effect, the size and bus width of the EEPROM is now specified in the ADD macro rather than in the interface structure. --- .gitattributes | 2 + src/emu/distate.c | 4 +- src/emu/emucore.h | 1 + src/emu/machine/eeprom.c | 480 ++++++++----------------------- src/emu/machine/eeprom.h | 144 ++++------ src/emu/machine/eepromser.c | 437 ++++++++++++++++++++++++++++ src/emu/machine/eepromser.h | 152 ++++++++++ src/emu/machine/machine.mak | 2 + src/emu/machine/smpc.c | 2 +- src/emu/save.h | 1 + src/emu/video/pc_vga.c | 6 +- src/mame/drivers/20pacgal.c | 6 +- src/mame/drivers/39in1.c | 2 +- src/mame/drivers/8080bw.c | 2 +- src/mame/drivers/albazg.c | 2 +- src/mame/drivers/asterix.c | 6 +- src/mame/drivers/astrcorp.c | 2 +- src/mame/drivers/ataxx.c | 6 +- src/mame/drivers/backfire.c | 2 +- src/mame/drivers/cave.c | 6 +- src/mame/drivers/cbasebal.c | 6 +- src/mame/drivers/centiped.c | 2 +- src/mame/drivers/cps1.c | 12 +- src/mame/drivers/cps2.c | 6 +- src/mame/drivers/dcheese.c | 2 +- src/mame/drivers/deco156.c | 2 +- src/mame/drivers/deco32.c | 6 +- src/mame/drivers/deco_mlc.c | 2 +- src/mame/drivers/dkong.c | 2 +- src/mame/drivers/dreambal.c | 2 +- src/mame/drivers/eolith.c | 6 +- src/mame/drivers/eolith16.c | 6 +- src/mame/drivers/esd16.c | 2 +- src/mame/drivers/f-32.c | 2 +- src/mame/drivers/fcrash.c | 12 +- src/mame/drivers/fortecar.c | 6 +- src/mame/drivers/fromanc2.c | 2 +- src/mame/drivers/gaelco2.c | 10 +- src/mame/drivers/gaelco3d.c | 2 +- src/mame/drivers/galastrm.c | 6 +- src/mame/drivers/galpani2.c | 2 +- src/mame/drivers/galpani3.c | 2 +- src/mame/drivers/gijoe.c | 6 +- src/mame/drivers/groundfx.c | 6 +- src/mame/drivers/gticlub.c | 8 +- src/mame/drivers/gunbustr.c | 6 +- src/mame/drivers/hornet.c | 2 +- src/mame/drivers/inufuku.c | 2 +- src/mame/drivers/invqix.c | 2 +- src/mame/drivers/jackpool.c | 2 +- src/mame/drivers/jaguar.c | 2 +- src/mame/drivers/jchan.c | 2 +- src/mame/drivers/jclub2.c | 2 +- src/mame/drivers/kaneko16.c | 2 +- src/mame/drivers/kickgoal.c | 2 +- src/mame/drivers/konamigq.c | 2 +- src/mame/drivers/konamigv.c | 2 +- src/mame/drivers/konamigx.c | 2 +- src/mame/drivers/leland.c | 6 +- src/mame/drivers/lethal.c | 6 +- src/mame/drivers/limenko.c | 2 +- src/mame/drivers/lordgun.c | 2 +- src/mame/drivers/metro.c | 2 +- src/mame/drivers/midas.c | 2 +- src/mame/drivers/mitchell.c | 12 +- src/mame/drivers/model2.c | 2 +- src/mame/drivers/model3.c | 12 +- src/mame/drivers/moo.c | 8 +- src/mame/drivers/mystwarr.c | 10 +- src/mame/drivers/othunder.c | 6 +- src/mame/drivers/overdriv.c | 6 +- src/mame/drivers/pasha2.c | 2 +- src/mame/drivers/pirates.c | 6 +- src/mame/drivers/playmark.c | 8 +- src/mame/drivers/plygonet.c | 6 +- src/mame/drivers/pntnpuzl.c | 6 +- src/mame/drivers/policetr.c | 6 +- src/mame/drivers/powerbal.c | 6 +- src/mame/drivers/psikyo4.c | 6 +- src/mame/drivers/psikyosh.c | 6 +- src/mame/drivers/pzletime.c | 2 +- src/mame/drivers/r2dx_v33.c | 2 +- src/mame/drivers/rabbit.c | 2 +- src/mame/drivers/raiden2.c | 2 +- src/mame/drivers/rbmk.c | 2 +- src/mame/drivers/rungun.c | 6 +- src/mame/drivers/segas32.c | 2 +- src/mame/drivers/seibuspi.c | 10 +- src/mame/drivers/seta2.c | 2 +- src/mame/drivers/sigmab98.c | 10 +- src/mame/drivers/simpl156.c | 2 +- src/mame/drivers/simpsons.c | 6 +- src/mame/drivers/spool99.c | 2 +- src/mame/drivers/stlforce.c | 2 +- src/mame/drivers/stv.c | 2 +- src/mame/drivers/superchs.c | 6 +- src/mame/drivers/taito_b.c | 10 +- src/mame/drivers/taito_f3.c | 2 +- src/mame/drivers/taito_z.c | 6 +- src/mame/drivers/taitojc.c | 2 +- src/mame/drivers/tasman.c | 2 +- src/mame/drivers/tecmosys.c | 2 +- src/mame/drivers/tmaster.c | 14 +- src/mame/drivers/tmmjprd.c | 2 +- src/mame/drivers/tmnt.c | 18 +- src/mame/drivers/toaplan2.c | 6 +- src/mame/drivers/ultrsprt.c | 2 +- src/mame/drivers/undrfire.c | 8 +- src/mame/drivers/unico.c | 6 +- src/mame/drivers/vamphalf.c | 2 +- src/mame/drivers/vendetta.c | 6 +- src/mame/drivers/wheelfir.c | 2 +- src/mame/drivers/xexex.c | 6 +- src/mame/drivers/xmen.c | 8 +- src/mame/drivers/xorworld.c | 2 +- src/mame/drivers/zr107.c | 2 +- src/mame/includes/20pacgal.h | 2 +- src/mame/includes/8080bw.h | 2 +- src/mame/includes/cave.h | 2 +- src/mame/includes/centiped.h | 2 +- src/mame/includes/deco32.h | 2 +- src/mame/includes/deco_mlc.h | 2 +- src/mame/includes/dkong.h | 2 +- src/mame/includes/esd16.h | 2 +- src/mame/includes/fromanc2.h | 2 +- src/mame/includes/gaelco2.h | 2 +- src/mame/includes/gaelco3d.h | 2 +- src/mame/includes/galastrm.h | 2 +- src/mame/includes/galpani2.h | 2 +- src/mame/includes/gunbustr.h | 2 +- src/mame/includes/jaguar.h | 2 +- src/mame/includes/kaneko16.h | 2 +- src/mame/includes/kickgoal.h | 2 +- src/mame/includes/leland.h | 2 +- src/mame/includes/lordgun.h | 2 +- src/mame/includes/metro.h | 2 +- src/mame/includes/mitchell.h | 2 +- src/mame/includes/model2.h | 2 +- src/mame/includes/model3.h | 2 +- src/mame/includes/naomi.h | 2 +- src/mame/includes/othunder.h | 2 +- src/mame/includes/pirates.h | 2 +- src/mame/includes/playmark.h | 2 +- src/mame/includes/plygonet.h | 2 +- src/mame/includes/policetr.h | 2 +- src/mame/includes/psikyo4.h | 2 +- src/mame/includes/psikyosh.h | 2 +- src/mame/includes/segas32.h | 2 +- src/mame/includes/seibuspi.h | 2 +- src/mame/includes/seta2.h | 2 +- src/mame/includes/simpl156.h | 2 +- src/mame/includes/ssv.h | 2 +- src/mame/includes/stlforce.h | 2 +- src/mame/includes/stv.h | 2 +- src/mame/includes/superchs.h | 2 +- src/mame/includes/taito_z.h | 2 +- src/mame/includes/tecmosys.h | 2 +- src/mame/includes/toaplan2.h | 2 +- src/mame/includes/undrfire.h | 2 +- src/mame/includes/unico.h | 2 +- src/mame/includes/xorworld.h | 2 +- src/mame/machine/deco104.c | 2 +- src/mame/machine/deco146.c | 2 +- src/mame/machine/gaelco2.c | 2 +- src/mame/machine/kaneko_calc3.c | 2 +- src/mame/machine/kaneko_toybox.c | 2 +- src/mame/machine/leland.c | 2 +- src/mame/machine/mie.h | 2 +- src/mame/machine/simpsons.c | 2 +- src/mess/drivers/ip20.c | 6 +- src/mess/drivers/saturn.c | 2 +- src/mess/machine/sega8_rom.h | 2 +- 172 files changed, 1014 insertions(+), 813 deletions(-) create mode 100644 src/emu/machine/eepromser.c create mode 100644 src/emu/machine/eepromser.h diff --git a/.gitattributes b/.gitattributes index 8e2ed4f5426..b4a61c6a42f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1233,6 +1233,8 @@ src/emu/machine/e0516.c svneol=native#text/plain src/emu/machine/e0516.h svneol=native#text/plain src/emu/machine/eeprom.c svneol=native#text/plain src/emu/machine/eeprom.h svneol=native#text/plain +src/emu/machine/eepromser.c svneol=native#text/plain +src/emu/machine/eepromser.h svneol=native#text/plain src/emu/machine/er2055.c svneol=native#text/plain src/emu/machine/er2055.h svneol=native#text/plain src/emu/machine/er59256.c svneol=native#text/plain diff --git a/src/emu/distate.c b/src/emu/distate.c index 7af6f23e2d1..c79cad327b0 100644 --- a/src/emu/distate.c +++ b/src/emu/distate.c @@ -81,6 +81,7 @@ const UINT64 device_state_entry::k_decimal_divisor[] = device_state_entry::device_state_entry(int index, const char *symbol, void *dataptr, UINT8 size) : m_next(NULL), m_index(index), + m_dataptr(dataptr), m_datamask(0), m_datasize(size), m_flags(0), @@ -88,9 +89,6 @@ device_state_entry::device_state_entry(int index, const char *symbol, void *data m_default_format(true), m_sizemask(0) { - // set the data pointer - m_dataptr.v = dataptr; - // convert the size to a mask assert(size == 1 || size == 2 || size == 4 || size == 8); if (size == 1) diff --git a/src/emu/emucore.h b/src/emu/emucore.h index 7a8539adfc1..8a5f71c7313 100644 --- a/src/emu/emucore.h +++ b/src/emu/emucore.h @@ -85,6 +85,7 @@ class running_machine; // generic_ptr is a union of pointers to various sizes union generic_ptr { + generic_ptr(void *value) { v = value; } void * v; INT8 * i8; UINT8 * u8; diff --git a/src/emu/machine/eeprom.c b/src/emu/machine/eeprom.c index 1ef1cbb87a3..1138f1726c6 100644 --- a/src/emu/machine/eeprom.c +++ b/src/emu/machine/eeprom.c @@ -2,7 +2,38 @@ eeprom.c - Serial eeproms. + Base class for EEPROM devices. + +**************************************************************************** + + Copyright Aaron Giles + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name 'MAME' nor the names of its contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ @@ -24,61 +55,12 @@ // GLOBAL VARIABLES //************************************************************************** -// device type definition -const device_type SERIAL_EEPROM = &device_creator; - -const serial_eeprom_interface eeprom_interface_93C46 = -{ - 6, // address bits 6 - 16, // data bits 16 - "*110", // read 1 10 aaaaaa - "*101", // write 1 01 aaaaaa dddddddddddddddd - "*111", // erase 1 11 aaaaaa - "*10000xxxx", // lock 1 00 00xxxx - "*10011xxxx", // unlock 1 00 11xxxx - 1, // enable_multi_read - 0 // reset_delay -// "*10001xxxx" // write all 1 00 01xxxx dddddddddddddddd -// "*10010xxxx" // erase all 1 00 10xxxx -}; - -const serial_eeprom_interface eeprom_interface_93C46_8bit = -{ - 7, // address bits 7 - 8, // data bits 8 - "*110", // read 1 10 aaaaaa - "*101", // write 1 01 aaaaaa dddddddd - "*111", // erase 1 11 aaaaaa - "*10000xxxx", // lock 1 00 00xxxx - "*10011xxxx", // unlock 1 00 11xxxx - 1, // enable_multi_read - 0 // reset_delay -// "*10001xxxx" // write all 1 00 01xxxx dddddddd -// "*10010xxxx" // erase all 1 00 10xxxx -}; - -const serial_eeprom_interface eeprom_interface_93C66B = -{ - 8, // address bits - 16, // data bits - "*110", // read command - "*101", // write command - "*111", // erase command - "*10000xxxxxx", // lock command - "*10011xxxxxx", // unlock command - 1, // enable_multi_read - 0 // reset_delay -// "*10001xxxxxx", // write all -// "*10010xxxxxx", // erase all -}; - - -static ADDRESS_MAP_START( eeprom_map8, AS_PROGRAM, 8, serial_eeprom_device ) +static ADDRESS_MAP_START( eeprom_map8, AS_PROGRAM, 8, base_eeprom_device ) AM_RANGE(0x0000, 0x0fff) AM_RAM ADDRESS_MAP_END -static ADDRESS_MAP_START( eeprom_map16, AS_PROGRAM, 16, serial_eeprom_device ) +static ADDRESS_MAP_START( eeprom_map16, AS_PROGRAM, 16, base_eeprom_device ) AM_RANGE(0x0000, 0x07ff) AM_RAM ADDRESS_MAP_END @@ -89,40 +71,43 @@ ADDRESS_MAP_END //************************************************************************** //------------------------------------------------- -// serial_eeprom_device - constructor +// base_eeprom_device - constructor //------------------------------------------------- -serial_eeprom_device::serial_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, SERIAL_EEPROM, "Serial EEPROM", tag, owner, clock, "seeprom", __FILE__), +base_eeprom_device::base_eeprom_device(const machine_config &mconfig, device_type devtype, const char *name, const char *tag, device_t *owner, const char *shortname, const char *file) + : device_t(mconfig, devtype, name, tag, owner, 0, shortname, file), device_memory_interface(mconfig, *this), device_nvram_interface(mconfig, *this), + m_cells(0), + m_address_bits(0), + m_data_bits(0), + m_default_data(0), m_default_data_size(0), m_default_value(0), - m_serial_count(0), - m_data_buffer(0), - m_read_address(0), - m_clock_count(0), - m_latch(0), - m_reset_line(CLEAR_LINE), - m_clock_line(CLEAR_LINE), - m_sending(0), - m_locked(false), - m_reset_counter(0) + m_default_value_set(false) { - m_default_data.u8 = NULL; - memset(downcast(this), 0, sizeof(serial_eeprom_interface)); } //------------------------------------------------- -// static_set_interface - configuration helper -// to set the interface +// static_set_default_data - configuration helpers +// to set the default data //------------------------------------------------- -void serial_eeprom_device::static_set_interface(device_t &device, const serial_eeprom_interface &interface) +void base_eeprom_device::static_set_size(device_t &device, int cells, int cellbits) { - serial_eeprom_device &eeprom = downcast(device); - static_cast(eeprom) = interface; + base_eeprom_device &eeprom = downcast(device); + eeprom.m_cells = cells; + eeprom.m_data_bits = cellbits; + + // compute address bits (validation checks verify cells was an even power of 2) + cells--; + eeprom.m_address_bits = 0; + while (cells != 0) + { + cells >>= 1; + eeprom.m_address_bits++; + } // describe our address space if (eeprom.m_data_bits == 8) @@ -137,18 +122,18 @@ void serial_eeprom_device::static_set_interface(device_t &device, const serial_e // to set the default data //------------------------------------------------- -void serial_eeprom_device::static_set_default_data(device_t &device, const UINT8 *data, UINT32 size) +void base_eeprom_device::static_set_default_data(device_t &device, const UINT8 *data, UINT32 size) { - serial_eeprom_device &eeprom = downcast(device); - assert(eeprom.m_data_bits == 8); + base_eeprom_device &eeprom = downcast(device); + assert(eeprom.m_cellbits == 8); eeprom.m_default_data.u8 = const_cast(data); eeprom.m_default_data_size = size; } -void serial_eeprom_device::static_set_default_data(device_t &device, const UINT16 *data, UINT32 size) +void base_eeprom_device::static_set_default_data(device_t &device, const UINT16 *data, UINT32 size) { - serial_eeprom_device &eeprom = downcast(device); - assert(eeprom.m_data_bits == 16); + base_eeprom_device &eeprom = downcast(device); + assert(eeprom.m_cellbits == 16); eeprom.m_default_data.u16 = const_cast(data); eeprom.m_default_data_size = size / 2; } @@ -159,9 +144,37 @@ void serial_eeprom_device::static_set_default_data(device_t &device, const UINT1 // to set the default value //------------------------------------------------- -void serial_eeprom_device::static_set_default_value(device_t &device, UINT16 value) +void base_eeprom_device::static_set_default_value(device_t &device, UINT32 value) { - downcast(device).m_default_value = 0x10000 | value; + base_eeprom_device &eeprom = downcast(device); + eeprom.m_default_value = value; + eeprom.m_default_value_set = true; +} + + +//------------------------------------------------- +// read_data - read data at the given address +//------------------------------------------------- + +UINT32 base_eeprom_device::read_data(offs_t address) +{ + if (m_data_bits == 16) + return m_addrspace[0]->read_word(address * 2); + else + return m_addrspace[0]->read_byte(address); +} + + +//------------------------------------------------- +// write_data - write data at the given address +//------------------------------------------------- + +void base_eeprom_device::write_data(offs_t address, UINT32 data) +{ + if (m_data_bits == 16) + m_addrspace[0]->write_word(address * 2, data); + else + m_addrspace[0]->write_byte(address, data); } @@ -170,10 +183,15 @@ void serial_eeprom_device::static_set_default_value(device_t &device, UINT16 val // on this device //------------------------------------------------- -void serial_eeprom_device::device_validity_check(validity_checker &valid) const +void base_eeprom_device::device_validity_check(validity_checker &valid) const { + // ensure the number of cells is an even power of 2 + if (m_cells != (1 << m_address_bits)) + mame_printf_error("Invalid EEPROM size %d specified\n", m_cells); + + // ensure only the sizes we support are requested if (m_data_bits != 8 && m_data_bits != 16) - mame_printf_error("Invalid data width %d specified\n", m_data_bits); + mame_printf_error("Invalid EEPROM data width %d specified\n", m_data_bits); } @@ -181,20 +199,8 @@ void serial_eeprom_device::device_validity_check(validity_checker &valid) const // device_start - device-specific startup //------------------------------------------------- -void serial_eeprom_device::device_start() +void base_eeprom_device::device_start() { - m_locked = (m_cmd_unlock != NULL); - - save_pointer(NAME(m_serial_buffer), SERIAL_BUFFER_LENGTH); - save_item(NAME(m_clock_line)); - save_item(NAME(m_reset_line)); - save_item(NAME(m_locked)); - save_item(NAME(m_serial_count)); - save_item(NAME(m_latch)); - save_item(NAME(m_reset_counter)); - save_item(NAME(m_clock_count)); - save_item(NAME(m_data_buffer)); - save_item(NAME(m_read_address)); } @@ -202,7 +208,7 @@ void serial_eeprom_device::device_start() // device_reset - device-specific reset //------------------------------------------------- -void serial_eeprom_device::device_reset() +void base_eeprom_device::device_reset() { } @@ -212,7 +218,7 @@ void serial_eeprom_device::device_reset() // any address spaces owned by this device //------------------------------------------------- -const address_space_config *serial_eeprom_device::memory_space_config(address_spacenum spacenum) const +const address_space_config *base_eeprom_device::memory_space_config(address_spacenum spacenum) const { return (spacenum == 0) ? &m_space_config : NULL; } @@ -223,31 +229,30 @@ const address_space_config *serial_eeprom_device::memory_space_config(address_sp // its default state //------------------------------------------------- -void serial_eeprom_device::nvram_default() +void base_eeprom_device::nvram_default() { UINT32 eeprom_length = 1 << m_address_bits; UINT32 eeprom_bytes = eeprom_length * m_data_bits / 8; - /* initialize to the default value */ - UINT16 default_value = 0xffff; - if (m_default_value != 0) - default_value = m_default_value; + // initialize to the default value + UINT32 default_value = m_default_value_set ? m_default_value : ~0; for (offs_t offs = 0; offs < eeprom_length; offs++) if (m_data_bits == 8) m_addrspace[0]->write_byte(offs, default_value); else m_addrspace[0]->write_word(offs * 2, default_value); - /* handle hard-coded data from the driver */ + // handle hard-coded data from the driver if (m_default_data.u8 != NULL) - for (offs_t offs = 0; offs < m_default_data_size; offs++) { + for (offs_t offs = 0; offs < m_default_data_size; offs++) + { if (m_data_bits == 8) m_addrspace[0]->write_byte(offs, m_default_data.u8[offs]); else m_addrspace[0]->write_word(offs * 2, m_default_data.u16[offs]); } - /* populate from a memory region if present */ + // populate from a memory region if present if (m_region != NULL) { if (m_region->bytes() != eeprom_bytes) @@ -271,16 +276,15 @@ void serial_eeprom_device::nvram_default() // .nv file //------------------------------------------------- -void serial_eeprom_device::nvram_read(emu_file &file) +void base_eeprom_device::nvram_read(emu_file &file) { UINT32 eeprom_length = 1 << m_address_bits; UINT32 eeprom_bytes = eeprom_length * m_data_bits / 8; - UINT8 *buffer = auto_alloc_array(machine(), UINT8, eeprom_bytes); + dynamic_buffer buffer(eeprom_bytes); file.read(buffer, eeprom_bytes); for (offs_t offs = 0; offs < eeprom_bytes; offs++) m_addrspace[0]->write_byte(offs, buffer[offs]); - auto_free(machine(), buffer); } @@ -289,269 +293,13 @@ void serial_eeprom_device::nvram_read(emu_file &file) // .nv file //------------------------------------------------- -void serial_eeprom_device::nvram_write(emu_file &file) +void base_eeprom_device::nvram_write(emu_file &file) { UINT32 eeprom_length = 1 << m_address_bits; UINT32 eeprom_bytes = eeprom_length * m_data_bits / 8; - UINT8 *buffer = auto_alloc_array(machine(), UINT8, eeprom_bytes); + dynamic_buffer buffer(eeprom_bytes); for (offs_t offs = 0; offs < eeprom_bytes; offs++) buffer[offs] = m_addrspace[0]->read_byte(offs); file.write(buffer, eeprom_bytes); - auto_free(machine(), buffer); -} - - - -//************************************************************************** -// READ/WRITE HANDLERS -//************************************************************************** - -WRITE_LINE_MEMBER( serial_eeprom_device::write_bit ) -{ - LOG(("write bit %d\n",state)); - m_latch = state; -} - - -READ_LINE_DEVICE_HANDLER( eeprom_read_bit ) -{ - return downcast(device)->read_bit(); -} - -READ_LINE_MEMBER( serial_eeprom_device::read_bit ) -{ - int res; - - if (m_sending) - res = (m_data_buffer >> m_data_bits) & 1; - else - { - if (m_reset_counter > 0) - { - /* this is needed by wbeachvl */ - m_reset_counter--; - res = 0; - } - else - res = 1; - } - - LOG(("read bit %d\n",res)); - - return res; -} - - - -WRITE_LINE_MEMBER( serial_eeprom_device::set_cs_line ) -{ - LOG(("set reset line %d\n",state)); - m_reset_line = state; - - if (m_reset_line != CLEAR_LINE) - { - if (m_serial_count) - logerror("EEPROM %s reset, buffer = %s\n", tag(), m_serial_buffer); - - m_serial_count = 0; - m_sending = 0; - m_reset_counter = m_reset_delay; /* delay a little before returning setting data to 1 (needed by wbeachvl) */ - } -} - - - -WRITE_LINE_MEMBER( serial_eeprom_device::set_clock_line ) -{ - LOG(("set clock line %d\n",state)); - if (state == PULSE_LINE || (m_clock_line == CLEAR_LINE && state != CLEAR_LINE)) - { - if (m_reset_line == CLEAR_LINE) - { - if (m_sending) - { - if (m_clock_count == m_data_bits && m_enable_multi_read) - { - m_read_address = (m_read_address + 1) & ((1 << m_address_bits) - 1); - if (m_data_bits == 16) - m_data_buffer = m_addrspace[0]->read_word(m_read_address * 2); - else - m_data_buffer = m_addrspace[0]->read_byte(m_read_address); - m_clock_count = 0; - logerror("EEPROM %s read %04x from address %02x\n", tag(), m_data_buffer, m_read_address); - } - m_data_buffer = (m_data_buffer << 1) | 1; - m_clock_count++; - } - else - write(m_latch); - } - } - - m_clock_line = state; -} - - - -//************************************************************************** -// INTERNAL HELPERS -//************************************************************************** - -void serial_eeprom_device::write(int bit) -{ - LOG(("EEPROM %s write bit %d\n", tag(), bit)); - - if (m_serial_count >= SERIAL_BUFFER_LENGTH-1) - { - logerror("error: EEPROM %s serial buffer overflow\n", tag()); - return; - } - - m_serial_buffer[m_serial_count++] = (bit ? '1' : '0'); - m_serial_buffer[m_serial_count] = 0; /* nul terminate so we can treat it as a string */ - - if ( (m_serial_count > m_address_bits) && - command_match((char*)(m_serial_buffer),m_cmd_read,strlen((char*)(m_serial_buffer))-m_address_bits) ) - { - int i,address; - - address = 0; - for (i = m_serial_count-m_address_bits;i < m_serial_count;i++) - { - address <<= 1; - if (m_serial_buffer[i] == '1') address |= 1; - } - if (m_data_bits == 16) - m_data_buffer = m_addrspace[0]->read_word(address * 2); - else - m_data_buffer = m_addrspace[0]->read_byte(address); - m_read_address = address; - m_clock_count = 0; - m_sending = 1; - m_serial_count = 0; - logerror("EEPROM %s read %04x from address %02x\n", tag(), m_data_buffer,address); - } - else if ( (m_serial_count > m_address_bits) && - command_match((char*)(m_serial_buffer),m_cmd_erase,strlen((char*)(m_serial_buffer))-m_address_bits) ) - { - int i,address; - - address = 0; - for (i = m_serial_count-m_address_bits;i < m_serial_count;i++) - { - address <<= 1; - if (m_serial_buffer[i] == '1') address |= 1; - } - logerror("EEPROM %s erase address %02x\n", tag(), address); - if (m_locked == 0) - { - if (m_data_bits == 16) - m_addrspace[0]->write_word(address * 2, 0xFFFF); - else - m_addrspace[0]->write_byte(address, 0xFF); - } - else - logerror("Error: EEPROM %s is locked\n", tag()); - m_serial_count = 0; - } - else if ( (m_serial_count > (m_address_bits + m_data_bits)) && - command_match((char*)(m_serial_buffer),m_cmd_write,strlen((char*)(m_serial_buffer))-(m_address_bits + m_data_bits)) ) - { - int i,address,data; - - address = 0; - for (i = m_serial_count-m_data_bits-m_address_bits;i < (m_serial_count-m_data_bits);i++) - { - address <<= 1; - if (m_serial_buffer[i] == '1') address |= 1; - } - data = 0; - for (i = m_serial_count-m_data_bits;i < m_serial_count;i++) - { - data <<= 1; - if (m_serial_buffer[i] == '1') data |= 1; - } - logerror("EEPROM %s write %04x to address %02x\n", tag(), data, address); - if (m_locked == 0) - { - if (m_data_bits == 16) - m_addrspace[0]->write_word(address * 2, data); - else - m_addrspace[0]->write_byte(address, data); - } - else - logerror("Error: EEPROM %s is locked\n", tag()); - m_serial_count = 0; - } - else if ( command_match((char*)(m_serial_buffer),m_cmd_lock,strlen((char*)(m_serial_buffer))) ) - { - logerror("EEPROM %s lock\n", tag()); - m_locked = 1; - m_serial_count = 0; - } - else if ( command_match((char*)(m_serial_buffer),m_cmd_unlock,strlen((char*)(m_serial_buffer))) ) - { - logerror("EEPROM %s unlock\n", tag()); - m_locked = 0; - m_serial_count = 0; - } -} - - -/* - command_match: - - Try to match the first (len) digits in the EEPROM serial buffer - string (*buf) with an EEPROM command string (*cmd). - Return non zero if a match was found. - - The serial buffer only contains '0' or '1' (e.g. "1001"). - The command can contain: '0' or '1' or these wildcards: - - 'x' : match both '0' and '1' - "*1": match "1", "01", "001", "0001" etc. - "*0": match "0", "10", "110", "1110" etc. - - Note: (cmd) may be NULL. Return 0 (no match) in this case. -*/ -bool serial_eeprom_device::command_match(const char *buf, const char *cmd, int len) -{ - if ( cmd == 0 ) return false; - if ( len == 0 ) return false; - - for (;len>0;) - { - char b = *buf; - char c = *cmd; - - if ((b==0) || (c==0)) - return (b==c); - - switch ( c ) - { - case '0': - case '1': - if (b != c) return false; - case 'X': - case 'x': - buf++; - len--; - cmd++; - break; - - case '*': - c = cmd[1]; - switch( c ) - { - case '0': - case '1': - if (b == c) { cmd++; } - else { buf++; len--; } - break; - default: return false; - } - } - } - return (*cmd==0); } diff --git a/src/emu/machine/eeprom.h b/src/emu/machine/eeprom.h index 76ae0c9aceb..7ac10097ef5 100644 --- a/src/emu/machine/eeprom.h +++ b/src/emu/machine/eeprom.h @@ -2,14 +2,45 @@ eeprom.h - Serial eeproms. + Base class for EEPROM devices. + +**************************************************************************** + + Copyright Aaron Giles + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name 'MAME' nor the names of its contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ #pragma once -#ifndef __EEPROMDEV_H__ -#define __EEPROMDEV_H__ +#ifndef __EEPROM_H__ +#define __EEPROM_H__ @@ -17,23 +48,12 @@ // INTERFACE CONFIGURATION MACROS //************************************************************************** -#define MCFG_SERIAL_EEPROM_ADD(_tag, _interface) \ - MCFG_DEVICE_ADD(_tag, SERIAL_EEPROM, 0) \ - serial_eeprom_device::static_set_interface(*device, _interface); - -#define MCFG_SERIAL_EEPROM_DATA(_data, _size) \ - serial_eeprom_device::static_set_default_data(*device, _data, _size); -#define MCFG_SERIAL_EEPROM_DEFAULT_VALUE(_value) \ - serial_eeprom_device::static_set_default_value(*device, _value); - -#define MCFG_EEPROM_93C46_ADD(_tag) \ - MCFG_SERIAL_EEPROM_ADD(_tag, eeprom_interface_93C46) - -#define MCFG_EEPROM_93C46_8BIT_ADD(_tag) \ - MCFG_SERIAL_EEPROM_ADD(_tag, eeprom_interface_93C46_8bit) - -#define MCFG_EEPROM_93C66B_ADD(_tag) \ - MCFG_SERIAL_EEPROM_ADD(_tag, eeprom_interface_93C66B) +#define MCFG_EEPROM_SIZE(_cells, _cellbits) \ + base_eeprom_device::static_set_size(*device, _cells, _cellbits); +#define MCFG_EEPROM_DATA(_data, _size) \ + base_eeprom_device::static_set_default_data(*device, _data, _size); +#define MCFG_EEPROM_DEFAULT_VALUE(_value) \ + base_eeprom_device::static_set_default_value(*device, _value); @@ -41,47 +61,26 @@ // TYPE DEFINITIONS //************************************************************************** +// ======================> base_eeprom_device -// ======================> serial_eeprom_interface - -struct serial_eeprom_interface +class base_eeprom_device : public device_t, + public device_memory_interface, + public device_nvram_interface { - UINT8 m_address_bits; // EEPROM has 2^address_bits cells - UINT8 m_data_bits; // every cell has this many bits (8 or 16) - const char *m_cmd_read; // read command string, e.g. "0110" - const char *m_cmd_write; // write command string, e.g. "0111" - const char *m_cmd_erase; // erase command string, or 0 if n/a - const char *m_cmd_lock; // lock command string, or 0 if n/a - const char *m_cmd_unlock; // unlock command string, or 0 if n/a - bool m_enable_multi_read; // set to 1 to enable multiple values to be read from one read command - int m_reset_delay; // number of times eeprom_read_bit() should return 0 after a reset, - // before starting to return 1. -}; - - - -// ======================> serial_eeprom_device - -class serial_eeprom_device : public device_t, - public device_memory_interface, - public device_nvram_interface, - public serial_eeprom_interface -{ -public: +protected: // construction/destruction - serial_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + base_eeprom_device(const machine_config &mconfig, device_type devtype, const char *name, const char *tag, device_t *owner, const char *shortname, const char *file); +public: // inline configuration helpers - static void static_set_interface(device_t &device, const serial_eeprom_interface &interface); + static void static_set_size(device_t &device, int cells, int cellbits); static void static_set_default_data(device_t &device, const UINT8 *data, UINT32 size); static void static_set_default_data(device_t &device, const UINT16 *data, UINT32 size); - static void static_set_default_value(device_t &device, UINT16 value); + static void static_set_default_value(device_t &device, UINT32 value); - // I/O operations - DECLARE_WRITE_LINE_MEMBER( write_bit ); - DECLARE_READ_LINE_MEMBER( read_bit ); - DECLARE_WRITE_LINE_MEMBER( set_cs_line ); - DECLARE_WRITE_LINE_MEMBER( set_clock_line ); + // read/write data + UINT32 read_data(offs_t address); + void write_data(offs_t address, UINT32 data); protected: // device-level overrides @@ -97,45 +96,16 @@ protected: virtual void nvram_read(emu_file &file); virtual void nvram_write(emu_file &file); - // internal helpers - void write(int bit); - bool command_match(const char *buf, const char *cmd, int len); - - static const int SERIAL_BUFFER_LENGTH = 40; - // configuration state + UINT32 m_cells; + UINT8 m_address_bits; + UINT8 m_data_bits; address_space_config m_space_config; generic_ptr m_default_data; - int m_default_data_size; + UINT32 m_default_data_size; UINT32 m_default_value; - - // runtime state - int m_serial_count; - UINT8 m_serial_buffer[SERIAL_BUFFER_LENGTH]; - int m_data_buffer; - int m_read_address; - int m_clock_count; - int m_latch; - int m_reset_line; - int m_clock_line; - int m_sending; - int m_locked; - int m_reset_counter; + bool m_default_value_set; }; -// device type definition -extern const device_type SERIAL_EEPROM; - - - -//************************************************************************** -// GLOBAL VARIABLES -//************************************************************************** - -extern const serial_eeprom_interface eeprom_interface_93C46; -extern const serial_eeprom_interface eeprom_interface_93C46_8bit; -extern const serial_eeprom_interface eeprom_interface_93C66B; - - #endif diff --git a/src/emu/machine/eepromser.c b/src/emu/machine/eepromser.c new file mode 100644 index 00000000000..53cdeacfa5f --- /dev/null +++ b/src/emu/machine/eepromser.c @@ -0,0 +1,437 @@ +/*************************************************************************** + + eepromser.c + + Serial EEPROM devices. + +**************************************************************************** + + Copyright Aaron Giles + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name 'MAME' nor the names of its contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +***************************************************************************/ + +#include "emu.h" +#include "machine/eepromser.h" + + + +//************************************************************************** +// DEBUGGING +//************************************************************************** + +#define VERBOSE 0 +#define LOG(x) do { if (VERBOSE) logerror x; } while (0) + + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +// device type definition +const device_type SERIAL_EEPROM = &device_creator; + +const serial_eeprom_interface eeprom_interface_93C46_93C66B = +{ + "*110", // read 1 10 aaaaaa + "*101", // write 1 01 aaaaaa dddddddddddddddd + "*111", // erase 1 11 aaaaaa + "*10000xxxx", // lock 1 00 00xxxx + "*10011xxxx", // unlock 1 00 11xxxx + 1, // enable_multi_read + 0 // reset_delay +// "*10001xxxx" // write all 1 00 01xxxx dddddddddddddddd +// "*10010xxxx" // erase all 1 00 10xxxx +}; + + + +//************************************************************************** +// LIVE DEVICE +//************************************************************************** + +//------------------------------------------------- +// serial_eeprom_device - constructor +//------------------------------------------------- + +serial_eeprom_device::serial_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : base_eeprom_device(mconfig, SERIAL_EEPROM, "Serial EEPROM", tag, owner, "seeprom", __FILE__), + m_serial_count(0), + m_data_buffer(0), + m_read_address(0), + m_clock_count(0), + m_latch(0), + m_reset_line(CLEAR_LINE), + m_clock_line(CLEAR_LINE), + m_sending(false), + m_locked(false), + m_reset_counter(0) +{ + memset(downcast(this), 0, sizeof(serial_eeprom_interface)); +} + + +//------------------------------------------------- +// static_set_interface - configuration helper +// to set the interface +//------------------------------------------------- + +void serial_eeprom_device::static_set_interface(device_t &device, const serial_eeprom_interface &interface) +{ + serial_eeprom_device &eeprom = downcast(device); + static_cast(eeprom) = interface; +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void serial_eeprom_device::device_start() +{ + base_eeprom_device::device_start(); + + m_locked = (m_cmd_unlock != NULL); + + save_item(NAME(m_serial_buffer)); + save_item(NAME(m_clock_line)); + save_item(NAME(m_reset_line)); + save_item(NAME(m_locked)); + save_item(NAME(m_serial_count)); + save_item(NAME(m_latch)); + save_item(NAME(m_reset_counter)); + save_item(NAME(m_clock_count)); + save_item(NAME(m_data_buffer)); + save_item(NAME(m_read_address)); +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void serial_eeprom_device::device_reset() +{ + base_eeprom_device::device_reset(); + + // make a note if someone reset in the middle of a read or write + if (m_serial_count) + logerror("EEPROM %s reset, buffer = %s\n", tag(), m_serial_buffer); + + // reset the state + m_serial_count = 0; + m_sending = false; + m_reset_counter = m_reset_delay; // delay a little before returning setting data to 1 (needed by wbeachvl) +} + + + +//************************************************************************** +// READ/WRITE HANDLERS +//************************************************************************** + +//------------------------------------------------- +// write_bit - latch a bit to write +//------------------------------------------------- + +WRITE_LINE_MEMBER( serial_eeprom_device::write_bit ) +{ + LOG(("write bit %d\n",state)); + m_latch = state; +} + + +//------------------------------------------------- +// read_bit - read a bit from the eeprom +//------------------------------------------------- + +READ_LINE_MEMBER( serial_eeprom_device::read_bit ) +{ + int res; + + // if sending, pull the next bit off + if (m_sending) + res = (m_data_buffer >> m_data_bits) & 1; + + // otherwise check for the proper number of bits needed for a reset + else + { + // this is needed by wbeachvl + if (m_reset_counter > 0) + { + m_reset_counter--; + res = 0; + } + else + res = 1; + } + + LOG(("read bit %d\n",res)); + + return res; +} + + +//------------------------------------------------- +// set_cs_line - set the state of the chip +// select (/CS) line +//------------------------------------------------- + +WRITE_LINE_MEMBER( serial_eeprom_device::set_cs_line ) +{ + // ignore if the state is not changing + if (state == m_reset_line) + return; + + LOG(("set reset line %d\n",state)); + + // if we're going active, reset things + m_reset_line = state; + if (m_reset_line != CLEAR_LINE) + reset(); +} + + +//------------------------------------------------- +// set_clock_line - set the state of the clock +// (CLK) line +//------------------------------------------------- + +WRITE_LINE_MEMBER( serial_eeprom_device::set_clock_line ) +{ + LOG(("set clock line %d\n",state)); + + // on a pulse or a rising edge, process + if (state == PULSE_LINE || (m_clock_line == CLEAR_LINE && state != CLEAR_LINE)) + { + // only proceed if we're not held in reset + if (m_reset_line == CLEAR_LINE) + { + // if sending, clock the next bit + if (m_sending) + { + // auto-advance to then next word if supported + if (m_clock_count == m_data_bits && m_enable_multi_read) + { + fill_data_buffer(m_read_address + 1); + logerror("EEPROM %s read %04x from address %02x\n", tag(), m_data_buffer, m_read_address); + } + + // shift the data buffer + m_data_buffer = (m_data_buffer << 1) | 1; + m_clock_count++; + } + + // if not sending, then write the data that was latched + else + write(m_latch); + } + } + + // remember the news state + m_clock_line = state; +} + + + +//************************************************************************** +// INTERNAL HELPERS +//************************************************************************** + +//------------------------------------------------- +// decode_value - convert accumulated bits to +// a binary value, releative to the end of the +// accumulation buffer +//------------------------------------------------- + +UINT32 serial_eeprom_device::decode_value(int numbits, int bitsfromend) +{ + UINT32 value = 0; + for (int bitnum = m_serial_count - bitsfromend - numbits; bitnum < m_serial_count - bitsfromend; bitnum++) + value = (value << 1) | (m_serial_buffer[bitnum] - '0'); + return value; +} + + +//------------------------------------------------- +// fill_data_buffer - fill the data buffer with +// the appropriately-sized chunk of data +//------------------------------------------------- + +void serial_eeprom_device::fill_data_buffer(offs_t address) +{ + // make the address to be in range + address &= (1 << m_address_bits) - 1; + + // fetch the appropriately-sized data + m_data_buffer = read_data(address); + + // remember the address and reset the clock count + m_read_address = address; + m_clock_count = 0; +} + + +//------------------------------------------------- +// write - process an EEPROM write +//------------------------------------------------- + +void serial_eeprom_device::write(int bit) +{ + LOG(("EEPROM %s write bit %d\n", tag(), bit)); + + // if too much data was written without seeing a command, log it and return + if (m_serial_count >= SERIAL_BUFFER_LENGTH - 1) + { + logerror("error: EEPROM %s serial buffer overflow\n", tag()); + return; + } + + // update the buffer + m_serial_buffer[m_serial_count++] = (bit ? '1' : '0'); + m_serial_buffer[m_serial_count] = 0; // nul terminate so we can treat it as a string + + // look for a read command + if (m_cmd_read != NULL && m_serial_count > m_address_bits && command_match(m_cmd_read, m_address_bits)) + { + fill_data_buffer(decode_value(m_address_bits)); + m_sending = true; + m_serial_count = 0; + logerror("EEPROM %s read %04x from address %02x\n", tag(), m_data_buffer, m_read_address); + } + + // look for an erase command + else if (m_cmd_erase != NULL && m_serial_count > m_address_bits && command_match(m_cmd_erase, m_address_bits)) + { + offs_t address = decode_value(m_address_bits); + logerror("EEPROM %s erase address %02x\n", tag(), address); + if (m_locked == 0) + write_data(address, ~0); + else + logerror("Error: EEPROM %s is locked\n", tag()); + m_serial_count = 0; + } + + // look for a write command + else if (m_cmd_write != NULL && m_serial_count > m_address_bits + m_data_bits && command_match(m_cmd_write, m_address_bits + m_data_bits)) + { + offs_t address = decode_value(m_address_bits, m_data_bits); + UINT32 data = decode_value(m_data_bits); + logerror("EEPROM %s write %04x to address %02x\n", tag(), data, address); + if (m_locked == 0) + write_data(address, data); + else + logerror("Error: EEPROM %s is locked\n", tag()); + m_serial_count = 0; + } + + // look for a lock command + else if (m_cmd_lock != NULL && command_match(m_cmd_lock)) + { + logerror("EEPROM %s lock\n", tag()); + m_locked = 1; + m_serial_count = 0; + } + + // look for an unlock command + else if (m_cmd_unlock != NULL && command_match(m_cmd_unlock)) + { + logerror("EEPROM %s unlock\n", tag()); + m_locked = 0; + m_serial_count = 0; + } +} + + +//------------------------------------------------- +// command_match - try to match incoming data +// against a command template +//------------------------------------------------- + +bool serial_eeprom_device::command_match(const char *cmd, int ignorebits) +{ + // + // The serial buffer only contains '0' or '1' (e.g. "1001"). + // The command can contain: '0' or '1' or these wildcards: + // 'x' : match both '0' and '1' + // "*1": match "1", "01", "001", "0001" etc. + // "*0": match "0", "10", "110", "1110" etc. + // + + int len = m_serial_count - ignorebits; + const char *buf = m_serial_buffer; + while (len > 0) + { + char bufbit = *buf; + char cmdbit = *cmd; + + // stop when we hit the end of either string + if (bufbit == 0 || cmdbit == 0) + return (bufbit == cmdbit); + + // parse based on the cmdbit + switch (cmdbit) + { + case '0': + case '1': + // these require an exact match + if (bufbit != cmdbit) + return false; + + // fall through... + + case 'X': + case 'x': + // this is 'ignore', so just accept anything + buf++; + len--; + cmd++; + break; + + case '*': + // for a wildcard, check for the opposit bit + cmdbit = cmd[1]; + switch (cmdbit) + { + case '0': + case '1': + if (bufbit == cmdbit) + cmd++; + else + buf++, len--; + break; + + default: + return false; + } + } + } + return (*cmd == 0); +} diff --git a/src/emu/machine/eepromser.h b/src/emu/machine/eepromser.h new file mode 100644 index 00000000000..42177ace744 --- /dev/null +++ b/src/emu/machine/eepromser.h @@ -0,0 +1,152 @@ +/*************************************************************************** + + eepromser.h + + Serial EEPROM devices. + +**************************************************************************** + + Copyright Aaron Giles + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + * Neither the name 'MAME' nor the names of its contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY AARON GILES ''AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL AARON GILES BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +***************************************************************************/ + +#pragma once + +#ifndef __EEPROMSER_H__ +#define __EEPROMSER_H__ + +#include "eeprom.h" + + +//************************************************************************** +// INTERFACE CONFIGURATION MACROS +//************************************************************************** + +#define MCFG_SERIAL_EEPROM_ADD(_tag, _cells, _cellbits, _interface) \ + MCFG_DEVICE_ADD(_tag, SERIAL_EEPROM, 0) \ + MCFG_EEPROM_SIZE(_cells, _cellbits) \ + serial_eeprom_device::static_set_interface(*device, _interface); + +#define MCFG_SERIAL_EEPROM_DATA(_data, _size) \ + serial_eeprom_device::static_set_default_data(*device, _data, _size); +#define MCFG_SERIAL_EEPROM_DEFAULT_VALUE(_value) \ + serial_eeprom_device::static_set_default_value(*device, _value); + +#define MCFG_EEPROM_93C46_ADD(_tag) \ + MCFG_SERIAL_EEPROM_ADD(_tag, 64, 16, eeprom_interface_93C46_93C66B) + +#define MCFG_EEPROM_93C46_8BIT_ADD(_tag) \ + MCFG_SERIAL_EEPROM_ADD(_tag, 128, 8, eeprom_interface_93C46_93C66B) + +#define MCFG_EEPROM_93C66B_ADD(_tag) \ + MCFG_SERIAL_EEPROM_ADD(_tag, 256, 16, eeprom_interface_93C46_93C66B) + + + +//************************************************************************** +// TYPE DEFINITIONS +//************************************************************************** + + +// ======================> serial_eeprom_interface + +struct serial_eeprom_interface +{ + const char *m_cmd_read; // read command string, e.g. "0110" + const char *m_cmd_write; // write command string, e.g. "0111" + const char *m_cmd_erase; // erase command string, or 0 if n/a + const char *m_cmd_lock; // lock command string, or 0 if n/a + const char *m_cmd_unlock; // unlock command string, or 0 if n/a + bool m_enable_multi_read; // set to 1 to enable multiple values to be read from one read command + int m_reset_delay; // number of times eeprom_read_bit() should return 0 after a reset, + // before starting to return 1. +}; + + + +// ======================> serial_eeprom_device + +class serial_eeprom_device : public base_eeprom_device, + public serial_eeprom_interface +{ +public: + // construction/destruction + serial_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + + // inline configuration helpers + static void static_set_interface(device_t &device, const serial_eeprom_interface &interface); + + // I/O operations + DECLARE_WRITE_LINE_MEMBER( write_bit ); + DECLARE_READ_LINE_MEMBER( read_bit ); + DECLARE_WRITE_LINE_MEMBER( set_cs_line ); + DECLARE_WRITE_LINE_MEMBER( set_clock_line ); + +protected: + // device-level overrides + virtual void device_start(); + virtual void device_reset(); + + // internal helpers + UINT32 decode_value(int numbits, int bitsfromend = 0); + void fill_data_buffer(offs_t address); + void write(int bit); + bool command_match(const char *cmd, int ignorebits = 0); + + static const int SERIAL_BUFFER_LENGTH = 40; + + // runtime state + int m_serial_count; + char m_serial_buffer[SERIAL_BUFFER_LENGTH]; + int m_data_buffer; + int m_read_address; + int m_clock_count; + int m_latch; + int m_reset_line; + int m_clock_line; + bool m_sending; + bool m_locked; + int m_reset_counter; +}; + + +// device type definition +extern const device_type SERIAL_EEPROM; + + + +//************************************************************************** +// GLOBAL VARIABLES +//************************************************************************** + +extern const serial_eeprom_interface eeprom_interface_93C46_93C66B; + + +#endif diff --git a/src/emu/machine/machine.mak b/src/emu/machine/machine.mak index 655db3a569e..e18e704098b 100644 --- a/src/emu/machine/machine.mak +++ b/src/emu/machine/machine.mak @@ -419,10 +419,12 @@ endif #------------------------------------------------- # #@src/emu/machine/eeprom.h,MACHINES += EEPROMDEV +#@src/emu/machine/eepromser.h,MACHINES += EEPROMDEV #------------------------------------------------- ifneq ($(filter EEPROMDEV,$(MACHINES)),) MACHINEOBJS += $(MACHINEOBJ)/eeprom.o +MACHINEOBJS += $(MACHINEOBJ)/eepromser.o endif #------------------------------------------------- diff --git a/src/emu/machine/smpc.c b/src/emu/machine/smpc.c index 9231000d260..97cf3270c3a 100644 --- a/src/emu/machine/smpc.c +++ b/src/emu/machine/smpc.c @@ -150,7 +150,7 @@ TODO: #include "coreutil.h" #include "includes/stv.h" #include "machine/smpc.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #define LOG_SMPC 0 #define LOG_PAD_CMD 0 diff --git a/src/emu/save.h b/src/emu/save.h index 9daf7636be9..b52a3633b37 100644 --- a/src/emu/save.h +++ b/src/emu/save.h @@ -224,6 +224,7 @@ private: // template specializations to enumerate the fundamental atomic types you are allowed to save +ALLOW_SAVE_TYPE(char); ALLOW_SAVE_TYPE(bool); ALLOW_SAVE_TYPE(INT8); ALLOW_SAVE_TYPE(UINT8); diff --git a/src/emu/video/pc_vga.c b/src/emu/video/pc_vga.c index 4bef19c1e62..b49d391fd63 100644 --- a/src/emu/video/pc_vga.c +++ b/src/emu/video/pc_vga.c @@ -44,7 +44,7 @@ #include "emu.h" #include "pc_vga.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "debugger.h" /*************************************************************************** @@ -2107,8 +2107,6 @@ WRITE8_MEMBER(vga_device::mem_linear_w) static struct serial_eeprom_interface ati_eeprom_interface = { - 6, /* address bits */ - 16, /* data bits */ "*110", /* read command */ "*101", /* write command */ "*111", /* erase command */ @@ -2164,7 +2162,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_FRAGMENT( ati_vga ) MCFG_MACH8_ADD_OWNER("8514a") - MCFG_SERIAL_EEPROM_ADD("ati_eeprom",ati_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD("ati_eeprom",64,16,ati_eeprom_interface) MACHINE_CONFIG_END static MACHINE_CONFIG_FRAGMENT( s3_764 ) diff --git a/src/mame/drivers/20pacgal.c b/src/mame/drivers/20pacgal.c index f9ac43f89ae..0fafc1878b0 100644 --- a/src/mame/drivers/20pacgal.c +++ b/src/mame/drivers/20pacgal.c @@ -83,7 +83,7 @@ Graphics: CY37256P160-83AC x 2 (Ultra37000 CPLD family - 160 pin TQFP, 256 Macro #include "emu.h" #include "cpu/z180/z180.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/dac.h" #include "includes/20pacgal.h" @@ -141,8 +141,6 @@ static const namco_interface namco_config = static const serial_eeprom_interface _20pacgal_eeprom_intf = { - 7, /* address bits */ - 8, /* data bits */ "*110", /* read command */ "*101", /* write command */ 0, /* erase command */ @@ -368,7 +366,7 @@ static MACHINE_CONFIG_START( 20pacgal, _20pacgal_state ) MCFG_CPU_VBLANK_INT_DRIVER("screen", _20pacgal_state, vblank_irq) - MCFG_SERIAL_EEPROM_ADD("eeprom", _20pacgal_eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, _20pacgal_eeprom_intf) /* video hardware */ MCFG_FRAGMENT_ADD(20pacgal_video) diff --git a/src/mame/drivers/39in1.c b/src/mame/drivers/39in1.c index 952ac31ffde..2a1deefbd17 100644 --- a/src/mame/drivers/39in1.c +++ b/src/mame/drivers/39in1.c @@ -23,7 +23,7 @@ #include "emu.h" #include "cpu/arm7/arm7.h" #include "cpu/arm7/arm7core.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/pxa255.h" #include "sound/dmadac.h" diff --git a/src/mame/drivers/8080bw.c b/src/mame/drivers/8080bw.c index 3290b4afe1a..63ee9c0edb0 100644 --- a/src/mame/drivers/8080bw.c +++ b/src/mame/drivers/8080bw.c @@ -175,7 +175,7 @@ #include "emu.h" #include "cpu/m6800/m6800.h" #include "cpu/i8085/i8085.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/ay8910.h" #include "sound/speaker.h" #include "includes/8080bw.h" diff --git a/src/mame/drivers/albazg.c b/src/mame/drivers/albazg.c index a48da7de988..a7720638aba 100644 --- a/src/mame/drivers/albazg.c +++ b/src/mame/drivers/albazg.c @@ -34,7 +34,7 @@ PCB: #include "emu.h" #include "cpu/z80/z80.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/ay8910.h" #include "video/mc6845.h" #include "machine/i8255.h" diff --git a/src/mame/drivers/asterix.c b/src/mame/drivers/asterix.c index a42794225f2..04753dac38c 100644 --- a/src/mame/drivers/asterix.c +++ b/src/mame/drivers/asterix.c @@ -12,7 +12,7 @@ colour, including the word "Konami" #include "emu.h" #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/2151intf.h" #include "sound/k053260.h" #include "includes/konamipt.h" @@ -20,8 +20,6 @@ colour, including the word "Konami" static const serial_eeprom_interface eeprom_intf = { - 7, /* address bits */ - 8, /* data bits */ "111000", /* read command */ "111100", /* write command */ "1100100000000",/* erase command */ @@ -289,7 +287,7 @@ static MACHINE_CONFIG_START( asterix, asterix_state ) MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, eeprom_intf) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS) diff --git a/src/mame/drivers/astrcorp.c b/src/mame/drivers/astrcorp.c index ae937404d5a..c98c0b01fb0 100644 --- a/src/mame/drivers/astrcorp.c +++ b/src/mame/drivers/astrcorp.c @@ -35,7 +35,7 @@ To do: #include "emu.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/ticket.h" #include "machine/nvram.h" #include "sound/okim6295.h" diff --git a/src/mame/drivers/ataxx.c b/src/mame/drivers/ataxx.c index 2ff413bf79f..ac0473caac1 100644 --- a/src/mame/drivers/ataxx.c +++ b/src/mame/drivers/ataxx.c @@ -27,7 +27,7 @@ #include "emu.h" #include "cpu/i86/i86.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/nvram.h" #include "cpu/z80/z80.h" #include "includes/leland.h" @@ -292,8 +292,6 @@ INPUT_PORTS_END static const serial_eeprom_interface eeprom_intf = { - 7, - 16, "000001100", "000001010", 0, @@ -328,7 +326,7 @@ static MACHINE_CONFIG_START( ataxx, leland_state ) MCFG_MACHINE_START_OVERRIDE(leland_state,ataxx) MCFG_MACHINE_RESET_OVERRIDE(leland_state,ataxx) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 16, eeprom_intf) MCFG_NVRAM_ADD_0FILL("battery") /* video hardware */ diff --git a/src/mame/drivers/backfire.c b/src/mame/drivers/backfire.c index 749016634c4..168e972af67 100644 --- a/src/mame/drivers/backfire.c +++ b/src/mame/drivers/backfire.c @@ -13,7 +13,7 @@ #define DE156CPU ARM #include "emu.h" #include "includes/decocrpt.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/okim6295.h" #include "sound/ymz280b.h" #include "cpu/arm/arm.h" diff --git a/src/mame/drivers/cave.c b/src/mame/drivers/cave.c index 7523224df85..0c64876d882 100644 --- a/src/mame/drivers/cave.c +++ b/src/mame/drivers/cave.c @@ -84,7 +84,7 @@ Versions known to exist but not dumped: #include "emu.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/nvram.h" #include "cpu/z80/z80.h" #include "includes/cave.h" @@ -389,8 +389,6 @@ WRITE16_MEMBER(cave_state::metmqstr_eeprom_msb_w) static const serial_eeprom_interface eeprom_interface_93C46_pacslot = { - 6, // address bits 6 - 16, // data bits 16 "*110", // read 1 10 aaaaaa "*101", // write 1 01 aaaaaa dddddddddddddddd "*111", // erase 1 11 aaaaaa @@ -2301,7 +2299,7 @@ static MACHINE_CONFIG_START( pacslot, cave_state ) MCFG_MACHINE_START_OVERRIDE(cave_state,cave) MCFG_MACHINE_RESET_OVERRIDE(cave_state,cave) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_interface_93C46_pacslot) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, eeprom_interface_93C46_pacslot) MCFG_TIMER_DRIVER_ADD("int_timer", cave_state, cave_vblank_start) diff --git a/src/mame/drivers/cbasebal.c b/src/mame/drivers/cbasebal.c index 29e00518f76..2d655b664e9 100644 --- a/src/mame/drivers/cbasebal.c +++ b/src/mame/drivers/cbasebal.c @@ -16,7 +16,7 @@ #include "cpu/z80/z80.h" #include "machine/kabuki.h" // needed for decoding functions only #include "includes/cbasebal.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/okim6295.h" #include "sound/2413intf.h" @@ -91,8 +91,6 @@ WRITE8_MEMBER(cbasebal_state::cbasebal_coinctrl_w) static const serial_eeprom_interface cbasebal_eeprom_intf = { - 6, /* address bits */ - 16, /* data bits */ "0110", /* read command */ "0101", /* write command */ "0111" /* erase command */ @@ -275,7 +273,7 @@ static MACHINE_CONFIG_START( cbasebal, cbasebal_state ) MCFG_CPU_VBLANK_INT_DRIVER("screen", cbasebal_state, irq0_line_hold) /* ??? */ - MCFG_SERIAL_EEPROM_ADD("eeprom", cbasebal_eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, cbasebal_eeprom_intf) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) diff --git a/src/mame/drivers/centiped.c b/src/mame/drivers/centiped.c index 016996189a2..3bdaa8454f3 100644 --- a/src/mame/drivers/centiped.c +++ b/src/mame/drivers/centiped.c @@ -428,7 +428,7 @@ each direction to assign the boundries. #include "emu.h" #include "cpu/m6502/m6502.h" #include "cpu/s2650/s2650.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/atari_vg.h" #include "includes/centiped.h" #include "sound/ay8910.h" diff --git a/src/mame/drivers/cps1.c b/src/mame/drivers/cps1.c index b3e0b920c3a..5c46348d10b 100644 --- a/src/mame/drivers/cps1.c +++ b/src/mame/drivers/cps1.c @@ -239,7 +239,7 @@ Stephh's log (2006.09.20) : #include "cpu/z80/z80.h" #include "cpu/pic16c5x/pic16c5x.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/2151intf.h" #include "sound/okim6295.h" #include "sound/qsound.h" @@ -434,8 +434,6 @@ WRITE8_MEMBER(cps_state::qsound_banksw_w) static const serial_eeprom_interface qsound_eeprom_interface = { - 7, /* address bits */ - 8, /* data bits */ "0110", /* read command */ "0101", /* write command */ "0111" /* erase command */ @@ -443,8 +441,6 @@ static const serial_eeprom_interface qsound_eeprom_interface = static const serial_eeprom_interface pang3_eeprom_interface = { - 6, /* address bits */ - 16, /* data bits */ "0110", /* read command */ "0101", /* write command */ "0111" /* erase command */ @@ -3217,7 +3213,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( pang3, cps1_12MHz ) /* basic machine hardware */ - MCFG_SERIAL_EEPROM_ADD("eeprom", pang3_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, pang3_eeprom_interface) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( ganbare, cps1_10MHz ) @@ -3242,7 +3238,7 @@ static MACHINE_CONFIG_DERIVED( qsound, cps1_12MHz ) MCFG_MACHINE_START_OVERRIDE(cps_state,qsound) - MCFG_SERIAL_EEPROM_ADD("eeprom", qsound_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, qsound_eeprom_interface) /* sound hardware */ MCFG_DEVICE_REMOVE("mono") @@ -3259,7 +3255,7 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( wofhfh, cps1_12MHz ) /* basic machine hardware */ - MCFG_SERIAL_EEPROM_ADD("eeprom", qsound_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, qsound_eeprom_interface) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( sf2m3, cps1_12MHz) diff --git a/src/mame/drivers/cps2.c b/src/mame/drivers/cps2.c index 182b64ca18a..4e11fe23cfb 100644 --- a/src/mame/drivers/cps2.c +++ b/src/mame/drivers/cps2.c @@ -593,7 +593,7 @@ Stephh's inputs notes (based on some tests on the "parent" set) : #include "emu.h" #include "cpu/z80/z80.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "cpu/m68000/m68000.h" #include "sound/qsound.h" #include "sound/okim6295.h" // gigaman2 bootleg @@ -681,8 +681,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(cps_state::cps2_interrupt) static const serial_eeprom_interface cps2_eeprom_interface = { - 6, /* address bits */ - 16, /* data bits */ "0110", /* read command */ "0101", /* write command */ "0111" /* erase command */ @@ -1258,7 +1256,7 @@ static MACHINE_CONFIG_START( cps2, cps_state ) MCFG_MACHINE_START_OVERRIDE(cps_state,cps2) - MCFG_SERIAL_EEPROM_ADD("eeprom", cps2_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, cps2_eeprom_interface) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) diff --git a/src/mame/drivers/dcheese.c b/src/mame/drivers/dcheese.c index 011202f63c5..db2d04166fa 100644 --- a/src/mame/drivers/dcheese.c +++ b/src/mame/drivers/dcheese.c @@ -31,7 +31,7 @@ #include "emu.h" #include "cpu/m6809/m6809.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/ticket.h" #include "sound/bsmt2000.h" #include "includes/dcheese.h" diff --git a/src/mame/drivers/deco156.c b/src/mame/drivers/deco156.c index b99674e3126..b9cccd4f0d4 100644 --- a/src/mame/drivers/deco156.c +++ b/src/mame/drivers/deco156.c @@ -17,7 +17,7 @@ #include "emu.h" #include "cpu/arm/arm.h" #include "includes/decocrpt.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/okim6295.h" #include "sound/ymz280b.h" #include "video/deco16ic.h" diff --git a/src/mame/drivers/deco32.c b/src/mame/drivers/deco32.c index baf6a4d668e..7e8c10df406 100644 --- a/src/mame/drivers/deco32.c +++ b/src/mame/drivers/deco32.c @@ -230,7 +230,7 @@ Notes: #include "cpu/m6809/m6809.h" #include "cpu/z80/z80.h" #include "includes/decocrpt.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "includes/deco32.h" #include "sound/2151intf.h" #include "sound/okim6295.h" @@ -1671,8 +1671,6 @@ WRITE8_MEMBER(deco32_state::sound_bankswitch_w) static const serial_eeprom_interface eeprom_interface_tattass = { - 10, // address bits 10 ==> } 1024 byte eprom - 8, // data bits 8 }; /**********************************************************************************/ @@ -2161,7 +2159,7 @@ static MACHINE_CONFIG_START( tattass, deco32_state ) MCFG_CPU_PROGRAM_MAP(tattass_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", deco32_state, deco32_vbl_interrupt) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_interface_tattass) + MCFG_SERIAL_EEPROM_ADD("eeprom", 1024, 8, eeprom_interface_tattass) MCFG_SCREEN_ADD("screen", RASTER) MCFG_SCREEN_REFRESH_RATE(60) diff --git a/src/mame/drivers/deco_mlc.c b/src/mame/drivers/deco_mlc.c index 6dcaa79521c..da9484f0eae 100644 --- a/src/mame/drivers/deco_mlc.c +++ b/src/mame/drivers/deco_mlc.c @@ -99,7 +99,7 @@ #include "emu.h" #include "includes/decocrpt.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/ymz280b.h" #include "cpu/arm/arm.h" #include "cpu/sh2/sh2.h" diff --git a/src/mame/drivers/dkong.c b/src/mame/drivers/dkong.c index e75637b6e54..a7e5064be4e 100644 --- a/src/mame/drivers/dkong.c +++ b/src/mame/drivers/dkong.c @@ -317,7 +317,7 @@ Donkey Kong Junior Notes #include "machine/8257dma.h" #include "machine/z80dma.h" #include "machine/latch8.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" /************************************* * diff --git a/src/mame/drivers/dreambal.c b/src/mame/drivers/dreambal.c index 54a9740d191..ce5a6e78596 100644 --- a/src/mame/drivers/dreambal.c +++ b/src/mame/drivers/dreambal.c @@ -25,7 +25,7 @@ lamps? #include "sound/okim6295.h" #include "video/deco16ic.h" #include "video/decospr.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/deco104.h" class dreambal_state : public driver_device diff --git a/src/mame/drivers/eolith.c b/src/mame/drivers/eolith.c index b7619ade851..7ebd65218ac 100644 --- a/src/mame/drivers/eolith.c +++ b/src/mame/drivers/eolith.c @@ -101,7 +101,7 @@ #include "cpu/e132xs/e132xs.h" #include "cpu/mcs51/mcs51.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "includes/eolith.h" #include "includes/eolithsp.h" @@ -546,8 +546,6 @@ INPUT_PORTS_END // It's configured for 512 bytes static const serial_eeprom_interface eeprom_interface_93C66 = { - 9, // address bits 9 - 8, // data bits 8 "*110", // read 110 aaaaaaaaa "*101", // write 101 aaaaaaaaa dddddddd "*111", // erase 111 aaaaaaaaa @@ -597,7 +595,7 @@ static MACHINE_CONFIG_START( eolith45, eolith_state ) MCFG_MACHINE_RESET_OVERRIDE(eolith_state,eolith) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_interface_93C66) + MCFG_SERIAL_EEPROM_ADD("eeprom", 512, 8, eeprom_interface_93C66) // for testing sound sync // MCFG_QUANTUM_PERFECT_CPU("maincpu") diff --git a/src/mame/drivers/eolith16.c b/src/mame/drivers/eolith16.c index 2226aa2b2e2..e402910de3d 100644 --- a/src/mame/drivers/eolith16.c +++ b/src/mame/drivers/eolith16.c @@ -11,7 +11,7 @@ #include "emu.h" #include "cpu/e132xs/e132xs.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/okim6295.h" #include "includes/eolith.h" @@ -41,8 +41,6 @@ public: // It's configured for 512 bytes static const serial_eeprom_interface eeprom_interface_93C66 = { - 9, // address bits 9 - 8, // data bits 8 "*110", // read 110 aaaaaaaaa "*101", // write 101 aaaaaaaaa dddddddd "*111", // erase 111 aaaaaaaaa @@ -181,7 +179,7 @@ static MACHINE_CONFIG_START( eolith16, eolith16_state ) MCFG_CPU_PROGRAM_MAP(eolith16_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", eolith16_state, eolith_speedup, "screen", 0, 1) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_interface_93C66) + MCFG_SERIAL_EEPROM_ADD("eeprom", 512, 8, eeprom_interface_93C66) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/esd16.c b/src/mame/drivers/esd16.c index 882433268de..2cfa3fc290a 100644 --- a/src/mame/drivers/esd16.c +++ b/src/mame/drivers/esd16.c @@ -67,7 +67,7 @@ ToDo: #include "emu.h" #include "cpu/z80/z80.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/okim6295.h" #include "sound/3812intf.h" #include "includes/esd16.h" diff --git a/src/mame/drivers/f-32.c b/src/mame/drivers/f-32.c index 6cb2bfcdb06..a86664ee92c 100644 --- a/src/mame/drivers/f-32.c +++ b/src/mame/drivers/f-32.c @@ -13,7 +13,7 @@ #include "emu.h" #include "cpu/e132xs/e132xs.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/2151intf.h" #include "sound/okim6295.h" diff --git a/src/mame/drivers/fcrash.c b/src/mame/drivers/fcrash.c index 51205c299ff..c861218a719 100644 --- a/src/mame/drivers/fcrash.c +++ b/src/mame/drivers/fcrash.c @@ -92,12 +92,10 @@ slampic: no sound. In the wrestling ring, a layer flashes on and off. #include "sound/msm5205.h" #include "sound/2151intf.h" #include "sound/okim6295.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" static const serial_eeprom_interface qsound_eeprom_interface = { - 7, /* address bits */ - 8, /* data bits */ "0110", /* read command */ "0101", /* write command */ "0111" /* erase command */ @@ -1976,7 +1974,7 @@ static MACHINE_CONFIG_START( dinopic, cps_state ) MCFG_MACHINE_START_OVERRIDE(cps_state, dinopic) - MCFG_SERIAL_EEPROM_ADD("eeprom", qsound_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, qsound_eeprom_interface) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -2143,7 +2141,7 @@ static MACHINE_CONFIG_START( sgyxz, cps_state ) MCFG_PALETTE_LENGTH(0xc00) MCFG_VIDEO_START_OVERRIDE(cps_state,cps1) - MCFG_SERIAL_EEPROM_ADD("eeprom", qsound_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, qsound_eeprom_interface) /* sound hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -2221,7 +2219,7 @@ static MACHINE_CONFIG_START( punipic, cps_state ) MCFG_MACHINE_START_OVERRIDE(cps_state, punipic) - MCFG_SERIAL_EEPROM_ADD("eeprom", qsound_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, qsound_eeprom_interface) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -2611,7 +2609,7 @@ static MACHINE_CONFIG_START( slampic, cps_state ) MCFG_MACHINE_START_OVERRIDE(cps_state, slampic) - MCFG_SERIAL_EEPROM_ADD("eeprom", qsound_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, qsound_eeprom_interface) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/fortecar.c b/src/mame/drivers/fortecar.c index 245b55b75cd..0d710e7bd2e 100644 --- a/src/mame/drivers/fortecar.c +++ b/src/mame/drivers/fortecar.c @@ -314,7 +314,7 @@ #include "emu.h" #include "cpu/z80/z80.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/ay8910.h" #include "machine/i8255.h" #include "machine/v3021.h" @@ -553,8 +553,6 @@ static const serial_eeprom_interface forte_eeprom_intf = Preliminary interface for NM93CS56N Serial EEPROM. Correct address & data. Using 93C46 similar protocol. */ - 8, /* address bits */ - 16, /* data bits */ "*110", /* read command */ "*101", /* write command */ "*111", /* erase command */ @@ -702,7 +700,7 @@ static MACHINE_CONFIG_START( fortecar, fortecar_state ) MCFG_SCREEN_UPDATE_DRIVER(fortecar_state, screen_update_fortecar) - MCFG_SERIAL_EEPROM_ADD("eeprom", forte_eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 256, 16, forte_eeprom_intf) MCFG_SERIAL_EEPROM_DEFAULT_VALUE(0) MCFG_I8255A_ADD( "fcppi0", ppi8255_intf ) diff --git a/src/mame/drivers/fromanc2.c b/src/mame/drivers/fromanc2.c index 9a1532c4cfe..994a2a1a483 100644 --- a/src/mame/drivers/fromanc2.c +++ b/src/mame/drivers/fromanc2.c @@ -19,7 +19,7 @@ #include "emu.h" #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/2610intf.h" #include "rendlay.h" #include "includes/fromanc2.h" diff --git a/src/mame/drivers/gaelco2.c b/src/mame/drivers/gaelco2.c index 49f381632dd..ee2151c2115 100644 --- a/src/mame/drivers/gaelco2.c +++ b/src/mame/drivers/gaelco2.c @@ -20,7 +20,7 @@ ***************************************************************************/ #include "emu.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/gaelco.h" #include "rendlay.h" #include "includes/gaelco2.h" @@ -273,8 +273,6 @@ static const gaelcosnd_interface bang_snd_interface = static const serial_eeprom_interface gaelco2_eeprom_interface = { - 8, /* address bits */ - 16, /* data bits */ "*110", /* read command */ "*101", /* write command */ "*111", /* erase command */ @@ -290,7 +288,7 @@ static MACHINE_CONFIG_START( bang, gaelco2_state ) MCFG_CPU_PROGRAM_MAP(bang_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", gaelco2_state, bang_irq, "screen", 0, 1) - MCFG_SERIAL_EEPROM_ADD("eeprom", gaelco2_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD("eeprom", 256, 16, gaelco2_eeprom_interface) /* video hardware */ MCFG_BUFFERED_SPRITERAM16_ADD("spriteram") @@ -967,7 +965,7 @@ static MACHINE_CONFIG_START( snowboar, gaelco2_state ) MCFG_CPU_PROGRAM_MAP(snowboar_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", gaelco2_state, irq6_line_hold) - MCFG_SERIAL_EEPROM_ADD("eeprom", gaelco2_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD("eeprom", 256, 16, gaelco2_eeprom_interface) /* video hardware */ MCFG_BUFFERED_SPRITERAM16_ADD("spriteram") @@ -1208,7 +1206,7 @@ static MACHINE_CONFIG_START( wrally2, gaelco2_state ) MCFG_CPU_PROGRAM_MAP(wrally2_map) MCFG_CPU_VBLANK_INT_DRIVER("lscreen", gaelco2_state, irq6_line_hold) - MCFG_SERIAL_EEPROM_ADD("eeprom", gaelco2_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD("eeprom", 256, 16, gaelco2_eeprom_interface) /* video hardware */ MCFG_BUFFERED_SPRITERAM16_ADD("spriteram") diff --git a/src/mame/drivers/gaelco3d.c b/src/mame/drivers/gaelco3d.c index 5a643d99480..074ed14e72a 100644 --- a/src/mame/drivers/gaelco3d.c +++ b/src/mame/drivers/gaelco3d.c @@ -147,7 +147,7 @@ REF. 970429 #include "includes/gaelco3d.h" #include "cpu/tms32031/tms32031.h" #include "cpu/adsp2100/adsp2100.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #define LOG 0 diff --git a/src/mame/drivers/galastrm.c b/src/mame/drivers/galastrm.c index 741c9f4e2bd..0a145e9416b 100644 --- a/src/mame/drivers/galastrm.c +++ b/src/mame/drivers/galastrm.c @@ -39,7 +39,7 @@ $305.b invincibility #include "emu.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/es5506.h" #include "audio/taito_en.h" #include "includes/galastrm.h" @@ -277,8 +277,6 @@ GFXDECODE_END static const serial_eeprom_interface galastrm_eeprom_interface = { - 6, /* address bits */ - 16, /* data bits */ "0110", /* read command */ "0101", /* write command */ "0111", /* erase command */ @@ -313,7 +311,7 @@ static MACHINE_CONFIG_START( galastrm, galastrm_state ) MCFG_CPU_PROGRAM_MAP(galastrm_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", galastrm_state, galastrm_interrupt) /* VBL */ - MCFG_SERIAL_EEPROM_ADD("eeprom", galastrm_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, galastrm_eeprom_interface) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/galpani2.c b/src/mame/drivers/galpani2.c index 2471ae32383..45a8a65fd34 100644 --- a/src/mame/drivers/galpani2.c +++ b/src/mame/drivers/galpani2.c @@ -22,7 +22,7 @@ To Do: #include "emu.h" #include "cpu/m68000/m68000.h" #include "sound/okim6295.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "includes/galpani2.h" /*************************************************************************** diff --git a/src/mame/drivers/galpani3.c b/src/mame/drivers/galpani3.c index 3fb5d787b26..5e3ecbc54a3 100644 --- a/src/mame/drivers/galpani3.c +++ b/src/mame/drivers/galpani3.c @@ -65,7 +65,7 @@ Dumped by Uki #include "cpu/m68000/m68000.h" #include "sound/ymz280b.h" #include "video/sknsspr.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/kaneko_toybox.h" #include "video/kaneko_grap2.h" diff --git a/src/mame/drivers/gijoe.c b/src/mame/drivers/gijoe.c index 90fddad9f9a..59e08f837a5 100644 --- a/src/mame/drivers/gijoe.c +++ b/src/mame/drivers/gijoe.c @@ -36,7 +36,7 @@ Known Issues #include "emu.h" #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/k054539.h" #include "includes/konamipt.h" #include "includes/gijoe.h" @@ -47,8 +47,6 @@ Known Issues static const serial_eeprom_interface eeprom_intf = { - 7, /* address bits */ - 8, /* data bits */ "011000", /* read command */ "011100", /* write command */ "0100100000000",/* erase command */ @@ -286,7 +284,7 @@ static MACHINE_CONFIG_START( gijoe, gijoe_state ) MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, eeprom_intf) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_UPDATE_BEFORE_VBLANK) diff --git a/src/mame/drivers/groundfx.c b/src/mame/drivers/groundfx.c index 8d31aee62d5..83c0e1180b3 100644 --- a/src/mame/drivers/groundfx.c +++ b/src/mame/drivers/groundfx.c @@ -64,7 +64,7 @@ #include "emu.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/es5506.h" #include "audio/taito_en.h" #include "includes/groundfx.h" @@ -116,8 +116,6 @@ void groundfx_state::device_timer(emu_timer &timer, device_timer_id id, int para static const serial_eeprom_interface groundfx_eeprom_interface = { - 6, /* address bits */ - 16, /* data bits */ "0110", /* read command */ "0101", /* write command */ "0111", /* erase command */ @@ -372,7 +370,7 @@ static MACHINE_CONFIG_START( groundfx, groundfx_state ) MCFG_CPU_PROGRAM_MAP(groundfx_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", groundfx_state, groundfx_interrupt) - MCFG_SERIAL_EEPROM_ADD("eeprom", groundfx_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, groundfx_eeprom_interface) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/gticlub.c b/src/mame/drivers/gticlub.c index adee32f879f..285f6bdd297 100644 --- a/src/mame/drivers/gticlub.c +++ b/src/mame/drivers/gticlub.c @@ -220,7 +220,7 @@ Hang Pilot (uses an unknown but similar video board) 12W #include "emu.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "cpu/powerpc/ppc.h" #include "cpu/sharc/sharc.h" #include "machine/konppc.h" @@ -362,8 +362,6 @@ WRITE32_MEMBER(gticlub_state::gticlub_k001604_reg_w) /* 93C56 EEPROM */ static const serial_eeprom_interface eeprom_intf = { - 8, /* address bits */ - 16, /* data bits */ "*110", /* read command */ "*101", /* write command */ "*111", /* erase command */ @@ -978,7 +976,7 @@ static MACHINE_CONFIG_START( gticlub, gticlub_state ) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 256, 16, eeprom_intf) MCFG_MACHINE_START_OVERRIDE(gticlub_state,gticlub) MCFG_MACHINE_RESET_OVERRIDE(gticlub_state,gticlub) @@ -1085,7 +1083,7 @@ static MACHINE_CONFIG_START( hangplt, gticlub_state ) MCFG_QUANTUM_TIME(attotime::from_hz(6000)) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 256, 16, eeprom_intf) MCFG_MACHINE_START_OVERRIDE(gticlub_state,gticlub) MCFG_MACHINE_RESET_OVERRIDE(gticlub_state,hangplt) diff --git a/src/mame/drivers/gunbustr.c b/src/mame/drivers/gunbustr.c index 058b952dbdb..a889a8b8e0c 100644 --- a/src/mame/drivers/gunbustr.c +++ b/src/mame/drivers/gunbustr.c @@ -43,7 +43,7 @@ #include "emu.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/es5506.h" #include "audio/taito_en.h" #include "includes/gunbustr.h" @@ -286,8 +286,6 @@ GFXDECODE_END static const serial_eeprom_interface gunbustr_eeprom_interface = { - 6, /* address bits */ - 16, /* data bits */ "0110", /* read command */ "0101", /* write command */ "0111", /* erase command */ @@ -312,7 +310,7 @@ static MACHINE_CONFIG_START( gunbustr, gunbustr_state ) MCFG_CPU_PROGRAM_MAP(gunbustr_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", gunbustr_state, gunbustr_interrupt) /* VBL */ - MCFG_SERIAL_EEPROM_ADD("eeprom", gunbustr_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, gunbustr_eeprom_interface) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/hornet.c b/src/mame/drivers/hornet.c index a875ba3314a..a63d1404d19 100644 --- a/src/mame/drivers/hornet.c +++ b/src/mame/drivers/hornet.c @@ -312,7 +312,7 @@ #include "cpu/powerpc/ppc.h" #include "cpu/sharc/sharc.h" #include "machine/adc1213x.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/k033906.h" #include "machine/konppc.h" #include "machine/timekpr.h" diff --git a/src/mame/drivers/inufuku.c b/src/mame/drivers/inufuku.c index 45590116f00..151272392ca 100644 --- a/src/mame/drivers/inufuku.c +++ b/src/mame/drivers/inufuku.c @@ -73,7 +73,7 @@ TODO: #include "emu.h" #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/2610intf.h" #include "video/vsystem_spr.h" #include "includes/inufuku.h" diff --git a/src/mame/drivers/invqix.c b/src/mame/drivers/invqix.c index 3203e62fce5..c7a57984c0e 100644 --- a/src/mame/drivers/invqix.c +++ b/src/mame/drivers/invqix.c @@ -119,7 +119,7 @@ as well as Up Right, Cocktail or Flip Screen from the service menu. #include "emu.h" #include "cpu/h83002/h8.h" #include "sound/okim9810.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" class invqix_state : public driver_device { diff --git a/src/mame/drivers/jackpool.c b/src/mame/drivers/jackpool.c index e909aa16150..41c493e4b01 100644 --- a/src/mame/drivers/jackpool.c +++ b/src/mame/drivers/jackpool.c @@ -18,7 +18,7 @@ TODO: #include "emu.h" #include "cpu/m68000/m68000.h" #include "sound/okim6295.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" class jackpool_state : public driver_device diff --git a/src/mame/drivers/jaguar.c b/src/mame/drivers/jaguar.c index cb9dbef6fbe..4b3b59968cf 100644 --- a/src/mame/drivers/jaguar.c +++ b/src/mame/drivers/jaguar.c @@ -341,7 +341,7 @@ Notes: #include "imagedev/cartslot.h" #include "imagedev/snapquik.h" #include "sound/dac.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #define COJAG_CLOCK XTAL_52MHz #define R3000_CLOCK XTAL_40MHz diff --git a/src/mame/drivers/jchan.c b/src/mame/drivers/jchan.c index ee0cea27505..5e00832617b 100644 --- a/src/mame/drivers/jchan.c +++ b/src/mame/drivers/jchan.c @@ -172,7 +172,7 @@ there are 9 PALS on the pcb (not dumped) #include "machine/nvram.h" #include "sound/ymz280b.h" #include "video/sknsspr.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "video/kaneko_tmap.h" #include "machine/kaneko_toybox.h" diff --git a/src/mame/drivers/jclub2.c b/src/mame/drivers/jclub2.c index f7f7f205f34..be278fbb106 100644 --- a/src/mame/drivers/jclub2.c +++ b/src/mame/drivers/jclub2.c @@ -94,7 +94,7 @@ To do: #include "emu.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/okim6295.h" #include "sound/st0016.h" #include "includes/st0016.h" diff --git a/src/mame/drivers/kaneko16.c b/src/mame/drivers/kaneko16.c index ba6cf40c598..a5d6c5d4f36 100644 --- a/src/mame/drivers/kaneko16.c +++ b/src/mame/drivers/kaneko16.c @@ -87,7 +87,7 @@ Dip locations verified from manual for: #include "emu.h" #include "cpu/z80/z80.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "includes/kaneko16.h" #include "sound/2203intf.h" #include "sound/2151intf.h" diff --git a/src/mame/drivers/kickgoal.c b/src/mame/drivers/kickgoal.c index 0203a1ae3a6..9d700c96426 100644 --- a/src/mame/drivers/kickgoal.c +++ b/src/mame/drivers/kickgoal.c @@ -37,7 +37,7 @@ lev 7 : 0x7c : 0000 0000 - x #include "emu.h" #include "cpu/m68000/m68000.h" #include "cpu/pic16c5x/pic16c5x.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/okim6295.h" #include "includes/kickgoal.h" diff --git a/src/mame/drivers/konamigq.c b/src/mame/drivers/konamigq.c index 2aeaf7c60b8..f60cfe6438a 100644 --- a/src/mame/drivers/konamigq.c +++ b/src/mame/drivers/konamigq.c @@ -50,7 +50,7 @@ #include "cpu/psx/psx.h" #include "video/psx.h" #include "machine/am53cf96.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/mb89371.h" #include "machine/scsibus.h" #include "machine/scsihd.h" diff --git a/src/mame/drivers/konamigv.c b/src/mame/drivers/konamigv.c index 0eac05587c2..9e3f4ff36b8 100644 --- a/src/mame/drivers/konamigv.c +++ b/src/mame/drivers/konamigv.c @@ -124,7 +124,7 @@ Notes: #include "cpu/psx/psx.h" #include "video/psx.h" #include "machine/am53cf96.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/intelfsh.h" #include "machine/mb89371.h" #include "machine/scsibus.h" diff --git a/src/mame/drivers/konamigx.c b/src/mame/drivers/konamigx.c index 12720c915d1..2b56b2dd74f 100644 --- a/src/mame/drivers/konamigx.c +++ b/src/mame/drivers/konamigx.c @@ -98,7 +98,7 @@ #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" #include "cpu/tms57002/tms57002.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/k054539.h" #include "includes/konamigx.h" #include "machine/adc083x.h" diff --git a/src/mame/drivers/leland.c b/src/mame/drivers/leland.c index 8261d956193..58e9d892d81 100644 --- a/src/mame/drivers/leland.c +++ b/src/mame/drivers/leland.c @@ -43,7 +43,7 @@ #include "emu.h" #include "cpu/i86/i86.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/nvram.h" #include "cpu/z80/z80.h" #include "includes/leland.h" @@ -730,8 +730,6 @@ static const ay8910_interface ay8910_config = static const serial_eeprom_interface eeprom_intf = { - 6, - 16, "110", "101", "111" @@ -760,7 +758,7 @@ static MACHINE_CONFIG_START( leland, leland_state ) MCFG_MACHINE_START_OVERRIDE(leland_state,leland) MCFG_MACHINE_RESET_OVERRIDE(leland_state,leland) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, eeprom_intf) MCFG_NVRAM_ADD_0FILL("battery") /* video hardware */ diff --git a/src/mame/drivers/lethal.c b/src/mame/drivers/lethal.c index bf903ecbbaa..27abd40e363 100644 --- a/src/mame/drivers/lethal.c +++ b/src/mame/drivers/lethal.c @@ -162,7 +162,7 @@ maybe some sprite placement issues #include "cpu/m6809/m6809.h" #include "cpu/m6809/hd6309.h" #include "cpu/z80/z80.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/k054539.h" #include "includes/lethal.h" @@ -178,8 +178,6 @@ static const char *const gunnames[] = { "LIGHT0_X", "LIGHT0_Y", "LIGHT1_X", "LIG static const serial_eeprom_interface eeprom_intf = { - 7, /* address bits */ - 8, /* data bits */ "011000", /* read command */ "011100", /* write command */ "0100100000000", /* erase command */ @@ -639,7 +637,7 @@ static MACHINE_CONFIG_START( lethalen, lethal_state ) MCFG_CPU_PROGRAM_MAP(le_sound) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, eeprom_intf) MCFG_GFXDECODE(lethal) diff --git a/src/mame/drivers/limenko.c b/src/mame/drivers/limenko.c index d4ad7445c98..8c84aea4ce3 100644 --- a/src/mame/drivers/limenko.c +++ b/src/mame/drivers/limenko.c @@ -24,7 +24,7 @@ #include "emu.h" #include "cpu/e132xs/e132xs.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/qs1000.h" #include "sound/okim6295.h" diff --git a/src/mame/drivers/lordgun.c b/src/mame/drivers/lordgun.c index fee5a5d1b2a..00d8efb6358 100644 --- a/src/mame/drivers/lordgun.c +++ b/src/mame/drivers/lordgun.c @@ -41,7 +41,7 @@ Notes: #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" #include "machine/i8255.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/3812intf.h" #include "sound/okim6295.h" #include "sound/ymf278b.h" diff --git a/src/mame/drivers/metro.c b/src/mame/drivers/metro.c index 0068d17e222..676d571e5f6 100644 --- a/src/mame/drivers/metro.c +++ b/src/mame/drivers/metro.c @@ -98,7 +98,7 @@ driver modified by Eisuke Watanabe #include "cpu/h83002/h8.h" #include "cpu/upd7810/upd7810.h" #include "includes/metro.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/2151intf.h" #include "sound/2413intf.h" #include "sound/2610intf.h" diff --git a/src/mame/drivers/midas.c b/src/mame/drivers/midas.c index 196eb8c6fdb..54019c57e7b 100644 --- a/src/mame/drivers/midas.c +++ b/src/mame/drivers/midas.c @@ -53,7 +53,7 @@ #include "emu.h" #include "cpu/m68000/m68000.h" #include "sound/ymz280b.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/ticket.h" diff --git a/src/mame/drivers/mitchell.c b/src/mame/drivers/mitchell.c index 815f3c7689b..4a2d984ed1a 100644 --- a/src/mame/drivers/mitchell.c +++ b/src/mame/drivers/mitchell.c @@ -68,7 +68,7 @@ mw-9.rom = ST M27C1001 / GFX #include "emu.h" #include "cpu/z80/z80.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/kabuki.h" // needed for decoding functions only #include "includes/mitchell.h" #include "sound/okim6295.h" @@ -85,8 +85,6 @@ mw-9.rom = ST M27C1001 / GFX static const serial_eeprom_interface eeprom_intf = { - 6, /* address bits */ - 16, /* data bits */ "0110", /* read command */ "0101", /* write command */ "0111" /* erase command */ @@ -1090,7 +1088,7 @@ static MACHINE_CONFIG_START( mgakuen, mitchell_state ) MCFG_MACHINE_START_OVERRIDE(mitchell_state,mitchell) MCFG_MACHINE_RESET_OVERRIDE(mitchell_state,mitchell) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, eeprom_intf) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1127,7 +1125,7 @@ static MACHINE_CONFIG_START( pang, mitchell_state ) MCFG_MACHINE_START_OVERRIDE(mitchell_state,mitchell) MCFG_MACHINE_RESET_OVERRIDE(mitchell_state,mitchell) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, eeprom_intf) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1262,7 +1260,7 @@ static MACHINE_CONFIG_START( marukin, mitchell_state ) MCFG_CPU_IO_MAP(mitchell_io_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mitchell_state, mitchell_irq, "screen", 0, 1) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, eeprom_intf) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -1313,7 +1311,7 @@ static MACHINE_CONFIG_START( pkladiesbl, mitchell_state ) MCFG_CPU_IO_MAP(mitchell_io_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", mitchell_state, mitchell_irq, "screen", 0, 1) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, eeprom_intf) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/model2.c b/src/mame/drivers/model2.c index 09d07430a0a..128134f4efc 100644 --- a/src/mame/drivers/model2.c +++ b/src/mame/drivers/model2.c @@ -87,7 +87,7 @@ */ #include "emu.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/nvram.h" #include "video/segaic24.h" #include "cpu/i960/i960.h" diff --git a/src/mame/drivers/model3.c b/src/mame/drivers/model3.c index 1c8d36f5759..e8c57bd3999 100644 --- a/src/mame/drivers/model3.c +++ b/src/mame/drivers/model3.c @@ -656,7 +656,7 @@ ALL VROM ROMs are 16M MASK #include "emu.h" #include "cpu/m68000/m68000.h" #include "cpu/powerpc/ppc.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/53c810.h" #include "machine/nvram.h" #include "sound/scsp.h" @@ -1195,8 +1195,6 @@ static void real3d_dma_callback(running_machine &machine, UINT32 src, UINT32 dst /* this is a 93C46 but with reset delay that is needed by Lost World */ static const serial_eeprom_interface eeprom_intf = { - 6, /* address bits */ - 16, /* data bits */ "*110", /* read command */ "*101", /* write command */ "*111", /* erase command */ @@ -5371,7 +5369,7 @@ static MACHINE_CONFIG_START( model3_10, model3_state ) MCFG_MACHINE_START_OVERRIDE(model3_state,model3_10) MCFG_MACHINE_RESET_OVERRIDE(model3_state,model3_10) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, eeprom_intf) MCFG_NVRAM_ADD_1FILL("backup") @@ -5412,7 +5410,7 @@ static MACHINE_CONFIG_START( model3_15, model3_state ) MCFG_MACHINE_START_OVERRIDE(model3_state,model3_15) MCFG_MACHINE_RESET_OVERRIDE(model3_state,model3_15) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, eeprom_intf) MCFG_NVRAM_ADD_1FILL("backup") @@ -5459,7 +5457,7 @@ static MACHINE_CONFIG_START( model3_20, model3_state ) MCFG_MACHINE_START_OVERRIDE(model3_state,model3_20) MCFG_MACHINE_RESET_OVERRIDE(model3_state,model3_20) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, eeprom_intf) MCFG_NVRAM_ADD_1FILL("backup") @@ -5497,7 +5495,7 @@ static MACHINE_CONFIG_START( model3_21, model3_state ) MCFG_MACHINE_START_OVERRIDE(model3_state,model3_21) MCFG_MACHINE_RESET_OVERRIDE(model3_state,model3_21) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, eeprom_intf) MCFG_NVRAM_ADD_1FILL("backup") diff --git a/src/mame/drivers/moo.c b/src/mame/drivers/moo.c index 7dc399bf4a3..6091ab15e48 100644 --- a/src/mame/drivers/moo.c +++ b/src/mame/drivers/moo.c @@ -41,7 +41,7 @@ Bucky: #include "emu.h" #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/2151intf.h" #include "sound/okim6295.h" #include "sound/k054539.h" @@ -54,8 +54,6 @@ Bucky: static const serial_eeprom_interface eeprom_intf = { - 7, /* address bits */ - 8, /* data bits */ "011000", /* read command */ "011100", /* write command */ "0100100000000", /* erase command */ @@ -508,7 +506,7 @@ static MACHINE_CONFIG_START( moo, moo_state ) MCFG_MACHINE_START_OVERRIDE(moo_state,moo) MCFG_MACHINE_RESET_OVERRIDE(moo_state,moo) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, eeprom_intf) MCFG_K053252_ADD("k053252", 16000000/2, moo_k053252_intf) @@ -553,7 +551,7 @@ static MACHINE_CONFIG_START( moobl, moo_state ) MCFG_MACHINE_START_OVERRIDE(moo_state,moo) MCFG_MACHINE_RESET_OVERRIDE(moo_state,moo) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, eeprom_intf) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS | VIDEO_UPDATE_AFTER_VBLANK) diff --git a/src/mame/drivers/mystwarr.c b/src/mame/drivers/mystwarr.c index 0f52bd2ed93..7013f9f4662 100644 --- a/src/mame/drivers/mystwarr.c +++ b/src/mame/drivers/mystwarr.c @@ -26,7 +26,7 @@ #include "includes/konamigx.h" #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/k054539.h" #include "includes/konamipt.h" #include "includes/mystwarr.h" @@ -35,8 +35,6 @@ static const serial_eeprom_interface eeprom_intf = { - 7, /* address bits */ - 8, /* data bits */ "011000", /* read command */ "011100", /* write command */ "0100100000000",/* erase command */ @@ -48,8 +46,6 @@ static const serial_eeprom_interface eeprom_intf = but the command formats are slightly different. Why? */ static const serial_eeprom_interface gaia_eeprom_intf = { - 7, /* address bits */ - 8, /* data bits */ "011000", /* read command */ "010100", /* write command */ "0100100000000",/* erase command */ @@ -974,7 +970,7 @@ static MACHINE_CONFIG_START( mystwarr, mystwarr_state ) MCFG_QUANTUM_TIME(attotime::from_hz(1920)) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, eeprom_intf) MCFG_K053252_ADD("k053252", 6000000, mystwarr_k053252_intf) // 6 MHz? MCFG_MACHINE_START_OVERRIDE(mystwarr_state,mystwarr) @@ -1101,7 +1097,7 @@ static MACHINE_CONFIG_DERIVED( gaiapols, mystwarr ) MCFG_GFXDECODE(gaiapols) MCFG_DEVICE_REMOVE("eeprom") - MCFG_SERIAL_EEPROM_ADD("eeprom", gaia_eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, gaia_eeprom_intf) /* video hardware */ MCFG_VIDEO_START_OVERRIDE(mystwarr_state,gaiapols) diff --git a/src/mame/drivers/othunder.c b/src/mame/drivers/othunder.c index c9c7c90f642..45dfeef19e6 100644 --- a/src/mame/drivers/othunder.c +++ b/src/mame/drivers/othunder.c @@ -235,7 +235,7 @@ TODO: #include "emu.h" #include "cpu/z80/z80.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "audio/taitosnd.h" #include "sound/2610intf.h" #include "sound/flt_vol.h" @@ -299,8 +299,6 @@ bits are different. static const serial_eeprom_interface eeprom_intf = { - 6, /* address bits */ - 16, /* data bits */ "0110", /* read command */ "0101", /* write command */ "0111", /* erase command */ @@ -688,7 +686,7 @@ static MACHINE_CONFIG_START( othunder, othunder_state ) MCFG_CPU_ADD("audiocpu", Z80,16000000/4 ) /* 4 MHz */ MCFG_CPU_PROGRAM_MAP(z80_sound_map) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, eeprom_intf) MCFG_TC0220IOC_ADD("tc0220ioc", othunder_io_intf) diff --git a/src/mame/drivers/overdriv.c b/src/mame/drivers/overdriv.c index 8e1e1d0d61c..909239a9595 100644 --- a/src/mame/drivers/overdriv.c +++ b/src/mame/drivers/overdriv.c @@ -27,7 +27,7 @@ #include "emu.h" #include "cpu/m68000/m68000.h" #include "video/k053250.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "cpu/m6809/m6809.h" #include "sound/2151intf.h" #include "sound/k053260.h" @@ -56,8 +56,6 @@ static const UINT16 overdriv_default_eeprom[64] = static const serial_eeprom_interface eeprom_intf = { - 6, /* address bits */ - 16, /* data bits */ "011000", /* read command */ "010100", /* write command */ 0, /* erase command */ @@ -353,7 +351,7 @@ static MACHINE_CONFIG_START( overdriv, overdriv_state ) MCFG_QUANTUM_TIME(attotime::from_hz(12000)) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, eeprom_intf) MCFG_SERIAL_EEPROM_DATA(overdriv_default_eeprom, 128) /* video hardware */ diff --git a/src/mame/drivers/pasha2.c b/src/mame/drivers/pasha2.c index 7eb31cffb96..fe0b3672242 100644 --- a/src/mame/drivers/pasha2.c +++ b/src/mame/drivers/pasha2.c @@ -73,7 +73,7 @@ Notes: #include "emu.h" #include "cpu/e132xs/e132xs.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/okim6295.h" class pasha2_state : public driver_device diff --git a/src/mame/drivers/pirates.c b/src/mame/drivers/pirates.c index 820780fd2fb..973986ae0b8 100644 --- a/src/mame/drivers/pirates.c +++ b/src/mame/drivers/pirates.c @@ -89,15 +89,13 @@ Notes: #include "emu.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/okim6295.h" #include "includes/pirates.h" static const serial_eeprom_interface eeprom_intf = { - 6, /* address bits */ - 16, /* data bits */ "*110", /* read command */ "*101", /* write command */ 0, /* erase command */ @@ -262,7 +260,7 @@ static MACHINE_CONFIG_START( pirates, pirates_state ) MCFG_CPU_PROGRAM_MAP(pirates_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", pirates_state, irq1_line_hold) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, eeprom_intf) MCFG_GFXDECODE(pirates) diff --git a/src/mame/drivers/playmark.c b/src/mame/drivers/playmark.c index 62275c36824..41c26fabea6 100644 --- a/src/mame/drivers/playmark.c +++ b/src/mame/drivers/playmark.c @@ -37,7 +37,7 @@ TODO: #include "emu.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "cpu/pic16c5x/pic16c5x.h" #include "sound/okim6295.h" #include "includes/playmark.h" @@ -63,8 +63,6 @@ WRITE16_MEMBER(playmark_state::coinctrl_w) static const serial_eeprom_interface eeprom_intf = { - 6, /* address bits */ - 16, /* data bits */ "*110", /* read command */ "*101", /* write command */ 0, /* erase command */ @@ -1128,7 +1126,7 @@ static MACHINE_CONFIG_START( wbeachvl, playmark_state ) /* Program and Data Maps are internal to the MCU */ // MCFG_CPU_IO_MAP(playmark_sound_io_map) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, eeprom_intf) MCFG_SERIAL_EEPROM_DEFAULT_VALUE(0) MCFG_MACHINE_START_OVERRIDE(playmark_state,playmark) @@ -1199,7 +1197,7 @@ static MACHINE_CONFIG_START( hotmind, playmark_state ) /* Program and Data Maps are internal to the MCU */ MCFG_CPU_IO_MAP(playmark_sound_io_map) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, eeprom_intf) MCFG_SERIAL_EEPROM_DEFAULT_VALUE(0) MCFG_MACHINE_START_OVERRIDE(playmark_state,playmark) diff --git a/src/mame/drivers/plygonet.c b/src/mame/drivers/plygonet.c index 0f50da897f6..254995ddc60 100644 --- a/src/mame/drivers/plygonet.c +++ b/src/mame/drivers/plygonet.c @@ -67,15 +67,13 @@ #include "cpu/z80/z80.h" #include "cpu/dsp56k/dsp56k.h" #include "sound/k054539.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "includes/plygonet.h" enum { BANK_GROUP_A, BANK_GROUP_B, INVALID_BANK_GROUP }; static const serial_eeprom_interface eeprom_intf = { - 9, // address bits - 8, // data bits "*110", // read command "*101", // write command "*111", // erase command @@ -671,7 +669,7 @@ static MACHINE_CONFIG_START( plygonet, polygonet_state ) MCFG_QUANTUM_PERFECT_CPU("maincpu") /* TODO: TEMPORARY! UNTIL A MORE LOCALIZED SYNC CAN BE MADE */ - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 512, 8, eeprom_intf) MCFG_GFXDECODE(plygonet) diff --git a/src/mame/drivers/pntnpuzl.c b/src/mame/drivers/pntnpuzl.c index 5f48c1902df..2f3466b0212 100644 --- a/src/mame/drivers/pntnpuzl.c +++ b/src/mame/drivers/pntnpuzl.c @@ -122,7 +122,7 @@ CN1 standard DB15 VGA connector (15KHz) #include "emu.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "video/pc_vga.h" @@ -160,8 +160,6 @@ public: static const serial_eeprom_interface eeprom_intf = { - 6, /* address bits */ - 16, /* data bits */ "*110", /* read command */ "*101", /* write command */ NULL, /* erase command */ @@ -359,7 +357,7 @@ static MACHINE_CONFIG_START( pntnpuzl, pntnpuzl_state ) MCFG_CPU_ADD("maincpu", M68000, 12000000)//?? MCFG_CPU_PROGRAM_MAP(pntnpuzl_map) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, eeprom_intf) /* video hardware */ MCFG_FRAGMENT_ADD( pcvideo_vga ) diff --git a/src/mame/drivers/policetr.c b/src/mame/drivers/policetr.c index 561938c4ebd..6f1ae580d4f 100644 --- a/src/mame/drivers/policetr.c +++ b/src/mame/drivers/policetr.c @@ -86,7 +86,7 @@ PC5380-9651 5380-JY3306A 5380-N1045503A #include "emu.h" #include "cpu/mips/r3000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "includes/policetr.h" #include "sound/bsmt2000.h" @@ -239,8 +239,6 @@ WRITE32_MEMBER(policetr_state::speedup_w) static const serial_eeprom_interface eeprom_interface_policetr = { - 8, // address bits 8 - 16, // data bits 16 "*110", // read 1 10 aaaaaa "*101", // write 1 01 aaaaaa dddddddddddddddd "*111", // erase 1 11 aaaaaa @@ -416,7 +414,7 @@ static MACHINE_CONFIG_START( policetr, policetr_state ) MCFG_CPU_PROGRAM_MAP(policetr_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", policetr_state, irq4_gen) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_interface_policetr) + MCFG_SERIAL_EEPROM_ADD("eeprom", 256, 16, eeprom_interface_policetr) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) diff --git a/src/mame/drivers/powerbal.c b/src/mame/drivers/powerbal.c index ec0e253d0bb..05bac1c6bb2 100644 --- a/src/mame/drivers/powerbal.c +++ b/src/mame/drivers/powerbal.c @@ -15,7 +15,7 @@ Magic Sticks: #include "emu.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/okim6295.h" #include "includes/playmark.h" @@ -49,8 +49,6 @@ public: static const serial_eeprom_interface eeprom_intf = { - 6, /* address bits */ - 16, /* data bits */ "*110", /* read command */ "*101", /* write command */ 0, /* erase command */ @@ -534,7 +532,7 @@ static MACHINE_CONFIG_START( magicstk, powerbal_state ) MCFG_CPU_PROGRAM_MAP(magicstk_main_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", powerbal_state, irq2_line_hold) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, eeprom_intf) MCFG_SERIAL_EEPROM_DEFAULT_VALUE(0) MCFG_MACHINE_START_OVERRIDE(powerbal_state,powerbal) diff --git a/src/mame/drivers/psikyo4.c b/src/mame/drivers/psikyo4.c index a8818645eb4..80125533b12 100644 --- a/src/mame/drivers/psikyo4.c +++ b/src/mame/drivers/psikyo4.c @@ -129,7 +129,7 @@ ROMs - #include "emu.h" #include "cpu/sh2/sh2.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/ymf278b.h" #include "rendlay.h" #include "includes/psikyo4.h" @@ -152,8 +152,6 @@ GFXDECODE_END static const serial_eeprom_interface eeprom_interface_93C56 = { - 8, // address bits 8 - 8, // data bits 8 "*110x", // read 110x aaaaaaaa "*101x", // write 101x aaaaaaaa dddddddd "*111x", // erase 111x aaaaaaaa @@ -669,7 +667,7 @@ static MACHINE_CONFIG_START( ps4big, psikyo4_state ) MCFG_CPU_VBLANK_INT_DRIVER("lscreen", psikyo4_state, psikyosh_interrupt) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_interface_93C56) + MCFG_SERIAL_EEPROM_ADD("eeprom", 256, 8, eeprom_interface_93C56) MCFG_SERIAL_EEPROM_DEFAULT_VALUE(0) /* video hardware */ diff --git a/src/mame/drivers/psikyosh.c b/src/mame/drivers/psikyosh.c index 6c7a5818fe9..eca9a0ca9ee 100644 --- a/src/mame/drivers/psikyosh.c +++ b/src/mame/drivers/psikyosh.c @@ -274,7 +274,7 @@ Notes: #include "emu.h" #include "cpu/sh2/sh2.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/ymf278b.h" #include "includes/psikyosh.h" @@ -308,8 +308,6 @@ GFXDECODE_END static const serial_eeprom_interface eeprom_interface_93C56 = { - 8, // address bits 8 - 8, // data bits 8 "*110x", // read 110x aaaaaaaa "*101x", // write 101x aaaaaaaa dddddddd "*111x", // erase 111x aaaaaaaa @@ -800,7 +798,7 @@ static MACHINE_CONFIG_START( psikyo3v1, psikyosh_state ) MCFG_CPU_VBLANK_INT_DRIVER("screen", psikyosh_state, psikyosh_interrupt) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_interface_93C56) + MCFG_SERIAL_EEPROM_ADD("eeprom", 256, 8, eeprom_interface_93C56) MCFG_SERIAL_EEPROM_DEFAULT_VALUE(0) /* video hardware */ diff --git a/src/mame/drivers/pzletime.c b/src/mame/drivers/pzletime.c index 534f85a8193..b129cfe4063 100644 --- a/src/mame/drivers/pzletime.c +++ b/src/mame/drivers/pzletime.c @@ -17,7 +17,7 @@ #include "emu.h" #include "cpu/m68000/m68000.h" #include "sound/okim6295.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" class pzletime_state : public driver_device { diff --git a/src/mame/drivers/r2dx_v33.c b/src/mame/drivers/r2dx_v33.c index 6922d66e0fd..1525e274d98 100644 --- a/src/mame/drivers/r2dx_v33.c +++ b/src/mame/drivers/r2dx_v33.c @@ -17,7 +17,7 @@ Then it puts settings at 0x9e08 and 0x9e0a (bp 91acb) #include "cpu/nec/nec.h" #include "cpu/z80/z80.h" #include "audio/seibu.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/okim6295.h" #include "includes/raiden2.h" #include "drivlgcy.h" diff --git a/src/mame/drivers/rabbit.c b/src/mame/drivers/rabbit.c index 25b2b544165..7154ed35788 100644 --- a/src/mame/drivers/rabbit.c +++ b/src/mame/drivers/rabbit.c @@ -82,7 +82,7 @@ Custom: Imagetek I5000 (2ch video & 2ch sound) #include "emu.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/i5000.h" diff --git a/src/mame/drivers/raiden2.c b/src/mame/drivers/raiden2.c index ef311c1cea0..a611b8bc087 100644 --- a/src/mame/drivers/raiden2.c +++ b/src/mame/drivers/raiden2.c @@ -148,7 +148,7 @@ Current Problem(s) - in order of priority #include "cpu/nec/nec.h" #include "cpu/z80/z80.h" #include "audio/seibu.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/okim6295.h" #include "includes/raiden2.h" #include "video/seibu_crtc.h" diff --git a/src/mame/drivers/rbmk.c b/src/mame/drivers/rbmk.c index c49e5d996db..96a3d7c46fa 100644 --- a/src/mame/drivers/rbmk.c +++ b/src/mame/drivers/rbmk.c @@ -54,7 +54,7 @@ Notes: #include "cpu/mcs51/mcs51.h" #include "sound/okim6295.h" #include "sound/2151intf.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" class rbmk_state : public driver_device diff --git a/src/mame/drivers/rungun.c b/src/mame/drivers/rungun.c index bc848a45213..852192734d1 100644 --- a/src/mame/drivers/rungun.c +++ b/src/mame/drivers/rungun.c @@ -45,7 +45,7 @@ #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/k054539.h" #include "includes/konamipt.h" #include "includes/rungun.h" @@ -55,8 +55,6 @@ static const serial_eeprom_interface eeprom_intf = { - 7, /* address bits */ - 8, /* data bits */ "011000", /* read command */ "011100", /* write command */ "0100100000000",/* erase command */ @@ -390,7 +388,7 @@ static MACHINE_CONFIG_START( rng, rungun_state ) MCFG_GFXDECODE(rungun) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, eeprom_intf) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS | VIDEO_UPDATE_BEFORE_VBLANK) diff --git a/src/mame/drivers/segas32.c b/src/mame/drivers/segas32.c index 0bace3e4ee2..5d0afb3878a 100644 --- a/src/mame/drivers/segas32.c +++ b/src/mame/drivers/segas32.c @@ -335,7 +335,7 @@ orunners: Interleaved with the dj and << >> buttons is the data the drives the #include "cpu/nec/nec.h" #include "rendlay.h" #include "includes/segas32.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/2612intf.h" #include "sound/rf5c68.h" #include "sound/multipcm.h" diff --git a/src/mame/drivers/seibuspi.c b/src/mame/drivers/seibuspi.c index 990f664f275..f1762d4600d 100644 --- a/src/mame/drivers/seibuspi.c +++ b/src/mame/drivers/seibuspi.c @@ -845,7 +845,7 @@ Notes: #include "cpu/z80/z80.h" #include "cpu/i386/i386.h" #include "machine/ds2404.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/intelfsh.h" #include "machine/7200fifo.h" #include "sound/okim6295.h" @@ -1753,8 +1753,6 @@ GFXDECODE_END /* this is a 93C46 but with reset delay */ static const serial_eeprom_interface eeprom_intf = { - 6, /* address bits */ - 16, /* data bits */ "*110", /* read command */ "*101", /* write command */ "*111", /* erase command */ @@ -1917,7 +1915,7 @@ static MACHINE_CONFIG_DERIVED( sxx2f, sxx2e ) MCFG_DEVICE_REMOVE("ds2404") - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, eeprom_intf) // Z80 is Z84C0006PCS instead of Z84C0008PEC // clock is unknown, possibly slower than 7.159MHz @@ -1950,7 +1948,7 @@ static MACHINE_CONFIG_START( sys386i, seibuspi_state ) MCFG_CPU_PROGRAM_MAP(sys386i_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", seibuspi_state, spi_interrupt) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, eeprom_intf) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -2000,7 +1998,7 @@ static MACHINE_CONFIG_START( sys386f, seibuspi_state ) MCFG_CPU_PROGRAM_MAP(sys386f_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", seibuspi_state, spi_interrupt) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, eeprom_intf) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/seta2.c b/src/mame/drivers/seta2.c index 1f2ee7c2621..b6216fae961 100644 --- a/src/mame/drivers/seta2.c +++ b/src/mame/drivers/seta2.c @@ -111,7 +111,7 @@ reelquak: #include "cpu/m68000/m68000.h" #include "cpu/h83002/h8.h" #include "sound/okim9810.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/nvram.h" #include "machine/ticket.h" #include "machine/mcf5206e.h" diff --git a/src/mame/drivers/sigmab98.c b/src/mame/drivers/sigmab98.c index 3ec5a1167bd..c5c2665ed6b 100644 --- a/src/mame/drivers/sigmab98.c +++ b/src/mame/drivers/sigmab98.c @@ -91,7 +91,7 @@ Notes: #include "cpu/z80/z80.h" #include "sound/okim9810.h" #include "sound/ymz280b.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/nvram.h" #include "machine/ticket.h" @@ -1677,8 +1677,6 @@ INPUT_PORTS_END const serial_eeprom_interface eeprom_intf = { - 6, // address bits 6 - 16, // data bits 16 "*110", // read 1 10 aaaaaa "*101", // write 1 01 aaaaaa dddddddddddddddd "*111", // erase 1 11 aaaaaa @@ -1700,7 +1698,7 @@ static MACHINE_CONFIG_START( gegege, sigmab98_state ) MCFG_CPU_VBLANK_INT_DRIVER("screen", sigmab98_state, gegege_vblank_interrupt) MCFG_NVRAM_ADD_0FILL("nvram") - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, eeprom_intf) MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_LOW ) @@ -1728,8 +1726,6 @@ MACHINE_CONFIG_END static const serial_eeprom_interface eeprom_interface_93C46_8bit_delay = { - 7, // address bits 6 - 8, // data bits 8 "*110", // read 1 10 aaaaaa "*101", // write 1 01 aaaaaa dddddddd "*111", // erase 1 11 aaaaaa @@ -1754,7 +1750,7 @@ static MACHINE_CONFIG_START( sammymdl, sigmab98_state ) MCFG_MACHINE_RESET_OVERRIDE(sigmab98_state, sammymdl ) MCFG_NVRAM_ADD_0FILL("nvram") // battery - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_interface_93C46_8bit_delay) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, eeprom_interface_93C46_8bit_delay) MCFG_TICKET_DISPENSER_ADD("hopper", attotime::from_msec(200), TICKET_MOTOR_ACTIVE_LOW, TICKET_STATUS_ACTIVE_LOW ) diff --git a/src/mame/drivers/simpl156.c b/src/mame/drivers/simpl156.c index 91157f552ba..de79101ea27 100644 --- a/src/mame/drivers/simpl156.c +++ b/src/mame/drivers/simpl156.c @@ -92,7 +92,7 @@ Are the OKI M6295 clocks from Heavy Smash are correct at least for the Mitchell #include "includes/decocrpt.h" #include "cpu/arm/arm.h" #include "includes/simpl156.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/okim6295.h" static INPUT_PORTS_START( simpl156 ) diff --git a/src/mame/drivers/simpsons.c b/src/mame/drivers/simpsons.c index 438c626d909..f8202994a6d 100644 --- a/src/mame/drivers/simpsons.c +++ b/src/mame/drivers/simpsons.c @@ -70,7 +70,7 @@ Custom ICs - 053260 - sound chip (QFP80) #include "cpu/m6809/konami.h" /* for the callback and the firq irq definition */ #include "cpu/z80/z80.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/2151intf.h" #include "sound/k053260.h" #include "includes/simpsons.h" @@ -293,8 +293,6 @@ static const k053247_interface simpsons_k053246_intf = static const serial_eeprom_interface eeprom_intf = { - 7, /* address bits */ - 8, /* data bits */ "011000", /* read command */ "011100", /* write command */ 0, /* erase command */ @@ -314,7 +312,7 @@ static MACHINE_CONFIG_START( simpsons, simpsons_state ) /* NMIs are generated by the 053260 */ - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, eeprom_intf) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS | VIDEO_UPDATE_AFTER_VBLANK) diff --git a/src/mame/drivers/spool99.c b/src/mame/drivers/spool99.c index 6e4a85975dd..4f88c8394d3 100644 --- a/src/mame/drivers/spool99.c +++ b/src/mame/drivers/spool99.c @@ -92,7 +92,7 @@ Note #include "emu.h" #include "cpu/z80/z80.h" #include "sound/okim6295.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" class spool99_state : public driver_device { diff --git a/src/mame/drivers/stlforce.c b/src/mame/drivers/stlforce.c index 75b0c9a2bb5..69144be5f0e 100644 --- a/src/mame/drivers/stlforce.c +++ b/src/mame/drivers/stlforce.c @@ -69,7 +69,7 @@ TO DO : #include "emu.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/okim6295.h" #include "includes/stlforce.h" diff --git a/src/mame/drivers/stv.c b/src/mame/drivers/stv.c index 0dd6fe3cb5e..d7766f1d867 100644 --- a/src/mame/drivers/stv.c +++ b/src/mame/drivers/stv.c @@ -14,7 +14,7 @@ #include "cpu/sh2/sh2.h" #include "cpu/m68000/m68000.h" #include "cpu/adsp2100/adsp2100.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/scudsp.h" #include "sound/scsp.h" #include "sound/cdda.h" diff --git a/src/mame/drivers/superchs.c b/src/mame/drivers/superchs.c index eb97d17f398..629272f772c 100644 --- a/src/mame/drivers/superchs.c +++ b/src/mame/drivers/superchs.c @@ -39,7 +39,7 @@ #include "emu.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/es5506.h" #include "audio/taito_en.h" @@ -305,8 +305,6 @@ GFXDECODE_END static const serial_eeprom_interface superchs_eeprom_interface = { - 6, /* address bits */ - 16, /* data bits */ "0110", /* read command */ "0101", /* write command */ "0111", /* erase command */ @@ -337,7 +335,7 @@ static MACHINE_CONFIG_START( superchs, superchs_state ) MCFG_QUANTUM_TIME(attotime::from_hz(480)) /* Need to interleave CPU 1 & 3 */ - MCFG_SERIAL_EEPROM_ADD("eeprom", superchs_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, superchs_eeprom_interface) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/taito_b.c b/src/mame/drivers/taito_b.c index 56531802b40..30aef775232 100644 --- a/src/mame/drivers/taito_b.c +++ b/src/mame/drivers/taito_b.c @@ -180,7 +180,7 @@ TODO! #include "cpu/z80/z80.h" #include "includes/taitoipt.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "audio/taitosnd.h" #include "sound/2203intf.h" #include "sound/2610intf.h" @@ -375,8 +375,6 @@ INPUT_CHANGED_MEMBER(taitob_state::realpunc_sensor) static const serial_eeprom_interface taitob_eeprom_intf = { - 6, /* address bits */ - 16, /* data bits */ "0110", /* read command */ "0101", /* write command */ "0111", /* erase command */ @@ -2356,7 +2354,7 @@ static MACHINE_CONFIG_START( pbobble, taitob_state ) MCFG_QUANTUM_TIME(attotime::from_hz(600)) - MCFG_SERIAL_EEPROM_ADD("eeprom", taitob_eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, taitob_eeprom_intf) MCFG_TC0640FIO_ADD("tc0640fio", pbobble_io_intf) @@ -2404,7 +2402,7 @@ static MACHINE_CONFIG_START( spacedx, taitob_state ) MCFG_QUANTUM_TIME(attotime::from_hz(600)) - MCFG_SERIAL_EEPROM_ADD("eeprom", taitob_eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, taitob_eeprom_intf) MCFG_TC0640FIO_ADD("tc0640fio", pbobble_io_intf) @@ -2496,7 +2494,7 @@ static MACHINE_CONFIG_START( qzshowby, taitob_state ) MCFG_QUANTUM_TIME(attotime::from_hz(600)) - MCFG_SERIAL_EEPROM_ADD("eeprom", taitob_eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, taitob_eeprom_intf) MCFG_TC0640FIO_ADD("tc0640fio", pbobble_io_intf) diff --git a/src/mame/drivers/taito_f3.c b/src/mame/drivers/taito_f3.c index a86135e885e..9e9b2271813 100644 --- a/src/mame/drivers/taito_f3.c +++ b/src/mame/drivers/taito_f3.c @@ -32,7 +32,7 @@ #include "emu.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "includes/taito_f3.h" #include "sound/es5506.h" #include "audio/taito_en.h" diff --git a/src/mame/drivers/taito_z.c b/src/mame/drivers/taito_z.c index 0a1d374589f..1fa70e64bc6 100644 --- a/src/mame/drivers/taito_z.c +++ b/src/mame/drivers/taito_z.c @@ -968,7 +968,7 @@ DIP switches are not verified #include "cpu/z80/z80.h" #include "includes/taitoipt.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/2610intf.h" #include "sound/flt_vol.h" #include "includes/taito_z.h" @@ -1066,8 +1066,6 @@ static const UINT16 spacegun_default_eeprom[64]= static const serial_eeprom_interface spacegun_eeprom_intf = { - 6, /* address bits */ - 16, /* data bits */ "0110", /* read command */ "0101", /* write command */ "0111", /* erase command */ @@ -3504,7 +3502,7 @@ static MACHINE_CONFIG_START( spacegun, taitoz_state ) MCFG_MACHINE_START_OVERRIDE(taitoz_state,bshark) MCFG_MACHINE_RESET_OVERRIDE(taitoz_state,taitoz) - MCFG_SERIAL_EEPROM_ADD("eeprom", spacegun_eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, spacegun_eeprom_intf) MCFG_SERIAL_EEPROM_DATA(spacegun_default_eeprom, 128) MCFG_TC0220IOC_ADD("tc0220ioc", taitoz_io220_intf) diff --git a/src/mame/drivers/taitojc.c b/src/mame/drivers/taitojc.c index 8bbdb489dfe..536fbf7b59a 100644 --- a/src/mame/drivers/taitojc.c +++ b/src/mame/drivers/taitojc.c @@ -380,7 +380,7 @@ Notes: #include "cpu/mc68hc11/mc68hc11.h" #include "sound/es5506.h" #include "sound/okim6295.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "audio/taito_en.h" #include "includes/taitojc.h" diff --git a/src/mame/drivers/tasman.c b/src/mame/drivers/tasman.c index b81c92c186e..da9f2c0dbb4 100644 --- a/src/mame/drivers/tasman.c +++ b/src/mame/drivers/tasman.c @@ -18,7 +18,7 @@ #include "video/konami_helper.h" #include "includes/konamigx.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #define CUSTOM_DRAW 1 diff --git a/src/mame/drivers/tecmosys.c b/src/mame/drivers/tecmosys.c index f23f648a2e0..31f2c66c8a9 100644 --- a/src/mame/drivers/tecmosys.c +++ b/src/mame/drivers/tecmosys.c @@ -182,7 +182,7 @@ ae500w07.ad1 - M6295 Samples (23c4001) #include "emu.h" #include "cpu/z80/z80.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "includes/tecmosys.h" #include "cpu/m68000/m68000.h" #include "sound/okim6295.h" diff --git a/src/mame/drivers/tmaster.c b/src/mame/drivers/tmaster.c index d861af2e40f..dc0252fe635 100644 --- a/src/mame/drivers/tmaster.c +++ b/src/mame/drivers/tmaster.c @@ -104,7 +104,7 @@ To Do: #include "emu.h" #include "cpu/m68000/m68000.h" #include "sound/okim6295.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/microtch.h" #include "machine/n68681.h" #include "machine/nvram.h" @@ -573,8 +573,6 @@ ADDRESS_MAP_END static const serial_eeprom_interface galgames_eeprom_interface = { - 10, // address bits 10 - 8, // data bits 8 "*1100", // read 110 0aaaaaaaaaa "*1010", // write 101 0aaaaaaaaaa dddddddd "*1110", // erase 111 0aaaaaaaaaa @@ -968,11 +966,11 @@ static MACHINE_CONFIG_START( galgames, tmaster_state ) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", tmaster_state, tm3k_interrupt, "screen", 0, 1) // 5 EEPROMs on the motherboard (for BIOS + 4 Carts) - MCFG_SERIAL_EEPROM_ADD(GALGAMES_EEPROM_BIOS, galgames_eeprom_interface) - MCFG_SERIAL_EEPROM_ADD(GALGAMES_EEPROM_CART1, galgames_eeprom_interface) - MCFG_SERIAL_EEPROM_ADD(GALGAMES_EEPROM_CART2, galgames_eeprom_interface) - MCFG_SERIAL_EEPROM_ADD(GALGAMES_EEPROM_CART3, galgames_eeprom_interface) - MCFG_SERIAL_EEPROM_ADD(GALGAMES_EEPROM_CART4, galgames_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD(GALGAMES_EEPROM_BIOS, 1024, 8, galgames_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD(GALGAMES_EEPROM_CART1, 1024, 8, galgames_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD(GALGAMES_EEPROM_CART2, 1024, 8, galgames_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD(GALGAMES_EEPROM_CART3, 1024, 8, galgames_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD(GALGAMES_EEPROM_CART4, 1024, 8, galgames_eeprom_interface) MCFG_MACHINE_RESET_OVERRIDE(tmaster_state, galgames ) diff --git a/src/mame/drivers/tmmjprd.c b/src/mame/drivers/tmmjprd.c index 0d604aea4fb..51131f1028a 100644 --- a/src/mame/drivers/tmmjprd.c +++ b/src/mame/drivers/tmmjprd.c @@ -29,7 +29,7 @@ #include "emu.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/i5000.h" #include "rendlay.h" diff --git a/src/mame/drivers/tmnt.c b/src/mame/drivers/tmnt.c index a0e0ab89cee..90eb416bc5b 100644 --- a/src/mame/drivers/tmnt.c +++ b/src/mame/drivers/tmnt.c @@ -65,7 +65,7 @@ Updates: ***************************************************************************/ #include "emu.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" #include "sound/2151intf.h" @@ -405,8 +405,6 @@ WRITE16_MEMBER(tmnt_state::ssriders_protection_w) static const serial_eeprom_interface eeprom_intf = { - 7, /* address bits */ - 8, /* data bits */ "011000", /* read command */ "011100", /* write command */ 0, /* erase command */ @@ -468,8 +466,6 @@ WRITE16_MEMBER(tmnt_state::blswhstl_eeprom_w) static const serial_eeprom_interface thndrx2_eeprom_intf = { - 7, /* address bits */ - 8, /* data bits */ "011000", /* read command */ "010100", /* write command */ 0, /* erase command */ @@ -2440,7 +2436,7 @@ static MACHINE_CONFIG_START( blswhstl, tmnt_state ) MCFG_MACHINE_START_OVERRIDE(tmnt_state,common) MCFG_MACHINE_RESET_OVERRIDE(tmnt_state,common) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, eeprom_intf) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS | VIDEO_UPDATE_AFTER_VBLANK) @@ -2569,7 +2565,7 @@ static MACHINE_CONFIG_START( prmrsocr, tmnt_state ) MCFG_MACHINE_START_OVERRIDE(tmnt_state,prmrsocr) MCFG_MACHINE_RESET_OVERRIDE(tmnt_state,common) - MCFG_SERIAL_EEPROM_ADD("eeprom", thndrx2_eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, thndrx2_eeprom_intf) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS | VIDEO_UPDATE_AFTER_VBLANK) @@ -2618,7 +2614,7 @@ static MACHINE_CONFIG_START( tmnt2, tmnt_state ) MCFG_MACHINE_START_OVERRIDE(tmnt_state,common) MCFG_MACHINE_RESET_OVERRIDE(tmnt_state,common) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, eeprom_intf) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS | VIDEO_UPDATE_AFTER_VBLANK) @@ -2665,7 +2661,7 @@ static MACHINE_CONFIG_START( ssriders, tmnt_state ) MCFG_MACHINE_START_OVERRIDE(tmnt_state,common) MCFG_MACHINE_RESET_OVERRIDE(tmnt_state,common) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, eeprom_intf) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS | VIDEO_UPDATE_AFTER_VBLANK) @@ -2708,7 +2704,7 @@ static MACHINE_CONFIG_START( sunsetbl, tmnt_state ) MCFG_MACHINE_START_OVERRIDE(tmnt_state,common) MCFG_MACHINE_RESET_OVERRIDE(tmnt_state,common) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, eeprom_intf) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS | VIDEO_UPDATE_AFTER_VBLANK) @@ -2748,7 +2744,7 @@ static MACHINE_CONFIG_START( thndrx2, tmnt_state ) MCFG_MACHINE_START_OVERRIDE(tmnt_state,common) MCFG_MACHINE_RESET_OVERRIDE(tmnt_state,common) - MCFG_SERIAL_EEPROM_ADD("eeprom", thndrx2_eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, thndrx2_eeprom_intf) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS) diff --git a/src/mame/drivers/toaplan2.c b/src/mame/drivers/toaplan2.c index 2f753b6a270..2c772dcc204 100644 --- a/src/mame/drivers/toaplan2.c +++ b/src/mame/drivers/toaplan2.c @@ -352,7 +352,7 @@ To Do / Unknowns: #include "cpu/nec/nec.h" #include "cpu/z80/z80.h" #include "cpu/z180/z180.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/2151intf.h" #include "sound/3812intf.h" #include "sound/okim6295.h" @@ -951,8 +951,6 @@ static const serial_eeprom_interface bbakraid_93C66_intf = // Pin 6 of the 93C66 is connected to Gnd! // So it's configured for 512 bytes - 9, // address bits - 8, // data bits "*110", // read 110 aaaaaaaaa "*101", // write 101 aaaaaaaaa dddddddd "*111", // erase 111 aaaaaaaaa @@ -3727,7 +3725,7 @@ static MACHINE_CONFIG_START( bbakraid, toaplan2_state ) MCFG_MACHINE_START_OVERRIDE(toaplan2_state,toaplan2) MCFG_MACHINE_RESET_OVERRIDE(toaplan2_state,toaplan2) - MCFG_SERIAL_EEPROM_ADD("eeprom", bbakraid_93C66_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 512, 8, bbakraid_93C66_intf) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) diff --git a/src/mame/drivers/ultrsprt.c b/src/mame/drivers/ultrsprt.c index 60b6dccd841..7e469c99ead 100644 --- a/src/mame/drivers/ultrsprt.c +++ b/src/mame/drivers/ultrsprt.c @@ -12,7 +12,7 @@ TODO: #include "cpu/m68000/m68000.h" #include "cpu/powerpc/ppc.h" #include "sound/k054539.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/konppc.h" #include "sound/k056800.h" diff --git a/src/mame/drivers/undrfire.c b/src/mame/drivers/undrfire.c index 137ba2b7646..60f0d78b229 100644 --- a/src/mame/drivers/undrfire.c +++ b/src/mame/drivers/undrfire.c @@ -188,7 +188,7 @@ Board contains only 29 ROMs and not much else. #include "emu.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/es5506.h" #include "audio/taito_en.h" #include "includes/undrfire.h" @@ -243,8 +243,6 @@ void undrfire_state::device_timer(emu_timer &timer, device_timer_id id, int para static const serial_eeprom_interface undrfire_eeprom_interface = { - 6, /* address bits */ - 16, /* data bits */ "0110", /* read command */ "0101", /* write command */ "0111", /* erase command */ @@ -734,7 +732,7 @@ static MACHINE_CONFIG_START( undrfire, undrfire_state ) MCFG_CPU_PROGRAM_MAP(undrfire_map) MCFG_CPU_VBLANK_INT_DRIVER("screen", undrfire_state, undrfire_interrupt) - MCFG_SERIAL_EEPROM_ADD("eeprom", undrfire_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, undrfire_eeprom_interface) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) @@ -769,7 +767,7 @@ static MACHINE_CONFIG_START( cbombers, undrfire_state ) MCFG_QUANTUM_TIME(attotime::from_hz(480)) /* CPU slices - Need to interleave Cpu's 1 & 3 */ - MCFG_SERIAL_EEPROM_ADD("eeprom", undrfire_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD("eeprom", 64, 16, undrfire_eeprom_interface) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/unico.c b/src/mame/drivers/unico.c index 1875f85198d..1a0a9b8677f 100644 --- a/src/mame/drivers/unico.c +++ b/src/mame/drivers/unico.c @@ -24,7 +24,7 @@ Year + Game PCB Notes #include "emu.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "includes/unico.h" #include "sound/2151intf.h" #include "sound/3812intf.h" @@ -569,8 +569,6 @@ MACHINE_RESET_MEMBER(unico_state,unico) static const serial_eeprom_interface zeropnt2_eeprom_interface = { - 7, // address bits 7 - 8, // data bits 8 "*110", // read 1 10 aaaaaaa "*101", // write 1 01 aaaaaaa dddddddd "*111", // erase 1 11 aaaaaaa @@ -679,7 +677,7 @@ static MACHINE_CONFIG_START( zeropnt2, unico_state ) MCFG_MACHINE_RESET_OVERRIDE(unico_state,zeropt) - MCFG_SERIAL_EEPROM_ADD("eeprom", zeropnt2_eeprom_interface) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, zeropnt2_eeprom_interface) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/vamphalf.c b/src/mame/drivers/vamphalf.c index 16488fd3725..2bb718ef194 100644 --- a/src/mame/drivers/vamphalf.c +++ b/src/mame/drivers/vamphalf.c @@ -61,7 +61,7 @@ TODO: #include "emu.h" #include "cpu/mcs51/mcs51.h" #include "cpu/e132xs/e132xs.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/nvram.h" #include "sound/qs1000.h" #include "sound/2151intf.h" diff --git a/src/mame/drivers/vendetta.c b/src/mame/drivers/vendetta.c index 3c703d3ede5..50e8337c900 100644 --- a/src/mame/drivers/vendetta.c +++ b/src/mame/drivers/vendetta.c @@ -90,7 +90,7 @@ #include "cpu/z80/z80.h" #include "cpu/m6809/konami.h" /* for the callback and the firq irq definition */ -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/2151intf.h" #include "sound/k053260.h" #include "includes/konamipt.h" @@ -107,8 +107,6 @@ static KONAMI_SETLINES_CALLBACK( vendetta_banking ); static const serial_eeprom_interface eeprom_intf = { - 7, /* address bits */ - 8, /* data bits */ "011000", /* read command */ "011100", /* write command */ 0, /* erase command */ @@ -499,7 +497,7 @@ static MACHINE_CONFIG_START( vendetta, vendetta_state ) /* interrupts are triggered by the main CPU */ - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, eeprom_intf) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS) diff --git a/src/mame/drivers/wheelfir.c b/src/mame/drivers/wheelfir.c index b548bf3f48b..ba6187fb8a5 100644 --- a/src/mame/drivers/wheelfir.c +++ b/src/mame/drivers/wheelfir.c @@ -208,7 +208,7 @@ suspicious code: #include "emu.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "cpu/m68000/m68000.h" #include "sound/dac.h" diff --git a/src/mame/drivers/xexex.c b/src/mame/drivers/xexex.c index 0a418f6c81d..446564d1ecf 100644 --- a/src/mame/drivers/xexex.c +++ b/src/mame/drivers/xexex.c @@ -60,7 +60,7 @@ Unresolved Issues: #include "emu.h" #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/k053252.h" #include "sound/k054539.h" #include "sound/2151intf.h" @@ -74,8 +74,6 @@ Unresolved Issues: static const serial_eeprom_interface eeprom_intf = { - 7, /* address bits */ - 8, /* data bits */ "011000", /* read command */ "011100", /* write command */ "0100100000000",/* erase command */ @@ -495,7 +493,7 @@ static MACHINE_CONFIG_START( xexex, xexex_state ) MCFG_QUANTUM_TIME(attotime::from_hz(1920)) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, eeprom_intf) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS | VIDEO_HAS_HIGHLIGHTS | VIDEO_UPDATE_BEFORE_VBLANK) diff --git a/src/mame/drivers/xmen.c b/src/mame/drivers/xmen.c index a48d747548d..7cdc533a97e 100644 --- a/src/mame/drivers/xmen.c +++ b/src/mame/drivers/xmen.c @@ -16,7 +16,7 @@ likewise be a 2 screen game #include "emu.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "cpu/z80/z80.h" #include "sound/2151intf.h" #include "sound/k054539.h" @@ -32,8 +32,6 @@ likewise be a 2 screen game static const serial_eeprom_interface eeprom_intf = { - 7, /* address bits */ - 8, /* data bits */ "011000", /* read command */ "011100", /* write command */ 0, /* erase command */ @@ -361,7 +359,7 @@ static MACHINE_CONFIG_START( xmen, xmen_state ) MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, eeprom_intf) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS) @@ -410,7 +408,7 @@ static MACHINE_CONFIG_START( xmen6p, xmen_state ) MCFG_CPU_PROGRAM_MAP(sound_map) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_intf) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 8, eeprom_intf) /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_HAS_SHADOWS) diff --git a/src/mame/drivers/xorworld.c b/src/mame/drivers/xorworld.c index cc3d5c5e33f..decd91b50c1 100644 --- a/src/mame/drivers/xorworld.c +++ b/src/mame/drivers/xorworld.c @@ -28,7 +28,7 @@ EEPROM chip: 93C46 ***************************************************************************/ #include "emu.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "cpu/m68000/m68000.h" #include "sound/saa1099.h" #include "includes/xorworld.h" diff --git a/src/mame/drivers/zr107.c b/src/mame/drivers/zr107.c index 3e48106226c..a5ee1ebcc6a 100644 --- a/src/mame/drivers/zr107.c +++ b/src/mame/drivers/zr107.c @@ -170,7 +170,7 @@ Check gticlub.c for details on the bottom board. #include "machine/konppc.h" #include "machine/adc083x.h" #include "machine/k056230.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/k056800.h" #include "sound/k054539.h" #include "video/k001604.h" diff --git a/src/mame/includes/20pacgal.h b/src/mame/includes/20pacgal.h index 34efa12dd5a..5c69a81e7ab 100644 --- a/src/mame/includes/20pacgal.h +++ b/src/mame/includes/20pacgal.h @@ -5,7 +5,7 @@ driver by Nicola Salmoria ***************************************************************************/ -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/namco.h" class _20pacgal_state : public driver_device diff --git a/src/mame/includes/8080bw.h b/src/mame/includes/8080bw.h index e4428e2b7c4..a7b07c3f353 100644 --- a/src/mame/includes/8080bw.h +++ b/src/mame/includes/8080bw.h @@ -6,7 +6,7 @@ #include "includes/mw8080bw.h" #include "sound/speaker.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" /* for games in 8080bw.c */ #define CABINET_PORT_TAG "CAB" diff --git a/src/mame/includes/cave.h b/src/mame/includes/cave.h index c658092f4dd..d9914ece9fd 100644 --- a/src/mame/includes/cave.h +++ b/src/mame/includes/cave.h @@ -3,7 +3,7 @@ Cave hardware ***************************************************************************/ -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/nmk112.h" struct sprite_cave diff --git a/src/mame/includes/centiped.h b/src/mame/includes/centiped.h index 25b0711d381..91a6d4c4fbb 100644 --- a/src/mame/includes/centiped.h +++ b/src/mame/includes/centiped.h @@ -3,7 +3,7 @@ Atari Centipede hardware *************************************************************************/ -#include "machine/eeprom.h" +#include "machine/eepromser.h" class centiped_state : public driver_device { diff --git a/src/mame/includes/deco32.h b/src/mame/includes/deco32.h index 6fd7449563a..1a880240666 100644 --- a/src/mame/includes/deco32.h +++ b/src/mame/includes/deco32.h @@ -2,7 +2,7 @@ #include "video/bufsprite.h" #include "video/decospr.h" #include "video/deco16ic.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/okim6295.h" #include "machine/deco146.h" #include "machine/deco104.h" diff --git a/src/mame/includes/deco_mlc.h b/src/mame/includes/deco_mlc.h index e63f0cba4c1..4cd042fab21 100644 --- a/src/mame/includes/deco_mlc.h +++ b/src/mame/includes/deco_mlc.h @@ -1,4 +1,4 @@ -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/deco146.h" class deco_mlc_state : public driver_device diff --git a/src/mame/includes/dkong.h b/src/mame/includes/dkong.h index 66b39c2e9f0..4547df8f465 100644 --- a/src/mame/includes/dkong.h +++ b/src/mame/includes/dkong.h @@ -1,5 +1,5 @@ #include "sound/discrete.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/tms6100.h" /* diff --git a/src/mame/includes/esd16.h b/src/mame/includes/esd16.h index 0485f98ca16..0263a0e4a84 100644 --- a/src/mame/includes/esd16.h +++ b/src/mame/includes/esd16.h @@ -4,7 +4,7 @@ ***************************************************************************/ -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "video/decospr.h" class esd16_state : public driver_device diff --git a/src/mame/includes/fromanc2.h b/src/mame/includes/fromanc2.h index b3a16b319c7..ca4cbded586 100644 --- a/src/mame/includes/fromanc2.h +++ b/src/mame/includes/fromanc2.h @@ -1,4 +1,4 @@ -#include "machine/eeprom.h" +#include "machine/eepromser.h" class fromanc2_state : public driver_device { diff --git a/src/mame/includes/gaelco2.h b/src/mame/includes/gaelco2.h index 286e3620cd8..b30a7d53ea5 100644 --- a/src/mame/includes/gaelco2.h +++ b/src/mame/includes/gaelco2.h @@ -1,6 +1,6 @@ #include "cpu/m68000/m68000.h" #include "video/bufsprite.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" class gaelco2_state : public driver_device { diff --git a/src/mame/includes/gaelco3d.h b/src/mame/includes/gaelco3d.h index 0a2703a19d9..40c267b1155 100644 --- a/src/mame/includes/gaelco3d.h +++ b/src/mame/includes/gaelco3d.h @@ -8,7 +8,7 @@ #include "sound/dmadac.h" #include "video/polynew.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/gaelco3d.h" #define SOUND_CHANNELS 4 diff --git a/src/mame/includes/galastrm.h b/src/mame/includes/galastrm.h index f7ee4e40ef1..b44fd2db631 100644 --- a/src/mame/includes/galastrm.h +++ b/src/mame/includes/galastrm.h @@ -1,4 +1,4 @@ -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "video/poly.h" #include "video/tc0100scn.h" #include "video/tc0480scp.h" diff --git a/src/mame/includes/galpani2.h b/src/mame/includes/galpani2.h index 429981e6342..6bb66d1effc 100644 --- a/src/mame/includes/galpani2.h +++ b/src/mame/includes/galpani2.h @@ -1,6 +1,6 @@ #include "video/kaneko_spr.h" #include "sound/okim6295.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" class galpani2_state : public driver_device { diff --git a/src/mame/includes/gunbustr.h b/src/mame/includes/gunbustr.h index 10372269d7a..9f537e2490a 100644 --- a/src/mame/includes/gunbustr.h +++ b/src/mame/includes/gunbustr.h @@ -1,4 +1,4 @@ -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "video/tc0480scp.h" struct tempsprite diff --git a/src/mame/includes/jaguar.h b/src/mame/includes/jaguar.h index 9a7cd004176..4047dacb073 100644 --- a/src/mame/includes/jaguar.h +++ b/src/mame/includes/jaguar.h @@ -7,7 +7,7 @@ #include "cpu/jaguar/jaguar.h" #include "machine/nvram.h" #include "sound/dac.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/vt83c461.h" #include "imagedev/snapquik.h" diff --git a/src/mame/includes/kaneko16.h b/src/mame/includes/kaneko16.h index ab074df13ce..ea2caf79208 100644 --- a/src/mame/includes/kaneko16.h +++ b/src/mame/includes/kaneko16.h @@ -14,7 +14,7 @@ #include "machine/kaneko_calc3.h" #include "machine/kaneko_toybox.h" #include "sound/okim6295.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" class kaneko16_state : public driver_device diff --git a/src/mame/includes/kickgoal.h b/src/mame/includes/kickgoal.h index 3b920dd26c4..555beb1db5b 100644 --- a/src/mame/includes/kickgoal.h +++ b/src/mame/includes/kickgoal.h @@ -5,7 +5,7 @@ *************************************************************************/ #include "sound/okim6295.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" class kickgoal_state : public driver_device { diff --git a/src/mame/includes/leland.h b/src/mame/includes/leland.h index c8f548f6fb0..efa53cf36a0 100644 --- a/src/mame/includes/leland.h +++ b/src/mame/includes/leland.h @@ -4,7 +4,7 @@ *************************************************************************/ -#include "machine/eeprom.h" +#include "machine/eepromser.h" #define LELAND_BATTERY_RAM_SIZE 0x4000 #define ATAXX_EXTRA_TRAM_SIZE 0x800 diff --git a/src/mame/includes/lordgun.h b/src/mame/includes/lordgun.h index 91ccdca1a57..8bcef123bb7 100644 --- a/src/mame/includes/lordgun.h +++ b/src/mame/includes/lordgun.h @@ -4,7 +4,7 @@ *************************************************************************/ #include "sound/okim6295.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" struct lordgun_gun_data { diff --git a/src/mame/includes/metro.h b/src/mame/includes/metro.h index 06302a139c6..4647e3f6fdf 100644 --- a/src/mame/includes/metro.h +++ b/src/mame/includes/metro.h @@ -7,7 +7,7 @@ #include "sound/okim6295.h" #include "sound/2151intf.h" #include "video/k053936.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" class metro_state : public driver_device { diff --git a/src/mame/includes/mitchell.h b/src/mame/includes/mitchell.h index 0276f0aefdf..b2c35268def 100644 --- a/src/mame/includes/mitchell.h +++ b/src/mame/includes/mitchell.h @@ -6,7 +6,7 @@ #include "sound/okim6295.h" #include "machine/nvram.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/msm5205.h" class mitchell_state : public driver_device diff --git a/src/mame/includes/model2.h b/src/mame/includes/model2.h index 87013b704b6..af599c936c0 100644 --- a/src/mame/includes/model2.h +++ b/src/mame/includes/model2.h @@ -1,6 +1,6 @@ #include "video/poly.h" #include "audio/dsbz80.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" struct raster_state; struct geo_state; diff --git a/src/mame/includes/model3.h b/src/mame/includes/model3.h index b81613ea38c..315914f7040 100644 --- a/src/mame/includes/model3.h +++ b/src/mame/includes/model3.h @@ -2,7 +2,7 @@ #include "machine/scsibus.h" #include "machine/53c810.h" #include "audio/dsbz80.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" typedef float MATRIX[4][4]; typedef float VECTOR[4]; diff --git a/src/mame/includes/naomi.h b/src/mame/includes/naomi.h index ad60dbc8670..554b136f496 100644 --- a/src/mame/includes/naomi.h +++ b/src/mame/includes/naomi.h @@ -3,7 +3,7 @@ naomi.h -> NAOMI includes */ -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/intelfsh.h" enum { diff --git a/src/mame/includes/othunder.h b/src/mame/includes/othunder.h index dc6421bc44d..933e8f493da 100644 --- a/src/mame/includes/othunder.h +++ b/src/mame/includes/othunder.h @@ -5,7 +5,7 @@ *************************************************************************/ #include "audio/taitosnd.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/taitoio.h" #include "sound/flt_vol.h" #include "video/tc0100scn.h" diff --git a/src/mame/includes/pirates.h b/src/mame/includes/pirates.h index 777fbf360af..dc77e781bce 100644 --- a/src/mame/includes/pirates.h +++ b/src/mame/includes/pirates.h @@ -1,4 +1,4 @@ -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/okim6295.h" class pirates_state : public driver_device diff --git a/src/mame/includes/playmark.h b/src/mame/includes/playmark.h index a91ac19f6d6..ef7e41a48b1 100644 --- a/src/mame/includes/playmark.h +++ b/src/mame/includes/playmark.h @@ -1,5 +1,5 @@ #include "sound/okim6295.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" class playmark_state : public driver_device { diff --git a/src/mame/includes/plygonet.h b/src/mame/includes/plygonet.h index 5cd2ccf42ea..5b2f6309e5c 100644 --- a/src/mame/includes/plygonet.h +++ b/src/mame/includes/plygonet.h @@ -1,4 +1,4 @@ -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "video/k053936.h" diff --git a/src/mame/includes/policetr.h b/src/mame/includes/policetr.h index 4ccd3d59597..9adb4c50b24 100644 --- a/src/mame/includes/policetr.h +++ b/src/mame/includes/policetr.h @@ -3,7 +3,7 @@ P&P Marketing Police Trainer hardware **************************************************************************/ -#include "machine/eeprom.h" +#include "machine/eepromser.h" class policetr_state : public driver_device { public: diff --git a/src/mame/includes/psikyo4.h b/src/mame/includes/psikyo4.h index 557d1caf567..97f4bbfbde0 100644 --- a/src/mame/includes/psikyo4.h +++ b/src/mame/includes/psikyo4.h @@ -5,7 +5,7 @@ *************************************************************************/ #define MASTER_CLOCK 57272700 // main oscillator frequency -#include "machine/eeprom.h" +#include "machine/eepromser.h" class psikyo4_state : public driver_device { diff --git a/src/mame/includes/psikyosh.h b/src/mame/includes/psikyosh.h index ac796d47738..92199a5acf4 100644 --- a/src/mame/includes/psikyosh.h +++ b/src/mame/includes/psikyosh.h @@ -1,5 +1,5 @@ #include "video/bufsprite.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #define MASTER_CLOCK 57272700 // main oscillator frequency diff --git a/src/mame/includes/segas32.h b/src/mame/includes/segas32.h index a8263c1f6df..dc1cbcaf58f 100644 --- a/src/mame/includes/segas32.h +++ b/src/mame/includes/segas32.h @@ -4,7 +4,7 @@ ***************************************************************************/ -#include "machine/eeprom.h" +#include "machine/eepromser.h" class segas32_state : public driver_device diff --git a/src/mame/includes/seibuspi.h b/src/mame/includes/seibuspi.h index 2b04ede5dc8..0e9581c55c1 100644 --- a/src/mame/includes/seibuspi.h +++ b/src/mame/includes/seibuspi.h @@ -5,7 +5,7 @@ ******************************************************************************/ #include "machine/intelfsh.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/7200fifo.h" #include "sound/okim6295.h" diff --git a/src/mame/includes/seta2.h b/src/mame/includes/seta2.h index 26ff2b75034..2ca67d38e86 100644 --- a/src/mame/includes/seta2.h +++ b/src/mame/includes/seta2.h @@ -1,5 +1,5 @@ #include "sound/okim9810.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/x1_010.h" #include "machine/tmp68301.h" diff --git a/src/mame/includes/simpl156.h b/src/mame/includes/simpl156.h index e9b789a6d51..e618037b40e 100644 --- a/src/mame/includes/simpl156.h +++ b/src/mame/includes/simpl156.h @@ -4,7 +4,7 @@ *************************************************************************/ -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/okim6295.h" #include "video/deco16ic.h" #include "video/decospr.h" diff --git a/src/mame/includes/ssv.h b/src/mame/includes/ssv.h index 299dd3eb45d..e57ebc2a21a 100644 --- a/src/mame/includes/ssv.h +++ b/src/mame/includes/ssv.h @@ -1,6 +1,6 @@ #include "cpu/upd7725/upd7725.h" #include "video/st0020.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" class ssv_state : public driver_device diff --git a/src/mame/includes/stlforce.h b/src/mame/includes/stlforce.h index c1bcd8efacc..1d1256cfb4a 100644 --- a/src/mame/includes/stlforce.h +++ b/src/mame/includes/stlforce.h @@ -1,5 +1,5 @@ #include "sound/okim6295.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" class stlforce_state : public driver_device { diff --git a/src/mame/includes/stv.h b/src/mame/includes/stv.h index 8ca1a04d1ac..e1b10ab9a04 100644 --- a/src/mame/includes/stv.h +++ b/src/mame/includes/stv.h @@ -1,6 +1,6 @@ /*----------- defined in drivers/stv.c -----------*/ #include "cdrom.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "cpu/m68000/m68000.h" #include "cpu/adsp2100/adsp2100.h" diff --git a/src/mame/includes/superchs.h b/src/mame/includes/superchs.h index 78e34d44381..08cedd2ffa5 100644 --- a/src/mame/includes/superchs.h +++ b/src/mame/includes/superchs.h @@ -1,4 +1,4 @@ -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "video/tc0480scp.h" diff --git a/src/mame/includes/taito_z.h b/src/mame/includes/taito_z.h index 2d50510a363..88d51c01dc4 100644 --- a/src/mame/includes/taito_z.h +++ b/src/mame/includes/taito_z.h @@ -6,7 +6,7 @@ *************************************************************************/ #include "audio/taitosnd.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/taitoio.h" #include "video/tc0100scn.h" #include "video/tc0110pcr.h" diff --git a/src/mame/includes/tecmosys.h b/src/mame/includes/tecmosys.h index f06c0873523..73f5665d519 100644 --- a/src/mame/includes/tecmosys.h +++ b/src/mame/includes/tecmosys.h @@ -3,7 +3,7 @@ tecmosys protection simulation ***************************************************************************/ -#include "machine/eeprom.h" +#include "machine/eepromser.h" class tecmosys_state : public driver_device { diff --git a/src/mame/includes/toaplan2.h b/src/mame/includes/toaplan2.h index 36d52b9065d..564c6ccf618 100644 --- a/src/mame/includes/toaplan2.h +++ b/src/mame/includes/toaplan2.h @@ -1,4 +1,4 @@ -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/nmk112.h" /**************** Machine stuff ******************/ diff --git a/src/mame/includes/undrfire.h b/src/mame/includes/undrfire.h index 4452bda8932..e1c16377165 100644 --- a/src/mame/includes/undrfire.h +++ b/src/mame/includes/undrfire.h @@ -1,4 +1,4 @@ -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "video/tc0100scn.h" #include "video/tc0480scp.h" diff --git a/src/mame/includes/unico.h b/src/mame/includes/unico.h index e194297013d..ebed6167069 100644 --- a/src/mame/includes/unico.h +++ b/src/mame/includes/unico.h @@ -1,5 +1,5 @@ #include "sound/okim6295.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" class unico_state : public driver_device { diff --git a/src/mame/includes/xorworld.h b/src/mame/includes/xorworld.h index c569cd8d255..ccdc641b3ed 100644 --- a/src/mame/includes/xorworld.h +++ b/src/mame/includes/xorworld.h @@ -1,4 +1,4 @@ -#include "machine/eeprom.h" +#include "machine/eepromser.h" class xorworld_state : public driver_device { diff --git a/src/mame/machine/deco104.c b/src/mame/machine/deco104.c index ec817d76e31..78238281126 100644 --- a/src/mame/machine/deco104.c +++ b/src/mame/machine/deco104.c @@ -8,7 +8,7 @@ ***************************************************************************/ #include "emu.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "deco104.h" // the same way some 146 games require an address XOR of 0x44a at some point during the read chain diff --git a/src/mame/machine/deco146.c b/src/mame/machine/deco146.c index 0322d6a19b2..5e2aa7e2d9b 100644 --- a/src/mame/machine/deco146.c +++ b/src/mame/machine/deco146.c @@ -87,7 +87,7 @@ #include "emu.h" #include "deco146.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" diff --git a/src/mame/machine/gaelco2.c b/src/mame/machine/gaelco2.c index b01cf2bf2ff..57ce95b070c 100644 --- a/src/mame/machine/gaelco2.c +++ b/src/mame/machine/gaelco2.c @@ -8,7 +8,7 @@ ***************************************************************************/ #include "emu.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "includes/gaelco2.h" /*************************************************************************** diff --git a/src/mame/machine/kaneko_calc3.c b/src/mame/machine/kaneko_calc3.c index c2c7dbf1dd8..dfb984c5a77 100644 --- a/src/mame/machine/kaneko_calc3.c +++ b/src/mame/machine/kaneko_calc3.c @@ -23,7 +23,7 @@ #include "emu.h" #include "kaneko_calc3.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" const device_type KANEKO_CALC3 = &device_creator; diff --git a/src/mame/machine/kaneko_toybox.c b/src/mame/machine/kaneko_toybox.c index b68214ca114..b4adf9845b4 100644 --- a/src/mame/machine/kaneko_toybox.c +++ b/src/mame/machine/kaneko_toybox.c @@ -47,7 +47,7 @@ mcu_subcmd = kaneko16_mcu_ram[0x0014/2]; // sub-command parameter, happens o #include "emu.h" #include "kaneko_toybox.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" const device_type KANEKO_TOYBOX = &device_creator; diff --git a/src/mame/machine/leland.c b/src/mame/machine/leland.c index 963938a82b5..c4072f90e54 100644 --- a/src/mame/machine/leland.c +++ b/src/mame/machine/leland.c @@ -8,7 +8,7 @@ #include "emu.h" #include "cpu/i86/i86.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "cpu/z80/z80.h" #include "includes/leland.h" #include "sound/ay8910.h" diff --git a/src/mame/machine/mie.h b/src/mame/machine/mie.h index c90d07202e8..7924afbbc1c 100644 --- a/src/mame/machine/mie.h +++ b/src/mame/machine/mie.h @@ -2,7 +2,7 @@ #define __MIE_H__ #include "cpu/z80/z80.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/jvshost.h" #include "machine/mapledev.h" diff --git a/src/mame/machine/simpsons.c b/src/mame/machine/simpsons.c index db94aa3071a..a6cf60c96dd 100644 --- a/src/mame/machine/simpsons.c +++ b/src/mame/machine/simpsons.c @@ -1,7 +1,7 @@ #include "emu.h" #include "cpu/m6809/konami.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "sound/k053260.h" #include "includes/simpsons.h" diff --git a/src/mess/drivers/ip20.c b/src/mess/drivers/ip20.c index fc4e3980aea..4da696ffef8 100644 --- a/src/mess/drivers/ip20.c +++ b/src/mess/drivers/ip20.c @@ -20,7 +20,7 @@ #include "cpu/mips/mips3.h" #include "machine/8530scc.h" #include "machine/sgi.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "machine/scsibus.h" #include "machine/scsicd.h" #include "machine/wd33c93.h" @@ -108,8 +108,6 @@ UINT32 ip20_state::screen_update_ip204415(screen_device &screen, bitmap_ind16 &b static const serial_eeprom_interface eeprom_interface_93C56 = { - 7, // address bits 7 - 16, // data bits 16 "*110x", // read 110x aaaaaaaa "*101x", // write 101x aaaaaaaa dddddddd "*111x", // erase 111x aaaaaaaa @@ -627,7 +625,7 @@ static MACHINE_CONFIG_START( ip204415, ip20_state ) MCFG_SOUND_MODIFY( "scsi:cdrom:cdda" ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "^^^mono", 1.0) - MCFG_SERIAL_EEPROM_ADD("eeprom", eeprom_interface_93C56) + MCFG_SERIAL_EEPROM_ADD("eeprom", 128, 16, eeprom_interface_93C56) MACHINE_CONFIG_END ROM_START( ip204415 ) diff --git a/src/mess/drivers/saturn.c b/src/mess/drivers/saturn.c index 0df08b9277d..2536c58c460 100644 --- a/src/mess/drivers/saturn.c +++ b/src/mess/drivers/saturn.c @@ -59,7 +59,7 @@ TODO: #include "emu.h" #include "cpu/m68000/m68000.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" #include "cpu/sh2/sh2.h" #include "machine/scudsp.h" #include "sound/scsp.h" diff --git a/src/mess/machine/sega8_rom.h b/src/mess/machine/sega8_rom.h index 0d6a7078c81..eac40974d62 100644 --- a/src/mess/machine/sega8_rom.h +++ b/src/mess/machine/sega8_rom.h @@ -2,7 +2,7 @@ #define __SEGA8_ROM_H #include "machine/sega8_slot.h" -#include "machine/eeprom.h" +#include "machine/eepromser.h" // ======================> sega8_rom_device