From 50749667bb8b6d0b92d187dffc9dcb0a03907375 Mon Sep 17 00:00:00 2001 From: AJR Date: Wed, 30 Aug 2017 00:17:11 -0400 Subject: Improvements to 28XX parallel EEPROM emulation - Emulate direct manipulation of /OE line for read/write mode control. - Special handling for data polling before a write has completed. - Allow optional configuration of device to lock EEPROM after each write, as often used by Atari. - Eliminate the Atari EEPROM interface devices, since their special features have been incorporated into the base device. To continue using old NVRAM files, rename them from eeprom_eeprom to eeprom. --- src/devices/machine/eeprompar.cpp | 102 +++++++++++++++++++++++++++++++++- src/devices/machine/eeprompar.h | 26 ++++++++- src/mame/drivers/arcadecl.cpp | 9 ++- src/mame/drivers/atarig1.cpp | 8 ++- src/mame/drivers/atarig42.cpp | 16 +++--- src/mame/drivers/atarigt.cpp | 8 ++- src/mame/drivers/atarigx2.cpp | 8 ++- src/mame/drivers/atarisy1.cpp | 9 +-- src/mame/drivers/atarisy2.cpp | 2 + src/mame/drivers/badlands.cpp | 15 +++-- src/mame/drivers/batman.cpp | 10 ++-- src/mame/drivers/blstroid.cpp | 9 +-- src/mame/drivers/cyberbal.cpp | 36 ++++++------ src/mame/drivers/eprom.cpp | 18 +++--- src/mame/drivers/gauntlet.cpp | 8 ++- src/mame/drivers/klax.cpp | 12 ++-- src/mame/drivers/mastboy.cpp | 39 ++----------- src/mame/drivers/offtwall.cpp | 12 ++-- src/mame/drivers/rampart.cpp | 14 +++-- src/mame/drivers/relief.cpp | 15 ++--- src/mame/drivers/shuuz.cpp | 8 ++- src/mame/drivers/skullxbo.cpp | 8 ++- src/mame/drivers/thunderj.cpp | 9 +-- src/mame/drivers/toobin.cpp | 10 ++-- src/mame/drivers/vindictr.cpp | 8 ++- src/mame/drivers/xybots.cpp | 9 +-- src/mame/includes/harddriv.h | 1 + src/mame/machine/atarigen.cpp | 113 -------------------------------------- src/mame/machine/atarigen.h | 70 ----------------------- 29 files changed, 282 insertions(+), 330 deletions(-) diff --git a/src/devices/machine/eeprompar.cpp b/src/devices/machine/eeprompar.cpp index 5e63b320add..704decb70ab 100644 --- a/src/devices/machine/eeprompar.cpp +++ b/src/devices/machine/eeprompar.cpp @@ -36,11 +36,21 @@ datasheet, for example), and the /WE must be held low for the entire write/erase duration in order to guarantee the data is written. + Though it is possible for the /OE line to be strobed directly upon + read accesses, it may also be controlled independently of /CS. For the + sake of convenience, the device here can also be configured to emulate + a small amount of external circuitry (1/2 of a LS74 flip-flop and 1 + gate of a LS02 or LS08), typically used by Atari Games, that reasserts + /OE low to lock the EEPROM after each byte of data is written and upon + reset, with extra writes required to unlock the EEPROM in between. + ***************************************************************************/ #include "emu.h" #include "machine/eeprompar.h" +//#define VERBOSE 1 +#include "logmacro.h" //************************************************************************** @@ -89,8 +99,49 @@ void eeprom_parallel_base_device::device_reset() //------------------------------------------------- eeprom_parallel_28xx_device::eeprom_parallel_28xx_device(const machine_config &mconfig, device_type devtype, const char *tag, device_t *owner) - : eeprom_parallel_base_device(mconfig, devtype, tag, owner) + : eeprom_parallel_base_device(mconfig, devtype, tag, owner), + m_lock_after_write(false), + m_oe(-1) +{ +} + + +//------------------------------------------------- +// static_set_lock_after_write - configuration +// helper to enable simulation of external +// flip-flop hooked to lock EEPROM after writes +//------------------------------------------------- + +void eeprom_parallel_28xx_device::static_set_lock_after_write(device_t &device, bool lock) +{ + downcast(device).m_lock_after_write = lock; +} + + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void eeprom_parallel_28xx_device::device_start() { + // start the base class + eeprom_parallel_base_device::device_start(); + + save_item(NAME(m_oe)); +} + + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void eeprom_parallel_28xx_device::device_reset() +{ + // reset the base class + eeprom_parallel_base_device::device_reset(); + + if (m_lock_after_write) + m_oe = 0; } @@ -100,15 +151,60 @@ eeprom_parallel_28xx_device::eeprom_parallel_28xx_device(const machine_config &m WRITE8_MEMBER(eeprom_parallel_28xx_device::write) { - eeprom_base_device::write(offset, data); + if (m_oe == 0) + { + // Master Boy writes every byte twice, resetting a control line in between, for some reason not clear + if (internal_read(offset) != data) + LOG("%s: Write attempted while /OE active (offset = %X, data = %02X)\n", machine().describe_context(), offset, data); + } + else + { + LOG("%s: Write cycle started (offset = %X, data = %02X)\n", machine().describe_context(), offset, data); + eeprom_base_device::write(offset, data); + if (m_lock_after_write) + m_oe = 0; + } } READ8_MEMBER(eeprom_parallel_28xx_device::read) { - return eeprom_base_device::read(offset); + if (m_oe == 1) + { + LOG("%s: Read attempted while /OE inactive (offset = %X)\n", machine().describe_context(), offset); + return space.unmap(); + } + + // if a write has not completed yet, the highest bit of data written will be read back inverted when polling the offset + if (ready()) + return eeprom_base_device::read(offset); + else + { + LOG("%s: Data read back before write completed (offset = %X)\n", machine().describe_context(), offset); + return ~internal_read(offset) & 0x80; + } } +//------------------------------------------------- +// oe_w - direct write to /OE (true line state) +//------------------------------------------------- + +WRITE_LINE_MEMBER(eeprom_parallel_28xx_device::oe_w) +{ + LOG("%s: EEPROM %s for writing\n", machine().describe_context(), state ? "unlocked" : "locked"); + m_oe = state ? 1 : 0; +} + + +//------------------------------------------------- +// unlock_write - unlock EEPROM by deasserting +// /OE line through external flip-flop +//------------------------------------------------- + +WRITE8_MEMBER(eeprom_parallel_28xx_device::unlock_write) { oe_w(1); } +WRITE16_MEMBER(eeprom_parallel_28xx_device::unlock_write) { oe_w(1); } +WRITE32_MEMBER(eeprom_parallel_28xx_device::unlock_write) { oe_w(1); } + //************************************************************************** // DERIVED TYPES diff --git a/src/devices/machine/eeprompar.h b/src/devices/machine/eeprompar.h index 62a4b539e8b..2370f1c0e46 100644 --- a/src/devices/machine/eeprompar.h +++ b/src/devices/machine/eeprompar.h @@ -38,6 +38,9 @@ #define MCFG_EEPROM_28040_ADD(_tag) \ MCFG_DEVICE_ADD(_tag, EEPROM_PARALLEL_28040, 0) +// true when external circuit is used to lock EEPROM after every write +#define MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(_lock) \ + eeprom_parallel_28xx_device::static_set_lock_after_write(*device, _lock); //************************************************************************** @@ -65,14 +68,33 @@ protected: class eeprom_parallel_28xx_device : public eeprom_parallel_base_device { public: - // read/write data lines - for now we cheat and ignore the control lines, assuming - // they are handled reasonably + // static configuration helpers + static void static_set_lock_after_write(device_t &device, bool lock); + + // read/write data lines DECLARE_WRITE8_MEMBER(write); DECLARE_READ8_MEMBER(read); + // control lines + DECLARE_WRITE_LINE_MEMBER(oe_w); + DECLARE_WRITE8_MEMBER(unlock_write); + DECLARE_WRITE16_MEMBER(unlock_write); + DECLARE_WRITE32_MEMBER(unlock_write); + protected: // construction/destruction eeprom_parallel_28xx_device(const machine_config &mconfig, device_type devtype, const char *tag, device_t *owner); + + // device-level overrides + virtual void device_start() override; + virtual void device_reset() override; + +private: + // configuration state + bool m_lock_after_write; // lock EEPROM after writes + + // runtime state + int m_oe; // state of OE line (-1 = synchronized with read) }; diff --git a/src/mame/drivers/arcadecl.cpp b/src/mame/drivers/arcadecl.cpp index b0236430897..79ebc19a18d 100644 --- a/src/mame/drivers/arcadecl.cpp +++ b/src/mame/drivers/arcadecl.cpp @@ -71,6 +71,7 @@ #include "emu.h" #include "includes/arcadecl.h" #include "cpu/m68000/m68000.h" +#include "machine/eeprompar.h" #include "machine/watchdog.h" #include "sound/okim6295.h" #include "video/atarimo.h" @@ -161,8 +162,8 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, arcadecl_state ) AM_RANGE(0x640024, 0x640025) AM_READ_PORT("TRACKX1") AM_RANGE(0x640026, 0x640027) AM_READ_PORT("TRACKY1") AM_RANGE(0x640040, 0x64004f) AM_WRITE(latch_w) - AM_RANGE(0x640060, 0x64006f) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) - AM_RANGE(0x641000, 0x641fff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) + AM_RANGE(0x640060, 0x64006f) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) + AM_RANGE(0x641000, 0x641fff) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) AM_RANGE(0x642000, 0x642001) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0xff00) AM_RANGE(0x646000, 0x646fff) AM_WRITE(scanline_int_ack_w) AM_RANGE(0x647000, 0x647fff) AM_DEVWRITE("watchdog", watchdog_timer_device, reset16_w) @@ -325,7 +326,9 @@ static MACHINE_CONFIG_START( arcadecl ) MCFG_DEVICE_VBLANK_INT_DRIVER("screen", atarigen_state, video_int_gen) MCFG_MACHINE_RESET_OVERRIDE(arcadecl_state,arcadecl) - MCFG_ATARI_EEPROM_2804_ADD("eeprom") + + MCFG_EEPROM_2804_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") diff --git a/src/mame/drivers/atarig1.cpp b/src/mame/drivers/atarig1.cpp index 3e18b3dec66..4ae33e667ee 100644 --- a/src/mame/drivers/atarig1.cpp +++ b/src/mame/drivers/atarig1.cpp @@ -22,6 +22,7 @@ #include "emu.h" #include "includes/atarig1.h" +#include "machine/eeprompar.h" #include "machine/watchdog.h" #include "speaker.h" @@ -195,7 +196,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, atarig1_state ) AM_RANGE(0x040000, 0x077fff) AM_ROM AM_RANGE(0x078000, 0x07ffff) AM_ROM /* hydra slapstic goes here */ AM_RANGE(0xf80000, 0xf80001) AM_DEVWRITE("watchdog", watchdog_timer_device, reset16_w) - AM_RANGE(0xf88000, 0xf8ffff) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0xf88000, 0xf8ffff) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0xf90000, 0xf90001) AM_DEVWRITE8("jsa", atari_jsa_ii_device, main_command_w, 0xff00) AM_RANGE(0xf98000, 0xf98001) AM_DEVWRITE("jsa", atari_jsa_ii_device, sound_reset_w) AM_RANGE(0xfa0000, 0xfa0001) AM_DEVWRITE8("rle", atari_rle_objects_device, control_write, 0x00ff) @@ -203,7 +204,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, atarig1_state ) AM_RANGE(0xfc0000, 0xfc0001) AM_READ(special_port0_r) AM_RANGE(0xfc8000, 0xfc8007) AM_READWRITE(a2d_data_r, a2d_select_w) AM_RANGE(0xfd0000, 0xfd0001) AM_DEVREAD8("jsa", atari_jsa_ii_device, main_response_r, 0xff00) - AM_RANGE(0xfd8000, 0xfdffff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) + AM_RANGE(0xfd8000, 0xfdffff) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) /* AM_RANGE(0xfe0000, 0xfe7fff) AM_READ(from_r)*/ AM_RANGE(0xfe8000, 0xfe89ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") AM_RANGE(0xff0000, 0xff0fff) AM_RAM AM_SHARE("rle") @@ -433,7 +434,8 @@ static MACHINE_CONFIG_START( atarig1 ) MCFG_MACHINE_START_OVERRIDE(atarig1_state,atarig1) MCFG_MACHINE_RESET_OVERRIDE(atarig1_state,atarig1) - MCFG_ATARI_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") diff --git a/src/mame/drivers/atarig42.cpp b/src/mame/drivers/atarig42.cpp index 3dfb46e04db..832d32896fc 100644 --- a/src/mame/drivers/atarig42.cpp +++ b/src/mame/drivers/atarig42.cpp @@ -21,6 +21,7 @@ #include "emu.h" #include "includes/atarig42.h" +#include "machine/eeprompar.h" #include "machine/watchdog.h" #include "speaker.h" @@ -329,14 +330,14 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, atarig42_state ) AM_RANGE(0xe00030, 0xe00031) AM_DEVREAD8("jsa", atari_jsa_iii_device, main_response_r, 0x00ff) AM_RANGE(0xe00040, 0xe00041) AM_DEVWRITE8("jsa", atari_jsa_iii_device, main_command_w, 0x00ff) AM_RANGE(0xe00050, 0xe00051) AM_WRITE(io_latch_w) - AM_RANGE(0xe00060, 0xe00061) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0xe00060, 0xe00061) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0xe03000, 0xe03001) AM_WRITE(video_int_ack_w) AM_RANGE(0xe03800, 0xe03801) AM_DEVWRITE("watchdog", watchdog_timer_device, reset16_w) AM_RANGE(0xe80000, 0xe80fff) AM_RAM AM_RANGE(0xf40000, 0xf40001) AM_DEVREAD("asic65", asic65_device, io_r) AM_RANGE(0xf60000, 0xf60001) AM_DEVREAD("asic65", asic65_device, read) AM_RANGE(0xf80000, 0xf80003) AM_DEVWRITE("asic65", asic65_device, data_w) - AM_RANGE(0xfa0000, 0xfa0fff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) + AM_RANGE(0xfa0000, 0xfa0fff) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) AM_RANGE(0xfc0000, 0xfc0fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") AM_RANGE(0xff0000, 0xff0fff) AM_RAM AM_SHARE("rle") AM_RANGE(0xff2000, 0xff5fff) AM_DEVWRITE("playfield", tilemap_device, write) AM_SHARE("playfield") @@ -531,7 +532,8 @@ static MACHINE_CONFIG_START( atarig42 ) MCFG_MACHINE_START_OVERRIDE(atarig42_state,atarig42) MCFG_MACHINE_RESET_OVERRIDE(atarig42_state,atarig42) - MCFG_ATARI_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") @@ -632,7 +634,7 @@ ROM_START( roadriot ) ROM_LOAD( "136089-1050.15e", 0x40000, 0x20000, CRC(64d410bb) SHA1(877bccca7ff37a9dd8294bc1453487a2f516ca7d) ) ROM_LOAD( "136089-1051.12e", 0x60000, 0x20000, CRC(bffd01c8) SHA1(f6de000f61ea0c1ddb31ee5301506e5e966638c2) ) - ROM_REGION( 0x800, "eeprom:eeprom", 0 ) + ROM_REGION( 0x800, "eeprom", 0 ) ROM_LOAD( "roadriot-eeprom.5c", 0x0000, 0x800, CRC(8d9b957d) SHA1(9d895c5977a3f405130594a10d530a82a6aa265f) ) ROM_REGION( 0x0600, "proms", 0 ) /* microcode for growth renderer */ @@ -689,7 +691,7 @@ ROM_START( roadriota ) ROM_LOAD( "136089-1050.15e", 0x40000, 0x20000, CRC(64d410bb) SHA1(877bccca7ff37a9dd8294bc1453487a2f516ca7d) ) ROM_LOAD( "136089-1051.12e", 0x60000, 0x20000, CRC(bffd01c8) SHA1(f6de000f61ea0c1ddb31ee5301506e5e966638c2) ) - ROM_REGION( 0x800, "eeprom:eeprom", 0 ) + ROM_REGION( 0x800, "eeprom", 0 ) ROM_LOAD( "roadriot-eeprom.5c", 0x0000, 0x800, CRC(8d9b957d) SHA1(9d895c5977a3f405130594a10d530a82a6aa265f) ) ROM_REGION( 0x0600, "proms", 0 ) /* microcode for growth renderer */ @@ -746,7 +748,7 @@ ROM_START( roadriotb ) ROM_LOAD( "136089-1050.15e", 0x40000, 0x20000, CRC(64d410bb) SHA1(877bccca7ff37a9dd8294bc1453487a2f516ca7d) ) ROM_LOAD( "136089-1051.12e", 0x60000, 0x20000, CRC(bffd01c8) SHA1(f6de000f61ea0c1ddb31ee5301506e5e966638c2) ) - ROM_REGION( 0x800, "eeprom:eeprom", 0 ) + ROM_REGION( 0x800, "eeprom", 0 ) ROM_LOAD( "roadriot-eeprom.5c", 0x0000, 0x800, CRC(8d9b957d) SHA1(9d895c5977a3f405130594a10d530a82a6aa265f) ) ROM_REGION( 0x0600, "proms", 0 ) /* microcode for growth renderer */ @@ -794,7 +796,7 @@ ROM_START( guardian ) ROM_REGION( 0x80000, "jsa:oki1", 0 ) ROM_LOAD( "136092-0010-snd.19e", 0x00000, 0x80000, CRC(bca27f40) SHA1(91a41eac116eb7d9a790abc590eb06328726d1c2) ) - ROM_REGION( 0x800, "eeprom:eeprom", 0 ) + ROM_REGION( 0x800, "eeprom", 0 ) ROM_LOAD( "guardian-eeprom.5c", 0x0000, 0x800, CRC(85835fab) SHA1(747e2851c8baa0e7f1c0784b0d6900514230ab07) ) ROM_REGION( 0x0600, "proms", 0 ) /* microcode for growth renderer */ diff --git a/src/mame/drivers/atarigt.cpp b/src/mame/drivers/atarigt.cpp index 2a6a248b72d..a86d026b6ef 100644 --- a/src/mame/drivers/atarigt.cpp +++ b/src/mame/drivers/atarigt.cpp @@ -56,6 +56,7 @@ #include "includes/atarigt.h" #include "cpu/m68000/m68000.h" +#include "machine/eeprompar.h" #define LOG_PROTECTION (0) @@ -600,8 +601,8 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 32, atarigt_state ) AM_RANGE(0xc00000, 0xc00003) AM_READWRITE(sound_data_r, sound_data_w) AM_RANGE(0xd00014, 0xd00017) AM_READ(analog_port0_r) AM_RANGE(0xd0001c, 0xd0001f) AM_READ(analog_port1_r) - AM_RANGE(0xd20000, 0xd20fff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0xff00ff00) - AM_RANGE(0xd40000, 0xd4ffff) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0xd20000, 0xd20fff) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0xff00ff00) + AM_RANGE(0xd40000, 0xd4ffff) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0xd72000, 0xd75fff) AM_DEVWRITE("playfield", tilemap_device, write) AM_SHARE("playfield") AM_RANGE(0xd76000, 0xd76fff) AM_DEVWRITE("alpha", tilemap_device, write) AM_SHARE("alpha") AM_RANGE(0xd78000, 0xd78fff) AM_RAM AM_SHARE("rle") @@ -809,7 +810,8 @@ static MACHINE_CONFIG_START( atarigt ) MCFG_MACHINE_RESET_OVERRIDE(atarigt_state,atarigt) - MCFG_ATARI_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) /* video hardware */ MCFG_GFXDECODE_ADD("gfxdecode", "palette", atarigt) diff --git a/src/mame/drivers/atarigx2.cpp b/src/mame/drivers/atarigx2.cpp index 2320667e3b0..ee2bad3564c 100644 --- a/src/mame/drivers/atarigx2.cpp +++ b/src/mame/drivers/atarigx2.cpp @@ -28,6 +28,7 @@ #include "includes/atarigx2.h" #include "cpu/m68000/m68000.h" +#include "machine/eeprompar.h" #include "speaker.h" @@ -1200,14 +1201,14 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 32, atarigx2_state ) AM_RANGE(0x000000, 0x07ffff) AM_ROM AM_RANGE(0xc80000, 0xc80fff) AM_RAM AM_RANGE(0xd00000, 0xd1ffff) AM_READ(a2d_data_r) - AM_RANGE(0xd20000, 0xd20fff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0xff00ff00) + AM_RANGE(0xd20000, 0xd20fff) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0xff00ff00) AM_RANGE(0xd40000, 0xd40fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") AM_RANGE(0xd72000, 0xd75fff) AM_DEVWRITE("playfield", tilemap_device, write) AM_SHARE("playfield") AM_RANGE(0xd76000, 0xd76fff) AM_DEVWRITE("alpha", tilemap_device, write) AM_SHARE("alpha") AM_RANGE(0xd78000, 0xd78fff) AM_RAM AM_SHARE("rle") AM_RANGE(0xd7a200, 0xd7a203) AM_WRITE(mo_command_w) AM_SHARE("mo_command") AM_RANGE(0xd70000, 0xd7ffff) AM_RAM - AM_RANGE(0xd80000, 0xd9ffff) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0xd80000, 0xd9ffff) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0xe06000, 0xe06003) AM_DEVWRITE8("jsa", atari_jsa_iiis_device, main_command_w, 0xff000000) AM_RANGE(0xe08000, 0xe08003) AM_WRITE(latch_w) AM_RANGE(0xe0c000, 0xe0c003) AM_WRITE16(video_int_ack_w, 0xffffffff) @@ -1502,7 +1503,8 @@ static MACHINE_CONFIG_START( atarigx2 ) MCFG_MACHINE_RESET_OVERRIDE(atarigx2_state,atarigx2) - MCFG_ATARI_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) /* video hardware */ MCFG_GFXDECODE_ADD("gfxdecode", "palette", atarigx2) diff --git a/src/mame/drivers/atarisy1.cpp b/src/mame/drivers/atarisy1.cpp index f100079edad..da07124c3dd 100644 --- a/src/mame/drivers/atarisy1.cpp +++ b/src/mame/drivers/atarisy1.cpp @@ -194,8 +194,8 @@ RoadBlasters (aka Future Vette):005* #include "includes/atarisy1.h" #include "cpu/m68000/m68000.h" #include "cpu/m6502/m6502.h" -#include "machine/atarigen.h" #include "machine/6522via.h" +#include "machine/eeprompar.h" #include "machine/watchdog.h" #include "sound/pokey.h" #include "sound/ym2151.h" @@ -456,13 +456,13 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, atarisy1_state ) AM_RANGE(0x860000, 0x860001) AM_WRITE(atarisy1_bankselect_w) AM_SHARE("bankselect") AM_RANGE(0x880000, 0x880001) AM_DEVWRITE("watchdog", watchdog_timer_device, reset16_w) AM_RANGE(0x8a0000, 0x8a0001) AM_WRITE(video_int_ack_w) - AM_RANGE(0x8c0000, 0x8c0001) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0x8c0000, 0x8c0001) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0x900000, 0x9fffff) AM_RAM AM_RANGE(0xa00000, 0xa01fff) AM_RAM_DEVWRITE("playfield", tilemap_device, write) AM_SHARE("playfield") AM_RANGE(0xa02000, 0xa02fff) AM_RAM_WRITE(atarisy1_spriteram_w) AM_SHARE("mob") AM_RANGE(0xa03000, 0xa03fff) AM_RAM_DEVWRITE("alpha", tilemap_device, write) AM_SHARE("alpha") AM_RANGE(0xb00000, 0xb007ff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") - AM_RANGE(0xf00000, 0xf00fff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) + AM_RANGE(0xf00000, 0xf00fff) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) AM_RANGE(0xf20000, 0xf20007) AM_READ(trakball_r) AM_RANGE(0xf40000, 0xf4001f) AM_READWRITE(joystick_r, joystick_w) AM_RANGE(0xf60000, 0xf60003) AM_READ_PORT("F60000") @@ -738,7 +738,8 @@ static MACHINE_CONFIG_START( atarisy1 ) MCFG_MACHINE_START_OVERRIDE(atarisy1_state,atarisy1) MCFG_MACHINE_RESET_OVERRIDE(atarisy1_state,atarisy1) - MCFG_ATARI_EEPROM_2804_ADD("eeprom") + MCFG_EEPROM_2804_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_DEVICE_ADD("outlatch", LS259, 0) // 15H (TTL) or 14F (LSI) MCFG_ADDRESSABLE_LATCH_Q0_OUT_CB(DEVWRITELINE("ymsnd", ym2151_device, reset_w)) diff --git a/src/mame/drivers/atarisy2.cpp b/src/mame/drivers/atarisy2.cpp index d2edbf0ecd3..4739ae4e358 100644 --- a/src/mame/drivers/atarisy2.cpp +++ b/src/mame/drivers/atarisy2.cpp @@ -127,6 +127,8 @@ #include "emu.h" #include "includes/atarisy2.h" + +#include "machine/eeprompar.h" #include "speaker.h" diff --git a/src/mame/drivers/badlands.cpp b/src/mame/drivers/badlands.cpp index a927d15d5de..1e04ff7c31c 100644 --- a/src/mame/drivers/badlands.cpp +++ b/src/mame/drivers/badlands.cpp @@ -168,6 +168,7 @@ Measurements - #include "cpu/z80/z80.h" #include "cpu/m68000/m68000.h" #include "cpu/m6502/m6502.h" +#include "machine/eeprompar.h" #include "machine/watchdog.h" #include "sound/ym2151.h" #include "speaker.h" @@ -377,7 +378,7 @@ WRITE8_MEMBER(badlands_state::audio_io_w) static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, badlands_state ) AM_RANGE(0x000000, 0x03ffff) AM_ROM AM_RANGE(0xfc0000, 0xfc1fff) AM_READ(sound_busy_r) AM_DEVWRITE("soundcomm", atari_sound_comm_device, sound_reset_w) - AM_RANGE(0xfd0000, 0xfd1fff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) + AM_RANGE(0xfd0000, 0xfd1fff) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) AM_RANGE(0xfe0000, 0xfe1fff) AM_DEVWRITE("watchdog", watchdog_timer_device, reset16_w) AM_RANGE(0xfe2000, 0xfe3fff) AM_WRITE(video_int_ack_w) AM_RANGE(0xfe4000, 0xfe5fff) AM_READ_PORT("FE4000") @@ -388,7 +389,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, badlands_state ) AM_RANGE(0xfe8000, 0xfe9fff) AM_DEVWRITE8("soundcomm", atari_sound_comm_device, main_command_w, 0xff00) AM_RANGE(0xfea000, 0xfebfff) AM_DEVREAD8("soundcomm", atari_sound_comm_device, main_response_r, 0xff00) AM_RANGE(0xfec000, 0xfedfff) AM_WRITE(badlands_pf_bank_w) - AM_RANGE(0xfee000, 0xfeffff) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0xfee000, 0xfeffff) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0xffc000, 0xffc3ff) AM_DEVREADWRITE8("palette", palette_device, read, write, 0xff00) AM_SHARE("palette") AM_RANGE(0xffe000, 0xffefff) AM_RAM_DEVWRITE("playfield", tilemap_device, write) AM_SHARE("playfield") AM_RANGE(0xfff000, 0xfff1ff) AM_RAM AM_SHARE("mob") @@ -513,7 +514,8 @@ static MACHINE_CONFIG_START( badlands ) MCFG_MACHINE_START_OVERRIDE(badlands_state,badlands) MCFG_MACHINE_RESET_OVERRIDE(badlands_state,badlands) - MCFG_ATARI_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") @@ -660,7 +662,7 @@ static ADDRESS_MAP_START( bootleg_map, AS_PROGRAM, 16, badlands_state ) AM_RANGE(0xfc0000, 0xfc0001) AM_READ(badlandsb_unk_r ) // sound comms? - AM_RANGE(0xfd0000, 0xfd1fff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) + AM_RANGE(0xfd0000, 0xfd1fff) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) //AM_RANGE(0xfe0000, 0xfe1fff) AM_DEVWRITE("watchdog", watchdog_timer_device, reset_w) AM_RANGE(0xfe2000, 0xfe3fff) AM_WRITE(video_int_ack_w) @@ -669,7 +671,7 @@ static ADDRESS_MAP_START( bootleg_map, AS_PROGRAM, 16, badlands_state ) AM_RANGE(0xfe4004, 0xfe4005) AM_READ_PORT("P1") AM_RANGE(0xfe4006, 0xfe4007) AM_READ_PORT("P2") AM_RANGE(0xfe4008, 0xfe4009) AM_WRITE(badlands_pf_bank_w) - AM_RANGE(0xfe400c, 0xfe400d) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0xfe400c, 0xfe400d) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0xffc000, 0xffc3ff) AM_DEVREADWRITE8("palette", palette_device, read, write, 0xff00) AM_SHARE("palette") AM_RANGE(0xffe000, 0xffefff) AM_RAM_DEVWRITE("playfield", tilemap_device, write) AM_SHARE("playfield") @@ -768,7 +770,8 @@ static MACHINE_CONFIG_START( badlandsb ) MCFG_MACHINE_START_OVERRIDE(badlands_state,badlands) MCFG_MACHINE_RESET_OVERRIDE(badlands_state,badlandsb) - MCFG_ATARI_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) /* video hardware */ MCFG_GFXDECODE_ADD("gfxdecode", "palette", badlandsb) diff --git a/src/mame/drivers/batman.cpp b/src/mame/drivers/batman.cpp index 158ee3a7aa0..ea9432aacff 100644 --- a/src/mame/drivers/batman.cpp +++ b/src/mame/drivers/batman.cpp @@ -22,6 +22,7 @@ #include "emu.h" #include "includes/batman.h" #include "cpu/m68000/m68000.h" +#include "machine/eeprompar.h" #include "machine/watchdog.h" #include "video/atarimo.h" #include "speaker.h" @@ -99,14 +100,14 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, batman_state ) ADDRESS_MAP_GLOBAL_MASK(0x3fffff) AM_RANGE(0x000000, 0x0bffff) AM_ROM AM_RANGE(0x100000, 0x10ffff) AM_MIRROR(0x010000) AM_RAM - AM_RANGE(0x120000, 0x120fff) AM_MIRROR(0x01f000) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) + AM_RANGE(0x120000, 0x120fff) AM_MIRROR(0x01f000) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) AM_RANGE(0x260000, 0x260001) AM_MIRROR(0x11ff8c) AM_READ_PORT("260000") AM_RANGE(0x260002, 0x260003) AM_MIRROR(0x11ff8c) AM_READ_PORT("260002") AM_RANGE(0x260010, 0x260011) AM_MIRROR(0x11ff8e) AM_READ_PORT("260010") AM_RANGE(0x260030, 0x260031) AM_MIRROR(0x11ff8e) AM_DEVREAD8("jsa", atari_jsa_iii_device, main_response_r, 0x00ff) AM_RANGE(0x260040, 0x260041) AM_MIRROR(0x11ff8e) AM_DEVWRITE8("jsa", atari_jsa_iii_device, main_command_w, 0x00ff) AM_RANGE(0x260050, 0x260051) AM_MIRROR(0x11ff8e) AM_WRITE(latch_w) - AM_RANGE(0x260060, 0x260061) AM_MIRROR(0x11ff8e) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0x260060, 0x260061) AM_MIRROR(0x11ff8e) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0x2a0000, 0x2a0001) AM_MIRROR(0x11fffe) AM_DEVWRITE("watchdog", watchdog_timer_device, reset16_w) AM_RANGE(0x2e0000, 0x2e0fff) AM_MIRROR(0x100000) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") AM_RANGE(0x2effc0, 0x2effff) AM_MIRROR(0x100000) AM_DEVREADWRITE("vad", atari_vad_device, control_read, control_write) @@ -205,7 +206,8 @@ static MACHINE_CONFIG_START( batman ) MCFG_MACHINE_START_OVERRIDE(batman_state,batman) MCFG_MACHINE_RESET_OVERRIDE(batman_state,batman) - MCFG_ATARI_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") @@ -287,7 +289,7 @@ ROM_START( batman ) ROM_LOAD( "136085-1043.15e", 0x40000, 0x20000, CRC(51812d3b) SHA1(6748fecef753179a9257c0da5a7b7c9648437208) ) ROM_LOAD( "136085-1044.12e", 0x60000, 0x20000, CRC(5e2d7f31) SHA1(737c7204d91f5dd5c9ed0321fc6c0d6194a18f8a) ) - ROM_REGION( 0x800, "eeprom:eeprom", 0 ) + ROM_REGION( 0x800, "eeprom", 0 ) ROM_LOAD( "batman-eeprom.bin", 0x0000, 0x800, CRC(c859b535) SHA1(b7f37aab1e869e92fbcc69af98a9c14f7cf2b418) ) ROM_REGION( 0x1000, "plds", 0 ) diff --git a/src/mame/drivers/blstroid.cpp b/src/mame/drivers/blstroid.cpp index 357f1d10516..0b317bdf4d5 100644 --- a/src/mame/drivers/blstroid.cpp +++ b/src/mame/drivers/blstroid.cpp @@ -21,9 +21,9 @@ #include "emu.h" #include "includes/blstroid.h" -#include "machine/atarigen.h" #include "cpu/m68000/m68000.h" +#include "machine/eeprompar.h" #include "machine/watchdog.h" #include "speaker.h" @@ -71,7 +71,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, blstroid_state ) AM_RANGE(0x800000, 0x800001) AM_MIRROR(0x0381fe) AM_DEVWRITE("watchdog", watchdog_timer_device, reset16_w) AM_RANGE(0x800200, 0x800201) AM_MIRROR(0x0381fe) AM_WRITE(scanline_int_ack_w) AM_RANGE(0x800400, 0x800401) AM_MIRROR(0x0381fe) AM_WRITE(video_int_ack_w) - AM_RANGE(0x800600, 0x800601) AM_MIRROR(0x0381fe) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0x800600, 0x800601) AM_MIRROR(0x0381fe) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0x800800, 0x8009ff) AM_MIRROR(0x038000) AM_WRITEONLY AM_SHARE("priorityram") AM_RANGE(0x800a00, 0x800a01) AM_MIRROR(0x0381fe) AM_DEVWRITE8("jsa", atari_jsa_i_device, main_command_w, 0x00ff) AM_RANGE(0x800c00, 0x800c01) AM_MIRROR(0x0381fe) AM_DEVWRITE("jsa", atari_jsa_i_device, sound_reset_w) @@ -82,7 +82,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, blstroid_state ) AM_RANGE(0x801c00, 0x801c01) AM_MIRROR(0x0383fc) AM_READ_PORT("IN0") AM_RANGE(0x801c02, 0x801c03) AM_MIRROR(0x0383fc) AM_READ_PORT("IN1") AM_RANGE(0x802000, 0x8023ff) AM_MIRROR(0x038c00) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") - AM_RANGE(0x803000, 0x8033ff) AM_MIRROR(0x038c00) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) + AM_RANGE(0x803000, 0x8033ff) AM_MIRROR(0x038c00) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) AM_RANGE(0x804000, 0x804fff) AM_MIRROR(0x038000) AM_RAM_DEVWRITE("playfield", tilemap_device, write) AM_SHARE("playfield") AM_RANGE(0x805000, 0x805fff) AM_MIRROR(0x038000) AM_RAM AM_SHARE("mob") AM_RANGE(0x806000, 0x807fff) AM_MIRROR(0x038000) AM_RAM @@ -183,7 +183,8 @@ static MACHINE_CONFIG_START( blstroid ) MCFG_MACHINE_RESET_OVERRIDE(blstroid_state,blstroid) - MCFG_ATARI_EEPROM_2804_ADD("eeprom") + MCFG_EEPROM_2804_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") diff --git a/src/mame/drivers/cyberbal.cpp b/src/mame/drivers/cyberbal.cpp index 3145013d72b..8fd7c144413 100644 --- a/src/mame/drivers/cyberbal.cpp +++ b/src/mame/drivers/cyberbal.cpp @@ -24,6 +24,7 @@ #include "emu.h" #include "includes/cyberbal.h" +#include "machine/eeprompar.h" #include "machine/watchdog.h" #include "sound/volt_reg.h" #include "speaker.h" @@ -128,9 +129,9 @@ WRITE16_MEMBER(cyberbal_state::p2_reset_w) static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, cyberbal_state ) AM_RANGE(0x000000, 0x03ffff) AM_ROM - AM_RANGE(0xfc0000, 0xfc0fff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) + AM_RANGE(0xfc0000, 0xfc0fff) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) AM_RANGE(0xfc8000, 0xfcffff) AM_DEVREAD8("soundcomm", atari_sound_comm_device, main_response_r, 0xff00) - AM_RANGE(0xfd0000, 0xfd1fff) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0xfd0000, 0xfd1fff) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0xfd2000, 0xfd3fff) AM_DEVWRITE("soundcomm", atari_sound_comm_device, sound_reset_w) AM_RANGE(0xfd4000, 0xfd5fff) AM_DEVWRITE("watchdog", watchdog_timer_device, reset16_w) AM_RANGE(0xfd6000, 0xfd7fff) AM_WRITE(p2_reset_w) @@ -232,9 +233,9 @@ static ADDRESS_MAP_START( cyberbal2p_map, AS_PROGRAM, 16, cyberbal_state ) AM_RANGE(0xfc2000, 0xfc2003) AM_READ_PORT("IN1") AM_RANGE(0xfc4000, 0xfc4003) AM_READ_PORT("IN2") AM_RANGE(0xfc6000, 0xfc6003) AM_DEVREAD8("jsa", atari_jsa_ii_device, main_response_r, 0xff00) - AM_RANGE(0xfc8000, 0xfc8fff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) + AM_RANGE(0xfc8000, 0xfc8fff) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) AM_RANGE(0xfca000, 0xfcafff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") - AM_RANGE(0xfd0000, 0xfd0003) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0xfd0000, 0xfd0003) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0xfd2000, 0xfd2003) AM_DEVWRITE("jsa", atari_jsa_ii_device, sound_reset_w) AM_RANGE(0xfd4000, 0xfd4003) AM_DEVWRITE("watchdog", watchdog_timer_device, reset16_w) AM_RANGE(0xfd6000, 0xfd6003) AM_WRITE(video_int_ack_w) @@ -417,7 +418,8 @@ static MACHINE_CONFIG_START( cyberbal ) MCFG_MACHINE_START_OVERRIDE(cyberbal_state,cyberbal) MCFG_MACHINE_RESET_OVERRIDE(cyberbal_state,cyberbal) - MCFG_ATARI_EEPROM_2804_ADD("eeprom") + MCFG_EEPROM_2804_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") @@ -476,7 +478,8 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( cyberbalt, cyberbal ) MCFG_DEVICE_REMOVE("eeprom") - MCFG_ATARI_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_SLAPSTIC_ADD("slapstic", 116) MACHINE_CONFIG_END @@ -492,7 +495,8 @@ static MACHINE_CONFIG_START( cyberbal2p ) MCFG_MACHINE_START_OVERRIDE(cyberbal_state,cyberbal2p) MCFG_MACHINE_RESET_OVERRIDE(cyberbal_state,cyberbal2p) - MCFG_ATARI_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") @@ -587,7 +591,7 @@ ROM_START( cyberbal ) ROM_LOAD( "gal16v8-136064-1029.d58", 0x0600, 0x0117, CRC(fd39d238) SHA1(55c1b9a56c9b2bfa434eed54f7baea436ea141b8) ) ROM_LOAD( "gal16v8-136064-1030.d91", 0x0800, 0x0117, CRC(84102588) SHA1(b6bffb47e5975c96b056d07357eb020caf3f0a0a) ) - ROM_REGION( 0x200, "eeprom:eeprom", 0 ) + ROM_REGION( 0x200, "eeprom", 0 ) ROM_LOAD( "cyberbal-eeprom.bin", 0x0000, 0x200, CRC(c6f256b2) SHA1(e0c62adcd9fd38e9d3ac60e6b08d468e04a350c6) ) ROM_END @@ -640,7 +644,7 @@ ROM_START( cyberbal2 ) ROM_LOAD( "136064-1121.15n", 0x000000, 0x010000, CRC(0ca1e3b3) SHA1(d934bc9a1def4404fb86175878404cbb18127a11) ) ROM_LOAD( "136064-1122.16n", 0x010000, 0x010000, CRC(882f4e1c) SHA1(f7517ff03502ff029fb375260a35e45414567433) ) - ROM_REGION( 0x200, "eeprom:eeprom", 0 ) + ROM_REGION( 0x200, "eeprom", 0 ) ROM_LOAD( "cyberbal-eeprom.bin", 0x0000, 0x200, CRC(c6f256b2) SHA1(e0c62adcd9fd38e9d3ac60e6b08d468e04a350c6) ) ROM_END @@ -693,7 +697,7 @@ ROM_START( cyberbalp ) ROM_LOAD( "136064-1121.15n", 0x000000, 0x010000, CRC(0ca1e3b3) SHA1(d934bc9a1def4404fb86175878404cbb18127a11) ) ROM_LOAD( "136064-1122.16n", 0x010000, 0x010000, CRC(882f4e1c) SHA1(f7517ff03502ff029fb375260a35e45414567433) ) - ROM_REGION( 0x200, "eeprom:eeprom", 0 ) + ROM_REGION( 0x200, "eeprom", 0 ) ROM_LOAD( "cyberbal-eeprom.bin", 0x0000, 0x200, CRC(c6f256b2) SHA1(e0c62adcd9fd38e9d3ac60e6b08d468e04a350c6) ) ROM_END @@ -742,7 +746,7 @@ ROM_START( cyberbal2p ) ROM_LOAD( "136071-1045.7e", 0x020000, 0x010000, CRC(f82558b9) SHA1(afbecccc6203db9bdcf60638e0f4e95040d7aaf2) ) ROM_LOAD( "136071-1046.7d", 0x030000, 0x010000, CRC(d96437ad) SHA1(b0b5cd75de4048e54b9d7d09a75381eb73c22ee1) ) - ROM_REGION( 0x800, "eeprom:eeprom", 0 ) + ROM_REGION( 0x800, "eeprom", 0 ) ROM_LOAD( "cyberbal2p-eeprom.bin", 0x0000, 0x800, CRC(3753f0e2) SHA1(26feab263a4d2d1dfcdf62e1225e0596cc036e1d) ) ROM_END @@ -791,7 +795,7 @@ ROM_START( cyberbal2p3 ) ROM_LOAD( "136071-1045.7e", 0x020000, 0x010000, CRC(f82558b9) SHA1(afbecccc6203db9bdcf60638e0f4e95040d7aaf2) ) ROM_LOAD( "136071-1046.7d", 0x030000, 0x010000, CRC(d96437ad) SHA1(b0b5cd75de4048e54b9d7d09a75381eb73c22ee1) ) - ROM_REGION( 0x800, "eeprom:eeprom", 0 ) + ROM_REGION( 0x800, "eeprom", 0 ) ROM_LOAD( "cyberbal2p-eeprom.bin", 0x0000, 0x800, CRC(3753f0e2) SHA1(26feab263a4d2d1dfcdf62e1225e0596cc036e1d) ) ROM_END @@ -840,7 +844,7 @@ ROM_START( cyberbal2p2 ) ROM_LOAD( "136071-1045.7e", 0x020000, 0x010000, CRC(f82558b9) SHA1(afbecccc6203db9bdcf60638e0f4e95040d7aaf2) ) ROM_LOAD( "136071-1046.7d", 0x030000, 0x010000, CRC(d96437ad) SHA1(b0b5cd75de4048e54b9d7d09a75381eb73c22ee1) ) - ROM_REGION( 0x800, "eeprom:eeprom", 0 ) + ROM_REGION( 0x800, "eeprom", 0 ) ROM_LOAD( "cyberbal2p-eeprom.bin", 0x0000, 0x800, CRC(3753f0e2) SHA1(26feab263a4d2d1dfcdf62e1225e0596cc036e1d) ) ROM_END @@ -889,7 +893,7 @@ ROM_START( cyberbal2p1 ) ROM_LOAD( "136071-1045.7e", 0x020000, 0x010000, CRC(f82558b9) SHA1(afbecccc6203db9bdcf60638e0f4e95040d7aaf2) ) ROM_LOAD( "136071-1046.7d", 0x030000, 0x010000, CRC(d96437ad) SHA1(b0b5cd75de4048e54b9d7d09a75381eb73c22ee1) ) - ROM_REGION( 0x800, "eeprom:eeprom", 0 ) + ROM_REGION( 0x800, "eeprom", 0 ) ROM_LOAD( "cyberbal2p-eeprom.bin", 0x0000, 0x800, CRC(3753f0e2) SHA1(26feab263a4d2d1dfcdf62e1225e0596cc036e1d) ) ROM_END @@ -940,7 +944,7 @@ ROM_START( cyberbalt ) ROM_LOAD( "136073-1005.15n", 0x000000, 0x010000, CRC(833b4768) SHA1(754f00089d439fb0aa1f650c1fef73cf7e5f33a1) ) ROM_LOAD( "136073-1006.16n", 0x010000, 0x010000, CRC(4976cffd) SHA1(4cac8d9bd30743da6e6e4f013e6101ebc27060b6) ) - ROM_REGION( 0x800, "eeprom:eeprom", 0 ) + ROM_REGION( 0x800, "eeprom", 0 ) ROM_LOAD( "cyberbalt-eeprom.bin", 0x0000, 0x800, CRC(0743c0a6) SHA1(0b7421484f640b528e96aed103775e81bbb60f62) ) ROM_END @@ -991,7 +995,7 @@ ROM_START( cyberbalt1 ) ROM_LOAD( "136073-1005.15n", 0x000000, 0x010000, CRC(833b4768) SHA1(754f00089d439fb0aa1f650c1fef73cf7e5f33a1) ) ROM_LOAD( "136073-1006.16n", 0x010000, 0x010000, CRC(4976cffd) SHA1(4cac8d9bd30743da6e6e4f013e6101ebc27060b6) ) - ROM_REGION( 0x800, "eeprom:eeprom", 0 ) + ROM_REGION( 0x800, "eeprom", 0 ) ROM_LOAD( "cyberbalt-eeprom.bin", 0x0000, 0x800, CRC(0743c0a6) SHA1(0b7421484f640b528e96aed103775e81bbb60f62) ) ROM_END diff --git a/src/mame/drivers/eprom.cpp b/src/mame/drivers/eprom.cpp index 9e647a6e4bb..5a68af1b488 100644 --- a/src/mame/drivers/eprom.cpp +++ b/src/mame/drivers/eprom.cpp @@ -28,6 +28,7 @@ #include "emu.h" #include "includes/eprom.h" #include "cpu/m68000/m68000.h" +#include "machine/eeprompar.h" #include "machine/watchdog.h" #include "screen.h" #include "speaker.h" @@ -147,10 +148,10 @@ WRITE16_MEMBER(eprom_state::sync_w) static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, eprom_state ) AM_RANGE(0x000000, 0x09ffff) AM_ROM - AM_RANGE(0x0e0000, 0x0e0fff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) + AM_RANGE(0x0e0000, 0x0e0fff) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) AM_RANGE(0x16cc00, 0x16cc01) AM_READWRITE(sync_r, sync_w) AM_RANGE(0x160000, 0x16ffff) AM_RAM AM_SHARE("share1") - AM_RANGE(0x1f0000, 0x1fffff) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0x1f0000, 0x1fffff) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0x260000, 0x26000f) AM_READ_PORT("260000") AM_RANGE(0x260010, 0x26001f) AM_READ(special_port1_r) AM_RANGE(0x260020, 0x26002f) AM_READ(adc_r) @@ -172,10 +173,10 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( guts_map, AS_PROGRAM, 16, eprom_state ) AM_RANGE(0x000000, 0x09ffff) AM_ROM - AM_RANGE(0x0e0000, 0x0e0fff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) + AM_RANGE(0x0e0000, 0x0e0fff) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) AM_RANGE(0x16cc00, 0x16cc01) AM_READWRITE(sync_r, sync_w) AM_RANGE(0x160000, 0x16ffff) AM_RAM AM_SHARE("share1") - AM_RANGE(0x1f0000, 0x1fffff) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0x1f0000, 0x1fffff) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0x260000, 0x26000f) AM_READ_PORT("260000") AM_RANGE(0x260010, 0x26001f) AM_READ(special_port1_r) AM_RANGE(0x260020, 0x26002f) AM_READ(adc_r) @@ -401,7 +402,8 @@ static MACHINE_CONFIG_START( eprom ) MCFG_MACHINE_START_OVERRIDE(eprom_state,eprom) MCFG_MACHINE_RESET_OVERRIDE(eprom_state,eprom) - MCFG_ATARI_EEPROM_2804_ADD("eeprom") + MCFG_EEPROM_2804_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") @@ -446,7 +448,8 @@ static MACHINE_CONFIG_START( klaxp ) MCFG_MACHINE_START_OVERRIDE(eprom_state,eprom) MCFG_MACHINE_RESET_OVERRIDE(eprom_state,eprom) - MCFG_ATARI_EEPROM_2804_ADD("eeprom") + MCFG_EEPROM_2804_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") @@ -490,7 +493,8 @@ static MACHINE_CONFIG_START( guts ) MCFG_MACHINE_START_OVERRIDE(eprom_state,eprom) MCFG_MACHINE_RESET_OVERRIDE(eprom_state,eprom) - MCFG_ATARI_EEPROM_2804_ADD("eeprom") + MCFG_EEPROM_2804_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") diff --git a/src/mame/drivers/gauntlet.cpp b/src/mame/drivers/gauntlet.cpp index 781e50ce6ee..5f9c3d843b8 100644 --- a/src/mame/drivers/gauntlet.cpp +++ b/src/mame/drivers/gauntlet.cpp @@ -124,6 +124,7 @@ #include "includes/gauntlet.h" #include "cpu/m68000/m68000.h" #include "cpu/m6502/m6502.h" +#include "machine/eeprompar.h" #include "machine/watchdog.h" #include "sound/tms5220.h" #include "sound/ym2151.h" @@ -279,7 +280,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, gauntlet_state ) /* MBUS */ AM_RANGE(0x800000, 0x801fff) AM_MIRROR(0x2fc000) AM_RAM - AM_RANGE(0x802000, 0x802fff) AM_MIRROR(0x2fc000) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) + AM_RANGE(0x802000, 0x802fff) AM_MIRROR(0x2fc000) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) AM_RANGE(0x803000, 0x803001) AM_MIRROR(0x2fcef0) AM_READ_PORT("803000") AM_RANGE(0x803002, 0x803003) AM_MIRROR(0x2fcef0) AM_READ_PORT("803002") AM_RANGE(0x803004, 0x803005) AM_MIRROR(0x2fcef0) AM_READ_PORT("803004") @@ -289,7 +290,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, gauntlet_state ) AM_RANGE(0x803100, 0x803101) AM_MIRROR(0x2fce8e) AM_DEVWRITE("watchdog", watchdog_timer_device, reset16_w) AM_RANGE(0x803120, 0x803121) AM_MIRROR(0x2fce8e) AM_DEVWRITE("soundcomm", atari_sound_comm_device, sound_reset_w) AM_RANGE(0x803140, 0x803141) AM_MIRROR(0x2fce8e) AM_WRITE(video_int_ack_w) - AM_RANGE(0x803150, 0x803151) AM_MIRROR(0x2fce8e) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0x803150, 0x803151) AM_MIRROR(0x2fce8e) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0x803170, 0x803171) AM_MIRROR(0x2fce8e) AM_DEVWRITE8("soundcomm", atari_sound_comm_device, main_command_w, 0x00ff) /* VBUS */ @@ -498,7 +499,8 @@ static MACHINE_CONFIG_START( gauntlet_base ) MCFG_MACHINE_START_OVERRIDE(gauntlet_state,gauntlet) MCFG_MACHINE_RESET_OVERRIDE(gauntlet_state,gauntlet) - MCFG_ATARI_EEPROM_2804_ADD("eeprom") + MCFG_EEPROM_2804_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") diff --git a/src/mame/drivers/klax.cpp b/src/mame/drivers/klax.cpp index 7446c8b27f3..c4c5665641a 100644 --- a/src/mame/drivers/klax.cpp +++ b/src/mame/drivers/klax.cpp @@ -24,6 +24,7 @@ #include "cpu/m68000/m68000.h" #include "cpu/z80/z80.h" +#include "machine/eeprompar.h" #include "machine/watchdog.h" #include "sound/okim6295.h" #include "sound/msm5205.h" @@ -80,8 +81,8 @@ MACHINE_RESET_MEMBER(klax_state,klax) static ADDRESS_MAP_START( klax_map, AS_PROGRAM, 16, klax_state ) AM_RANGE(0x000000, 0x03ffff) AM_ROM - AM_RANGE(0x0e0000, 0x0e0fff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) - AM_RANGE(0x1f0000, 0x1fffff) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0x0e0000, 0x0e0fff) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) + AM_RANGE(0x1f0000, 0x1fffff) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0x260000, 0x260001) AM_READ_PORT("P1") AM_WRITE(klax_latch_w) AM_RANGE(0x260002, 0x260003) AM_READ_PORT("P2") AM_RANGE(0x270000, 0x270001) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) @@ -97,8 +98,8 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( klax2bl_map, AS_PROGRAM, 16, klax_state ) AM_RANGE(0x000000, 0x03ffff) AM_ROM - AM_RANGE(0x0e0000, 0x0e0fff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) - AM_RANGE(0x1f0000, 0x1fffff) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0x0e0000, 0x0e0fff) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) + AM_RANGE(0x1f0000, 0x1fffff) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0x260000, 0x260001) AM_READ_PORT("P1") AM_WRITE(klax_latch_w) AM_RANGE(0x260002, 0x260003) AM_READ_PORT("P2") // AM_RANGE(0x270000, 0x270001) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) // no OKI here @@ -199,7 +200,8 @@ static MACHINE_CONFIG_START( klax ) MCFG_MACHINE_RESET_OVERRIDE(klax_state,klax) - MCFG_ATARI_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") diff --git a/src/mame/drivers/mastboy.cpp b/src/mame/drivers/mastboy.cpp index dccdd914f9c..14927ca30f2 100644 --- a/src/mame/drivers/mastboy.cpp +++ b/src/mame/drivers/mastboy.cpp @@ -11,6 +11,8 @@ Notes: Why does RAM-M fail on first boot, Charles mentioned it can (randomly?) fail on real HW too, is it buggy code? + The EAROM (28C16 parallel EEPROM) takes a long time to write out if RAM-M fails internal testing. + Are the correct/incorrect samples when you answer a question meant to loop as they do? Video timing should be hooked up with MAME's new video timing system @@ -18,8 +20,6 @@ having a different internal program, or is it just a (bad) hack? This Can be converted to tilemaps very easily, but probably not worth it - - EEPROM enable / disable needs figuring out properly */ /* @@ -475,16 +475,12 @@ public: uint8_t* m_vram; uint8_t m_bank; int m_irq0_ack; - int m_earom_enabled; int m_m5205_next; int m_m5205_part; DECLARE_READ8_MEMBER(banked_ram_r); DECLARE_WRITE8_MEMBER(banked_ram_w); DECLARE_WRITE8_MEMBER(bank_w); - DECLARE_READ8_MEMBER(earom_r); - DECLARE_WRITE8_MEMBER(earom_w); - DECLARE_WRITE_LINE_MEMBER(earom_enable_w); DECLARE_WRITE8_MEMBER(msm5205_data_w); DECLARE_WRITE_LINE_MEMBER(irq0_ack_w); DECLARE_READ8_MEMBER(port_38_read); @@ -626,32 +622,6 @@ WRITE8_MEMBER(mastboy_state::bank_w) m_bank = data; } -// EAROM (28C16 parallel EEPROM) access - -READ8_MEMBER(mastboy_state::earom_r) -{ - return m_earom->read(space, offset); -} - -WRITE8_MEMBER(mastboy_state::earom_w) -{ -// if (m_earom_enabled) -// { - m_earom->write(space, offset, data); -// } -// else -// { -// logerror("Write to EAROM when disabled! %04x, %02x\n", offset,data); -// } -} - -WRITE_LINE_MEMBER(mastboy_state::earom_enable_w) -{ - /* This is some kind of enable / disable control for backup memory (see Charles's notes) but I'm not - sure how it works in practice, if we use it then it writes a lot of data with it disabled */ - m_earom_enabled = state; -} - /* MSM5205 Related */ WRITE8_MEMBER(mastboy_state::msm5205_data_w) @@ -699,7 +669,7 @@ static ADDRESS_MAP_START( mastboy_map, AS_PROGRAM, 8, mastboy_state ) AM_RANGE(0xc000, 0xffff) AM_READWRITE(banked_ram_r,banked_ram_w) // mastboy bank area read / write - AM_RANGE(0xff000, 0xff7ff) AM_READWRITE(earom_r, earom_w) + AM_RANGE(0xff000, 0xff7ff) AM_DEVREADWRITE("earom", eeprom_parallel_28xx_device, read, write) AM_RANGE(0xff800, 0xff807) AM_READ_PORT("P1") AM_RANGE(0xff808, 0xff80f) AM_READ_PORT("P2") @@ -855,7 +825,6 @@ void mastboy_state::machine_start() save_item(NAME(m_bank)); save_item(NAME(m_irq0_ack)); - save_item(NAME(m_earom_enabled)); save_item(NAME(m_m5205_next)); save_item(NAME(m_m5205_part)); } @@ -884,7 +853,7 @@ static MACHINE_CONFIG_START( mastboy ) MCFG_ADDRESSABLE_LATCH_Q1_OUT_CB(DEVWRITELINE("msm", msm5205_device, s2_w)) MCFG_ADDRESSABLE_LATCH_Q2_OUT_CB(DEVWRITELINE("msm", msm5205_device, s1_w)) MCFG_ADDRESSABLE_LATCH_Q3_OUT_CB(DEVWRITELINE("msm", msm5205_device, reset_w)) - MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(WRITELINE(mastboy_state, earom_enable_w)) + MCFG_ADDRESSABLE_LATCH_Q4_OUT_CB(DEVWRITELINE("earom", eeprom_parallel_28xx_device, oe_w)) /* video hardware */ MCFG_SCREEN_ADD("screen", RASTER) diff --git a/src/mame/drivers/offtwall.cpp b/src/mame/drivers/offtwall.cpp index b6bef7c63df..40ee2b27cd0 100644 --- a/src/mame/drivers/offtwall.cpp +++ b/src/mame/drivers/offtwall.cpp @@ -23,6 +23,7 @@ #include "includes/offtwall.h" #include "cpu/m68000/m68000.h" +#include "machine/eeprompar.h" #include "machine/watchdog.h" #include "speaker.h" @@ -237,7 +238,7 @@ READ16_MEMBER(offtwall_state::unknown_verify_r) static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, offtwall_state ) AM_RANGE(0x000000, 0x037fff) AM_ROM AM_RANGE(0x038000, 0x03ffff) AM_READ(bankrom_r) AM_REGION("maincpu", 0x38000) AM_SHARE("bankrom_base") - AM_RANGE(0x120000, 0x120fff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) + AM_RANGE(0x120000, 0x120fff) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) AM_RANGE(0x260000, 0x260001) AM_READ_PORT("260000") AM_RANGE(0x260002, 0x260003) AM_READ_PORT("260002") AM_RANGE(0x260010, 0x260011) AM_READ_PORT("260010") @@ -248,7 +249,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, offtwall_state ) AM_RANGE(0x260030, 0x260031) AM_DEVREAD8("jsa", atari_jsa_iii_device, main_response_r, 0x00ff) AM_RANGE(0x260040, 0x260041) AM_DEVWRITE8("jsa", atari_jsa_iii_device, main_command_w, 0x00ff) AM_RANGE(0x260050, 0x260051) AM_WRITE(io_latch_w) - AM_RANGE(0x260060, 0x260061) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0x260060, 0x260061) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0x2a0000, 0x2a0001) AM_DEVWRITE("watchdog", watchdog_timer_device, reset16_w) AM_RANGE(0x3e0000, 0x3e0fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") AM_RANGE(0x3effc0, 0x3effff) AM_DEVREADWRITE("vad", atari_vad_device, control_read, control_write) @@ -368,7 +369,8 @@ static MACHINE_CONFIG_START( offtwall ) MCFG_MACHINE_RESET_OVERRIDE(offtwall_state,offtwall) - MCFG_ATARI_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") @@ -424,7 +426,7 @@ ROM_START( offtwall ) ROM_LOAD( "136090-1017.18p", 0x080000, 0x20000, CRC(7f7f8012) SHA1(1123ea3c6cd2c73617a87d6a5bbb26fca8941af3) ) ROM_LOAD( "136090-1019.18m", 0x0a0000, 0x20000, CRC(9efe511b) SHA1(db1f1d8792bf497bc9ad652b0b7d78c3abf0e817) ) - ROM_REGION( 0x800, "eeprom:eeprom", 0 ) + ROM_REGION( 0x800, "eeprom", 0 ) ROM_LOAD( "offtwall-eeprom.17l", 0x0000, 0x800, CRC(5eaf2d5b) SHA1(934a76a23960e6ed2cc33c359f9735caee762145) ) ROM_REGION(0x022f, "jsa:plds", 0) @@ -457,7 +459,7 @@ ROM_START( offtwallc ) ROM_LOAD( "090-1617.rom", 0x080000, 0x20000, CRC(15208a89) SHA1(124484ab54959a1e6d9022a4f3ee4288a79c768b) ) ROM_LOAD( "090-1619.rom", 0x0a0000, 0x20000, CRC(8a5d79b3) SHA1(0a202d20e6c86989ce2223e10eadf9009dd6ca8e) ) - ROM_REGION( 0x800, "eeprom:eeprom", 0 ) + ROM_REGION( 0x800, "eeprom", 0 ) ROM_LOAD( "offtwall-eeprom.17l", 0x0000, 0x800, CRC(5eaf2d5b) SHA1(934a76a23960e6ed2cc33c359f9735caee762145) ) ROM_END diff --git a/src/mame/drivers/rampart.cpp b/src/mame/drivers/rampart.cpp index e77fbbfb7d9..dfd97239377 100644 --- a/src/mame/drivers/rampart.cpp +++ b/src/mame/drivers/rampart.cpp @@ -28,6 +28,7 @@ #include "includes/rampart.h" #include "cpu/m68000/m68000.h" +#include "machine/eeprompar.h" #include "machine/watchdog.h" #include "sound/okim6295.h" #include "sound/ym2413.h" @@ -139,8 +140,8 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, rampart_state ) AM_RANGE(0x3e3f80, 0x3effff) AM_MIRROR(0x010000) AM_RAM AM_RANGE(0x460000, 0x460001) AM_MIRROR(0x019ffe) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0xff00) AM_RANGE(0x480000, 0x480003) AM_MIRROR(0x019ffc) AM_DEVWRITE8("ymsnd", ym2413_device, write, 0xff00) - AM_RANGE(0x500000, 0x500fff) AM_MIRROR(0x019000) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) - AM_RANGE(0x5a6000, 0x5a6001) AM_MIRROR(0x019ffe) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0x500000, 0x500fff) AM_MIRROR(0x019000) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) + AM_RANGE(0x5a6000, 0x5a6001) AM_MIRROR(0x019ffe) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0x640000, 0x640001) AM_MIRROR(0x019ffe) AM_WRITE(latch_w) AM_RANGE(0x640000, 0x640001) AM_MIRROR(0x019ffc) AM_READ_PORT("IN0") AM_RANGE(0x640002, 0x640003) AM_MIRROR(0x019ffc) AM_READ_PORT("IN1") @@ -346,7 +347,8 @@ static MACHINE_CONFIG_START( rampart ) MCFG_MACHINE_RESET_OVERRIDE(rampart_state,rampart) - MCFG_ATARI_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") MCFG_WATCHDOG_VBLANK_INIT("screen", 8) @@ -402,7 +404,7 @@ ROM_START( rampart ) ROM_LOAD( "136082-1007.2d", 0x00000, 0x20000, CRC(c96a0fc3) SHA1(6e7e242d0afa4714ca31d77ccbf8ee487bbdb1e4) ) ROM_LOAD( "136082-1008.1d", 0x20000, 0x20000, CRC(518218d9) SHA1(edf1b11579dcfa9a872fa4bd866dc2f95fac767d) ) - ROM_REGION( 0x800, "eeprom:eeprom", 0 ) + ROM_REGION( 0x800, "eeprom", 0 ) ROM_LOAD( "rampart-eeprom.bin", 0x0000, 0x800, CRC(0be57615) SHA1(bd1f9eef410c78c091d2c925d6275427c77c7ecd) ) ROM_REGION( 0x0c00, "plds", 0 ) @@ -429,7 +431,7 @@ ROM_START( rampart2p ) ROM_LOAD( "136082-1007.2d", 0x00000, 0x20000, CRC(c96a0fc3) SHA1(6e7e242d0afa4714ca31d77ccbf8ee487bbdb1e4) ) ROM_LOAD( "136082-1008.1d", 0x20000, 0x20000, CRC(518218d9) SHA1(edf1b11579dcfa9a872fa4bd866dc2f95fac767d) ) - ROM_REGION( 0x800, "eeprom:eeprom", 0 ) + ROM_REGION( 0x800, "eeprom", 0 ) ROM_LOAD( "rampart-eeprom.bin", 0x0000, 0x800, CRC(0be57615) SHA1(bd1f9eef410c78c091d2c925d6275427c77c7ecd) ) ROM_REGION( 0x0c00, "plds", 0 ) @@ -460,7 +462,7 @@ ROM_START( rampartj ) ROM_LOAD( "136082-1007.2d", 0x00000, 0x20000, CRC(c96a0fc3) SHA1(6e7e242d0afa4714ca31d77ccbf8ee487bbdb1e4) ) ROM_LOAD( "136082-1008.1d", 0x20000, 0x20000, CRC(518218d9) SHA1(edf1b11579dcfa9a872fa4bd866dc2f95fac767d) ) - ROM_REGION( 0x800, "eeprom:eeprom", 0 ) + ROM_REGION( 0x800, "eeprom", 0 ) ROM_LOAD( "rampartj-eeprom.bin", 0x0000, 0x800, CRC(096cacdc) SHA1(48328a27ce1975a27d9a83ae05d068cee7556a90) ) ROM_REGION( 0x0c00, "plds", 0 ) diff --git a/src/mame/drivers/relief.cpp b/src/mame/drivers/relief.cpp index 83d6e7c94cd..25f569d2017 100644 --- a/src/mame/drivers/relief.cpp +++ b/src/mame/drivers/relief.cpp @@ -23,8 +23,8 @@ #include "includes/relief.h" #include "cpu/m68000/m68000.h" +#include "machine/eeprompar.h" #include "machine/watchdog.h" -#include "machine/atarigen.h" #include "sound/okim6295.h" #include "sound/ym2413.h" #include "speaker.h" @@ -127,8 +127,8 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, relief_state ) AM_RANGE(0x140010, 0x140011) AM_DEVREADWRITE8("oki", okim6295_device, read, write, 0x00ff) AM_RANGE(0x140020, 0x140021) AM_WRITE(audio_volume_w) AM_RANGE(0x140030, 0x140031) AM_WRITE(audio_control_w) - AM_RANGE(0x180000, 0x180fff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0xff00) - AM_RANGE(0x1c0030, 0x1c0031) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0x180000, 0x180fff) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0xff00) + AM_RANGE(0x1c0030, 0x1c0031) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0x260000, 0x260001) AM_READ_PORT("260000") AM_RANGE(0x260002, 0x260003) AM_READ_PORT("260002") AM_RANGE(0x260010, 0x260011) AM_READ(special_port2_r) @@ -275,7 +275,8 @@ static MACHINE_CONFIG_START( relief ) MCFG_MACHINE_RESET_OVERRIDE(relief_state,relief) - MCFG_ATARI_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") @@ -338,7 +339,7 @@ ROM_START( relief ) ROM_LOAD( "136093-0030a.9b", 0x000000, 0x80000, CRC(f4c567f5) SHA1(7e8c1d54d918b0b41625eacbaf6dcb5bd99d1949) ) ROM_LOAD( "136093-0031a.10b", 0x080000, 0x80000, CRC(ba908d73) SHA1(a83afd86f4c39394cf624b728a87b8d8b6de1944) ) - ROM_REGION( 0x800, "eeprom:eeprom", 0 ) + ROM_REGION( 0x800, "eeprom", 0 ) ROM_LOAD( "relief-eeprom.bin", 0x0000, 0x800, CRC(66069f60) SHA1(fac3797888f7ffe972f642aca44c6ca7d208c814) ) ROM_REGION( 0x001000, "plds", 0 ) @@ -373,7 +374,7 @@ ROM_START( relief2 ) ROM_LOAD( "136093-0030a.9b", 0x000000, 0x80000, CRC(f4c567f5) SHA1(7e8c1d54d918b0b41625eacbaf6dcb5bd99d1949) ) ROM_LOAD( "136093-0031a.10b", 0x080000, 0x80000, CRC(ba908d73) SHA1(a83afd86f4c39394cf624b728a87b8d8b6de1944) ) - ROM_REGION( 0x800, "eeprom:eeprom", 0 ) + ROM_REGION( 0x800, "eeprom", 0 ) ROM_LOAD( "relief2-eeprom.bin", 0x0000, 0x800, CRC(2131fc40) SHA1(72a9f5f6647fbc74e645b6639db2fdbfbe6456e2) ) ROM_REGION( 0x001000, "plds", 0 ) @@ -407,7 +408,7 @@ ROM_START( relief3 ) ROM_LOAD( "136093-0030a.9b", 0x000000, 0x80000, CRC(f4c567f5) SHA1(7e8c1d54d918b0b41625eacbaf6dcb5bd99d1949) ) ROM_LOAD( "136093-0031a.10b", 0x080000, 0x80000, CRC(ba908d73) SHA1(a83afd86f4c39394cf624b728a87b8d8b6de1944) ) - ROM_REGION( 0x800, "eeprom:eeprom", 0 ) + ROM_REGION( 0x800, "eeprom", 0 ) ROM_LOAD( "relief3-eeprom.bin", 0x0000, 0x800, CRC(2131fc40) SHA1(72a9f5f6647fbc74e645b6639db2fdbfbe6456e2) ) ROM_REGION( 0x001000, "plds", 0 ) diff --git a/src/mame/drivers/shuuz.cpp b/src/mame/drivers/shuuz.cpp index dca4dcd5c6d..07e150c8baa 100644 --- a/src/mame/drivers/shuuz.cpp +++ b/src/mame/drivers/shuuz.cpp @@ -23,6 +23,7 @@ #include "includes/shuuz.h" #include "cpu/m68000/m68000.h" +#include "machine/eeprompar.h" #include "machine/watchdog.h" #include "sound/okim6295.h" #include "speaker.h" @@ -111,8 +112,8 @@ READ16_MEMBER(shuuz_state::special_port0_r) static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, shuuz_state ) AM_RANGE(0x000000, 0x03ffff) AM_ROM - AM_RANGE(0x100000, 0x100fff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) - AM_RANGE(0x101000, 0x101fff) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0x100000, 0x100fff) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) + AM_RANGE(0x101000, 0x101fff) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0x102000, 0x102001) AM_DEVWRITE("watchdog", watchdog_timer_device, reset16_w) AM_RANGE(0x103000, 0x103003) AM_READ(leta_r) AM_RANGE(0x105000, 0x105001) AM_READWRITE(special_port0_r, latch_w) @@ -236,7 +237,8 @@ static MACHINE_CONFIG_START( shuuz ) MCFG_CPU_ADD("maincpu", M68000, ATARI_CLOCK_14MHz/2) MCFG_CPU_PROGRAM_MAP(main_map) - MCFG_ATARI_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") diff --git a/src/mame/drivers/skullxbo.cpp b/src/mame/drivers/skullxbo.cpp index 227ced02bd7..39924160154 100644 --- a/src/mame/drivers/skullxbo.cpp +++ b/src/mame/drivers/skullxbo.cpp @@ -23,6 +23,7 @@ #include "includes/skullxbo.h" #include "cpu/m68000/m68000.h" +#include "machine/eeprompar.h" #include "machine/watchdog.h" #include "speaker.h" @@ -102,7 +103,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, skullxbo_state ) AM_RANGE(0x000000, 0x07ffff) AM_ROM AM_RANGE(0xff0000, 0xff07ff) AM_WRITE(skullxbo_mobmsb_w) AM_RANGE(0xff0800, 0xff0bff) AM_WRITE(skullxbo_halt_until_hblank_0_w) - AM_RANGE(0xff0c00, 0xff0fff) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0xff0c00, 0xff0fff) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0xff1000, 0xff13ff) AM_WRITE(video_int_ack_w) AM_RANGE(0xff1400, 0xff17ff) AM_DEVWRITE8("jsa", atari_jsa_ii_device, main_command_w, 0x00ff) AM_RANGE(0xff1800, 0xff1bff) AM_DEVWRITE("jsa", atari_jsa_ii_device, sound_reset_w) @@ -120,7 +121,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, skullxbo_state ) AM_RANGE(0xff5000, 0xff5001) AM_DEVREAD8("jsa", atari_jsa_ii_device, main_response_r, 0x00ff) AM_RANGE(0xff5800, 0xff5801) AM_READ_PORT("FF5800") AM_RANGE(0xff5802, 0xff5803) AM_READ_PORT("FF5802") - AM_RANGE(0xff6000, 0xff6fff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) + AM_RANGE(0xff6000, 0xff6fff) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) AM_RANGE(0xff8000, 0xff9fff) AM_RAM_WRITE(playfield_latched_w) AM_SHARE("playfield") AM_RANGE(0xffa000, 0xffbfff) AM_RAM_DEVWRITE("playfield", tilemap_device, write_ext) AM_SHARE("playfield_ext") AM_RANGE(0xffc000, 0xffcf7f) AM_RAM_DEVWRITE("alpha", tilemap_device, write) AM_SHARE("alpha") @@ -234,7 +235,8 @@ static MACHINE_CONFIG_START( skullxbo ) MCFG_TIMER_DRIVER_ADD("scan_timer", skullxbo_state, scanline_timer) MCFG_MACHINE_RESET_OVERRIDE(skullxbo_state,skullxbo) - MCFG_ATARI_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") diff --git a/src/mame/drivers/thunderj.cpp b/src/mame/drivers/thunderj.cpp index 6e65c10fa94..af5da94b790 100644 --- a/src/mame/drivers/thunderj.cpp +++ b/src/mame/drivers/thunderj.cpp @@ -39,8 +39,8 @@ #include "emu.h" #include "includes/thunderj.h" #include "cpu/m68000/m68000.h" +#include "machine/eeprompar.h" #include "machine/watchdog.h" -#include "machine/atarigen.h" #include "speaker.h" @@ -118,9 +118,9 @@ WRITE16_MEMBER(thunderj_state::latch_w) static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, thunderj_state ) AM_RANGE(0x000000, 0x09ffff) AM_ROM - AM_RANGE(0x0e0000, 0x0e0fff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) + AM_RANGE(0x0e0000, 0x0e0fff) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) AM_RANGE(0x160000, 0x16ffff) AM_RAM AM_SHARE("share1") - AM_RANGE(0x1f0000, 0x1fffff) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0x1f0000, 0x1fffff) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0x260000, 0x26000f) AM_READ_PORT("260000") AM_RANGE(0x260010, 0x260011) AM_READ_PORT("260010") AM_RANGE(0x260012, 0x260013) AM_READ(special_port2_r) @@ -259,7 +259,8 @@ static MACHINE_CONFIG_START( thunderj ) MCFG_MACHINE_START_OVERRIDE(thunderj_state,thunderj) MCFG_MACHINE_RESET_OVERRIDE(thunderj_state,thunderj) - MCFG_ATARI_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_2816_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") diff --git a/src/mame/drivers/toobin.cpp b/src/mame/drivers/toobin.cpp index cca681eaa97..41a2e70d39e 100644 --- a/src/mame/drivers/toobin.cpp +++ b/src/mame/drivers/toobin.cpp @@ -21,9 +21,10 @@ #include "emu.h" #include "includes/toobin.h" + #include "cpu/m68000/m68000.h" +#include "machine/eeprompar.h" #include "machine/watchdog.h" -#include "machine/atarigen.h" #include "speaker.h" #define MASTER_CLOCK XTAL_32MHz @@ -95,13 +96,13 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, toobin_state ) AM_RANGE(0x828380, 0x828381) AM_MIRROR(0x45003e) AM_RAM_WRITE(slip_w) AM_SHARE("mob:slip") AM_RANGE(0x8283c0, 0x8283c1) AM_MIRROR(0x45003e) AM_WRITE(scanline_int_ack_w) AM_RANGE(0x828400, 0x828401) AM_MIRROR(0x4500fe) AM_DEVWRITE("jsa", atari_jsa_i_device, sound_reset_w) - AM_RANGE(0x828500, 0x828501) AM_MIRROR(0x4500fe) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0x828500, 0x828501) AM_MIRROR(0x4500fe) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0x828600, 0x828601) AM_MIRROR(0x4500fe) AM_WRITE(xscroll_w) AM_SHARE("xscroll") AM_RANGE(0x828700, 0x828701) AM_MIRROR(0x4500fe) AM_WRITE(yscroll_w) AM_SHARE("yscroll") AM_RANGE(0x828800, 0x828801) AM_MIRROR(0x4507fe) AM_READ_PORT("FF8800") AM_RANGE(0x829000, 0x829001) AM_MIRROR(0x4507fe) AM_READ_PORT("FF9000") AM_RANGE(0x829800, 0x829801) AM_MIRROR(0x4507fe) AM_DEVREAD8("jsa", atari_jsa_i_device, main_response_r, 0x00ff) - AM_RANGE(0x82a000, 0x82afff) AM_MIRROR(0x451000) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) + AM_RANGE(0x82a000, 0x82afff) AM_MIRROR(0x451000) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) AM_RANGE(0x82c000, 0x82ffff) AM_MIRROR(0x450000) AM_RAM ADDRESS_MAP_END @@ -203,7 +204,8 @@ static MACHINE_CONFIG_START( toobin ) MCFG_MACHINE_RESET_OVERRIDE(toobin_state,toobin) - MCFG_ATARI_EEPROM_2804_ADD("eeprom") + MCFG_EEPROM_2804_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") MCFG_WATCHDOG_VBLANK_INIT("screen", 8) diff --git a/src/mame/drivers/vindictr.cpp b/src/mame/drivers/vindictr.cpp index b757fe65406..bf9191291ae 100644 --- a/src/mame/drivers/vindictr.cpp +++ b/src/mame/drivers/vindictr.cpp @@ -23,6 +23,7 @@ #include "includes/vindictr.h" #include "cpu/m68000/m68000.h" +#include "machine/eeprompar.h" #include "machine/watchdog.h" #include "speaker.h" @@ -74,8 +75,8 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, vindictr_state ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0x3fffff) AM_RANGE(0x000000, 0x05ffff) AM_ROM - AM_RANGE(0x0e0000, 0x0e0fff) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) - AM_RANGE(0x1f0000, 0x1fffff) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0x0e0000, 0x0e0fff) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) + AM_RANGE(0x1f0000, 0x1fffff) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0x260000, 0x26000f) AM_READ_PORT("260000") AM_RANGE(0x260010, 0x26001f) AM_READ(port1_r) AM_RANGE(0x260020, 0x26002f) AM_READ_PORT("260020") @@ -189,7 +190,8 @@ static MACHINE_CONFIG_START( vindictr ) MCFG_MACHINE_RESET_OVERRIDE(vindictr_state,vindictr) - MCFG_ATARI_EEPROM_2804_ADD("eeprom") + MCFG_EEPROM_2804_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") diff --git a/src/mame/drivers/xybots.cpp b/src/mame/drivers/xybots.cpp index 70b3ce57cf4..971fd419a48 100644 --- a/src/mame/drivers/xybots.cpp +++ b/src/mame/drivers/xybots.cpp @@ -23,8 +23,8 @@ #include "includes/xybots.h" #include "cpu/m68000/m68000.h" +#include "machine/eeprompar.h" #include "machine/watchdog.h" -#include "machine/atarigen.h" #include "speaker.h" @@ -81,11 +81,11 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 16, xybots_state ) AM_RANGE(0x802e00, 0x802fff) AM_MIRROR(0x7f8000) AM_RAM AM_SHARE("mob") AM_RANGE(0x803000, 0x803fff) AM_MIRROR(0x7f8000) AM_RAM_DEVWRITE("playfield", tilemap_device, write) AM_SHARE("playfield") AM_RANGE(0x804000, 0x8047ff) AM_MIRROR(0x7f8800) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette") - AM_RANGE(0x805000, 0x805fff) AM_MIRROR(0x7f8000) AM_DEVREADWRITE8("eeprom", atari_eeprom_device, read, write, 0x00ff) + AM_RANGE(0x805000, 0x805fff) AM_MIRROR(0x7f8000) AM_DEVREADWRITE8("eeprom", eeprom_parallel_28xx_device, read, write, 0x00ff) AM_RANGE(0x806000, 0x8060ff) AM_MIRROR(0x7f8000) AM_DEVREAD8("jsa", atari_jsa_i_device, main_response_r, 0x00ff) AM_RANGE(0x806100, 0x8061ff) AM_MIRROR(0x7f8000) AM_READ_PORT("FFE100") AM_RANGE(0x806200, 0x8062ff) AM_MIRROR(0x7f8000) AM_READ(special_port1_r) - AM_RANGE(0x806800, 0x8068ff) AM_MIRROR(0x7f8000) AM_DEVWRITE("eeprom", atari_eeprom_device, unlock_write) + AM_RANGE(0x806800, 0x8068ff) AM_MIRROR(0x7f8000) AM_DEVWRITE("eeprom", eeprom_parallel_28xx_device, unlock_write) AM_RANGE(0x806900, 0x8069ff) AM_MIRROR(0x7f8000) AM_DEVWRITE8("jsa", atari_jsa_i_device, main_command_w, 0x00ff) AM_RANGE(0x806a00, 0x806aff) AM_MIRROR(0x7f8000) AM_DEVWRITE("watchdog", watchdog_timer_device, reset16_w) AM_RANGE(0x806b00, 0x806bff) AM_MIRROR(0x7f8000) AM_WRITE(video_int_ack_w) @@ -191,7 +191,8 @@ static MACHINE_CONFIG_START( xybots ) MCFG_MACHINE_RESET_OVERRIDE(xybots_state,xybots) - MCFG_ATARI_EEPROM_2804_ADD("eeprom") + MCFG_EEPROM_2804_ADD("eeprom") + MCFG_EEPROM_28XX_LOCK_AFTER_WRITE(true) MCFG_WATCHDOG_ADD("watchdog") diff --git a/src/mame/includes/harddriv.h b/src/mame/includes/harddriv.h index 742726eb690..7f4d2db4970 100644 --- a/src/mame/includes/harddriv.h +++ b/src/mame/includes/harddriv.h @@ -22,6 +22,7 @@ #include "machine/74259.h" #include "machine/asic65.h" +#include "machine/eeprompar.h" #include "machine/mc68681.h" #include "machine/timekpr.h" diff --git a/src/mame/machine/atarigen.cpp b/src/mame/machine/atarigen.cpp index 65b2b5a84b7..9678655a743 100644 --- a/src/mame/machine/atarigen.cpp +++ b/src/mame/machine/atarigen.cpp @@ -814,119 +814,6 @@ void atari_vad_device::eof_update(emu_timer &timer) -//************************************************************************** -// EEPROM INTERFACE DEVICE -//************************************************************************** - -// device type definition -DEFINE_DEVICE_TYPE(ATARI_EEPROM_2804, atari_eeprom_2804_device, "atari2804", "Atari EEPROM Interface (2804)") -DEFINE_DEVICE_TYPE(ATARI_EEPROM_2816, atari_eeprom_2816_device, "atari2816", "Atari EEPROM Interface (2816)") - -//------------------------------------------------- -// atari_eeprom_device - constructor -//------------------------------------------------- - -atari_eeprom_device::atari_eeprom_device(const machine_config &mconfig, device_type devtype, const char *tag, device_t *owner) - : device_t(mconfig, devtype, tag, owner, 0), - m_eeprom(*this, "eeprom"), - m_unlocked(false) -{ -} - - -//------------------------------------------------- -// unlock_read/unlock_write - unlock read/write -// handlers -//------------------------------------------------- - -READ8_MEMBER(atari_eeprom_device::unlock_read) { m_unlocked = true; return space.unmap(); } -WRITE8_MEMBER(atari_eeprom_device::unlock_write) { m_unlocked = true; } -READ16_MEMBER(atari_eeprom_device::unlock_read) { m_unlocked = true; return space.unmap(); } -WRITE16_MEMBER(atari_eeprom_device::unlock_write) { m_unlocked = true; } -READ32_MEMBER(atari_eeprom_device::unlock_read) { m_unlocked = true; return space.unmap(); } -WRITE32_MEMBER(atari_eeprom_device::unlock_write) { m_unlocked = true; } - - -//------------------------------------------------- -// read/write - data read/write handlers -//------------------------------------------------- - -READ8_MEMBER(atari_eeprom_device::read) -{ - return m_eeprom->read(space, offset); -} - -WRITE8_MEMBER(atari_eeprom_device::write) -{ - if (m_unlocked) - m_eeprom->write(space, offset, data, mem_mask); - else - logerror("%s: Attemptedt to write to EEPROM while not unlocked\n", machine().describe_context()); - m_unlocked = false; -} - - -//------------------------------------------------- -// device_start: Start up the device -//------------------------------------------------- - -void atari_eeprom_device::device_start() -{ - // register for save states - save_item(NAME(m_unlocked)); -} - - -//------------------------------------------------- -// device_reset: Handle a device reset by -// clearing the interrupt lines and states -//------------------------------------------------- - -void atari_eeprom_device::device_reset() -{ - // reset unlocked state - m_unlocked = false; -} - - -//------------------------------------------------- -// atari_eeprom_2804_device - constructor -//------------------------------------------------- - -atari_eeprom_2804_device::atari_eeprom_2804_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : atari_eeprom_device(mconfig, ATARI_EEPROM_2804, tag, owner) -{ -} - - -//------------------------------------------------- -// device_add_mconfig - add device configuration -//------------------------------------------------- - -MACHINE_CONFIG_MEMBER(atari_eeprom_2804_device::device_add_mconfig) - MCFG_EEPROM_2804_ADD("eeprom") -MACHINE_CONFIG_END - - -//------------------------------------------------- -// atari_eeprom_2816_device - constructor -//------------------------------------------------- - -atari_eeprom_2816_device::atari_eeprom_2816_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : atari_eeprom_device(mconfig, ATARI_EEPROM_2816, tag, owner) -{ -} - - -//------------------------------------------------- -// device_add_mconfig - add device configuration -//------------------------------------------------- - -MACHINE_CONFIG_MEMBER(atari_eeprom_2816_device::device_add_mconfig) - MCFG_EEPROM_2816_ADD("eeprom") -MACHINE_CONFIG_END - - /*************************************************************************** OVERALL INIT ***************************************************************************/ diff --git a/src/mame/machine/atarigen.h b/src/mame/machine/atarigen.h index c6c6baa5896..759fa003fac 100644 --- a/src/mame/machine/atarigen.h +++ b/src/mame/machine/atarigen.h @@ -13,7 +13,6 @@ #include "includes/slapstic.h" #include "cpu/m6502/m6502.h" -#include "machine/eeprompar.h" #include "video/atarimo.h" #include "screen.h" @@ -81,14 +80,6 @@ -#define MCFG_ATARI_EEPROM_2804_ADD(_tag) \ - MCFG_DEVICE_ADD(_tag, ATARI_EEPROM_2804, 0) - -#define MCFG_ATARI_EEPROM_2816_ADD(_tag) \ - MCFG_DEVICE_ADD(_tag, ATARI_EEPROM_2816, 0) - - - /*************************************************************************** TYPE DEFINITIONS ***************************************************************************/ @@ -253,67 +244,6 @@ private: }; -// ======================> atari_eeprom_device - -// device type definition -DECLARE_DEVICE_TYPE(ATARI_EEPROM_2804, atari_eeprom_2804_device) -DECLARE_DEVICE_TYPE(ATARI_EEPROM_2816, atari_eeprom_2816_device) - -class atari_eeprom_device : public device_t -{ -protected: - // construction/destruction - atari_eeprom_device(const machine_config &mconfig, device_type devtype, const char *tag, device_t *owner); - -public: - // unlock controls - DECLARE_READ8_MEMBER(unlock_read); - DECLARE_WRITE8_MEMBER(unlock_write); - DECLARE_READ16_MEMBER(unlock_read); - DECLARE_WRITE16_MEMBER(unlock_write); - DECLARE_READ32_MEMBER(unlock_read); - DECLARE_WRITE32_MEMBER(unlock_write); - - // EEPROM read/write - DECLARE_READ8_MEMBER(read); - DECLARE_WRITE8_MEMBER(write); - -protected: - // device-level overrides - virtual void device_start() override; - virtual void device_reset() override; - - // internal state - required_device m_eeprom; - - // live state - bool m_unlocked; -}; - -class atari_eeprom_2804_device : public atari_eeprom_device -{ -public: - // construction/destruction - atari_eeprom_2804_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - -protected: - // device-level overrides - virtual void device_add_mconfig(machine_config &config) override; -}; - -class atari_eeprom_2816_device : public atari_eeprom_device -{ -public: - // construction/destruction - atari_eeprom_2816_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - -protected: - // device-level overrides - virtual void device_add_mconfig(machine_config &config) override; -}; - - - /*************************************************************************** TYPES & STRUCTURES ***************************************************************************/ -- cgit v1.2.3