diff options
author | Aaron Giles <aaron@aarongiles.com> | 2012-04-09 20:23:26 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2012-04-09 20:23:26 +0000 |
commit | 5181e3ea96e9cb8f65d346fc27d0b8ccde3576af (patch) | |
tree | 025f61176625c851e8e1f1a2b056015cba9be3c9 | |
parent | 6711559e87f917df9f789f56722d987b3ba78d50 (diff) |
Moved soundlatch helpers into driver.c and removed emu/audio/generic.c.
Normalized soundlatch helper function names.
Created delegates for machine/sound/video_start/reset callbacks and
added necessary infrastructure to use them going forward.
369 files changed, 1217 insertions, 1333 deletions
diff --git a/.gitattributes b/.gitattributes index 6faf2842edb..ceec56348fd 100644 --- a/.gitattributes +++ b/.gitattributes @@ -32,8 +32,6 @@ src/emu/addrmap.c svneol=native#text/plain src/emu/addrmap.h svneol=native#text/plain src/emu/attotime.c svneol=native#text/plain src/emu/attotime.h svneol=native#text/plain -src/emu/audio/generic.c svneol=native#text/plain -src/emu/audio/generic.h svneol=native#text/plain src/emu/audit.c svneol=native#text/plain src/emu/audit.h svneol=native#text/plain src/emu/cheat.c svneol=native#text/plain diff --git a/src/emu/audio/generic.c b/src/emu/audio/generic.c deleted file mode 100644 index 51524875497..00000000000 --- a/src/emu/audio/generic.c +++ /dev/null @@ -1,168 +0,0 @@ -/*************************************************************************** - - generic.c - - Generic simple sound functions. - - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - -***************************************************************************/ - -#include "emu.h" - - - -/*************************************************************************** - TYPE DEFINITIONS -***************************************************************************/ - -struct _generic_audio_private -{ - UINT16 latch_clear_value; - UINT16 latched_value[4]; - UINT8 latch_read[4]; -}; - - - -/*************************************************************************** - INITIALIZATION -***************************************************************************/ - -/*------------------------------------------------- - generic_sound_init - initialize globals and - register for save states --------------------------------------------------*/ - -int generic_sound_init(running_machine &machine) -{ - generic_audio_private *state; - - state = machine.generic_audio_data = auto_alloc_clear(machine, generic_audio_private); - - /* register globals with the save state system */ - state_save_register_global_array(machine, state->latched_value); - state_save_register_global_array(machine, state->latch_read); - - return 0; -} - - - -/*************************************************************************** - - Many games use a master-slave CPU setup. Typically, the main CPU writes - a command to some register, and then writes to another register to trigger - an interrupt on the slave CPU (the interrupt might also be triggered by - the first write). The slave CPU, notified by the interrupt, goes and reads - the command. - -***************************************************************************/ - -/*------------------------------------------------- - latch_callback - time-delayed callback to - set a latch value --------------------------------------------------*/ - -static TIMER_CALLBACK( latch_callback ) -{ - generic_audio_private *state = machine.generic_audio_data; - UINT16 value = param >> 8; - int which = param & 0xff; - - /* if the latch hasn't been read and the value is changed, log a warning */ - if (!state->latch_read[which] && state->latched_value[which] != value) - logerror("Warning: sound latch %d written before being read. Previous: %02x, new: %02x\n", which, state->latched_value[which], value); - - /* store the new value and mark it not read */ - state->latched_value[which] = value; - state->latch_read[which] = 0; -} - - -/*------------------------------------------------- - latch_w - handle a write to a given latch --------------------------------------------------*/ - -INLINE void latch_w(address_space *space, int which, UINT16 value) -{ - space->machine().scheduler().synchronize(FUNC(latch_callback), which | (value << 8)); -} - - -/*------------------------------------------------- - latch_r - handle a read from a given latch --------------------------------------------------*/ - -INLINE UINT16 latch_r(address_space *space, int which) -{ - generic_audio_private *state = space->machine().generic_audio_data; - state->latch_read[which] = 1; - return state->latched_value[which]; -} - - -/*------------------------------------------------- - latch_clear - clear a given latch --------------------------------------------------*/ - -INLINE void latch_clear(address_space *space, int which) -{ - generic_audio_private *state = space->machine().generic_audio_data; - state->latched_value[which] = state->latch_clear_value; -} - - -/*------------------------------------------------- - soundlatch_w - global write handlers for - writing to sound latches --------------------------------------------------*/ - -WRITE8_MEMBER( driver_device::soundlatch_w ) { latch_w(&space, 0, data); } -WRITE16_MEMBER( driver_device::soundlatch_word_w ) { latch_w(&space, 0, data); } -WRITE8_MEMBER( driver_device::soundlatch2_w ) { latch_w(&space, 1, data); } -WRITE16_MEMBER( driver_device::soundlatch2_word_w ) { latch_w(&space, 1, data); } -WRITE8_MEMBER( driver_device::soundlatch3_w ) { latch_w(&space, 2, data); } -WRITE16_MEMBER( driver_device::soundlatch3_word_w ) { latch_w(&space, 2, data); } -WRITE8_MEMBER( driver_device::soundlatch4_w ) { latch_w(&space, 3, data); } -WRITE16_MEMBER( driver_device::soundlatch4_word_w ) { latch_w(&space, 3, data); } - - -/*------------------------------------------------- - soundlatch_r - global read handlers for - reading from sound latches --------------------------------------------------*/ - -READ8_MEMBER( driver_device::soundlatch_r ) { return latch_r(&space, 0); } -READ16_MEMBER( driver_device::soundlatch_word_r ) { return latch_r(&space, 0); } -READ8_MEMBER( driver_device::soundlatch2_r ) { return latch_r(&space, 1); } -READ16_MEMBER( driver_device::soundlatch2_word_r ) { return latch_r(&space, 1); } -READ8_MEMBER( driver_device::soundlatch3_r ) { return latch_r(&space, 2); } -READ16_MEMBER( driver_device::soundlatch3_word_r ) { return latch_r(&space, 2); } -READ8_MEMBER( driver_device::soundlatch4_r ) { return latch_r(&space, 3); } -READ16_MEMBER( driver_device::soundlatch4_word_r ) { return latch_r(&space, 3); } - - -/*------------------------------------------------- - soundlatch_clear_w - global write handlers - for clearing sound latches --------------------------------------------------*/ - -WRITE8_MEMBER( driver_device::soundlatch_clear_w ) { latch_clear(&space, 0); } -WRITE8_MEMBER( driver_device::soundlatch2_clear_w ) { latch_clear(&space, 1); } -WRITE8_MEMBER( driver_device::soundlatch3_clear_w ) { latch_clear(&space, 2); } -WRITE8_MEMBER( driver_device::soundlatch4_clear_w ) { latch_clear(&space, 3); } - - -/*------------------------------------------------- - soundlatch_setclearedvalue - set the "clear" - value for all sound latches --------------------------------------------------*/ - -void soundlatch_setclearedvalue(running_machine &machine, int value) -{ - generic_audio_private *state = machine.generic_audio_data; - assert_always(machine.phase() == MACHINE_PHASE_INIT, "Can only call soundlatch_setclearedvalue at init time!"); - state->latch_clear_value = value; -} diff --git a/src/emu/audio/generic.h b/src/emu/audio/generic.h deleted file mode 100644 index eef51c99fb0..00000000000 --- a/src/emu/audio/generic.h +++ /dev/null @@ -1,33 +0,0 @@ -/*************************************************************************** - - generic.h - - Generic simple sound functions. - - Copyright Nicola Salmoria and the MAME Team. - Visit http://mamedev.org for licensing and usage restrictions. - -***************************************************************************/ - -#pragma once - -#ifndef __SOUND_GENERIC_H__ -#define __SOUND_GENERIC_H__ - - - -/*************************************************************************** - - Function prototypes - -***************************************************************************/ - -int generic_sound_init(running_machine &machine); - -/* If you're going to use soundlatchX_clear_w, and the cleared value is - something other than 0x00, use this function from machine_init. Note - that this one call effects all 4 latches */ -void soundlatch_setclearedvalue(running_machine &machine, int value); - - -#endif /* __SOUND_GENERIC_H__ */ diff --git a/src/emu/driver.c b/src/emu/driver.c index c36216dc175..7a5f511ecc0 100644 --- a/src/emu/driver.c +++ b/src/emu/driver.c @@ -51,18 +51,21 @@ driver_device::driver_device(const machine_config &mconfig, device_type type, const char *tag) : device_t(mconfig, type, "Driver Device", tag, NULL, 0), - m_system(NULL), - m_palette_init(NULL), m_generic_paletteram_8(*this, "paletteram"), m_generic_paletteram2_8(*this, "paletteram2"), m_generic_paletteram_16(*this, "paletteram"), m_generic_paletteram2_16(*this, "paletteram2"), m_generic_paletteram_32(*this, "paletteram"), m_generic_paletteram2_32(*this, "paletteram2"), + m_system(NULL), + m_palette_init(NULL), + m_latch_clear_value(0), m_flip_screen_x(0), m_flip_screen_y(0) { - memset(m_callbacks, 0, sizeof(m_callbacks)); + memset(m_legacy_callbacks, 0, sizeof(m_legacy_callbacks)); + memset(m_latched_value, 0, sizeof(m_latched_value)); + memset(m_latch_read, 0, sizeof(m_latch_read)); } @@ -101,13 +104,17 @@ void driver_device::static_set_game(device_t &device, const game_driver &game) //------------------------------------------------- -// static_set_machine_start - set the legacy -// machine start callback in the device -// configuration +// static_set_callback - set the a callback in +// the device configuration //------------------------------------------------- void driver_device::static_set_callback(device_t &device, callback_type type, legacy_callback_func callback) { + downcast<driver_device &>(device).m_legacy_callbacks[type] = callback; +} + +void driver_device::static_set_callback(device_t &device, callback_type type, driver_callback_delegate callback) +{ downcast<driver_device &>(device).m_callbacks[type] = callback; } @@ -141,8 +148,8 @@ void driver_device::driver_start() void driver_device::machine_start() { - if (m_callbacks[CB_MACHINE_START] != NULL) - (*m_callbacks[CB_MACHINE_START])(machine()); + if (!m_callbacks[CB_MACHINE_START].isnull()) + m_callbacks[CB_MACHINE_START](); } @@ -153,8 +160,8 @@ void driver_device::machine_start() void driver_device::sound_start() { - if (m_callbacks[CB_SOUND_START] != NULL) - (*m_callbacks[CB_SOUND_START])(machine()); + if (!m_callbacks[CB_SOUND_START].isnull()) + m_callbacks[CB_SOUND_START](); } @@ -165,8 +172,8 @@ void driver_device::sound_start() void driver_device::video_start() { - if (m_callbacks[CB_VIDEO_START] != NULL) - (*m_callbacks[CB_VIDEO_START])(machine()); + if (!m_callbacks[CB_VIDEO_START].isnull()) + m_callbacks[CB_VIDEO_START](); } @@ -187,8 +194,8 @@ void driver_device::driver_reset() void driver_device::machine_reset() { - if (m_callbacks[CB_MACHINE_RESET] != NULL) - (*m_callbacks[CB_MACHINE_RESET])(machine()); + if (!m_callbacks[CB_MACHINE_RESET].isnull()) + m_callbacks[CB_MACHINE_RESET](); } @@ -199,8 +206,8 @@ void driver_device::machine_reset() void driver_device::sound_reset() { - if (m_callbacks[CB_SOUND_RESET] != NULL) - (*m_callbacks[CB_SOUND_RESET])(machine()); + if (!m_callbacks[CB_SOUND_RESET].isnull()) + m_callbacks[CB_SOUND_RESET](); } @@ -211,8 +218,8 @@ void driver_device::sound_reset() void driver_device::video_reset() { - if (m_callbacks[CB_VIDEO_RESET] != NULL) - (*m_callbacks[CB_VIDEO_RESET])(machine()); + if (!m_callbacks[CB_VIDEO_RESET].isnull()) + m_callbacks[CB_VIDEO_RESET](); } @@ -245,6 +252,11 @@ ioport_constructor driver_device::device_input_ports() const void driver_device::device_start() { + // bind our legacy callbacks + for (int index = 0; index < ARRAY_LENGTH(m_legacy_callbacks); index++) + if (m_legacy_callbacks[index] != NULL) + m_callbacks[index] = driver_callback_delegate(m_legacy_callbacks[index], "legacy_callback", &machine()); + // reschedule ourselves to be last device_iterator iter(*this); for (device_t *test = iter.first(); test != NULL; test = iter.next()) @@ -292,6 +304,72 @@ void driver_device::device_reset_after_children() //************************************************************************** +// GENERIC SOUND COMMAND LATCHING +//************************************************************************** + +//------------------------------------------------- +// soundlatch_sync_callback - time-delayed +// callback to set a latch value +//------------------------------------------------- + +void driver_device::soundlatch_sync_callback(void *ptr, INT32 param) +{ + UINT16 value = param >> 8; + int which = param & 0xff; + + // if the latch hasn't been read and the value is changed, log a warning + if (!m_latch_read[which] && m_latched_value[which] != value) + logerror("Warning: sound latch %d written before being read. Previous: %02x, new: %02x\n", which, m_latched_value[which], value); + + // store the new value and mark it not read + m_latched_value[which] = value; + m_latch_read[which] = 0; +} + + +//------------------------------------------------- +// soundlatch_byte_w - global write handlers for +// writing to sound latches +//------------------------------------------------- + +WRITE8_MEMBER( driver_device::soundlatch_byte_w ) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(driver_device::soundlatch_sync_callback), this), 0 | (data << 8)); } +WRITE16_MEMBER( driver_device::soundlatch_word_w ) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(driver_device::soundlatch_sync_callback), this), 0 | (data << 8)); } +WRITE8_MEMBER( driver_device::soundlatch2_byte_w ) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(driver_device::soundlatch_sync_callback), this), 1 | (data << 8)); } +WRITE16_MEMBER( driver_device::soundlatch2_word_w ) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(driver_device::soundlatch_sync_callback), this), 1 | (data << 8)); } +WRITE8_MEMBER( driver_device::soundlatch3_byte_w ) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(driver_device::soundlatch_sync_callback), this), 2 | (data << 8)); } +WRITE16_MEMBER( driver_device::soundlatch3_word_w ) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(driver_device::soundlatch_sync_callback), this), 2 | (data << 8)); } +WRITE8_MEMBER( driver_device::soundlatch4_byte_w ) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(driver_device::soundlatch_sync_callback), this), 3 | (data << 8)); } +WRITE16_MEMBER( driver_device::soundlatch4_word_w ) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(driver_device::soundlatch_sync_callback), this), 3 | (data << 8)); } + + +//------------------------------------------------- +// soundlatch_byte_r - global read handlers for +// reading from sound latches +//------------------------------------------------- + +READ8_MEMBER( driver_device::soundlatch_byte_r ) { return m_latched_value[0]; } +READ16_MEMBER( driver_device::soundlatch_word_r ) { return m_latched_value[0]; } +READ8_MEMBER( driver_device::soundlatch2_byte_r ) { return m_latched_value[1]; } +READ16_MEMBER( driver_device::soundlatch2_word_r ) { return m_latched_value[1]; } +READ8_MEMBER( driver_device::soundlatch3_byte_r ) { return m_latched_value[2]; } +READ16_MEMBER( driver_device::soundlatch3_word_r ) { return m_latched_value[2]; } +READ8_MEMBER( driver_device::soundlatch4_byte_r ) { return m_latched_value[3]; } +READ16_MEMBER( driver_device::soundlatch4_word_r ) { return m_latched_value[3]; } + + +//------------------------------------------------- +// soundlatch_clear_byte_w - global write handlers +// for clearing sound latches +//------------------------------------------------- + +WRITE8_MEMBER( driver_device::soundlatch_clear_byte_w ) { m_latched_value[0] = m_latch_clear_value; } +WRITE8_MEMBER( driver_device::soundlatch2_clear_byte_w ) { m_latched_value[1] = m_latch_clear_value; } +WRITE8_MEMBER( driver_device::soundlatch3_clear_byte_w ) { m_latched_value[2] = m_latch_clear_value; } +WRITE8_MEMBER( driver_device::soundlatch4_clear_byte_w ) { m_latched_value[3] = m_latch_clear_value; } + + + +//************************************************************************** // GENERIC FLIP SCREEN HANDLING //************************************************************************** diff --git a/src/emu/driver.h b/src/emu/driver.h index d1d33256310..451d9f0667c 100644 --- a/src/emu/driver.h +++ b/src/emu/driver.h @@ -51,6 +51,8 @@ // TYPE DEFINITIONS //************************************************************************** +typedef delegate<void ()> driver_callback_delegate; + // ======================> driver_device @@ -61,6 +63,9 @@ public: // construction/destruction driver_device(const machine_config &mconfig, device_type type, const char *tag); virtual ~driver_device(); + + // getters + const game_driver &system() const { assert(m_system != NULL); return *m_system; } // indexes into our generic callbacks enum callback_type @@ -77,6 +82,7 @@ public: // inline configuration helpers static void static_set_game(device_t &device, const game_driver &game); static void static_set_callback(device_t &device, callback_type type, legacy_callback_func callback); + static void static_set_callback(device_t &device, callback_type type, driver_callback_delegate callback); static void static_set_palette_init(device_t &device, palette_init_func callback); // generic helpers @@ -86,15 +92,6 @@ public: (downcast<_DriverClass &>(device).*_Function)(); } - // generic video - void flip_screen_set(UINT32 on); - void flip_screen_set_no_update(UINT32 on); - void flip_screen_x_set(UINT32 on); - void flip_screen_y_set(UINT32 on); - UINT32 flip_screen() const { return m_flip_screen_x; } - UINT32 flip_screen_x() const { return m_flip_screen_x; } - UINT32 flip_screen_y() const { return m_flip_screen_y; } - // watchdog read/write handlers DECLARE_WRITE8_MEMBER( watchdog_reset_w ); DECLARE_READ8_MEMBER( watchdog_reset_r ); @@ -102,32 +99,44 @@ public: DECLARE_READ16_MEMBER( watchdog_reset16_r ); DECLARE_WRITE32_MEMBER( watchdog_reset32_w ); DECLARE_READ32_MEMBER( watchdog_reset32_r ); + + // generic audio + void soundlatch_setclearedvalue(UINT16 value) { m_latch_clear_value = value; } // sound latch readers - DECLARE_READ8_MEMBER( soundlatch_r ); - DECLARE_READ8_MEMBER( soundlatch2_r ); - DECLARE_READ8_MEMBER( soundlatch3_r ); - DECLARE_READ8_MEMBER( soundlatch4_r ); + DECLARE_READ8_MEMBER( soundlatch_byte_r ); + DECLARE_READ8_MEMBER( soundlatch2_byte_r ); + DECLARE_READ8_MEMBER( soundlatch3_byte_r ); + DECLARE_READ8_MEMBER( soundlatch4_byte_r ); DECLARE_READ16_MEMBER( soundlatch_word_r ); DECLARE_READ16_MEMBER( soundlatch2_word_r ); DECLARE_READ16_MEMBER( soundlatch3_word_r ); DECLARE_READ16_MEMBER( soundlatch4_word_r ); // sound latch writers - DECLARE_WRITE8_MEMBER( soundlatch_w ); - DECLARE_WRITE8_MEMBER( soundlatch2_w ); - DECLARE_WRITE8_MEMBER( soundlatch3_w ); - DECLARE_WRITE8_MEMBER( soundlatch4_w ); + DECLARE_WRITE8_MEMBER( soundlatch_byte_w ); + DECLARE_WRITE8_MEMBER( soundlatch2_byte_w ); + DECLARE_WRITE8_MEMBER( soundlatch3_byte_w ); + DECLARE_WRITE8_MEMBER( soundlatch4_byte_w ); DECLARE_WRITE16_MEMBER( soundlatch_word_w ); DECLARE_WRITE16_MEMBER( soundlatch2_word_w ); DECLARE_WRITE16_MEMBER( soundlatch3_word_w ); DECLARE_WRITE16_MEMBER( soundlatch4_word_w ); // sound latch clearers - DECLARE_WRITE8_MEMBER( soundlatch_clear_w ); - DECLARE_WRITE8_MEMBER( soundlatch2_clear_w ); - DECLARE_WRITE8_MEMBER( soundlatch3_clear_w ); - DECLARE_WRITE8_MEMBER( soundlatch4_clear_w ); + DECLARE_WRITE8_MEMBER( soundlatch_clear_byte_w ); + DECLARE_WRITE8_MEMBER( soundlatch2_clear_byte_w ); + DECLARE_WRITE8_MEMBER( soundlatch3_clear_byte_w ); + DECLARE_WRITE8_MEMBER( soundlatch4_clear_byte_w ); + + // generic video + void flip_screen_set(UINT32 on); + void flip_screen_set_no_update(UINT32 on); + void flip_screen_x_set(UINT32 on); + void flip_screen_y_set(UINT32 on); + UINT32 flip_screen() const { return m_flip_screen_x; } + UINT32 flip_screen_x() const { return m_flip_screen_x; } + UINT32 flip_screen_y() const { return m_flip_screen_y; } // templatized palette writers for 8-bit palette data template<int _RedBits, int _GreenBits, int _BlueBits, int _RedShift, int _GreenShift, int _BlueShift> DECLARE_WRITE8_MEMBER( palette_8bit_byte_w ); @@ -239,12 +248,6 @@ protected: inline UINT16 paletteram16_split(offs_t offset) const { return m_generic_paletteram_8[offset] | (m_generic_paletteram2_8[offset] << 8); } inline UINT32 paletteram32_be(offs_t offset) const { return m_generic_paletteram_16[offset | 1] | (m_generic_paletteram_16[offset & ~1] << 16); } - // internal state - const game_driver * m_system; // pointer to the game driver - - legacy_callback_func m_callbacks[CB_COUNT]; // generic legacy callbacks - palette_init_func m_palette_init; // one-time palette init callback - public: // generic pointers optional_shared_ptr<UINT8> m_generic_paletteram_8; @@ -256,11 +259,23 @@ public: private: // helpers + void soundlatch_sync_callback(void *ptr, INT32 param); void updateflip(); + // internal state + const game_driver * m_system; // pointer to the game driver + palette_init_func m_palette_init; // one-time palette init callback + driver_callback_delegate m_callbacks[CB_COUNT]; // start/reset callbacks + legacy_callback_func m_legacy_callbacks[CB_COUNT]; // legacy start/reset callbacks + + // generic audio + UINT16 m_latch_clear_value; + UINT16 m_latched_value[4]; + UINT8 m_latch_read[4]; + // generic video - UINT32 m_flip_screen_x; - UINT32 m_flip_screen_y; + UINT32 m_flip_screen_x; + UINT32 m_flip_screen_y; }; diff --git a/src/emu/emu.h b/src/emu/emu.h index 2e242cdd5f0..c976cce8d4a 100644 --- a/src/emu/emu.h +++ b/src/emu/emu.h @@ -140,7 +140,6 @@ typedef device_t * (*machine_config_constructor)(machine_config &config, device_ // generic helpers #include "devcb.h" #include "drivers/xtal.h" -#include "audio/generic.h" #include "machine/generic.h" #include "video/generic.h" diff --git a/src/emu/emu.mak b/src/emu/emu.mak index ba96ab2c2a2..9c6383d7f9c 100644 --- a/src/emu/emu.mak +++ b/src/emu/emu.mak @@ -134,7 +134,6 @@ EMUSOUNDOBJS = \ $(EMUOBJ)/sound/wavwrite.o \ EMUAUDIOOBJS = \ - $(EMUAUDIO)/generic.o \ EMUDRIVEROBJS = \ $(EMUDRIVERS)/empty.o \ diff --git a/src/emu/machine.c b/src/emu/machine.c index 8d3a66fd077..b2b20a3e46c 100644 --- a/src/emu/machine.c +++ b/src/emu/machine.c @@ -62,7 +62,6 @@ - calls render_init() [render.c] to initialize the rendering system - calls ui_init() [ui.c] to initialize the user interface - calls generic_machine_init() [machine/generic.c] to initialize generic machine structures - - calls generic_sound_init() [audio/generic.c] to initialize generic sound structures - calls timer_init() [timer.c] to reset the timer system - calls osd_init() [osdepend.h] to do platform-specific initialization - calls input_port_init() [inptport.c] to set up the input ports @@ -148,7 +147,6 @@ running_machine::running_machine(const machine_config &_config, osd_interface &o ui_input_data(NULL), debugcpu_data(NULL), generic_machine_data(NULL), - generic_audio_data(NULL), m_config(_config), m_system(_config.gamedrv()), @@ -249,7 +247,6 @@ void running_machine::start() palette_init(*this); m_render = auto_alloc(*this, render_manager(*this)); generic_machine_init(*this); - generic_sound_init(*this); // allocate a soft_reset timer m_soft_reset_timer = m_scheduler.timer_alloc(timer_expired_delegate(FUNC(running_machine::soft_reset), this)); diff --git a/src/emu/machine.h b/src/emu/machine.h index d5fb9a44db4..59cd2147dc8 100644 --- a/src/emu/machine.h +++ b/src/emu/machine.h @@ -189,7 +189,6 @@ typedef struct _input_port_private input_port_private; typedef struct _ui_input_private ui_input_private; typedef struct _debugcpu_private debugcpu_private; typedef struct _generic_machine_private generic_machine_private; -typedef struct _generic_audio_private generic_audio_private; // legacy callback functions @@ -412,7 +411,6 @@ public: ui_input_private * ui_input_data; // internal data from uiinput.c debugcpu_private * debugcpu_data; // internal data from debugcpu.c generic_machine_private *generic_machine_data; // internal data from machine/generic.c - generic_audio_private * generic_audio_data; // internal data from audio/generic.c private: // internal helpers diff --git a/src/mame/audio/aztarac.c b/src/mame/audio/aztarac.c index c9c74e1e43f..255e7b4950e 100644 --- a/src/mame/audio/aztarac.c +++ b/src/mame/audio/aztarac.c @@ -21,7 +21,7 @@ WRITE16_HANDLER( aztarac_sound_w ) if (ACCESSING_BITS_0_7) { data &= 0xff; - state->soundlatch_w(*space, offset, data); + state->soundlatch_byte_w(*space, offset, data); state->m_sound_status ^= 0x21; if (state->m_sound_status & 0x20) cputag_set_input_line(space->machine(), "audiocpu", 0, HOLD_LINE); @@ -33,7 +33,7 @@ READ8_HANDLER( aztarac_snd_command_r ) aztarac_state *state = space->machine().driver_data<aztarac_state>(); state->m_sound_status |= 0x01; state->m_sound_status &= ~0x20; - return state->soundlatch_r(*space,offset); + return state->soundlatch_byte_r(*space,offset); } READ8_HANDLER( aztarac_snd_status_r ) diff --git a/src/mame/audio/cchasm.c b/src/mame/audio/cchasm.c index 410f356a6aa..460ae656912 100644 --- a/src/mame/audio/cchasm.c +++ b/src/mame/audio/cchasm.c @@ -44,14 +44,14 @@ READ8_HANDLER( cchasm_soundlatch2_r ) cchasm_state *state = space->machine().driver_data<cchasm_state>(); state->m_sound_flags &= ~0x80; z80ctc_trg2_w(state->m_ctc, 0); - return state->soundlatch2_r(*space, offset); + return state->soundlatch2_byte_r(*space, offset); } WRITE8_HANDLER( cchasm_soundlatch4_w ) { cchasm_state *state = space->machine().driver_data<cchasm_state>(); state->m_sound_flags |= 0x40; - state->soundlatch4_w(*space, offset, data); + state->soundlatch4_byte_w(*space, offset, data); cputag_set_input_line(space->machine(), "maincpu", 1, HOLD_LINE); } @@ -66,11 +66,11 @@ WRITE16_HANDLER( cchasm_io_w ) switch (offset & 0xf) { case 0: - state->soundlatch_w(*space, offset, data); + state->soundlatch_byte_w(*space, offset, data); break; case 1: state->m_sound_flags |= 0x80; - state->soundlatch2_w(*space, offset, data); + state->soundlatch2_byte_w(*space, offset, data); z80ctc_trg2_w(state->m_ctc, 1); cputag_set_input_line(space->machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); break; @@ -87,10 +87,10 @@ READ16_HANDLER( cchasm_io_r ) switch (offset & 0xf) { case 0x0: - return state->soundlatch3_r(*space, offset) << 8; + return state->soundlatch3_byte_r(*space, offset) << 8; case 0x1: state->m_sound_flags &= ~0x40; - return state->soundlatch4_r(*space,offset) << 8; + return state->soundlatch4_byte_r(*space,offset) << 8; case 0x2: return (state->m_sound_flags| (input_port_read(space->machine(), "IN3") & 0x07) | 0x08) << 8; case 0x5: diff --git a/src/mame/audio/hyprolyb.c b/src/mame/audio/hyprolyb.c index 535c4687811..d66a260388c 100644 --- a/src/mame/audio/hyprolyb.c +++ b/src/mame/audio/hyprolyb.c @@ -46,7 +46,7 @@ WRITE8_DEVICE_HANDLER( hyprolyb_adpcm_w ) { hyprolyb_adpcm_state *state = get_safe_token(device); driver_device *drvstate = device->machine().driver_data<driver_device>(); - drvstate->soundlatch2_w(*state->m_space, offset, data); + drvstate->soundlatch2_byte_w(*state->m_space, offset, data); state->m_adpcm_ready = 0x80; } @@ -86,7 +86,7 @@ static READ8_DEVICE_HANDLER( hyprolyb_adpcm_data_r ) hyprolyb_adpcm_state *state = get_safe_token(device); driver_device *drvstate = device->machine().driver_data<driver_device>(); state->m_adpcm_ready = 0x00; - return drvstate->soundlatch2_r(*state->m_space, offset); + return drvstate->soundlatch2_byte_r(*state->m_space, offset); } static ADDRESS_MAP_START( hyprolyb_adpcm_map, AS_PROGRAM, 8, driver_device ) diff --git a/src/mame/audio/irem.c b/src/mame/audio/irem.c index f0e2fa02ab0..cc05dbbbe12 100644 --- a/src/mame/audio/irem.c +++ b/src/mame/audio/irem.c @@ -66,7 +66,7 @@ WRITE8_HANDLER( irem_sound_cmd_w ) { driver_device *drvstate = space->machine().driver_data<driver_device>(); if ((data & 0x80) == 0) - drvstate->soundlatch_w(*space, 0, data & 0x7f); + drvstate->soundlatch_byte_w(*space, 0, data & 0x7f); else cputag_set_input_line(space->machine(), "iremsound", 0, ASSERT_LINE); } @@ -251,7 +251,7 @@ static const ay8910_interface irem_ay8910_interface_1 = { AY8910_SINGLE_OUTPUT | AY8910_DISCRETE_OUTPUT, {470, 0, 0}, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_NULL, DEVCB_NULL, DEVCB_DEVICE_HANDLER("irem_audio", ay8910_0_portb_w) diff --git a/src/mame/audio/m72.c b/src/mame/audio/m72.c index 034a94fd0b0..2847d5d9dae 100644 --- a/src/mame/audio/m72.c +++ b/src/mame/audio/m72.c @@ -154,7 +154,7 @@ WRITE16_DEVICE_HANDLER( m72_sound_command_w ) { m72_audio_state *state = get_safe_token(device); driver_device *drvstate = device->machine().driver_data<driver_device>(); - drvstate->soundlatch_w(*state->space, offset, data); + drvstate->soundlatch_byte_w(*state->space, offset, data); device->machine().scheduler().synchronize(FUNC(setvector_callback), Z80_ASSERT, state); } } @@ -163,7 +163,7 @@ WRITE8_DEVICE_HANDLER( m72_sound_command_byte_w ) { m72_audio_state *state = get_safe_token(device); driver_device *drvstate = device->machine().driver_data<driver_device>(); - drvstate->soundlatch_w(*state->space, offset, data); + drvstate->soundlatch_byte_w(*state->space, offset, data); device->machine().scheduler().synchronize(FUNC(setvector_callback), Z80_ASSERT, state); } diff --git a/src/mame/audio/mario.c b/src/mame/audio/mario.c index 6dcc667add9..857611111c4 100644 --- a/src/mame/audio/mario.c +++ b/src/mame/audio/mario.c @@ -22,17 +22,17 @@ #define ACTIVELOW_PORT_BIT(P,A,D) ((P & (~(1 << A))) | ((D ^ 1) << A)) #define ACTIVEHIGH_PORT_BIT(P,A,D) ((P & (~(1 << A))) | (D << A)) -#define I8035_T_R(M,N) ((state->soundlatch2_r(M,0) >> (N)) & 1) -#define I8035_T_W_AH(M,N,D) do { state->m_portT = ACTIVEHIGH_PORT_BIT(state->m_portT,N,D); state->soundlatch2_w(M, 0, state->m_portT); } while (0) +#define I8035_T_R(M,N) ((state->soundlatch2_byte_r(M,0) >> (N)) & 1) +#define I8035_T_W_AH(M,N,D) do { state->m_portT = ACTIVEHIGH_PORT_BIT(state->m_portT,N,D); state->soundlatch2_byte_w(M, 0, state->m_portT); } while (0) -#define I8035_P1_R(M) (state->soundlatch3_r(M,0)) -#define I8035_P2_R(M) (state->soundlatch4_r(M,0)) -#define I8035_P1_W(M,D) state->soundlatch3_w(M,0,D) +#define I8035_P1_R(M) (state->soundlatch3_byte_r(M,0)) +#define I8035_P2_R(M) (state->soundlatch4_byte_r(M,0)) +#define I8035_P1_W(M,D) state->soundlatch3_byte_w(M,0,D) #if (USE_8039) -#define I8035_P2_W(M,D) do { state->soundlatch4_w(M,0,D); } while (0) +#define I8035_P2_W(M,D) do { state->soundlatch4_byte_w(M,0,D); } while (0) #else -#define I8035_P2_W(M,D) do { set_ea(M, ((D) & 0x20) ? 0 : 1); state->soundlatch4_w(M,0,D); } while (0) +#define I8035_P2_W(M,D) do { set_ea(M, ((D) & 0x20) ? 0 : 1); state->soundlatch4_byte_w(M,0,D); } while (0) #endif #define I8035_P1_W_AH(M,B,D) I8035_P1_W(M,ACTIVEHIGH_PORT_BIT(I8035_P1_R(M),B,(D))) @@ -444,10 +444,10 @@ static SOUND_RESET( mario ) #endif /* FIXME: convert to latch8 */ - state->soundlatch_clear_w(*space, 0, 0); - state->soundlatch2_clear_w(*space, 0, 0); - state->soundlatch3_clear_w(*space, 0, 0); - state->soundlatch4_clear_w(*space, 0, 0); + state->soundlatch_clear_byte_w(*space, 0, 0); + state->soundlatch2_clear_byte_w(*space, 0, 0); + state->soundlatch3_clear_byte_w(*space, 0, 0); + state->soundlatch4_clear_byte_w(*space, 0, 0); I8035_P1_W(*space, 0x00); /* Input port */ I8035_P2_W(*space, 0xff); /* Port is in high impedance state after reset */ @@ -492,7 +492,7 @@ static READ8_HANDLER( mario_sh_tune_r ) UINT8 p2 = I8035_P2_R(*space); if ((p2 >> 7) & 1) - return state->soundlatch_r(*space, offset); + return state->soundlatch_byte_r(*space, offset); else return (SND[(0x1000 + (p2 & 0x0f) * 256 + offset) & mask]); } @@ -536,7 +536,7 @@ WRITE8_HANDLER( masao_sh_irqtrigger_w ) WRITE8_HANDLER( mario_sh_tuneselect_w ) { mario_state *state = space->machine().driver_data<mario_state>(); - state->soundlatch_w(*space, offset, data); + state->soundlatch_byte_w(*space, offset, data); } /* Sound 0 and 1 are pulsed !*/ @@ -626,7 +626,7 @@ static const ay8910_interface ay8910_config = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL diff --git a/src/mame/audio/redalert.c b/src/mame/audio/redalert.c index 5c036a91808..d8cb4623c13 100644 --- a/src/mame/audio/redalert.c +++ b/src/mame/audio/redalert.c @@ -66,7 +66,7 @@ WRITE8_HANDLER( redalert_audio_command_w ) { redalert_state *state = space->machine().driver_data<redalert_state>(); /* the byte is connected to port A of the AY8910 */ - state->soundlatch_w(*space, 0, data); + state->soundlatch_byte_w(*space, 0, data); /* D7 is also connected to the NMI input of the CPU - the NMI is actually toggled by a 74121 */ @@ -119,7 +119,7 @@ static const ay8910_interface redalert_ay8910_interface = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_NULL, /* port A/B read */ DEVCB_NULL, DEVCB_HANDLER(redalert_analog_w) /* port A/B write */ @@ -158,7 +158,7 @@ static SOUND_START( redalert_audio ) WRITE8_HANDLER( redalert_voice_command_w ) { redalert_state *state = space->machine().driver_data<redalert_state>(); - state->soundlatch2_w(*space, 0, (data & 0x78) >> 3); + state->soundlatch2_byte_w(*space, 0, (data & 0x78) >> 3); cputag_set_input_line(space->machine(), "voice", I8085_RST75_LINE, (~data & 0x80) ? ASSERT_LINE : CLEAR_LINE); } @@ -188,7 +188,7 @@ static ADDRESS_MAP_START( redalert_voice_map, AS_PROGRAM, 8, driver_device ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x4000, 0x7fff) AM_NOP AM_RANGE(0x8000, 0x83ff) AM_MIRROR(0x3c00) AM_RAM - AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x3fff) AM_READ(soundlatch2_r) AM_WRITENOP + AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x3fff) AM_READ(soundlatch2_byte_r) AM_WRITENOP ADDRESS_MAP_END @@ -286,7 +286,7 @@ WRITE8_HANDLER( demoneye_audio_command_w ) { redalert_state *state = space->machine().driver_data<redalert_state>(); /* the byte is connected to port A of the AY8910 */ - state->soundlatch_w(*space, 0, data); + state->soundlatch_byte_w(*space, 0, data); cputag_set_input_line(space->machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -359,7 +359,7 @@ static const ay8910_interface demoneye_ay8910_interface = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_NULL, /* port A/B read */ DEVCB_NULL, DEVCB_NULL /* port A/B write */ diff --git a/src/mame/audio/scramble.c b/src/mame/audio/scramble.c index a2de9bbf72a..24dca51c51c 100644 --- a/src/mame/audio/scramble.c +++ b/src/mame/audio/scramble.c @@ -126,7 +126,7 @@ READ8_DEVICE_HANDLER( hotshock_soundlatch_r ) { driver_device *drvstate = device->machine().driver_data<driver_device>(); cputag_set_input_line(device->machine(), "audiocpu", 0, CLEAR_LINE); - return drvstate->soundlatch_r(*device->machine().device("audiocpu")->memory().space(AS_PROGRAM),0); + return drvstate->soundlatch_byte_r(*device->machine().device("audiocpu")->memory().space(AS_PROGRAM),0); } static void filter_w(device_t *device, int data) diff --git a/src/mame/audio/timeplt.c b/src/mame/audio/timeplt.c index d4c2ff80566..d6bc60ec8ed 100644 --- a/src/mame/audio/timeplt.c +++ b/src/mame/audio/timeplt.c @@ -198,7 +198,7 @@ static const ay8910_interface timeplt_ay8910_interface = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_DEVICE_HANDLER("timeplt_audio", timeplt_portB_r), DEVCB_NULL, DEVCB_NULL diff --git a/src/mame/audio/williams.c b/src/mame/audio/williams.c index e1c52231bdf..21688d7a965 100644 --- a/src/mame/audio/williams.c +++ b/src/mame/audio/williams.c @@ -544,7 +544,7 @@ static READ8_HANDLER( narc_command_r ) driver_device *drvstate = space->machine().driver_data<driver_device>(); device_set_input_line(state->sound_cpu, M6809_IRQ_LINE, CLEAR_LINE); state->sound_int_state = 0; - return drvstate->soundlatch_r(*space, 0); + return drvstate->soundlatch_byte_r(*space, 0); } @@ -552,7 +552,7 @@ static WRITE8_HANDLER( narc_command2_w ) { williams_audio_state *state = &audio; driver_device *drvstate = space->machine().driver_data<driver_device>(); - drvstate->soundlatch2_w(*space, 0, data & 0xff); + drvstate->soundlatch2_byte_w(*space, 0, data & 0xff); device_set_input_line(state->soundalt_cpu, M6809_FIRQ_LINE, ASSERT_LINE); } @@ -562,7 +562,7 @@ static READ8_HANDLER( narc_command2_r ) williams_audio_state *state = &audio; driver_device *drvstate = space->machine().driver_data<driver_device>(); device_set_input_line(state->soundalt_cpu, M6809_FIRQ_LINE, CLEAR_LINE); - return drvstate->soundlatch2_r(*space, 0); + return drvstate->soundlatch2_byte_r(*space, 0); } @@ -619,7 +619,7 @@ void williams_narc_data_w(running_machine &machine, int data) device_t *sound_cpu = state->sound_cpu; address_space *space = sound_cpu->memory().space(AS_PROGRAM); driver_device *drvstate = space->machine().driver_data<driver_device>(); - drvstate->soundlatch_w(*space, 0, data & 0xff); + drvstate->soundlatch_byte_w(*space, 0, data & 0xff); device_set_input_line(sound_cpu, INPUT_LINE_NMI, (data & 0x100) ? CLEAR_LINE : ASSERT_LINE); if (!(data & 0x200)) { @@ -697,7 +697,7 @@ static READ8_HANDLER( adpcm_command_r ) self-tests to pass */ space->machine().scheduler().timer_set(attotime::from_usec(10), FUNC(clear_irq_state)); driver_device *drvstate = space->machine().driver_data<driver_device>(); - return drvstate->soundlatch_r(*space, 0); + return drvstate->soundlatch_byte_r(*space, 0); } @@ -720,7 +720,7 @@ void williams_adpcm_data_w(running_machine &machine, int data) device_t *sound_cpu = state->sound_cpu; address_space *space = sound_cpu->memory().space(AS_PROGRAM); driver_device *drvstate = space->machine().driver_data<driver_device>(); - drvstate->soundlatch_w(*space, 0, data & 0xff); + drvstate->soundlatch_byte_w(*space, 0, data & 0xff); if (!(data & 0x200)) { device_set_input_line(sound_cpu, M6809_IRQ_LINE, ASSERT_LINE); diff --git a/src/mame/drivers/1942.c b/src/mame/drivers/1942.c index 86767c51700..7c9d19ec3e0 100644 --- a/src/mame/drivers/1942.c +++ b/src/mame/drivers/1942.c @@ -94,7 +94,7 @@ static ADDRESS_MAP_START( c1942_map, AS_PROGRAM, 8, _1942_state ) AM_RANGE(0xc002, 0xc002) AM_READ_PORT("P2") AM_RANGE(0xc003, 0xc003) AM_READ_PORT("DSWA") AM_RANGE(0xc004, 0xc004) AM_READ_PORT("DSWB") - AM_RANGE(0xc800, 0xc800) AM_WRITE(soundlatch_w) + AM_RANGE(0xc800, 0xc800) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xc802, 0xc803) AM_WRITE(c1942_scroll_w) AM_RANGE(0xc804, 0xc804) AM_WRITE(c1942_c804_w) AM_RANGE(0xc805, 0xc805) AM_WRITE(c1942_palette_bank_w) @@ -108,7 +108,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, _1942_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x4000, 0x47ff) AM_RAM - AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_r) + AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) AM_RANGE(0x8000, 0x8001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) AM_RANGE(0xc000, 0xc001) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/1943.c b/src/mame/drivers/1943.c index af7f52c12ba..c38ac9246b3 100644 --- a/src/mame/drivers/1943.c +++ b/src/mame/drivers/1943.c @@ -59,7 +59,7 @@ static ADDRESS_MAP_START( c1943_map, AS_PROGRAM, 8, _1943_state ) AM_RANGE(0xc003, 0xc003) AM_READ_PORT("DSWA") AM_RANGE(0xc004, 0xc004) AM_READ_PORT("DSWB") AM_RANGE(0xc007, 0xc007) AM_READ(c1943_protection_r) - AM_RANGE(0xc800, 0xc800) AM_WRITE(soundlatch_w) + AM_RANGE(0xc800, 0xc800) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xc804, 0xc804) AM_WRITE(c1943_c804_w) // ROM bank switch, screen flip AM_RANGE(0xc806, 0xc806) AM_WRITE(watchdog_reset_w) AM_RANGE(0xc807, 0xc807) AM_WRITENOP // ??? @@ -80,7 +80,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, _1943_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0xc000, 0xc7ff) AM_RAM - AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_r) + AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_byte_r) AM_RANGE(0xe000, 0xe001) AM_DEVWRITE_LEGACY("ym1", ym2203_w) AM_RANGE(0xe002, 0xe003) AM_DEVWRITE_LEGACY("ym2", ym2203_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/40love.c b/src/mame/drivers/40love.c index 1c4cf391c82..ed759d54adf 100644 --- a/src/mame/drivers/40love.c +++ b/src/mame/drivers/40love.c @@ -236,7 +236,7 @@ static TIMER_CALLBACK( nmi_callback ) WRITE8_MEMBER(fortyl_state::sound_command_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); machine().scheduler().synchronize(FUNC(nmi_callback), data); } @@ -750,7 +750,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, fortyl_state ) AM_RANGE(0xca00, 0xca0d) AM_DEVWRITE_LEGACY("msm", msm5232_w) AM_RANGE(0xcc00, 0xcc00) AM_DEVWRITE_LEGACY("msm", sound_control_0_w) AM_RANGE(0xce00, 0xce00) AM_DEVWRITE_LEGACY("msm", sound_control_1_w) - AM_RANGE(0xd800, 0xd800) AM_READ(soundlatch_r) AM_WRITE(to_main_w) + AM_RANGE(0xd800, 0xd800) AM_READ(soundlatch_byte_r) AM_WRITE(to_main_w) AM_RANGE(0xda00, 0xda00) AM_READNOP AM_WRITE(nmi_enable_w) /* unknown read */ AM_RANGE(0xdc00, 0xdc00) AM_WRITE(nmi_disable_w) AM_RANGE(0xde00, 0xde00) AM_READNOP AM_DEVWRITE_LEGACY("dac", dac_signed_w) /* signed 8-bit DAC - unknown read */ diff --git a/src/mame/drivers/88games.c b/src/mame/drivers/88games.c index 7fa74f5e87d..472b6d64dd1 100644 --- a/src/mame/drivers/88games.c +++ b/src/mame/drivers/88games.c @@ -134,7 +134,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, _88games_state ) AM_RANGE(0x3800, 0x3fff) AM_READWRITE(bankedram_r, bankedram_w) AM_BASE(m_ram) AM_RANGE(0x5f84, 0x5f84) AM_WRITE(k88games_5f84_w) AM_RANGE(0x5f88, 0x5f88) AM_WRITE(watchdog_reset_w) - AM_RANGE(0x5f8c, 0x5f8c) AM_WRITE(soundlatch_w) + AM_RANGE(0x5f8c, 0x5f8c) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x5f90, 0x5f90) AM_WRITE(k88games_sh_irqtrigger_w) AM_RANGE(0x5f94, 0x5f94) AM_READ_PORT("IN0") AM_RANGE(0x5f95, 0x5f95) AM_READ_PORT("IN1") @@ -150,7 +150,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, _88games_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x9000, 0x9000) AM_WRITE(speech_msg_w) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0xe000, 0xe000) AM_WRITE(speech_control_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/actfancr.c b/src/mame/drivers/actfancr.c index f21cc05fa75..18d879ec093 100644 --- a/src/mame/drivers/actfancr.c +++ b/src/mame/drivers/actfancr.c @@ -55,7 +55,7 @@ READ8_MEMBER(actfancr_state::triothep_control_r) WRITE8_MEMBER(actfancr_state::actfancr_sound_w) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } @@ -118,7 +118,7 @@ static ADDRESS_MAP_START( dec0_s_map, AS_PROGRAM, 8, actfancr_state ) AM_RANGE(0x0000, 0x07ff) AM_RAM AM_RANGE(0x0800, 0x0801) AM_DEVWRITE_LEGACY("ym1", ym2203_w) AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym2", ym3812_w) - AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_r) + AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) AM_RANGE(0x3800, 0x3800) AM_DEVREADWRITE("oki", okim6295_device, read, write) AM_RANGE(0x4000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/aeroboto.c b/src/mame/drivers/aeroboto.c index ce07673fefd..9bd7f40ba55 100644 --- a/src/mame/drivers/aeroboto.c +++ b/src/mame/drivers/aeroboto.c @@ -83,8 +83,8 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, aeroboto_state ) AM_RANGE(0x2900, 0x2fff) AM_WRITENOP // cleared along with sprite RAM AM_RANGE(0x2973, 0x2973) AM_READ(aeroboto_2973_r) // protection read AM_RANGE(0x3000, 0x3000) AM_READWRITE(aeroboto_in0_r, aeroboto_3000_w) - AM_RANGE(0x3001, 0x3001) AM_READ_PORT("DSW1") AM_WRITE(soundlatch_w) - AM_RANGE(0x3002, 0x3002) AM_READ_PORT("DSW2") AM_WRITE(soundlatch2_w) + AM_RANGE(0x3001, 0x3001) AM_READ_PORT("DSW1") AM_WRITE(soundlatch_byte_w) + AM_RANGE(0x3002, 0x3002) AM_READ_PORT("DSW2") AM_WRITE(soundlatch2_byte_w) AM_RANGE(0x3003, 0x3003) AM_WRITEONLY AM_BASE(m_vscroll) AM_RANGE(0x3004, 0x3004) AM_READ(aeroboto_201_r) AM_WRITEONLY AM_BASE(m_starx) AM_RANGE(0x3005, 0x3005) AM_WRITEONLY AM_BASE(m_stary) // usable but probably wrong @@ -217,8 +217,8 @@ static const ay8910_interface ay8910_config = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), - DEVCB_DRIVER_MEMBER(driver_device, soundlatch2_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch2_byte_r), DEVCB_NULL, DEVCB_NULL }; diff --git a/src/mame/drivers/aerofgt.c b/src/mame/drivers/aerofgt.c index 9883176bde7..47567807aaf 100644 --- a/src/mame/drivers/aerofgt.c +++ b/src/mame/drivers/aerofgt.c @@ -71,7 +71,7 @@ WRITE16_MEMBER(aerofgt_state::sound_command_w) if (ACCESSING_BITS_0_7) { m_pending_command = 1; - soundlatch_w(space, offset, data & 0xff); + soundlatch_byte_w(space, offset, data & 0xff); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } } @@ -81,7 +81,7 @@ WRITE16_MEMBER(aerofgt_state::turbofrc_sound_command_w) if (ACCESSING_BITS_8_15) { m_pending_command = 1; - soundlatch_w(space, offset, (data >> 8) & 0xff); + soundlatch_byte_w(space, offset, (data >> 8) & 0xff); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } } @@ -90,7 +90,7 @@ WRITE16_MEMBER(aerofgt_state::aerfboot_soundlatch_w) { if(ACCESSING_BITS_8_15) { - soundlatch_w(space, 0, (data >> 8) & 0xff); + soundlatch_byte_w(space, 0, (data >> 8) & 0xff); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } } @@ -385,7 +385,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( turbofrc_sound_portmap, AS_IO, 8, aerofgt_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x00) AM_WRITE(aerofgt_sh_bankswitch_w) - AM_RANGE(0x14, 0x14) AM_READ(soundlatch_r) AM_WRITE(pending_command_clear_w) + AM_RANGE(0x14, 0x14) AM_READ(soundlatch_byte_r) AM_WRITE(pending_command_clear_w) AM_RANGE(0x18, 0x1b) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w) ADDRESS_MAP_END @@ -394,7 +394,7 @@ static ADDRESS_MAP_START( aerofgt_sound_portmap, AS_IO, 8, aerofgt_state ) AM_RANGE(0x00, 0x03) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w) AM_RANGE(0x04, 0x04) AM_WRITE(aerofgt_sh_bankswitch_w) AM_RANGE(0x08, 0x08) AM_WRITE(pending_command_clear_w) - AM_RANGE(0x0c, 0x0c) AM_READ(soundlatch_r) + AM_RANGE(0x0c, 0x0c) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static ADDRESS_MAP_START( aerfboot_sound_map, AS_PROGRAM, 8, aerofgt_state ) @@ -402,7 +402,7 @@ static ADDRESS_MAP_START( aerfboot_sound_map, AS_PROGRAM, 8, aerofgt_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x9000, 0x9000) AM_WRITE(aerfboot_okim6295_banking_w) AM_RANGE(0x9800, 0x9800) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static ADDRESS_MAP_START( wbbc97_sound_map, AS_PROGRAM, 8, aerofgt_state ) @@ -411,7 +411,7 @@ static ADDRESS_MAP_START( wbbc97_sound_map, AS_PROGRAM, 8, aerofgt_state ) AM_RANGE(0xf800, 0xf800) AM_DEVREADWRITE("oki", okim6295_device, read, write) AM_RANGE(0xf810, 0xf811) AM_DEVWRITE_LEGACY("ymsnd", ym3812_w) AM_RANGE(0xfc00, 0xfc00) AM_NOP - AM_RANGE(0xfc20, 0xfc20) AM_READ(soundlatch_r) + AM_RANGE(0xfc20, 0xfc20) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static INPUT_PORTS_START( pspikes ) diff --git a/src/mame/drivers/airbustr.c b/src/mame/drivers/airbustr.c index a3a0cfd317b..a83274ec31a 100644 --- a/src/mame/drivers/airbustr.c +++ b/src/mame/drivers/airbustr.c @@ -295,25 +295,25 @@ READ8_MEMBER(airbustr_state::soundcommand_status_r) READ8_MEMBER(airbustr_state::soundcommand_r) { m_soundlatch_status = 0; // soundlatch has been read - return soundlatch_r(space, 0); + return soundlatch_byte_r(space, 0); } READ8_MEMBER(airbustr_state::soundcommand2_r) { m_soundlatch2_status = 0; // soundlatch2 has been read - return soundlatch2_r(space, 0); + return soundlatch2_byte_r(space, 0); } WRITE8_MEMBER(airbustr_state::soundcommand_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); m_soundlatch_status = 1; // soundlatch has been written device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); // cause a nmi to sub cpu } WRITE8_MEMBER(airbustr_state::soundcommand2_w) { - soundlatch2_w(space, 0, data); + soundlatch2_byte_w(space, 0, data); m_soundlatch2_status = 1; // soundlatch2 has been written } diff --git a/src/mame/drivers/ajax.c b/src/mame/drivers/ajax.c index 55b5c6d34e0..1b48cd8cc02 100644 --- a/src/mame/drivers/ajax.c +++ b/src/mame/drivers/ajax.c @@ -56,7 +56,7 @@ static ADDRESS_MAP_START( ajax_sound_map, AS_PROGRAM, 8, ajax_state ) AM_RANGE(0xb80c, 0xb80c) AM_DEVWRITE_LEGACY("k007232_2", k007232_extvol_w) /* extra volume, goes to the 007232 w/ A11 */ /* selecting a different latch for the external port */ AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) /* YM2151 */ - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) /* soundlatch_r */ + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) /* soundlatch_byte_r */ ADDRESS_MAP_END diff --git a/src/mame/drivers/aliens.c b/src/mame/drivers/aliens.c index e012c38fbc6..14fd9af8dbc 100644 --- a/src/mame/drivers/aliens.c +++ b/src/mame/drivers/aliens.c @@ -69,7 +69,7 @@ WRITE8_MEMBER(aliens_state::aliens_coin_counter_w) WRITE8_MEMBER(aliens_state::aliens_sh_irqtrigger_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff); } @@ -133,7 +133,7 @@ static ADDRESS_MAP_START( aliens_sound_map, AS_PROGRAM, 8, aliens_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM /* ROM g04_b03.bin */ AM_RANGE(0x8000, 0x87ff) AM_RAM /* RAM */ AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) - AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_r) /* soundlatch_r */ + AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_byte_r) /* soundlatch_byte_r */ AM_RANGE(0xe000, 0xe00d) AM_DEVREADWRITE_LEGACY("k007232", k007232_r, k007232_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/alpha68k.c b/src/mame/drivers/alpha68k.c index e1992ba67fd..30e0d9d7414 100644 --- a/src/mame/drivers/alpha68k.c +++ b/src/mame/drivers/alpha68k.c @@ -296,20 +296,20 @@ READ16_MEMBER(alpha68k_state::jongbou_inputs_r) WRITE16_MEMBER(alpha68k_state::kyros_sound_w) { if(ACCESSING_BITS_8_15) - soundlatch_w(space, 0, (data >> 8) & 0xff); + soundlatch_byte_w(space, 0, (data >> 8) & 0xff); } WRITE16_MEMBER(alpha68k_state::alpha68k_II_sound_w) { if(ACCESSING_BITS_0_7) - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); } WRITE16_MEMBER(alpha68k_state::alpha68k_V_sound_w) { /* Sound & fix bank select are in the same word */ if(ACCESSING_BITS_0_7) - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); if(ACCESSING_BITS_8_15) alpha68k_V_video_bank_w(machine(), (data >> 8) & 0xff); } @@ -319,7 +319,7 @@ WRITE16_MEMBER(alpha68k_state::paddlema_soundlatch_w) if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_audiocpu, 0, HOLD_LINE); } } @@ -329,7 +329,7 @@ WRITE16_MEMBER(alpha68k_state::tnextspc_soundlatch_w) if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } } @@ -750,8 +750,8 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( kyros_sound_map, AS_PROGRAM, 8, alpha68k_state ) AM_RANGE(0x0000, 0xbfff) AM_ROM AM_RANGE(0xc000, 0xc7ff) AM_RAM - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) - AM_RANGE(0xe002, 0xe002) AM_WRITE(soundlatch_clear_w) + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) + AM_RANGE(0xe002, 0xe002) AM_WRITE(soundlatch_clear_byte_w) AM_RANGE(0xe004, 0xe004) AM_DEVWRITE_LEGACY("dac", dac_signed_w) AM_RANGE(0xe006, 0xe00e) AM_WRITENOP // soundboard I/O's, ignored /* reference only @@ -766,8 +766,8 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sstingry_sound_map, AS_PROGRAM, 8, alpha68k_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0x87ff) AM_RAM - AM_RANGE(0xc100, 0xc100) AM_READ(soundlatch_r) - AM_RANGE(0xc102, 0xc102) AM_WRITE(soundlatch_clear_w) + AM_RANGE(0xc100, 0xc100) AM_READ(soundlatch_byte_r) + AM_RANGE(0xc102, 0xc102) AM_WRITE(soundlatch_clear_byte_w) AM_RANGE(0xc104, 0xc104) AM_DEVWRITE_LEGACY("dac", dac_signed_w) AM_RANGE(0xc106, 0xc10e) AM_WRITENOP // soundboard I/O's, ignored ADDRESS_MAP_END @@ -779,7 +779,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( alpha68k_I_s_map, AS_PROGRAM, 8, alpha68k_state ) AM_RANGE(0x0000, 0x9fff) AM_ROM - AM_RANGE(0xe000, 0xe000) AM_READWRITE(soundlatch_r, soundlatch_clear_w) + AM_RANGE(0xe000, 0xe000) AM_READWRITE(soundlatch_byte_r, soundlatch_clear_byte_w) AM_RANGE(0xe800, 0xe800) AM_DEVREADWRITE_LEGACY("ymsnd", ym3812_status_port_r, ym3812_control_port_w) AM_RANGE(0xec00, 0xec00) AM_DEVWRITE_LEGACY("ymsnd", ym3812_write_port_w) AM_RANGE(0xf000, 0xf7ff) AM_RAM @@ -790,12 +790,12 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( tnextspc_sound_map, AS_PROGRAM, 8, alpha68k_state ) AM_RANGE(0x0000, 0xefff) AM_ROM AM_RANGE(0xf000, 0xf7ff) AM_RAM - AM_RANGE(0xf800, 0xf800) AM_READWRITE(soundlatch_r, soundlatch_clear_w) + AM_RANGE(0xf800, 0xf800) AM_READWRITE(soundlatch_byte_r, soundlatch_clear_byte_w) ADDRESS_MAP_END static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, alpha68k_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READWRITE(soundlatch_r, soundlatch_clear_w) + AM_RANGE(0x00, 0x00) AM_READWRITE(soundlatch_byte_r, soundlatch_clear_byte_w) AM_RANGE(0x08, 0x08) AM_DEVWRITE_LEGACY("dac", dac_signed_w) AM_RANGE(0x0a, 0x0b) AM_DEVWRITE_LEGACY("ym2", ym2413_w) AM_RANGE(0x0c, 0x0d) AM_DEVWRITE_LEGACY("ym1", ym2203_w) @@ -815,7 +815,7 @@ static ADDRESS_MAP_START( jongbou_sound_portmap, AS_IO, 8, alpha68k_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x00) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) AM_RANGE(0x01, 0x01) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_data_w) - AM_RANGE(0x02, 0x02) AM_WRITE(soundlatch_clear_w) + AM_RANGE(0x02, 0x02) AM_WRITE(soundlatch_clear_byte_w) AM_RANGE(0x06, 0x06) AM_WRITENOP ADDRESS_MAP_END @@ -1823,7 +1823,7 @@ static const ay8910_interface ay8910_config = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r) + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r) }; WRITE8_MEMBER(alpha68k_state::porta_w) @@ -1847,7 +1847,7 @@ static const ym2203_interface ym2203_config = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_NULL, DEVCB_DRIVER_MEMBER(alpha68k_state, porta_w), DEVCB_NULL diff --git a/src/mame/drivers/amspdwy.c b/src/mame/drivers/amspdwy.c index a3a8201b511..29efabff939 100644 --- a/src/mame/drivers/amspdwy.c +++ b/src/mame/drivers/amspdwy.c @@ -69,7 +69,7 @@ static READ8_DEVICE_HANDLER( amspdwy_sound_r ) WRITE8_MEMBER(amspdwy_state::amspdwy_sound_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } @@ -114,7 +114,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( amspdwy_sound_map, AS_PROGRAM, 8, amspdwy_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM // ROM // AM_RANGE(0x8000, 0x8000) AM_WRITENOP // ? Written with 0 at the start - AM_RANGE(0x9000, 0x9000) AM_READ(soundlatch_r) // From Main CPU + AM_RANGE(0x9000, 0x9000) AM_READ(soundlatch_byte_r) // From Main CPU AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) // AM_RANGE(0xc000, 0xdfff) AM_RAM // Work RAM AM_RANGE(0xffff, 0xffff) AM_READNOP // ??? IY = FFFF at the start ? diff --git a/src/mame/drivers/aquarium.c b/src/mame/drivers/aquarium.c index 41887625e94..e6e954749ac 100644 --- a/src/mame/drivers/aquarium.c +++ b/src/mame/drivers/aquarium.c @@ -62,7 +62,7 @@ WRITE16_MEMBER(aquarium_state::aquarium_sound_w) { // popmessage("sound write %04x",data); - soundlatch_w(space, 1, data & 0xff); + soundlatch_byte_w(space, 1, data & 0xff); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE ); } @@ -131,7 +131,7 @@ static ADDRESS_MAP_START( snd_portmap, AS_IO, 8, aquarium_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0x02, 0x02) AM_READWRITE(aquarium_oki_r, aquarium_oki_w) - AM_RANGE(0x04, 0x04) AM_READ(soundlatch_r) + AM_RANGE(0x04, 0x04) AM_READ(soundlatch_byte_r) AM_RANGE(0x06, 0x06) AM_WRITE(aquarium_snd_ack_w) AM_RANGE(0x08, 0x08) AM_WRITE(aquarium_z80_bank_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/argus.c b/src/mame/drivers/argus.c index 796c9159468..52f52adf734 100644 --- a/src/mame/drivers/argus.c +++ b/src/mame/drivers/argus.c @@ -198,7 +198,7 @@ static ADDRESS_MAP_START( argus_map, AS_PROGRAM, 8, argus_state ) AM_RANGE(0xc002, 0xc002) AM_READ_PORT("P2") AM_RANGE(0xc003, 0xc003) AM_READ_PORT("DSW1") AM_RANGE(0xc004, 0xc004) AM_READ_PORT("DSW2") - AM_RANGE(0xc200, 0xc200) AM_WRITE(soundlatch_w) + AM_RANGE(0xc200, 0xc200) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xc201, 0xc201) AM_WRITE(argus_flipscreen_w) AM_RANGE(0xc202, 0xc202) AM_WRITE(argus_bankselect_w) AM_RANGE(0xc300, 0xc301) AM_RAM AM_BASE(m_bg0_scrollx) @@ -222,7 +222,7 @@ static ADDRESS_MAP_START( valtric_map, AS_PROGRAM, 8, argus_state ) AM_RANGE(0xc002, 0xc002) AM_READ_PORT("P2") AM_RANGE(0xc003, 0xc003) AM_READ_PORT("DSW1") AM_RANGE(0xc004, 0xc004) AM_READ_PORT("DSW2") - AM_RANGE(0xc200, 0xc200) AM_WRITE(soundlatch_w) + AM_RANGE(0xc200, 0xc200) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xc201, 0xc201) AM_WRITE(argus_flipscreen_w) AM_RANGE(0xc202, 0xc202) AM_WRITE(argus_bankselect_w) AM_RANGE(0xc300, 0xc300) AM_WRITE(valtric_unknown_w) @@ -247,7 +247,7 @@ static ADDRESS_MAP_START( butasan_map, AS_PROGRAM, 8, argus_state ) AM_RANGE(0xc003, 0xc003) AM_READ_PORT("DSW1") AM_RANGE(0xc004, 0xc004) AM_READ_PORT("DSW2") AM_RANGE(0xc100, 0xc100) AM_WRITE(butasan_unknown_w) - AM_RANGE(0xc200, 0xc200) AM_WRITE(soundlatch_w) + AM_RANGE(0xc200, 0xc200) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xc201, 0xc201) AM_WRITE(argus_flipscreen_w) AM_RANGE(0xc202, 0xc202) AM_WRITE(argus_bankselect_w) AM_RANGE(0xc203, 0xc203) AM_WRITE(butasan_pageselect_w) @@ -268,13 +268,13 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map_a, AS_PROGRAM, 8, argus_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0x87ff) AM_RAM - AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_r) + AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map_b, AS_PROGRAM, 8, argus_state ) AM_RANGE(0x0000, 0xbfff) AM_ROM AM_RANGE(0xc000, 0xc7ff) AM_RAM - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END #if 0 diff --git a/src/mame/drivers/armedf.c b/src/mame/drivers/armedf.c index e11d90f492f..b96cc2d3160 100644 --- a/src/mame/drivers/armedf.c +++ b/src/mame/drivers/armedf.c @@ -361,12 +361,12 @@ WRITE16_MEMBER(armedf_state::bootleg_io_w) WRITE16_MEMBER(armedf_state::sound_command_w) { if (ACCESSING_BITS_0_7) - soundlatch_w(space, 0, ((data & 0x7f) << 1) | 1); + soundlatch_byte_w(space, 0, ((data & 0x7f) << 1) | 1); } READ8_MEMBER(armedf_state::soundlatch_clear_r) { - soundlatch_clear_w(space, 0, 0); + soundlatch_clear_byte_w(space, 0, 0); return 0; } @@ -758,7 +758,7 @@ static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, armedf_state ) AM_RANGE(0x2, 0x2) AM_DEVWRITE_LEGACY("dac1", dac_signed_w) AM_RANGE(0x3, 0x3) AM_DEVWRITE_LEGACY("dac2", dac_signed_w) AM_RANGE(0x4, 0x4) AM_READ(soundlatch_clear_r) - AM_RANGE(0x6, 0x6) AM_READ(soundlatch_r) + AM_RANGE(0x6, 0x6) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/ashnojoe.c b/src/mame/drivers/ashnojoe.c index 3ed83639b2b..4ad4e97bb0b 100644 --- a/src/mame/drivers/ashnojoe.c +++ b/src/mame/drivers/ashnojoe.c @@ -91,7 +91,7 @@ WRITE16_MEMBER(ashnojoe_state::ashnojoe_soundlatch_w) if (ACCESSING_BITS_0_7) { m_soundlatch_status = 1; - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); } } @@ -126,7 +126,7 @@ WRITE8_MEMBER(ashnojoe_state::adpcm_w) READ8_MEMBER(ashnojoe_state::sound_latch_r) { m_soundlatch_status = 0; - return soundlatch_r(space, 0); + return soundlatch_byte_r(space, 0); } READ8_MEMBER(ashnojoe_state::sound_latch_status_r) diff --git a/src/mame/drivers/astrocde.c b/src/mame/drivers/astrocde.c index e52318c6482..74f490a294f 100644 --- a/src/mame/drivers/astrocde.c +++ b/src/mame/drivers/astrocde.c @@ -522,7 +522,7 @@ static const ay8910_interface ay8912_interface = WRITE8_MEMBER(astrocde_state::tenpindx_sound_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); cputag_set_input_line(machine(), "sub", INPUT_LINE_NMI, PULSE_LINE); } @@ -708,7 +708,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( tenpin_sub_io_map, AS_IO, 8, astrocde_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x90, 0x93) AM_DEVREADWRITE_LEGACY("ctc", z80ctc_r, z80ctc_w) - AM_RANGE(0x97, 0x97) AM_READ(soundlatch_r) + AM_RANGE(0x97, 0x97) AM_READ(soundlatch_byte_r) AM_RANGE(0x98, 0x98) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) AM_RANGE(0x98, 0x98) AM_DEVREAD_LEGACY("aysnd", ay8910_r) AM_RANGE(0x9a, 0x9a) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) diff --git a/src/mame/drivers/battlera.c b/src/mame/drivers/battlera.c index bbd5f7f3072..09307745865 100644 --- a/src/mame/drivers/battlera.c +++ b/src/mame/drivers/battlera.c @@ -35,7 +35,7 @@ WRITE8_MEMBER(battlera_state::battlera_sound_w) { if (offset == 0) { - soundlatch_w(space,0,data); + soundlatch_byte_w(space,0,data); cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE); } } @@ -111,7 +111,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, battlera_state ) AM_RANGE(0x080000, 0x080001) AM_WRITE(battlera_adpcm_data_w) AM_RANGE(0x1fe800, 0x1fe80f) AM_DEVWRITE_LEGACY("c6280", c6280_w) AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank7") /* Main ram */ - AM_RANGE(0x1ff000, 0x1ff001) AM_READ(soundlatch_r) AM_DEVWRITE_LEGACY("msm", battlera_adpcm_reset_w) + AM_RANGE(0x1ff000, 0x1ff001) AM_READ(soundlatch_byte_r) AM_DEVWRITE_LEGACY("msm", battlera_adpcm_reset_w) AM_RANGE(0x1ff400, 0x1ff403) AM_WRITE_LEGACY(h6280_irq_status_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/battlnts.c b/src/mame/drivers/battlnts.c index cc2d32ffbd7..0362b11c51a 100644 --- a/src/mame/drivers/battlnts.c +++ b/src/mame/drivers/battlnts.c @@ -70,7 +70,7 @@ static ADDRESS_MAP_START( battlnts_map, AS_PROGRAM, 8, battlnts_state ) AM_RANGE(0x2e08, 0x2e08) AM_WRITE(battlnts_bankswitch_w) /* bankswitch control */ AM_RANGE(0x2e0c, 0x2e0c) AM_WRITE(battlnts_spritebank_w) /* sprite bank select */ AM_RANGE(0x2e10, 0x2e10) AM_WRITE(watchdog_reset_w) /* watchdog reset */ - AM_RANGE(0x2e14, 0x2e14) AM_WRITE(soundlatch_w) /* sound code # */ + AM_RANGE(0x2e14, 0x2e14) AM_WRITE(soundlatch_byte_w) /* sound code # */ AM_RANGE(0x2e18, 0x2e18) AM_WRITE(battlnts_sh_irqtrigger_w) /* cause interrupt on audio CPU */ AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank1") /* banked ROM */ AM_RANGE(0x8000, 0xffff) AM_ROM /* ROM 777e02.bin */ @@ -81,7 +81,7 @@ static ADDRESS_MAP_START( battlnts_sound_map, AS_PROGRAM, 8, battlnts_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM /* RAM */ AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ym1", ym3812_r, ym3812_w) /* YM3812 (chip 1) */ AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ym2", ym3812_r, ym3812_w) /* YM3812 (chip 2) */ - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) /* soundlatch_r */ + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) /* soundlatch_byte_r */ ADDRESS_MAP_END /************************************* diff --git a/src/mame/drivers/bbusters.c b/src/mame/drivers/bbusters.c index caae010b49a..57f5f28ba57 100644 --- a/src/mame/drivers/bbusters.c +++ b/src/mame/drivers/bbusters.c @@ -253,7 +253,7 @@ WRITE16_MEMBER(bbusters_state::sound_cpu_w) { if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data&0xff); + soundlatch_byte_w(space, 0, data&0xff); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } } @@ -376,7 +376,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, bbusters_state ) AM_RANGE(0x0000, 0xefff) AM_ROM AM_RANGE(0xf000, 0xf7ff) AM_RAM - AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_r) AM_WRITE(sound_status_w) + AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_byte_r) AM_WRITE(sound_status_w) ADDRESS_MAP_END static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, bbusters_state ) diff --git a/src/mame/drivers/bfm_sc1.c b/src/mame/drivers/bfm_sc1.c index 0dafccc276a..1748be23b16 100644 --- a/src/mame/drivers/bfm_sc1.c +++ b/src/mame/drivers/bfm_sc1.c @@ -695,7 +695,7 @@ static ADDRESS_MAP_START( sc1_base, AS_PROGRAM, 8, bfm_sc1_state ) AM_RANGE(0x2E00, 0x2E00) AM_READ(irqlatch_r) // irq latch - AM_RANGE(0x3001, 0x3001) AM_READ(soundlatch_r) + AM_RANGE(0x3001, 0x3001) AM_READ(soundlatch_byte_r) AM_RANGE(0x3001, 0x3001) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) AM_RANGE(0x3101, 0x3201) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) diff --git a/src/mame/drivers/bingoc.c b/src/mame/drivers/bingoc.c index 58d357d1c77..f2b71a6a7bd 100644 --- a/src/mame/drivers/bingoc.c +++ b/src/mame/drivers/bingoc.c @@ -89,7 +89,7 @@ READ8_MEMBER(bingoc_state::sound_test_r) #else WRITE16_MEMBER(bingoc_state::main_sound_latch_w) { - soundlatch_w(space,0,data&0xff); + soundlatch_byte_w(space,0,data&0xff); cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_NMI, PULSE_LINE); } #endif @@ -127,7 +127,7 @@ static ADDRESS_MAP_START( sound_io, AS_IO, 8, bingoc_state ) AM_RANGE(0x40, 0x40) AM_DEVWRITE_LEGACY("upd", bingoc_play_w) AM_RANGE(0x80, 0x80) AM_DEVWRITE_LEGACY("upd", upd7759_port_w) #if !SOUND_TEST - AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_r) //soundlatch + AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_byte_r) //soundlatch #else AM_RANGE(0xc0, 0xc0) AM_READ(sound_test_r) #endif diff --git a/src/mame/drivers/bionicc.c b/src/mame/drivers/bionicc.c index cb658e70f21..91539c80762 100644 --- a/src/mame/drivers/bionicc.c +++ b/src/mame/drivers/bionicc.c @@ -102,7 +102,7 @@ WRITE16_MEMBER(bionicc_state::hacked_soundcommand_w) { COMBINE_DATA(&m_soundcommand); - soundlatch_w(space, 0, m_soundcommand & 0xff); + soundlatch_byte_w(space, 0, m_soundcommand & 0xff); } READ16_MEMBER(bionicc_state::hacked_soundcommand_r) @@ -164,7 +164,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, bionicc_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0x8001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) AM_RANGE(0xc000, 0xc7ff) AM_RAM ADDRESS_MAP_END diff --git a/src/mame/drivers/bking.c b/src/mame/drivers/bking.c index e975477ed8f..7390abbe59c 100644 --- a/src/mame/drivers/bking.c +++ b/src/mame/drivers/bking.c @@ -42,7 +42,7 @@ WRITE8_MEMBER(bking_state::bking_soundlatch_w) if (data & (1 << i)) code |= 0x80 >> i; - soundlatch_w(space, offset, code); + soundlatch_byte_w(space, offset, code); if (m_sound_nmi_enable) device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } @@ -133,7 +133,7 @@ static ADDRESS_MAP_START( bking_audio_map, AS_PROGRAM, 8, bking_state ) AM_RANGE(0x4401, 0x4401) AM_DEVREAD_LEGACY("ay1", ay8910_r) AM_RANGE(0x4402, 0x4403) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) AM_RANGE(0x4403, 0x4403) AM_DEVREAD_LEGACY("ay2", ay8910_r) - AM_RANGE(0x4800, 0x4800) AM_READ(soundlatch_r) + AM_RANGE(0x4800, 0x4800) AM_READ(soundlatch_byte_r) AM_RANGE(0x4802, 0x4802) AM_READWRITE(bking_sndnmi_disable_r, bking_sndnmi_enable_w) AM_RANGE(0xe000, 0xefff) AM_ROM /* Space for diagnostic ROM */ ADDRESS_MAP_END diff --git a/src/mame/drivers/bladestl.c b/src/mame/drivers/bladestl.c index f85f0121a36..4c46151ccb1 100644 --- a/src/mame/drivers/bladestl.c +++ b/src/mame/drivers/bladestl.c @@ -90,7 +90,7 @@ WRITE8_MEMBER(bladestl_state::bladestl_bankswitch_w) WRITE8_MEMBER(bladestl_state::bladestl_sh_irqtrigger_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); device_set_input_line(m_audiocpu, M6809_IRQ_LINE, HOLD_LINE); //logerror("(sound) write %02x\n", data); } @@ -146,7 +146,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, bladestl_state ) AM_RANGE(0x3000, 0x3000) AM_DEVWRITE_LEGACY("upd", bladestl_speech_ctrl_w) /* UPD7759 */ AM_RANGE(0x4000, 0x4000) AM_DEVREAD_LEGACY("upd", bladestl_speech_busy_r) /* UPD7759 */ AM_RANGE(0x5000, 0x5000) AM_WRITENOP /* ??? */ - AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_r) /* soundlatch_r */ + AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) /* soundlatch_byte_r */ AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/blktiger.c b/src/mame/drivers/blktiger.c index 35cd47390a7..15fc9763ea2 100644 --- a/src/mame/drivers/blktiger.c +++ b/src/mame/drivers/blktiger.c @@ -80,7 +80,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( blktiger_io_map, AS_IO, 8, blktiger_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_WRITE(soundlatch_w) + AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_WRITE(soundlatch_byte_w) AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") AM_WRITE(blktiger_bankswitch_w) AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW0") AM_WRITE(blktiger_coinlockout_w) @@ -97,7 +97,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( blktigerbl_io_map, AS_IO, 8, blktiger_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_WRITE(soundlatch_w) + AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_WRITE(soundlatch_byte_w) AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") AM_WRITE(blktiger_bankswitch_w) AM_RANGE(0x02, 0x02) AM_READ_PORT("IN2") AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW0") AM_WRITE(blktiger_coinlockout_w) @@ -115,7 +115,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( blktiger_sound_map, AS_PROGRAM, 8, blktiger_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0xc000, 0xc7ff) AM_RAM - AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_r) + AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_byte_r) AM_RANGE(0xe000, 0xe001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w) AM_RANGE(0xe002, 0xe003) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/blockhl.c b/src/mame/drivers/blockhl.c index 470e96b4f9d..2c383f846ed 100644 --- a/src/mame/drivers/blockhl.c +++ b/src/mame/drivers/blockhl.c @@ -92,7 +92,7 @@ WRITE8_MEMBER(blockhl_state::k052109_051960_w) static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, blockhl_state ) - AM_RANGE(0x1f84, 0x1f84) AM_WRITE(soundlatch_w) + AM_RANGE(0x1f84, 0x1f84) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x1f88, 0x1f88) AM_WRITE(blockhl_sh_irqtrigger_w) AM_RANGE(0x1f8c, 0x1f8c) AM_WRITE(watchdog_reset_w) AM_RANGE(0x1f94, 0x1f94) AM_READ_PORT("DSW3") @@ -110,7 +110,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( audio_map, AS_PROGRAM, 8, blockhl_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0x87ff) AM_RAM - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0xe00c, 0xe00d) AM_WRITENOP /* leftover from missing 007232? */ ADDRESS_MAP_END diff --git a/src/mame/drivers/blockout.c b/src/mame/drivers/blockout.c index 107f854b085..10d77ca8188 100644 --- a/src/mame/drivers/blockout.c +++ b/src/mame/drivers/blockout.c @@ -79,7 +79,7 @@ WRITE16_MEMBER(blockout_state::blockout_sound_command_w) if (ACCESSING_BITS_0_7) { - soundlatch_w(space, offset, data & 0xff); + soundlatch_byte_w(space, offset, data & 0xff); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } } @@ -147,7 +147,7 @@ static ADDRESS_MAP_START( audio_map, AS_PROGRAM, 8, blockout_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x8800, 0x8801) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0x9800, 0x9800) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/blueprnt.c b/src/mame/drivers/blueprnt.c index 4ceed521a55..15730516788 100644 --- a/src/mame/drivers/blueprnt.c +++ b/src/mame/drivers/blueprnt.c @@ -70,7 +70,7 @@ READ8_MEMBER(blueprnt_state::blueprnt_sh_dipsw_r) WRITE8_MEMBER(blueprnt_state::blueprnt_sound_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } @@ -254,7 +254,7 @@ static const ay8910_interface ay8910_interface_1 = AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, DEVCB_NULL, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_HANDLER(dipsw_w), DEVCB_NULL }; diff --git a/src/mame/drivers/boogwing.c b/src/mame/drivers/boogwing.c index 6ecb54bd12a..7b06dc535a8 100644 --- a/src/mame/drivers/boogwing.c +++ b/src/mame/drivers/boogwing.c @@ -134,7 +134,7 @@ static ADDRESS_MAP_START( audio_map, AS_PROGRAM, 8, boogwing_state ) AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0x120000, 0x120001) AM_DEVREADWRITE("oki1", okim6295_device, read, write) AM_RANGE(0x130000, 0x130001) AM_DEVREADWRITE("oki2", okim6295_device, read, write) - AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_r) + AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_byte_r) AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8") AM_RANGE(0x1fec00, 0x1fec01) AM_WRITE_LEGACY(h6280_timer_w) AM_RANGE(0x1ff400, 0x1ff403) AM_WRITE_LEGACY(h6280_irq_status_w) diff --git a/src/mame/drivers/bottom9.c b/src/mame/drivers/bottom9.c index c923fbb7506..c81401c9bc4 100644 --- a/src/mame/drivers/bottom9.c +++ b/src/mame/drivers/bottom9.c @@ -169,7 +169,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, bottom9_state ) AM_RANGE(0x1f80, 0x1f80) AM_WRITE(bankswitch_w) AM_RANGE(0x1f90, 0x1f90) AM_WRITE(bottom9_1f90_w) AM_RANGE(0x1fa0, 0x1fa0) AM_WRITE(watchdog_reset_w) - AM_RANGE(0x1fb0, 0x1fb0) AM_WRITE(soundlatch_w) + AM_RANGE(0x1fb0, 0x1fb0) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x1fc0, 0x1fc0) AM_WRITE(bottom9_sh_irqtrigger_w) AM_RANGE(0x1fd0, 0x1fd0) AM_READ_PORT("SYSTEM") AM_RANGE(0x1fd1, 0x1fd1) AM_READ_PORT("P1") @@ -190,7 +190,7 @@ static ADDRESS_MAP_START( audio_map, AS_PROGRAM, 8, bottom9_state ) AM_RANGE(0x9000, 0x9000) AM_WRITE(sound_bank_w) AM_RANGE(0xa000, 0xa00d) AM_DEVREADWRITE_LEGACY("k007232_1", k007232_r, k007232_w) AM_RANGE(0xb000, 0xb00d) AM_DEVREADWRITE_LEGACY("k007232_2", k007232_r, k007232_w) - AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_r) + AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_byte_r) AM_RANGE(0xf000, 0xf000) AM_WRITE(nmi_enable_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/brkthru.c b/src/mame/drivers/brkthru.c index ce5b9cf1ba5..47722a881dd 100644 --- a/src/mame/drivers/brkthru.c +++ b/src/mame/drivers/brkthru.c @@ -92,7 +92,7 @@ WRITE8_MEMBER(brkthru_state::darwin_0803_w) WRITE8_MEMBER(brkthru_state::brkthru_soundlatch_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } @@ -151,7 +151,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, brkthru_state ) AM_RANGE(0x0000, 0x1fff) AM_RAM AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ym2", ym3526_w) - AM_RANGE(0x4000, 0x4000) AM_READ(soundlatch_r) + AM_RANGE(0x4000, 0x4000) AM_READ(soundlatch_byte_r) AM_RANGE(0x6000, 0x6001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w) AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/btime.c b/src/mame/drivers/btime.c index 71884c82beb..d4b354bd672 100644 --- a/src/mame/drivers/btime.c +++ b/src/mame/drivers/btime.c @@ -511,7 +511,7 @@ static ADDRESS_MAP_START( disco_audio_map, AS_PROGRAM, 8, btime_state ) AM_RANGE(0x5000, 0x5fff) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) AM_RANGE(0x6000, 0x6fff) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) AM_RANGE(0x7000, 0x7fff) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) - AM_RANGE(0x8000, 0x8fff) AM_READ(soundlatch_r) AM_WRITENOP /* ack ? */ + AM_RANGE(0x8000, 0x8fff) AM_READ(soundlatch_byte_r) AM_WRITENOP /* ack ? */ AM_RANGE(0xf000, 0xffff) AM_ROM ADDRESS_MAP_END @@ -541,14 +541,14 @@ static INPUT_CHANGED( coin_inserted_nmi_lo ) WRITE8_MEMBER(btime_state::audio_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); device_set_input_line(m_audiocpu, 0, ASSERT_LINE); } READ8_MEMBER(btime_state::audio_command_r) { device_set_input_line(m_audiocpu, 0, CLEAR_LINE); - return soundlatch_r(space, offset); + return soundlatch_byte_r(space, offset); } READ8_MEMBER(btime_state::zoar_dsw1_read) diff --git a/src/mame/drivers/bublbobl.c b/src/mame/drivers/bublbobl.c index d1f305c7975..024c6d6193f 100644 --- a/src/mame/drivers/bublbobl.c +++ b/src/mame/drivers/bublbobl.c @@ -308,7 +308,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, bublbobl_state ) AM_RANGE(0x8000, 0x8fff) AM_RAM AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w) AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ym2", ym3526_r, ym3526_w) - AM_RANGE(0xb000, 0xb000) AM_READ(soundlatch_r) AM_WRITE(bublbobl_sound_status_w) + AM_RANGE(0xb000, 0xb000) AM_READ(soundlatch_byte_r) AM_WRITE(bublbobl_sound_status_w) AM_RANGE(0xb001, 0xb001) AM_WRITE(bublbobl_sh_nmi_enable_w) AM_READNOP AM_RANGE(0xb002, 0xb002) AM_WRITE(bublbobl_sh_nmi_disable_w) AM_RANGE(0xe000, 0xffff) AM_ROM // space for diagnostic ROM? @@ -392,7 +392,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( tokio_sound_map, AS_PROGRAM, 8, bublbobl_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0x8fff) AM_RAM - AM_RANGE(0x9000, 0x9000) AM_READ(soundlatch_r) AM_WRITE(bublbobl_sound_status_w) + AM_RANGE(0x9000, 0x9000) AM_READ(soundlatch_byte_r) AM_WRITE(bublbobl_sound_status_w) AM_RANGE(0x9800, 0x9800) AM_READNOP // ??? AM_RANGE(0xa000, 0xa000) AM_WRITE(bublbobl_sh_nmi_disable_w) AM_RANGE(0xa800, 0xa800) AM_WRITE(bublbobl_sh_nmi_enable_w) diff --git a/src/mame/drivers/buggychl.c b/src/mame/drivers/buggychl.c index 854f88a1612..f7be2f33034 100644 --- a/src/mame/drivers/buggychl.c +++ b/src/mame/drivers/buggychl.c @@ -103,7 +103,7 @@ static TIMER_CALLBACK( nmi_callback ) WRITE8_MEMBER(buggychl_state::sound_command_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); machine().scheduler().synchronize(FUNC(nmi_callback), data); } @@ -169,7 +169,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, buggychl_state ) AM_RANGE(0x4810, 0x481d) AM_DEVWRITE_LEGACY("msm", msm5232_w) AM_RANGE(0x4820, 0x4820) AM_RAM /* VOL/BAL for the 7630 on the MSM5232 output */ AM_RANGE(0x4830, 0x4830) AM_RAM /* TRBL/BASS for the 7630 on the MSM5232 output */ - AM_RANGE(0x5000, 0x5000) AM_READ(soundlatch_r) + AM_RANGE(0x5000, 0x5000) AM_READ(soundlatch_byte_r) // AM_RANGE(0x5001, 0x5001) AM_READNOP /* is command pending? */ AM_RANGE(0x5001, 0x5001) AM_WRITE(nmi_enable_w) AM_RANGE(0x5002, 0x5002) AM_WRITE(nmi_disable_w) diff --git a/src/mame/drivers/bwing.c b/src/mame/drivers/bwing.c index 2ce3a20bf24..816a1260ad6 100644 --- a/src/mame/drivers/bwing.c +++ b/src/mame/drivers/bwing.c @@ -103,7 +103,7 @@ WRITE8_MEMBER(bwing_state::bwp1_ctrl_w) device_set_input_line(m_subcpu, INPUT_LINE_NMI, ASSERT_LINE); // SNMI else { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_audiocpu, DECO16_IRQ_LINE, HOLD_LINE); // SNDREQ } break; @@ -178,7 +178,7 @@ static ADDRESS_MAP_START( bwp3_map, AS_PROGRAM, 8, bwing_state ) AM_RANGE(0x4000, 0x4000) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) AM_RANGE(0x6000, 0x6000) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) AM_RANGE(0x8000, 0x8000) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) AM_RANGE(0xd000, 0xd000) AM_WRITE(bwp3_nmimask_w) AM_RANGE(0xe000, 0xffff) AM_ROM AM_BASE_SIZE(m_bwp3_rombase, m_bwp3_romsize) ADDRESS_MAP_END diff --git a/src/mame/drivers/cabal.c b/src/mame/drivers/cabal.c index f1be64d0380..29ec65529b9 100644 --- a/src/mame/drivers/cabal.c +++ b/src/mame/drivers/cabal.c @@ -199,13 +199,13 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( cabalbl_sound_map, AS_PROGRAM, 8, cabal_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM AM_RANGE(0x2000, 0x2fff) AM_RAM - AM_RANGE(0x4000, 0x4000) AM_WRITE(soundlatch3_w) - AM_RANGE(0x4002, 0x4002) AM_WRITE(soundlatch4_w) + AM_RANGE(0x4000, 0x4000) AM_WRITE(soundlatch3_byte_w) + AM_RANGE(0x4002, 0x4002) AM_WRITE(soundlatch4_byte_w) AM_RANGE(0x4004, 0x4004) AM_WRITE(cabalbl_coin_w) AM_RANGE(0x4006, 0x4006) AM_READ_PORT("COIN") AM_RANGE(0x4008, 0x4008) AM_READ(cabalbl_snd2_r) AM_RANGE(0x400a, 0x400a) AM_READ(cabalbl_snd1_r) - AM_RANGE(0x400c, 0x400c) AM_WRITE(soundlatch2_w) + AM_RANGE(0x400c, 0x400c) AM_WRITE(soundlatch2_byte_w) AM_RANGE(0x400e, 0x400f) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0x6000, 0x6000) AM_WRITENOP /* ??? */ AM_RANGE(0x8000, 0xffff) AM_ROM @@ -228,7 +228,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( cabalbl_talk1_portmap, AS_IO, 8, cabal_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch3_r) + AM_RANGE(0x00, 0x00) AM_READ(soundlatch3_byte_r) AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("msm1", cabalbl_adpcm_w) ADDRESS_MAP_END @@ -238,7 +238,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( cabalbl_talk2_portmap, AS_IO, 8, cabal_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch4_r) + AM_RANGE(0x00, 0x00) AM_READ(soundlatch4_byte_r) AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("msm2", cabalbl_adpcm_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/calorie.c b/src/mame/drivers/calorie.c index 108533cf054..c311ed2e6ae 100644 --- a/src/mame/drivers/calorie.c +++ b/src/mame/drivers/calorie.c @@ -224,8 +224,8 @@ WRITE8_MEMBER(calorie_state::calorie_flipscreen_w) READ8_MEMBER(calorie_state::calorie_soundlatch_r) { - UINT8 latch = soundlatch_r(space, 0); - soundlatch_clear_w(space, 0, 0); + UINT8 latch = soundlatch_byte_r(space, 0); + soundlatch_clear_byte_w(space, 0, 0); return latch; } @@ -253,7 +253,7 @@ static ADDRESS_MAP_START( calorie_map, AS_PROGRAM, 8, calorie_state ) AM_RANGE(0xf002, 0xf002) AM_READ_PORT("SYSTEM") AM_RANGE(0xf004, 0xf004) AM_READ_PORT("DSW1") AM_WRITE(calorie_flipscreen_w) AM_RANGE(0xf005, 0xf005) AM_READ_PORT("DSW2") - AM_RANGE(0xf800, 0xf800) AM_WRITE(soundlatch_w) + AM_RANGE(0xf800, 0xf800) AM_WRITE(soundlatch_byte_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/capbowl.c b/src/mame/drivers/capbowl.c index 7250855a916..54f634920f7 100644 --- a/src/mame/drivers/capbowl.c +++ b/src/mame/drivers/capbowl.c @@ -183,7 +183,7 @@ WRITE8_MEMBER(capbowl_state::track_reset_w) WRITE8_MEMBER(capbowl_state::capbowl_sndcmd_w) { device_set_input_line(m_audiocpu, M6809_IRQ_LINE, HOLD_LINE); - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); } @@ -264,7 +264,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, capbowl_state ) AM_RANGE(0x1000, 0x1001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w) AM_RANGE(0x2000, 0x2000) AM_WRITENOP /* Not hooked up according to the schematics */ AM_RANGE(0x6000, 0x6000) AM_DEVWRITE_LEGACY("dac", dac_w) - AM_RANGE(0x7000, 0x7000) AM_READ(soundlatch_r) + AM_RANGE(0x7000, 0x7000) AM_READ(soundlatch_byte_r) AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/carjmbre.c b/src/mame/drivers/carjmbre.c index 77774f2f537..a39ef795956 100644 --- a/src/mame/drivers/carjmbre.c +++ b/src/mame/drivers/carjmbre.c @@ -71,7 +71,7 @@ static ADDRESS_MAP_START( carjmbre_map, AS_PROGRAM, 8, carjmbre_state ) AM_RANGE(0x9800, 0x985f) AM_MIRROR(0x80) AM_WRITEONLY AM_BASE_SIZE(m_spriteram, m_spriteram_size) AM_RANGE(0xa000, 0xa000) AM_READ_PORT("P1") AM_RANGE(0xa800, 0xa800) AM_READ_PORT("P2") - AM_RANGE(0xb800, 0xb800) AM_READ_PORT("DSW") AM_WRITE(soundlatch_w) + AM_RANGE(0xb800, 0xb800) AM_READ_PORT("DSW") AM_WRITE(soundlatch_byte_w) ADDRESS_MAP_END static ADDRESS_MAP_START( carjmbre_sound_map, AS_PROGRAM, 8, carjmbre_state ) @@ -82,7 +82,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( carjmbre_sound_io_map, AS_IO, 8, carjmbre_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r) + AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r) AM_RANGE(0x10, 0x10) AM_WRITENOP //?? written on init/0xff sound command reset AM_RANGE(0x20, 0x21) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) AM_RANGE(0x22, 0x22) AM_WRITENOP //?? written before and after 0x21 with same value diff --git a/src/mame/drivers/cbuster.c b/src/mame/drivers/cbuster.c index a7f5a9a9047..197af64a497 100644 --- a/src/mame/drivers/cbuster.c +++ b/src/mame/drivers/cbuster.c @@ -39,7 +39,7 @@ WRITE16_MEMBER(cbuster_state::twocrude_control_w) return; case 2: /* Sound CPU write */ - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_audiocpu, 0, HOLD_LINE); return; @@ -133,7 +133,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, cbuster_state ) AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE_LEGACY("ym2", ym2151_r, ym2151_w) AM_RANGE(0x120000, 0x120001) AM_DEVREADWRITE("oki1", okim6295_device, read, write) AM_RANGE(0x130000, 0x130001) AM_DEVREADWRITE("oki2", okim6295_device, read, write) - AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_r) + AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_byte_r) AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8") AM_RANGE(0x1fec00, 0x1fec01) AM_WRITE_LEGACY(h6280_timer_w) AM_RANGE(0x1ff400, 0x1ff403) AM_WRITE_LEGACY(h6280_irq_status_w) diff --git a/src/mame/drivers/cchasm.c b/src/mame/drivers/cchasm.c index 404ed55461e..ee8ffd9e5d5 100644 --- a/src/mame/drivers/cchasm.c +++ b/src/mame/drivers/cchasm.c @@ -56,7 +56,7 @@ static ADDRESS_MAP_START( sound_memmap, AS_PROGRAM, 8, cchasm_state ) AM_RANGE(0x6001, 0x6001) AM_MIRROR(0xf9e) AM_DEVREAD_LEGACY("ay1", ay8910_r) AM_RANGE(0x6020, 0x6021) AM_MIRROR(0xf9e) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) AM_RANGE(0x6021, 0x6021) AM_MIRROR(0xf9e) AM_DEVREAD_LEGACY("ay2", ay8910_r) - AM_RANGE(0x6040, 0x6040) AM_MIRROR(0xf9e) AM_READWRITE(soundlatch_r, soundlatch3_w) + AM_RANGE(0x6040, 0x6040) AM_MIRROR(0xf9e) AM_READWRITE(soundlatch_byte_r, soundlatch3_byte_w) AM_RANGE(0x6041, 0x6041) AM_MIRROR(0xf9e) AM_READWRITE_LEGACY(cchasm_soundlatch2_r, cchasm_soundlatch4_w) AM_RANGE(0x6061, 0x6061) AM_MIRROR(0xf9e) AM_WRITE_LEGACY(cchasm_reset_coin_flag_w) AM_RANGE(0x7041, 0x7041) AM_NOP // TODO diff --git a/src/mame/drivers/cclimber.c b/src/mame/drivers/cclimber.c index 385635c61e1..be38df2653a 100644 --- a/src/mame/drivers/cclimber.c +++ b/src/mame/drivers/cclimber.c @@ -216,7 +216,7 @@ Dip location verified from manual for: cclimber, guzzler, swimmer WRITE8_MEMBER(cclimber_state::swimmer_sh_soundlatch_w) { - soundlatch_w(space,offset,data); + soundlatch_byte_w(space,offset,data); cputag_set_input_line_and_vector(machine(), "audiocpu", 0, HOLD_LINE, 0xff); } @@ -399,7 +399,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( swimmer_audio_map, AS_PROGRAM, 8, cclimber_state ) AM_RANGE(0x0000, 0x0fff) AM_ROM AM_RANGE(0x2000, 0x23ff) AM_RAM - AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_r) + AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) AM_RANGE(0x4000, 0x4001) AM_RAM /* ??? */ ADDRESS_MAP_END diff --git a/src/mame/drivers/champbas.c b/src/mame/drivers/champbas.c index d681e301579..e125cbf52d7 100644 --- a/src/mame/drivers/champbas.c +++ b/src/mame/drivers/champbas.c @@ -264,7 +264,7 @@ static ADDRESS_MAP_START( champbas_main_map, AS_PROGRAM, 8, champbas_state ) AM_RANGE(0xa007, 0xa007) AM_WRITE(champbas_mcu_switch_w) // MCU not present/not used in champbas AM_RANGE(0xa060, 0xa06f) AM_RAM AM_BASE(m_spriteram_2) - AM_RANGE(0xa080, 0xa080) AM_WRITE(soundlatch_w) + AM_RANGE(0xa080, 0xa080) AM_WRITE(soundlatch_byte_w) /* AM_RANGE(0xa0a0, 0xa0a0) ???? */ AM_RANGE(0xa0c0, 0xa0c0) AM_WRITE(champbas_watchdog_reset_w) @@ -293,7 +293,7 @@ static ADDRESS_MAP_START( exctsccrb_main_map, AS_PROGRAM, 8, champbas_state ) AM_RANGE(0xa007, 0xa007) AM_WRITENOP /* MCU is not used, but some leftover code still writes here */ AM_RANGE(0xa040, 0xa06f) AM_WRITEONLY AM_BASE(m_spriteram) /* Sprite Pos */ - AM_RANGE(0xa080, 0xa080) AM_WRITE(soundlatch_w) + AM_RANGE(0xa080, 0xa080) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xa0c0, 0xa0c0) AM_WRITE(watchdog_reset_w) ADDRESS_MAP_END @@ -318,7 +318,7 @@ static ADDRESS_MAP_START( exctsccr_main_map, AS_PROGRAM, 8, champbas_state ) AM_RANGE(0xa007, 0xa007) AM_WRITENOP /* This is also MCU control, but i dont need it */ AM_RANGE(0xa040, 0xa06f) AM_WRITEONLY AM_BASE(m_spriteram) /* Sprite pos */ - AM_RANGE(0xa080, 0xa080) AM_WRITE(soundlatch_w) + AM_RANGE(0xa080, 0xa080) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xa0c0, 0xa0c0) AM_WRITE(watchdog_reset_w) ADDRESS_MAP_END @@ -326,9 +326,9 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( champbas_sub_map, AS_PROGRAM, 8, champbas_state ) AM_RANGE(0x0000, 0x5fff) AM_ROM - AM_RANGE(0x6000, 0x7fff) AM_READ(soundlatch_r) + AM_RANGE(0x6000, 0x7fff) AM_READ(soundlatch_byte_r) AM_RANGE(0x8000, 0x9fff) AM_WRITENOP // 4-bit return code to main CPU (not used) - AM_RANGE(0xa000, 0xbfff) AM_WRITE(soundlatch_clear_w) + AM_RANGE(0xa000, 0xbfff) AM_WRITE(soundlatch_clear_byte_w) AM_RANGE(0xc000, 0xdfff) AM_DEVWRITE_LEGACY("dac", champbas_dac_w) AM_RANGE(0xe000, 0xe3ff) AM_MIRROR(0x1c00) AM_RAM ADDRESS_MAP_END @@ -339,8 +339,8 @@ static ADDRESS_MAP_START( exctsccr_sub_map, AS_PROGRAM, 8, champbas_state ) AM_RANGE(0xa000, 0xa7ff) AM_RAM AM_RANGE(0xc008, 0xc008) AM_DEVWRITE_LEGACY("dac1", champbas_dac_w) AM_RANGE(0xc009, 0xc009) AM_DEVWRITE_LEGACY("dac2", champbas_dac_w) - AM_RANGE(0xc00c, 0xc00c) AM_WRITE(soundlatch_clear_w) - AM_RANGE(0xc00d, 0xc00d) AM_READ(soundlatch_r) + AM_RANGE(0xc00c, 0xc00c) AM_WRITE(soundlatch_clear_byte_w) + AM_RANGE(0xc00d, 0xc00d) AM_READ(soundlatch_byte_r) // AM_RANGE(0xc00f, 0xc00f) AM_WRITENOP /* ??? */ ADDRESS_MAP_END diff --git a/src/mame/drivers/chinagat.c b/src/mame/drivers/chinagat.c index 0f3add8fa9f..4ba70815fbb 100644 --- a/src/mame/drivers/chinagat.c +++ b/src/mame/drivers/chinagat.c @@ -140,7 +140,7 @@ static WRITE8_HANDLER( chinagat_interrupt_w ) switch (offset) { case 0: /* 3e00 - SND irq */ - state->soundlatch_w(*space, 0, data); + state->soundlatch_byte_w(*space, 0, data); device_set_input_line(state->m_snd_cpu, state->m_sound_irq, (state->m_sound_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE ); break; @@ -341,7 +341,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, ddragon_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x8800, 0x8801) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0x9800, 0x9800) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xA000, 0xA000) AM_READ(soundlatch_r) + AM_RANGE(0xA000, 0xA000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static ADDRESS_MAP_START( ym2203c_sound_map, AS_PROGRAM, 8, ddragon_state ) @@ -359,7 +359,7 @@ static ADDRESS_MAP_START( ym2203c_sound_map, AS_PROGRAM, 8, ddragon_state ) // AM_RANGE(0x8800, 0x8801) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) // AM_RANGE(0x9800, 0x9800) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xA000, 0xA000) AM_READ(soundlatch_r) + AM_RANGE(0xA000, 0xA000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static ADDRESS_MAP_START( saiyugoub1_sound_map, AS_PROGRAM, 8, ddragon_state ) @@ -367,7 +367,7 @@ static ADDRESS_MAP_START( saiyugoub1_sound_map, AS_PROGRAM, 8, ddragon_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x8800, 0x8801) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0x9800, 0x9800) AM_WRITE_LEGACY(saiyugoub1_mcu_command_w) - AM_RANGE(0xA000, 0xA000) AM_READ(soundlatch_r) + AM_RANGE(0xA000, 0xA000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static ADDRESS_MAP_START( i8748_map, AS_PROGRAM, 8, ddragon_state ) diff --git a/src/mame/drivers/chqflag.c b/src/mame/drivers/chqflag.c index 88109373d65..2d7bfc82028 100644 --- a/src/mame/drivers/chqflag.c +++ b/src/mame/drivers/chqflag.c @@ -131,7 +131,7 @@ READ8_MEMBER(chqflag_state::analog_read_r) WRITE8_MEMBER(chqflag_state::chqflag_sh_irqtrigger_w) { - soundlatch2_w(space, 0, data); + soundlatch2_byte_w(space, 0, data); device_set_input_line(m_audiocpu, 0, HOLD_LINE); } @@ -145,7 +145,7 @@ static ADDRESS_MAP_START( chqflag_map, AS_PROGRAM, 8, chqflag_state ) AM_RANGE(0x2000, 0x2007) AM_DEVREADWRITE_LEGACY("k051960", k051937_r, k051937_w) /* Sprite control registers */ AM_RANGE(0x2400, 0x27ff) AM_DEVREADWRITE_LEGACY("k051960", k051960_r, k051960_w) /* Sprite RAM */ AM_RANGE(0x2800, 0x2fff) AM_READ_BANK("bank3") AM_DEVWRITE_LEGACY("k051316_2", k051316_w) /* 051316 zoom/rotation (chip 2) */ - AM_RANGE(0x3000, 0x3000) AM_WRITE(soundlatch_w) /* sound code # */ + AM_RANGE(0x3000, 0x3000) AM_WRITE(soundlatch_byte_w) /* sound code # */ AM_RANGE(0x3001, 0x3001) AM_WRITE(chqflag_sh_irqtrigger_w) /* cause interrupt on audio CPU */ AM_RANGE(0x3002, 0x3002) AM_WRITE(chqflag_bankswitch_w) /* bankswitch control */ AM_RANGE(0x3003, 0x3003) AM_WRITE(chqflag_vreg_w) /* enable K051316 ROM reading */ @@ -187,8 +187,8 @@ static ADDRESS_MAP_START( chqflag_sound_map, AS_PROGRAM, 8, chqflag_state ) AM_RANGE(0xa01c, 0xa01c) AM_DEVWRITE_LEGACY("k007232_2", k007232_extvolume_w) /* extra volume, goes to the 007232 w/ A11 */ AM_RANGE(0xb000, 0xb00d) AM_DEVREADWRITE_LEGACY("k007232_2", k007232_r, k007232_w) /* 007232 (chip 2) */ AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) /* YM2151 */ - AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_r) /* soundlatch_r */ - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch2_r) /* engine sound volume */ + AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_byte_r) /* soundlatch_byte_r */ + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch2_byte_r) /* engine sound volume */ AM_RANGE(0xf000, 0xf000) AM_WRITENOP /* ??? */ ADDRESS_MAP_END diff --git a/src/mame/drivers/circusc.c b/src/mame/drivers/circusc.c index 20a526b0930..ae3c113ae6e 100644 --- a/src/mame/drivers/circusc.c +++ b/src/mame/drivers/circusc.c @@ -153,7 +153,7 @@ static ADDRESS_MAP_START( circusc_map, AS_PROGRAM, 8, circusc_state ) AM_RANGE(0x0003, 0x0004) AM_MIRROR(0x03f8) AM_WRITE(circusc_coin_counter_w) /* COIN1, COIN2 */ AM_RANGE(0x0005, 0x0005) AM_MIRROR(0x03f8) AM_WRITEONLY AM_BASE(m_spritebank) /* OBJ CHENG */ AM_RANGE(0x0400, 0x0400) AM_MIRROR(0x03ff) AM_WRITE(watchdog_reset_w) /* WDOG */ - AM_RANGE(0x0800, 0x0800) AM_MIRROR(0x03ff) AM_WRITE(soundlatch_w) /* SOUND DATA */ + AM_RANGE(0x0800, 0x0800) AM_MIRROR(0x03ff) AM_WRITE(soundlatch_byte_w) /* SOUND DATA */ AM_RANGE(0x0c00, 0x0c00) AM_MIRROR(0x03ff) AM_WRITE(circusc_sh_irqtrigger_w) /* SOUND-ON causes interrupt on audio CPU */ AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x03fc) AM_READ_PORT("SYSTEM") AM_RANGE(0x1001, 0x1001) AM_MIRROR(0x03fc) AM_READ_PORT("P1") @@ -174,7 +174,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, circusc_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x4000, 0x43ff) AM_MIRROR(0x1c00) AM_RAM - AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x1fff) AM_READ(soundlatch_r) /* CS0 */ + AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x1fff) AM_READ(soundlatch_byte_r) /* CS0 */ AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x1fff) AM_READ(circusc_sh_timer_r) /* CS1 */ AM_RANGE(0xa000, 0xa07f) AM_MIRROR(0x1f80) AM_WRITE(circusc_sound_w) /* CS2 - CS6 */ ADDRESS_MAP_END diff --git a/src/mame/drivers/citycon.c b/src/mame/drivers/citycon.c index 158fbe991e0..b2caff101e2 100644 --- a/src/mame/drivers/citycon.c +++ b/src/mame/drivers/citycon.c @@ -33,8 +33,8 @@ static ADDRESS_MAP_START( citycon_map, AS_PROGRAM, 8, citycon_state ) AM_RANGE(0x2800, 0x28ff) AM_RAM AM_BASE_SIZE(m_spriteram, m_spriteram_size) AM_RANGE(0x2800, 0x2fff) AM_NOP //0x2900-0x2fff cleared at post but unused AM_RANGE(0x3000, 0x3000) AM_READ(citycon_in_r) AM_WRITE(citycon_background_w) /* player 1 & 2 inputs multiplexed */ - AM_RANGE(0x3001, 0x3001) AM_READ_PORT("DSW1") AM_WRITE(soundlatch_w) - AM_RANGE(0x3002, 0x3002) AM_READ_PORT("DSW2") AM_WRITE(soundlatch2_w) + AM_RANGE(0x3001, 0x3001) AM_READ_PORT("DSW1") AM_WRITE(soundlatch_byte_w) + AM_RANGE(0x3002, 0x3002) AM_READ_PORT("DSW2") AM_WRITE(soundlatch2_byte_w) AM_RANGE(0x3004, 0x3005) AM_READNOP AM_WRITEONLY AM_BASE(m_scroll) AM_RANGE(0x3007, 0x3007) AM_READ(citycon_irq_ack_r) AM_RANGE(0x3800, 0x3cff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_byte_be_w) AM_SHARE("paletteram") @@ -176,8 +176,8 @@ static const ym2203_interface ym2203_config = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), - DEVCB_DRIVER_MEMBER(driver_device, soundlatch2_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch2_byte_r), DEVCB_NULL, DEVCB_NULL }, diff --git a/src/mame/drivers/cninja.c b/src/mame/drivers/cninja.c index 00d6ad2f3f7..0dc0378ad47 100644 --- a/src/mame/drivers/cninja.c +++ b/src/mame/drivers/cninja.c @@ -57,14 +57,14 @@ Note about version levels using Mutant Fighter as the example: WRITE16_MEMBER(cninja_state::cninja_sound_w) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_audiocpu, 0, HOLD_LINE); } WRITE16_MEMBER(cninja_state::stoneage_sound_w) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } @@ -307,7 +307,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, cninja_state ) AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE_LEGACY("ym2", ym2151_r, ym2151_w) AM_RANGE(0x120000, 0x120001) AM_DEVREADWRITE("oki1", okim6295_device, read, write) AM_RANGE(0x130000, 0x130001) AM_DEVREADWRITE("oki2", okim6295_device, read, write) - AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_r) + AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_byte_r) AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8") AM_RANGE(0x1fec00, 0x1fec01) AM_WRITE_LEGACY(h6280_timer_w) AM_RANGE(0x1ff400, 0x1ff403) AM_WRITE_LEGACY(h6280_irq_status_w) @@ -319,7 +319,7 @@ static ADDRESS_MAP_START( sound_map_mutantf, AS_PROGRAM, 8, cninja_state ) AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0x120000, 0x120001) AM_DEVREADWRITE("oki1", okim6295_device, read, write) AM_RANGE(0x130000, 0x130001) AM_DEVREADWRITE("oki2", okim6295_device, read, write) - AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_r) + AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_byte_r) AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8") AM_RANGE(0x1fec00, 0x1fec01) AM_WRITE_LEGACY(h6280_timer_w) AM_RANGE(0x1ff400, 0x1ff403) AM_WRITE_LEGACY(h6280_irq_status_w) @@ -329,7 +329,7 @@ static ADDRESS_MAP_START( stoneage_s_map, AS_PROGRAM, 8, cninja_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x8800, 0x8801) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) AM_RANGE(0x9800, 0x9800) AM_DEVREADWRITE("oki1", okim6295_device, read, write) ADDRESS_MAP_END diff --git a/src/mame/drivers/cntsteer.c b/src/mame/drivers/cntsteer.c index e7e9e7e2fbd..2350c91f472 100644 --- a/src/mame/drivers/cntsteer.c +++ b/src/mame/drivers/cntsteer.c @@ -458,7 +458,7 @@ WRITE8_MEMBER(cntsteer_state::gekitsui_sub_irq_ack) WRITE8_MEMBER(cntsteer_state::cntsteer_sound_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_audiocpu, 0, HOLD_LINE); } @@ -597,7 +597,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, cntsteer_state ) AM_RANGE(0x4000, 0x4000) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) AM_RANGE(0x6000, 0x6000) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) AM_RANGE(0x8000, 0x8000) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) AM_RANGE(0xd000, 0xd000) AM_WRITE(nmimask_w) AM_RANGE(0xe000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/combatsc.c b/src/mame/drivers/combatsc.c index 819b74154f4..c99953fa899 100644 --- a/src/mame/drivers/combatsc.c +++ b/src/mame/drivers/combatsc.c @@ -110,7 +110,7 @@ SOUND CPU: 9000 uPD7759 b000 uPD7759 c000 uPD7759 -d000 soundlatch_r +d000 soundlatch_byte_r e000-e001 YM2203 @@ -150,7 +150,7 @@ WRITE8_MEMBER(combatsc_state::combatsc_vreg_w) WRITE8_MEMBER(combatsc_state::combatscb_sh_irqtrigger_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } @@ -389,7 +389,7 @@ static ADDRESS_MAP_START( combatsc_map, AS_PROGRAM, 8, combatsc_state ) AM_RANGE(0x0408, 0x0408) AM_WRITE(combatsc_coin_counter_w) /* coin counters */ AM_RANGE(0x040c, 0x040c) AM_WRITE(combatsc_vreg_w) AM_RANGE(0x0410, 0x0410) AM_WRITE(combatsc_bankselect_w) - AM_RANGE(0x0414, 0x0414) AM_WRITE(soundlatch_w) + AM_RANGE(0x0414, 0x0414) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x0418, 0x0418) AM_WRITE(combatsc_sh_irqtrigger_w) AM_RANGE(0x041c, 0x041c) AM_WRITE(watchdog_reset_w) /* watchdog reset? */ @@ -419,7 +419,7 @@ static ADDRESS_MAP_START( combatsc_sound_map, AS_PROGRAM, 8, combatsc_state ) AM_RANGE(0xb000, 0xb000) AM_DEVREAD_LEGACY("upd", combatsc_busy_r) /* upd7759 busy? */ AM_RANGE(0xc000, 0xc000) AM_DEVWRITE_LEGACY("upd", combatsc_voice_reset_w) /* upd7759 reset? */ - AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_r) /* soundlatch_r? */ + AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_byte_r) /* soundlatch_byte_r? */ AM_RANGE(0xe000, 0xe001) AM_DEVREADWRITE_LEGACY("ymsnd", combatsc_ym2203_r, ym2203_w) /* YM 2203 intercepted */ ADDRESS_MAP_END @@ -440,7 +440,7 @@ static ADDRESS_MAP_START( combatscb_sound_map, AS_PROGRAM, 8, combatsc_state ) AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w) /* YM 2203 */ AM_RANGE(0x9008, 0x9009) AM_DEVREAD_LEGACY("ymsnd", ym2203_r) /* ??? */ AM_RANGE(0x9800, 0x9800) AM_DEVWRITE_LEGACY("msm5205",combatscb_dac_w) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) /* soundlatch_r? */ + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) /* soundlatch_byte_r? */ ADDRESS_MAP_END /************************************* diff --git a/src/mame/drivers/commando.c b/src/mame/drivers/commando.c index d5db0318f72..03e292304cb 100644 --- a/src/mame/drivers/commando.c +++ b/src/mame/drivers/commando.c @@ -57,7 +57,7 @@ static ADDRESS_MAP_START( commando_map, AS_PROGRAM, 8, commando_state ) AM_RANGE(0xc002, 0xc002) AM_READ_PORT("P2") AM_RANGE(0xc003, 0xc003) AM_READ_PORT("DSW1") AM_RANGE(0xc004, 0xc004) AM_READ_PORT("DSW2") - AM_RANGE(0xc800, 0xc800) AM_WRITE(soundlatch_w) + AM_RANGE(0xc800, 0xc800) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xc804, 0xc804) AM_WRITE(commando_c804_w) AM_RANGE(0xc808, 0xc809) AM_WRITE(commando_scrollx_w) AM_RANGE(0xc80a, 0xc80b) AM_WRITE(commando_scrolly_w) @@ -73,7 +73,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, commando_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x4000, 0x47ff) AM_RAM - AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_r) + AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) AM_RANGE(0x8000, 0x8001) AM_DEVWRITE_LEGACY("ym1", ym2203_w) AM_RANGE(0x8002, 0x8003) AM_DEVWRITE_LEGACY("ym2", ym2203_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/contra.c b/src/mame/drivers/contra.c index 9451d815346..d20d3ea68bf 100644 --- a/src/mame/drivers/contra.c +++ b/src/mame/drivers/contra.c @@ -53,7 +53,7 @@ WRITE8_MEMBER(contra_state::contra_coin_counter_w) WRITE8_MEMBER(contra_state::cpu_sound_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); } @@ -96,7 +96,7 @@ static ADDRESS_MAP_START( contra_map, AS_PROGRAM, 8, contra_state ) ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, contra_state ) - AM_RANGE(0x0000, 0x0000) AM_READ(soundlatch_r) + AM_RANGE(0x0000, 0x0000) AM_READ(soundlatch_byte_r) AM_RANGE(0x2000, 0x2001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0x4000, 0x4000) AM_WRITENOP /* read triggers irq reset and latch read (in the hardware only). */ AM_RANGE(0x6000, 0x67ff) AM_RAM diff --git a/src/mame/drivers/cop01.c b/src/mame/drivers/cop01.c index 809e44a52bd..1a17352dd89 100644 --- a/src/mame/drivers/cop01.c +++ b/src/mame/drivers/cop01.c @@ -72,13 +72,13 @@ Mighty Guy board layout: WRITE8_MEMBER(cop01_state::cop01_sound_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); device_set_input_line(m_audiocpu, 0, ASSERT_LINE ); } READ8_MEMBER(cop01_state::cop01_sound_command_r) { - int res = (soundlatch_r(space, offset) & 0x7f) << 1; + int res = (soundlatch_byte_r(space, offset) & 0x7f) << 1; /* bit 0 seems to be a timer */ if ((m_audiocpu->total_cycles() / TIMER_RATE) & 1) diff --git a/src/mame/drivers/corona.c b/src/mame/drivers/corona.c index e3b5e9005f2..5ae202de1c5 100644 --- a/src/mame/drivers/corona.c +++ b/src/mame/drivers/corona.c @@ -486,14 +486,14 @@ static SCREEN_UPDATE_IND16(luckyrlt) WRITE8_MEMBER(corona_state::sound_latch_w) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "soundcpu", 0, ASSERT_LINE); } READ8_MEMBER(corona_state::sound_latch_r) { cputag_set_input_line(machine(), "soundcpu", 0, CLEAR_LINE); - return soundlatch_r(space, 0); + return soundlatch_byte_r(space, 0); } diff --git a/src/mame/drivers/cps1.c b/src/mame/drivers/cps1.c index 9aebe1d24d9..57d89e2e3c4 100644 --- a/src/mame/drivers/cps1.c +++ b/src/mame/drivers/cps1.c @@ -292,13 +292,13 @@ static WRITE8_DEVICE_HANDLER( cps1_oki_pin7_w ) WRITE16_MEMBER(cps_state::cps1_soundlatch_w) { if (ACCESSING_BITS_0_7) - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); } WRITE16_MEMBER(cps_state::cps1_soundlatch2_w) { if (ACCESSING_BITS_0_7) - soundlatch2_w(space, 0, data & 0xff); + soundlatch2_byte_w(space, 0, data & 0xff); } WRITE16_MEMBER(cps_state::cps1_coinctrl_w) @@ -582,8 +582,8 @@ static ADDRESS_MAP_START( sub_map, AS_PROGRAM, 8, cps_state ) AM_RANGE(0xf002, 0xf002) AM_DEVREADWRITE("oki", okim6295_device, read, write) AM_RANGE(0xf004, 0xf004) AM_WRITE(cps1_snd_bankswitch_w) AM_RANGE(0xf006, 0xf006) AM_DEVWRITE_LEGACY("oki", cps1_oki_pin7_w) /* controls pin 7 of OKI chip */ - AM_RANGE(0xf008, 0xf008) AM_READ(soundlatch_r) /* Sound command */ - AM_RANGE(0xf00a, 0xf00a) AM_READ(soundlatch2_r) /* Sound timer fade */ + AM_RANGE(0xf008, 0xf008) AM_READ(soundlatch_byte_r) /* Sound command */ + AM_RANGE(0xf00a, 0xf00a) AM_READ(soundlatch2_byte_r) /* Sound timer fade */ ADDRESS_MAP_END static ADDRESS_MAP_START( qsound_main_map, AS_PROGRAM, 16, cps_state ) diff --git a/src/mame/drivers/crimfght.c b/src/mame/drivers/crimfght.c index bed01bd7d1c..e56750d6c3f 100644 --- a/src/mame/drivers/crimfght.c +++ b/src/mame/drivers/crimfght.c @@ -32,7 +32,7 @@ WRITE8_MEMBER(crimfght_state::crimfght_coin_w) WRITE8_MEMBER(crimfght_state::crimfght_sh_irqtrigger_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff); } @@ -99,7 +99,7 @@ static ADDRESS_MAP_START( crimfght_sound_map, AS_PROGRAM, 8, crimfght_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM /* ROM 821l01.h4 */ AM_RANGE(0x8000, 0x87ff) AM_RAM /* RAM */ AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) /* YM2151 */ - AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_r) /* soundlatch_r */ + AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_byte_r) /* soundlatch_byte_r */ AM_RANGE(0xe000, 0xe00d) AM_DEVREADWRITE_LEGACY("k007232", k007232_r, k007232_w) /* 007232 registers */ ADDRESS_MAP_END diff --git a/src/mame/drivers/crospang.c b/src/mame/drivers/crospang.c index 252115643d8..12bb44f7fab 100644 --- a/src/mame/drivers/crospang.c +++ b/src/mame/drivers/crospang.c @@ -42,7 +42,7 @@ WRITE16_MEMBER(crospang_state::crospang_soundlatch_w) { if(ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); } } @@ -100,7 +100,7 @@ static ADDRESS_MAP_START( crospang_sound_io_map, AS_IO, 8, crospang_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym3812_r, ym3812_w) AM_RANGE(0x02, 0x02) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0x06, 0x06) AM_READ(soundlatch_r) + AM_RANGE(0x06, 0x06) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/crshrace.c b/src/mame/drivers/crshrace.c index 0bbf3605f6f..a3bf2fb0e3e 100644 --- a/src/mame/drivers/crshrace.c +++ b/src/mame/drivers/crshrace.c @@ -165,7 +165,7 @@ WRITE16_MEMBER(crshrace_state::sound_command_w) if (ACCESSING_BITS_0_7) { m_pending_command = 1; - soundlatch_w(space, offset, data & 0xff); + soundlatch_byte_w(space, offset, data & 0xff); m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); } } @@ -214,7 +214,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, crshrace_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x00) AM_WRITE(crshrace_sh_bankswitch_w) - AM_RANGE(0x04, 0x04) AM_READ(soundlatch_r) AM_WRITE(pending_command_clear_w) + AM_RANGE(0x04, 0x04) AM_READ(soundlatch_byte_r) AM_WRITE(pending_command_clear_w) AM_RANGE(0x08, 0x0b) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/csplayh5.c b/src/mame/drivers/csplayh5.c index 97eead7cea3..dc3269f5fe5 100644 --- a/src/mame/drivers/csplayh5.c +++ b/src/mame/drivers/csplayh5.c @@ -109,7 +109,7 @@ WRITE16_MEMBER(csplayh5_state::csplayh5_mux_w) WRITE16_MEMBER(csplayh5_state::csplayh5_sound_w) { - soundlatch_w(space, 0, ((data >> 8) & 0xff)); + soundlatch_byte_w(space, 0, ((data >> 8) & 0xff)); } @@ -174,12 +174,12 @@ static void csplayh5_soundbank_w(running_machine &machine, int data) READ8_MEMBER(csplayh5_state::csplayh5_sound_r) { - return soundlatch_r(space, 0); + return soundlatch_byte_r(space, 0); } WRITE8_MEMBER(csplayh5_state::csplayh5_soundclr_w) { - soundlatch_clear_w(space, 0, 0); + soundlatch_clear_byte_w(space, 0, 0); } READ8_MEMBER(csplayh5_state::tmpz84c011_pio_r) diff --git a/src/mame/drivers/cvs.c b/src/mame/drivers/cvs.c index 03a9f3c0983..e71d3305da6 100644 --- a/src/mame/drivers/cvs.c +++ b/src/mame/drivers/cvs.c @@ -391,7 +391,7 @@ READ8_MEMBER(cvs_state::cvs_speech_command_r) /* FIXME: this was by observation on board ??? * -bit 7 is TMS status (active LO) */ - return ((tms5110_ctl_r(m_tms, 0) ^ 1) << 7) | (soundlatch_r(space, 0) & 0x7f); + return ((tms5110_ctl_r(m_tms, 0) ^ 1) << 7) | (soundlatch_byte_r(space, 0) & 0x7f); } @@ -459,7 +459,7 @@ WRITE8_MEMBER(cvs_state::audio_command_w) LOG(("data %02x\n", data)); /* cause interrupt on audio CPU if bit 7 set */ - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); cvs_slave_cpu_interrupt(m_audiocpu, data & 0x80 ? 1 : 0); } @@ -506,7 +506,7 @@ static ADDRESS_MAP_START( cvs_dac_cpu_map, AS_PROGRAM, 8, cvs_state ) ADDRESS_MAP_GLOBAL_MASK(0x7fff) AM_RANGE(0x0000, 0x0fff) AM_ROM AM_RANGE(0x1000, 0x107f) AM_RAM - AM_RANGE(0x1800, 0x1800) AM_READ(soundlatch_r) + AM_RANGE(0x1800, 0x1800) AM_READ(soundlatch_byte_r) AM_RANGE(0x1840, 0x1840) AM_DEVWRITE_LEGACY("dac1", dac_w) AM_RANGE(0x1880, 0x1883) AM_DEVWRITE_LEGACY("dac2", cvs_4_bit_dac_data_w) AM_BASE(m_cvs_4_bit_dac_data) AM_RANGE(0x1884, 0x1887) AM_DEVWRITE_LEGACY("dac3", cvs_unknown_w) AM_BASE(m_dac3_state) /* ???? not connected to anything */ diff --git a/src/mame/drivers/cyclemb.c b/src/mame/drivers/cyclemb.c index 59eb96dd3c8..330375eaf11 100644 --- a/src/mame/drivers/cyclemb.c +++ b/src/mame/drivers/cyclemb.c @@ -227,7 +227,7 @@ WRITE8_MEMBER(cyclemb_state::cyclemb_bankswitch_w) #if 0 WRITE8_MEMBER(cyclemb_state::sound_cmd_w) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE); } #endif @@ -241,7 +241,7 @@ READ8_MEMBER(cyclemb_state::mcu_status_r) WRITE8_MEMBER(cyclemb_state::sound_cmd_w)//actually ciom { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE); } #endif @@ -280,7 +280,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( cyclemb_sound_io, AS_IO, 8, cyclemb_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("aysnd", ay8910_r, ay8910_address_data_w) - AM_RANGE(0x40, 0x40) AM_READ(soundlatch_r) AM_WRITE(soundlatch2_w) + AM_RANGE(0x40, 0x40) AM_READ(soundlatch_byte_r) AM_WRITE(soundlatch2_byte_w) ADDRESS_MAP_END static MACHINE_RESET( cyclemb ) diff --git a/src/mame/drivers/dacholer.c b/src/mame/drivers/dacholer.c index f5074ac55ed..31248091889 100644 --- a/src/mame/drivers/dacholer.c +++ b/src/mame/drivers/dacholer.c @@ -203,7 +203,7 @@ WRITE8_MEMBER(dacholer_state::coins_w) WRITE8_MEMBER(dacholer_state::snd_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } @@ -284,7 +284,7 @@ WRITE8_MEMBER(dacholer_state::music_irq_w) static ADDRESS_MAP_START( snd_io_map, AS_IO, 8, dacholer_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READWRITE(soundlatch_r, soundlatch_clear_w ) + AM_RANGE(0x00, 0x00) AM_READWRITE(soundlatch_byte_r, soundlatch_clear_byte_w ) AM_RANGE(0x04, 0x04) AM_WRITE(music_irq_w) AM_RANGE(0x08, 0x08) AM_WRITE(snd_irq_w) AM_RANGE(0x0c, 0x0c) AM_WRITE(snd_ack_w) @@ -296,7 +296,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( itaten_snd_io_map, AS_IO, 8, dacholer_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READWRITE(soundlatch_r, soundlatch_clear_w ) + AM_RANGE(0x00, 0x00) AM_READWRITE(soundlatch_byte_r, soundlatch_clear_byte_w ) AM_RANGE(0x86, 0x87) AM_DEVWRITE_LEGACY("ay1", ay8910_data_address_w) AM_RANGE(0x8a, 0x8b) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) AM_RANGE(0x8e, 0x8f) AM_DEVWRITE_LEGACY("ay3", ay8910_data_address_w) diff --git a/src/mame/drivers/darkseal.c b/src/mame/drivers/darkseal.c index 8ba040c108e..e1ed69b67c9 100644 --- a/src/mame/drivers/darkseal.c +++ b/src/mame/drivers/darkseal.c @@ -32,7 +32,7 @@ WRITE16_MEMBER(darkseal_state::darkseal_control_w) m_spriteram->copy(); return; case 8: /* Sound CPU write */ - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE); return; case 0xa: /* IRQ Ack (VBL) */ @@ -88,7 +88,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, darkseal_state ) AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE_LEGACY("ym2", ym2151_r, ym2151_w) AM_RANGE(0x120000, 0x120001) AM_DEVREADWRITE("oki1", okim6295_device, read, write) AM_RANGE(0x130000, 0x130001) AM_DEVREADWRITE("oki2", okim6295_device, read, write) - AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_r) + AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_byte_r) AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8") AM_RANGE(0x1fec00, 0x1fec01) AM_WRITE_LEGACY(h6280_timer_w) AM_RANGE(0x1ff400, 0x1ff403) AM_WRITE_LEGACY(h6280_irq_status_w) diff --git a/src/mame/drivers/dassault.c b/src/mame/drivers/dassault.c index d2f1b2f6970..92d40cef93f 100644 --- a/src/mame/drivers/dassault.c +++ b/src/mame/drivers/dassault.c @@ -166,7 +166,7 @@ READ16_MEMBER(dassault_state::dassault_sub_control_r) WRITE16_MEMBER(dassault_state::dassault_sound_w) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_audiocpu, 0, HOLD_LINE); /* IRQ1 */ } @@ -254,7 +254,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, dassault_state ) AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE_LEGACY("ym2", ym2151_r, ym2151_w) AM_RANGE(0x120000, 0x120001) AM_DEVREADWRITE("oki1", okim6295_device, read, write) AM_RANGE(0x130000, 0x130001) AM_DEVREADWRITE("oki2", okim6295_device, read, write) - AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_r) + AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_byte_r) AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8") AM_RANGE(0x1fec00, 0x1fec01) AM_WRITE_LEGACY(h6280_timer_w) AM_RANGE(0x1ff400, 0x1ff403) AM_WRITE_LEGACY(h6280_irq_status_w) diff --git a/src/mame/drivers/dblewing.c b/src/mame/drivers/dblewing.c index c201d1b572e..a0e152edb15 100644 --- a/src/mame/drivers/dblewing.c +++ b/src/mame/drivers/dblewing.c @@ -240,7 +240,7 @@ WRITE16_MEMBER(dblewing_state::dblewing_prot_w) //printf("%04x\n",m_280_data); return; case 0x380: // sound write - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); m_sound_irq |= 0x02; device_set_input_line(m_audiocpu, 0, (m_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE); return; @@ -347,7 +347,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, dblewing_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_status_port_r,ym2151_w) AM_RANGE(0xb000, 0xb000) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_r) + AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_byte_r) AM_RANGE(0xd000, 0xd000) AM_READ(irq_latch_r) //timing? sound latch? AM_RANGE(0xf000, 0xf000) AM_DEVREADWRITE("oki", okim6295_device, read, write) ADDRESS_MAP_END diff --git a/src/mame/drivers/dbz.c b/src/mame/drivers/dbz.c index c63bfd3f764..94c92fab282 100644 --- a/src/mame/drivers/dbz.c +++ b/src/mame/drivers/dbz.c @@ -97,7 +97,7 @@ WRITE16_MEMBER(dbz_state::dbzcontrol_w) WRITE16_MEMBER(dbz_state::dbz_sound_command_w) { - soundlatch_w(space, 0, data >> 8); + soundlatch_byte_w(space, 0, data >> 8); } WRITE16_MEMBER(dbz_state::dbz_sound_cause_nmi) @@ -154,7 +154,7 @@ static ADDRESS_MAP_START( dbz_sound_map, AS_PROGRAM, 8, dbz_state ) AM_RANGE(0x8000, 0xbfff) AM_RAM AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0xd000, 0xd002) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xe000, 0xe001) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe001) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static ADDRESS_MAP_START( dbz_sound_io_map, AS_IO, 8, dbz_state ) diff --git a/src/mame/drivers/dcheese.c b/src/mame/drivers/dcheese.c index 06b7566ed4b..a7c1af3e774 100644 --- a/src/mame/drivers/dcheese.c +++ b/src/mame/drivers/dcheese.c @@ -143,7 +143,7 @@ WRITE16_MEMBER(dcheese_state::sound_command_w) /* write the latch and set the IRQ */ m_soundlatch_full = 1; device_set_input_line(m_audiocpu, 0, ASSERT_LINE); - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); } } @@ -161,7 +161,7 @@ READ8_MEMBER(dcheese_state::sound_command_r) /* read the latch and clear the IRQ */ m_soundlatch_full = 0; device_set_input_line(m_audiocpu, 0, CLEAR_LINE); - return soundlatch_r(space, 0); + return soundlatch_byte_r(space, 0); } diff --git a/src/mame/drivers/ddayjlc.c b/src/mame/drivers/ddayjlc.c index 620426fb676..eda89e3c245 100644 --- a/src/mame/drivers/ddayjlc.c +++ b/src/mame/drivers/ddayjlc.c @@ -205,7 +205,7 @@ WRITE8_MEMBER(ddayjlc_state::bg2_w) WRITE8_MEMBER(ddayjlc_state::sound_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff); } @@ -421,7 +421,7 @@ static const ay8910_interface ay8910_config = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL diff --git a/src/mame/drivers/ddenlovr.c b/src/mame/drivers/ddenlovr.c index 1488207ad35..cba3b1621bb 100644 --- a/src/mame/drivers/ddenlovr.c +++ b/src/mame/drivers/ddenlovr.c @@ -2090,7 +2090,7 @@ WRITE8_MEMBER(dynax_state::mmpanic_rombank_w) WRITE8_MEMBER(dynax_state::mmpanic_soundlatch_w) { - soundlatch_w(*&space, 0, data); + soundlatch_byte_w(*&space, 0, data); device_set_input_line(m_soundcpu, INPUT_LINE_NMI, PULSE_LINE); } @@ -2200,7 +2200,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( mmpanic_sound_portmap, AS_IO, 8, dynax_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r) + AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r) AM_RANGE(0x02, 0x02) AM_READNOP // read just before port 00 AM_RANGE(0x04, 0x04) AM_NOP // read only once at the start AM_RANGE(0x06, 0x06) AM_WRITENOP // almost always 1, sometimes 0 @@ -2338,7 +2338,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( funkyfig_sound_portmap, AS_IO, 8, dynax_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x02, 0x02) AM_READ(soundlatch_r) + AM_RANGE(0x02, 0x02) AM_READ(soundlatch_byte_r) AM_RANGE(0x04, 0x04) AM_READNOP // read only once at the start ADDRESS_MAP_END diff --git a/src/mame/drivers/ddragon.c b/src/mame/drivers/ddragon.c index e46d7e547c5..c3ca54c6e3a 100644 --- a/src/mame/drivers/ddragon.c +++ b/src/mame/drivers/ddragon.c @@ -316,7 +316,7 @@ static WRITE8_HANDLER( ddragon_interrupt_w ) break; case 3: /* 380e - SND irq */ - state->soundlatch_w(*space, 0, data); + state->soundlatch_byte_w(*space, 0, data); device_set_input_line(state->m_snd_cpu, state->m_sound_irq, (state->m_sound_irq == INPUT_LINE_NMI) ? PULSE_LINE : HOLD_LINE); break; @@ -594,7 +594,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, ddragon_state ) AM_RANGE(0x0000, 0x0fff) AM_RAM - AM_RANGE(0x1000, 0x1000) AM_READ(soundlatch_r) + AM_RANGE(0x1000, 0x1000) AM_READ(soundlatch_byte_r) AM_RANGE(0x1800, 0x1800) AM_READ_LEGACY(dd_adpcm_status_r) AM_RANGE(0x2800, 0x2801) AM_DEVREADWRITE_LEGACY("fmsnd", ym2151_r, ym2151_w) AM_RANGE(0x3800, 0x3807) AM_WRITE_LEGACY(dd_adpcm_w) @@ -607,7 +607,7 @@ static ADDRESS_MAP_START( dd2_sound_map, AS_PROGRAM, 8, ddragon_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x8800, 0x8801) AM_DEVREADWRITE_LEGACY("fmsnd", ym2151_r, ym2151_w) AM_RANGE(0x9800, 0x9800) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xA000, 0xA000) AM_READ(soundlatch_r) + AM_RANGE(0xA000, 0xA000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/ddragon3.c b/src/mame/drivers/ddragon3.c index c5108f744a5..a9e9da7a7a9 100644 --- a/src/mame/drivers/ddragon3.c +++ b/src/mame/drivers/ddragon3.c @@ -171,8 +171,8 @@ WRITE16_MEMBER(ddragon3_state::ddragon3_io_w) m_vreg = m_io_reg[0]; break; - case 1: /* soundlatch_w */ - soundlatch_w(space, 1, m_io_reg[1] & 0xff); + case 1: /* soundlatch_byte_w */ + soundlatch_byte_w(space, 1, m_io_reg[1] & 0xff); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE ); break; @@ -257,7 +257,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, ddragon3_state ) AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_RANGE(0xc800, 0xc801) AM_DEVREADWRITE_LEGACY("ym2151", ym2151_r, ym2151_w) AM_RANGE(0xd800, 0xd800) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) AM_RANGE(0xe800, 0xe800) AM_DEVWRITE_LEGACY("oki", oki_bankswitch_w) ADDRESS_MAP_END @@ -266,7 +266,7 @@ static ADDRESS_MAP_START( ctribe_sound_map, AS_PROGRAM, 8, ddragon3_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x8800, 0x8801) AM_DEVREADWRITE_LEGACY("ym2151", ym2151_status_port_r, ym2151_w) AM_RANGE(0x9800, 0x9800) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END /************************************* diff --git a/src/mame/drivers/dec0.c b/src/mame/drivers/dec0.c index 50e26b65999..0df2fdd9580 100644 --- a/src/mame/drivers/dec0.c +++ b/src/mame/drivers/dec0.c @@ -188,7 +188,7 @@ WRITE16_MEMBER(dec0_state::dec0_control_w) case 4: /* 6502 sound cpu */ if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } break; @@ -227,7 +227,7 @@ WRITE16_MEMBER(dec0_state::automat_control_w) case 0xe: /* 6502 sound cpu */ if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE); } break; @@ -260,7 +260,7 @@ WRITE16_MEMBER(dec0_state::slyspy_control_w) case 0: if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } break; @@ -274,7 +274,7 @@ WRITE16_MEMBER(dec0_state::midres_sound_w) { if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } } @@ -552,7 +552,7 @@ static ADDRESS_MAP_START( dec0_s_map, AS_PROGRAM, 8, dec0_state ) AM_RANGE(0x0000, 0x05ff) AM_RAM AM_RANGE(0x0800, 0x0801) AM_DEVWRITE_LEGACY("ym1", ym2203_w) AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym2", ym3812_w) - AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_r) + AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) AM_RANGE(0x3800, 0x3800) AM_DEVREADWRITE("oki", okim6295_device, read, write) AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END @@ -564,7 +564,7 @@ static ADDRESS_MAP_START( slyspy_s_map, AS_PROGRAM, 8, dec0_state ) AM_RANGE(0x0a0000, 0x0a0001) AM_READNOP /* Protection counter */ AM_RANGE(0x0b0000, 0x0b0001) AM_DEVWRITE_LEGACY("ym1", ym2203_w) AM_RANGE(0x0e0000, 0x0e0001) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0x0f0000, 0x0f0001) AM_READ(soundlatch_r) + AM_RANGE(0x0f0000, 0x0f0001) AM_READ(soundlatch_byte_r) AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8") AM_RANGE(0x1ff400, 0x1ff403) AM_WRITE_LEGACY(h6280_irq_status_w) ADDRESS_MAP_END @@ -574,7 +574,7 @@ static ADDRESS_MAP_START( midres_s_map, AS_PROGRAM, 8, dec0_state ) AM_RANGE(0x108000, 0x108001) AM_DEVWRITE_LEGACY("ym2", ym3812_w) AM_RANGE(0x118000, 0x118001) AM_DEVWRITE_LEGACY("ym1", ym2203_w) AM_RANGE(0x130000, 0x130001) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0x138000, 0x138001) AM_READ(soundlatch_r) + AM_RANGE(0x138000, 0x138001) AM_READ(soundlatch_byte_r) AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8") AM_RANGE(0x1ff400, 0x1ff403) AM_WRITE_LEGACY(h6280_irq_status_w) ADDRESS_MAP_END @@ -652,7 +652,7 @@ static ADDRESS_MAP_START( automat_s_map, AS_PROGRAM, 8, dec0_state ) AM_RANGE(0xc000, 0xc7ff) AM_RAM // AM_RANGE(0xc800, 0xc800) AM_WRITE_LEGACY(ym2203_control_port_0_w) // AM_RANGE(0xc801, 0xc801) AM_WRITE_LEGACY(ym2203_write_port_0_w) - AM_RANGE(0xd800, 0xd800) AM_READ(soundlatch_r) + AM_RANGE(0xd800, 0xd800) AM_READ(soundlatch_byte_r) // AM_RANGE(0xd000, 0xd000) AM_WRITE_LEGACY(ym2203_control_port_1_w) // AM_RANGE(0xd001, 0xd001) AM_WRITE_LEGACY(ym2203_write_port_1_w) AM_RANGE(0xf000, 0xf000) AM_WRITE(automat_adpcm_w) diff --git a/src/mame/drivers/dec8.c b/src/mame/drivers/dec8.c index 82f1abe5a1c..db3f1fdf930 100644 --- a/src/mame/drivers/dec8.c +++ b/src/mame/drivers/dec8.c @@ -478,7 +478,7 @@ WRITE8_MEMBER(dec8_state::csilver_control_w) WRITE8_MEMBER(dec8_state::dec8_sound_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } @@ -873,7 +873,7 @@ static ADDRESS_MAP_START( dec8_s_map, AS_PROGRAM, 8, dec8_state ) AM_RANGE(0x0000, 0x05ff) AM_RAM AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ym1", ym2203_w) AM_RANGE(0x4000, 0x4001) AM_DEVWRITE_LEGACY("ym2", ym3812_w) - AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_r) + AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END @@ -882,7 +882,7 @@ static ADDRESS_MAP_START( oscar_s_map, AS_PROGRAM, 8, dec8_state ) AM_RANGE(0x0000, 0x05ff) AM_RAM AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ym1", ym2203_w) AM_RANGE(0x4000, 0x4001) AM_DEVWRITE_LEGACY("ym2", ym3526_w) - AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_r) + AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END @@ -891,7 +891,7 @@ static ADDRESS_MAP_START( ym3526_s_map, AS_PROGRAM, 8, dec8_state ) AM_RANGE(0x0000, 0x05ff) AM_RAM AM_RANGE(0x0800, 0x0801) AM_DEVWRITE_LEGACY("ym1", ym2203_w) AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym2", ym3526_w) - AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_r) + AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END @@ -902,7 +902,7 @@ static ADDRESS_MAP_START( csilver_s_map, AS_PROGRAM, 8, dec8_state ) AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym2", ym3526_w) AM_RANGE(0x1800, 0x1800) AM_WRITE(csilver_adpcm_data_w) /* ADPCM data for the MSM5205 chip */ AM_RANGE(0x2000, 0x2000) AM_WRITE(csilver_sound_bank_w) - AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_r) + AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) AM_RANGE(0x3400, 0x3400) AM_DEVREAD_LEGACY("msm", csilver_adpcm_reset_r) /* ? not sure */ AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank3") AM_RANGE(0x8000, 0xffff) AM_ROM diff --git a/src/mame/drivers/deco32.c b/src/mame/drivers/deco32.c index 378f656db8d..910d51265ef 100644 --- a/src/mame/drivers/deco32.c +++ b/src/mame/drivers/deco32.c @@ -343,7 +343,7 @@ WRITE32_MEMBER(deco32_state::deco32_irq_controller_w) WRITE32_MEMBER(deco32_state::deco32_sound_w) { - soundlatch_w(space,0,data & 0xff); + soundlatch_byte_w(space,0,data & 0xff); cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE); } @@ -669,7 +669,7 @@ WRITE32_MEMBER(deco32_state::nslasher_prot_w) if (offset==0x700/4) { /* bit 1 of nslasher_sound_irq specifies IRQ command writes */ - soundlatch_w(space,0,(data>>16)&0xff); + soundlatch_byte_w(space,0,(data>>16)&0xff); m_nslasher_sound_irq |= 0x02; cputag_set_input_line(machine(), "audiocpu", 0, (m_nslasher_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE); } @@ -1004,7 +1004,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, deco32_state ) AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0x120000, 0x120001) AM_DEVREADWRITE("oki1", okim6295_device, read, write) AM_RANGE(0x130000, 0x130001) AM_DEVREADWRITE("oki2", okim6295_device, read, write) - AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_r) + AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_byte_r) AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8") AM_RANGE(0x1fec00, 0x1fec01) AM_WRITE_LEGACY(h6280_timer_w) AM_RANGE(0x1ff400, 0x1ff403) AM_WRITE_LEGACY(h6280_irq_status_w) @@ -1015,7 +1015,7 @@ READ8_MEMBER(deco32_state::latch_r) /* bit 1 of nslasher_sound_irq specifies IRQ command writes */ m_nslasher_sound_irq &= ~0x02; cputag_set_input_line(machine(), "audiocpu", 0, (m_nslasher_sound_irq != 0) ? ASSERT_LINE : CLEAR_LINE); - return soundlatch_r(space,0); + return soundlatch_byte_r(space,0); } static ADDRESS_MAP_START( nslasher_sound, AS_PROGRAM, 8, deco32_state ) @@ -3352,7 +3352,8 @@ static DRIVER_INIT( nslasher ) deco156_decrypt(machine); - soundlatch_setclearedvalue(machine, 0xff); + deco32_state *state = machine.driver_data<deco32_state>(); + state->soundlatch_setclearedvalue(0xff); /* The board for Night Slashers is very close to the Fighter's History and Tattoo Assassins boards, but has an encrypted ARM cpu. */ diff --git a/src/mame/drivers/deco_ld.c b/src/mame/drivers/deco_ld.c index 2c15e743efd..f7837bc2e8c 100644 --- a/src/mame/drivers/deco_ld.c +++ b/src/mame/drivers/deco_ld.c @@ -156,7 +156,7 @@ static SCREEN_UPDATE_IND16( rblaster ) #if 0 WRITE8_MEMBER(deco_ld_state::rblaster_sound_w) { - soundlatch_w(space,0,data); + soundlatch_byte_w(space,0,data); device_set_input_line(machine().cpu[1], 0, HOLD_LINE); } #endif @@ -258,7 +258,7 @@ static ADDRESS_MAP_START( rblaster_sound_map, AS_PROGRAM, 8, deco_ld_state ) AM_RANGE(0x4000, 0x4000) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) AM_RANGE(0x6000, 0x6000) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) AM_RANGE(0x8000, 0x8000) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) AM_RANGE(0xe000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/deniam.c b/src/mame/drivers/deniam.c index 98680cf8d7f..e2180e90a5b 100644 --- a/src/mame/drivers/deniam.c +++ b/src/mame/drivers/deniam.c @@ -52,7 +52,7 @@ WRITE16_MEMBER(deniam_state::sound_command_w) { if (ACCESSING_BITS_8_15) { - soundlatch_w(space,offset, (data >> 8) & 0xff); + soundlatch_byte_w(space,offset, (data >> 8) & 0xff); device_set_input_line(m_audio_cpu, INPUT_LINE_NMI, PULSE_LINE); } } @@ -101,7 +101,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, deniam_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x01, 0x01) AM_READ(soundlatch_r) + AM_RANGE(0x01, 0x01) AM_READ(soundlatch_byte_r) AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("ymsnd", ym3812_w) AM_RANGE(0x05, 0x05) AM_DEVREADWRITE("oki", okim6295_device, read, write) AM_RANGE(0x07, 0x07) AM_DEVWRITE_LEGACY("oki", deniam16b_oki_rom_bank_w) diff --git a/src/mame/drivers/dietgo.c b/src/mame/drivers/dietgo.c index cac3369d7af..2d77711b15f 100644 --- a/src/mame/drivers/dietgo.c +++ b/src/mame/drivers/dietgo.c @@ -37,7 +37,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, dietgo_state ) AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0x120000, 0x120001) AM_DEVREADWRITE("oki", okim6295_device, read, write) AM_RANGE(0x130000, 0x130001) AM_NOP /* This board only has 1 oki chip */ - AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_r) + AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_byte_r) AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8") AM_RANGE(0x1fec00, 0x1fec01) AM_WRITE_LEGACY(h6280_timer_w) AM_RANGE(0x1ff400, 0x1ff403) AM_WRITE_LEGACY(h6280_irq_status_w) diff --git a/src/mame/drivers/discoboy.c b/src/mame/drivers/discoboy.c index 9f2d8159fae..85c6fb971a8 100644 --- a/src/mame/drivers/discoboy.c +++ b/src/mame/drivers/discoboy.c @@ -232,7 +232,7 @@ WRITE8_MEMBER(discoboy_state::discoboy_port_03_w)// sfx? (to sound cpu) { // printf("unk discoboy_port_03_w %02x\n", data); // device_set_input_line(m_audiocpu, INPUT_LINE_NMI, HOLD_LINE); - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_audiocpu, 0, HOLD_LINE); } @@ -349,7 +349,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, discoboy_state ) AM_RANGE(0xe400, 0xe400) AM_WRITE(yunsung8_adpcm_w) AM_RANGE(0xec00, 0xec01) AM_DEVWRITE_LEGACY("ymsnd", ym3812_w) AM_RANGE(0xf000, 0xf7ff) AM_RAM - AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_r) + AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/diverboy.c b/src/mame/drivers/diverboy.c index 4d17158ddf1..10a6f195876 100644 --- a/src/mame/drivers/diverboy.c +++ b/src/mame/drivers/diverboy.c @@ -123,7 +123,7 @@ WRITE16_MEMBER(diverboy_state::soundcmd_w) if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_audiocpu, 0, HOLD_LINE); } } @@ -161,7 +161,7 @@ static ADDRESS_MAP_START( snd_map, AS_PROGRAM, 8, diverboy_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x9000, 0x9000) AM_DEVWRITE_LEGACY("oki", okibank_w) AM_RANGE(0x9800, 0x9800) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/djboy.c b/src/mame/drivers/djboy.c index 268faa76fcb..cc1729ef4cf 100644 --- a/src/mame/drivers/djboy.c +++ b/src/mame/drivers/djboy.c @@ -232,7 +232,7 @@ WRITE8_MEMBER(djboy_state::coin_count_w) WRITE8_MEMBER(djboy_state::trigger_nmi_on_sound_cpu2) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_cpu2, INPUT_LINE_NMI, PULSE_LINE); } /* trigger_nmi_on_sound_cpu2 */ @@ -293,7 +293,7 @@ static ADDRESS_MAP_START( cpu2_port_am, AS_IO, 8, djboy_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x00) AM_WRITE(cpu2_bankswitch_w) AM_RANGE(0x02, 0x03) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w) - AM_RANGE(0x04, 0x04) AM_READ(soundlatch_r) + AM_RANGE(0x04, 0x04) AM_READ(soundlatch_byte_r) AM_RANGE(0x06, 0x06) AM_DEVREADWRITE("oki1", okim6295_device, read, write) AM_RANGE(0x07, 0x07) AM_DEVREADWRITE("oki2", okim6295_device, read, write) ADDRESS_MAP_END diff --git a/src/mame/drivers/dmndrby.c b/src/mame/drivers/dmndrby.c index 3c402c03146..d3fbb363fdd 100644 --- a/src/mame/drivers/dmndrby.c +++ b/src/mame/drivers/dmndrby.c @@ -78,7 +78,7 @@ public: WRITE8_MEMBER(dmndrby_state::dderby_sound_w) { - soundlatch_w(space,0,data); + soundlatch_byte_w(space,0,data); cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE); } @@ -138,7 +138,7 @@ static ADDRESS_MAP_START( dderby_sound_map, AS_PROGRAM, 8, dmndrby_state ) AM_RANGE(0x0000, 0x0fff) AM_ROM AM_RANGE(0x1000, 0x1000) AM_RAM //??? AM_RANGE(0x4000, 0x4001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) - AM_RANGE(0x4000, 0x4000) AM_READ(soundlatch_r) + AM_RANGE(0x4000, 0x4000) AM_READ(soundlatch_byte_r) AM_RANGE(0x4001, 0x4001) AM_DEVREAD_LEGACY("ay1", ay8910_r) AM_RANGE(0x6000, 0x67ff) AM_RAM ADDRESS_MAP_END diff --git a/src/mame/drivers/dooyong.c b/src/mame/drivers/dooyong.c index fe4f4259d1f..a053e29f066 100644 --- a/src/mame/drivers/dooyong.c +++ b/src/mame/drivers/dooyong.c @@ -125,7 +125,7 @@ static ADDRESS_MAP_START( lastday_map, AS_PROGRAM, 8, dooyong_state ) AM_RANGE(0xc011, 0xc011) AM_READ_PORT("P1") AM_RANGE(0xc011, 0xc011) AM_WRITE(lastday_bankswitch_w) AM_RANGE(0xc012, 0xc012) AM_READ_PORT("P2") - AM_RANGE(0xc012, 0xc012) AM_WRITE(soundlatch_w) + AM_RANGE(0xc012, 0xc012) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xc013, 0xc013) AM_READ_PORT("DSWA") AM_RANGE(0xc014, 0xc014) AM_READ_PORT("DSWB") AM_RANGE(0xc800, 0xcfff) AM_RAM_WRITE(paletteram_xxxxBBBBGGGGRRRR_byte_le_w) AM_SHARE("paletteram") @@ -146,7 +146,7 @@ static ADDRESS_MAP_START( pollux_map, AS_PROGRAM, 8, dooyong_state ) AM_RANGE(0xf003, 0xf003) AM_READ_PORT("P2") AM_RANGE(0xf004, 0xf004) AM_READ_PORT("SYSTEM") AM_RANGE(0xf008, 0xf008) AM_WRITE(pollux_ctrl_w) /* coin counter, flip screen */ - AM_RANGE(0xf010, 0xf010) AM_WRITE(soundlatch_w) + AM_RANGE(0xf010, 0xf010) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xf018, 0xf01f) AM_WRITE(dooyong_bgscroll8_w) AM_RANGE(0xf020, 0xf027) AM_WRITE(dooyong_fgscroll8_w) AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_byte_le_w) AM_SHARE("paletteram") @@ -165,7 +165,7 @@ static ADDRESS_MAP_START( gulfstrm_map, AS_PROGRAM, 8, dooyong_state ) AM_RANGE(0xf003, 0xf003) AM_READ_PORT("P1") AM_RANGE(0xf004, 0xf004) AM_READ_PORT("SYSTEM") AM_RANGE(0xf008, 0xf008) AM_WRITE(pollux_ctrl_w) /* coin counter, flip screen */ - AM_RANGE(0xf010, 0xf010) AM_WRITE(soundlatch_w) + AM_RANGE(0xf010, 0xf010) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xf018, 0xf01f) AM_WRITE(dooyong_bgscroll8_w) AM_RANGE(0xf020, 0xf027) AM_WRITE(dooyong_fgscroll8_w) AM_RANGE(0xf800, 0xffff) AM_RAM_WRITE(paletteram_xRRRRRGGGGGBBBBB_byte_le_w) AM_SHARE("paletteram") @@ -181,7 +181,7 @@ static ADDRESS_MAP_START( bluehawk_map, AS_PROGRAM, 8, dooyong_state ) AM_RANGE(0xc003, 0xc003) AM_READ_PORT("P2") AM_RANGE(0xc004, 0xc004) AM_READ_PORT("SYSTEM") AM_RANGE(0xc008, 0xc008) AM_WRITE(lastday_bankswitch_w) - AM_RANGE(0xc010, 0xc010) AM_WRITE(soundlatch_w) + AM_RANGE(0xc010, 0xc010) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xc018, 0xc01f) AM_WRITE(dooyong_fg2scroll8_w) AM_RANGE(0xc040, 0xc047) AM_WRITE(dooyong_bgscroll8_w) AM_RANGE(0xc048, 0xc04f) AM_WRITE(dooyong_fgscroll8_w) @@ -203,7 +203,7 @@ static ADDRESS_MAP_START( flytiger_map, AS_PROGRAM, 8, dooyong_state ) AM_RANGE(0xe006, 0xe006) AM_READ_PORT("DSWA") AM_RANGE(0xe008, 0xe008) AM_READ_PORT("DSWB") AM_RANGE(0xe010, 0xe010) AM_WRITE(flytiger_ctrl_w) /* coin counter, flip screen */ - AM_RANGE(0xe020, 0xe020) AM_WRITE(soundlatch_w) + AM_RANGE(0xe020, 0xe020) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xe030, 0xe037) AM_WRITE(dooyong_bgscroll8_w) AM_RANGE(0xe040, 0xe047) AM_WRITE(dooyong_fgscroll8_w) AM_RANGE(0xe800, 0xefff) AM_RAM_WRITE(paletteram_flytiger_w) AM_BASE(m_paletteram_flytiger) @@ -220,7 +220,7 @@ static ADDRESS_MAP_START( primella_map, AS_PROGRAM, 8, dooyong_state ) AM_RANGE(0xf800, 0xf800) AM_READ_PORT("DSWA") AM_RANGE(0xf800, 0xf800) AM_WRITE(primella_ctrl_w) /* bank switch, flip screen etc */ AM_RANGE(0xf810, 0xf810) AM_READ_PORT("DSWB") - AM_RANGE(0xf810, 0xf810) AM_WRITE(soundlatch_w) + AM_RANGE(0xf810, 0xf810) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xf820, 0xf820) AM_READ_PORT("P1") AM_RANGE(0xf830, 0xf830) AM_READ_PORT("P2") AM_RANGE(0xf840, 0xf840) AM_READ_PORT("SYSTEM") @@ -287,7 +287,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( lastday_sound_map, AS_PROGRAM, 8, dooyong_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0xc000, 0xc7ff) AM_RAM - AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_r) + AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_byte_r) AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w) AM_RANGE(0xf002, 0xf003) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w) ADDRESS_MAP_END @@ -295,7 +295,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( pollux_sound_map, AS_PROGRAM, 8, dooyong_state ) AM_RANGE(0x0000, 0xefff) AM_ROM AM_RANGE(0xf000, 0xf7ff) AM_RAM - AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_r) + AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_byte_r) AM_RANGE(0xf802, 0xf803) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w) AM_RANGE(0xf804, 0xf805) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w) ADDRESS_MAP_END @@ -303,7 +303,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( bluehawk_sound_map, AS_PROGRAM, 8, dooyong_state ) AM_RANGE(0x0000, 0xefff) AM_ROM AM_RANGE(0xf000, 0xf7ff) AM_RAM - AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_r) + AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_byte_r) AM_RANGE(0xf808, 0xf809) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0xf80a, 0xf80a) AM_DEVREADWRITE("oki", okim6295_device, read, write) ADDRESS_MAP_END diff --git a/src/mame/drivers/dynadice.c b/src/mame/drivers/dynadice.c index e6192d18cbc..72baf0d22f8 100644 --- a/src/mame/drivers/dynadice.c +++ b/src/mame/drivers/dynadice.c @@ -103,7 +103,7 @@ static ADDRESS_MAP_START( dynadice_io_map, AS_IO, 8, dynadice_state ) AM_RANGE(0x51, 0x51) AM_READ_PORT("IN1") AM_RANGE(0x52, 0x52) AM_READ_PORT("DSW") AM_RANGE(0x62, 0x62) AM_WRITENOP - AM_RANGE(0x63, 0x63) AM_WRITE(soundlatch_w) + AM_RANGE(0x63, 0x63) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x70, 0x77) AM_WRITENOP ADDRESS_MAP_END @@ -114,8 +114,8 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( dynadice_sound_io_map, AS_IO, 8, dynadice_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r) - AM_RANGE(0x01, 0x01) AM_WRITE(soundlatch_clear_w) + AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r) + AM_RANGE(0x01, 0x01) AM_WRITE(soundlatch_clear_byte_w) AM_RANGE(0x02, 0x02) AM_WRITE(sound_data_w) AM_RANGE(0x03, 0x03) AM_DEVWRITE_LEGACY("aysnd", sound_control_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/egghunt.c b/src/mame/drivers/egghunt.c index 135be3157d4..60e51bd3383 100644 --- a/src/mame/drivers/egghunt.c +++ b/src/mame/drivers/egghunt.c @@ -199,7 +199,7 @@ WRITE8_MEMBER(egghunt_state::egghunt_vidram_bank_w) WRITE8_MEMBER(egghunt_state::egghunt_soundlatch_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_audiocpu, 0, HOLD_LINE); } @@ -239,7 +239,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, egghunt_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) AM_RANGE(0xe001, 0xe001) AM_DEVREADWRITE_LEGACY("oki", egghunt_okibanking_r, egghunt_okibanking_w) AM_RANGE(0xe004, 0xe004) AM_DEVREADWRITE("oki", okim6295_device, read, write) AM_RANGE(0xf000, 0xffff) AM_RAM diff --git a/src/mame/drivers/equites.c b/src/mame/drivers/equites.c index 207decbfb25..de4547b2e04 100644 --- a/src/mame/drivers/equites.c +++ b/src/mame/drivers/equites.c @@ -466,7 +466,7 @@ WRITE8_MEMBER(equites_state::equites_c0f8_w) case 7: // c0ff: sound command latch clear // Note: solder pad CP1 on the pcb would allow to disable this - soundlatch_clear_w(space, 0, 0); + soundlatch_clear_byte_w(space, 0, 0); break; } } @@ -750,7 +750,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, equites_state ) AM_RANGE(0x0000, 0xbfff) AM_ROM - AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_r) + AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_byte_r) AM_RANGE(0xc080, 0xc08d) AM_DEVWRITE_LEGACY("msm", msm5232_w) AM_RANGE(0xc0a0, 0xc0a1) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) AM_RANGE(0xc0b0, 0xc0b0) AM_WRITENOP // n.c. diff --git a/src/mame/drivers/esd16.c b/src/mame/drivers/esd16.c index 6cea60b43db..dba68aedb6f 100644 --- a/src/mame/drivers/esd16.c +++ b/src/mame/drivers/esd16.c @@ -67,7 +67,7 @@ WRITE16_MEMBER(esd16_state::esd16_sound_command_w) { if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_audio_cpu, 0, ASSERT_LINE); // Generate an IRQ device_spin_until_time(&space.device(), attotime::from_usec(50)); // Allow the other CPU to reply } @@ -240,7 +240,7 @@ READ8_MEMBER(esd16_state::esd16_sound_command_r) /* Clear IRQ only after reading the command, or some get lost */ device_set_input_line(m_audio_cpu, 0, CLEAR_LINE); - return soundlatch_r(space, 0); + return soundlatch_byte_r(space, 0); } static ADDRESS_MAP_START( multchmp_sound_io_map, AS_IO, 8, esd16_state ) diff --git a/src/mame/drivers/espial.c b/src/mame/drivers/espial.c index 7a8bde6f06a..4ea73dc4528 100644 --- a/src/mame/drivers/espial.c +++ b/src/mame/drivers/espial.c @@ -101,7 +101,7 @@ INTERRUPT_GEN( espial_sound_nmi_gen ) WRITE8_MEMBER(espial_state::espial_master_soundlatch_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); device_set_input_line(m_audiocpu, 0, HOLD_LINE); } @@ -113,7 +113,7 @@ static ADDRESS_MAP_START( espial_map, AS_PROGRAM, 8, espial_state ) AM_RANGE(0x6082, 0x6082) AM_READ_PORT("DSW1") AM_RANGE(0x6083, 0x6083) AM_READ_PORT("IN1") AM_RANGE(0x6084, 0x6084) AM_READ_PORT("IN2") - AM_RANGE(0x6090, 0x6090) AM_READ(soundlatch2_r) AM_WRITE(espial_master_soundlatch_w) + AM_RANGE(0x6090, 0x6090) AM_READ(soundlatch2_byte_r) AM_WRITE(espial_master_soundlatch_w) AM_RANGE(0x7000, 0x7000) AM_READWRITE(watchdog_reset_r, watchdog_reset_w) AM_RANGE(0x7100, 0x7100) AM_WRITE(espial_master_interrupt_mask_w) AM_RANGE(0x7200, 0x7200) AM_WRITE(espial_flipscreen_w) @@ -138,7 +138,7 @@ static ADDRESS_MAP_START( netwars_map, AS_PROGRAM, 8, espial_state ) AM_RANGE(0x6082, 0x6082) AM_READ_PORT("DSW1") AM_RANGE(0x6083, 0x6083) AM_READ_PORT("IN1") AM_RANGE(0x6084, 0x6084) AM_READ_PORT("IN2") - AM_RANGE(0x6090, 0x6090) AM_READ(soundlatch2_r) AM_WRITE(espial_master_soundlatch_w) + AM_RANGE(0x6090, 0x6090) AM_READ(soundlatch2_byte_r) AM_WRITE(espial_master_soundlatch_w) AM_RANGE(0x7000, 0x7000) AM_READWRITE(watchdog_reset_r, watchdog_reset_w) AM_RANGE(0x7100, 0x7100) AM_WRITE(espial_master_interrupt_mask_w) AM_RANGE(0x7200, 0x7200) AM_WRITE(espial_flipscreen_w) @@ -156,7 +156,7 @@ static ADDRESS_MAP_START( espial_sound_map, AS_PROGRAM, 8, espial_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM AM_RANGE(0x2000, 0x23ff) AM_RAM AM_RANGE(0x4000, 0x4000) AM_WRITE(espial_sound_nmi_mask_w) - AM_RANGE(0x6000, 0x6000) AM_READWRITE(soundlatch_r, soundlatch2_w) + AM_RANGE(0x6000, 0x6000) AM_READWRITE(soundlatch_byte_r, soundlatch2_byte_w) ADDRESS_MAP_END static ADDRESS_MAP_START( espial_sound_io_map, AS_IO, 8, espial_state ) diff --git a/src/mame/drivers/exedexes.c b/src/mame/drivers/exedexes.c index 4ca96eb103e..701afcfa245 100644 --- a/src/mame/drivers/exedexes.c +++ b/src/mame/drivers/exedexes.c @@ -35,7 +35,7 @@ static ADDRESS_MAP_START( exedexes_map, AS_PROGRAM, 8, exedexes_state ) AM_RANGE(0xc002, 0xc002) AM_READ_PORT("P2") AM_RANGE(0xc003, 0xc003) AM_READ_PORT("DSW0") AM_RANGE(0xc004, 0xc004) AM_READ_PORT("DSW1") - AM_RANGE(0xc800, 0xc800) AM_WRITE(soundlatch_w) + AM_RANGE(0xc800, 0xc800) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xc804, 0xc804) AM_WRITE(exedexes_c804_w) /* coin counters + text layer enable */ AM_RANGE(0xc806, 0xc806) AM_WRITENOP /* Watchdog ?? */ AM_RANGE(0xd000, 0xd3ff) AM_RAM_WRITE(exedexes_videoram_w) AM_BASE(m_videoram) /* Video RAM */ @@ -53,7 +53,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, exedexes_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x4000, 0x47ff) AM_RAM - AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_r) + AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) AM_RANGE(0x8000, 0x8001) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) AM_RANGE(0x8002, 0x8002) AM_DEVWRITE_LEGACY("sn1", sn76496_w) AM_RANGE(0x8003, 0x8003) AM_DEVWRITE_LEGACY("sn2", sn76496_w) diff --git a/src/mame/drivers/exerion.c b/src/mame/drivers/exerion.c index e7a345e508d..6d26a3612dd 100644 --- a/src/mame/drivers/exerion.c +++ b/src/mame/drivers/exerion.c @@ -200,7 +200,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, exerion_state ) AM_RANGE(0xa800, 0xa800) AM_READ_PORT("DSW0") AM_RANGE(0xb000, 0xb000) AM_READ_PORT("DSW1") AM_RANGE(0xc000, 0xc000) AM_WRITE(exerion_videoreg_w) - AM_RANGE(0xc800, 0xc800) AM_WRITE(soundlatch_w) + AM_RANGE(0xc800, 0xc800) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xd000, 0xd001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) AM_RANGE(0xd800, 0xd801) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) AM_RANGE(0xd802, 0xd802) AM_DEVREAD_LEGACY("ay2", ay8910_r) @@ -217,7 +217,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sub_map, AS_PROGRAM, 8, exerion_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM AM_RANGE(0x4000, 0x47ff) AM_RAM - AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_r) + AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) AM_RANGE(0x8000, 0x800c) AM_WRITE(exerion_video_latch_w) AM_RANGE(0xa000, 0xa000) AM_READ(exerion_video_timing_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/exprraid.c b/src/mame/drivers/exprraid.c index 4ea59dc5b41..55620ca4aae 100644 --- a/src/mame/drivers/exprraid.c +++ b/src/mame/drivers/exprraid.c @@ -232,7 +232,7 @@ READ8_MEMBER(exprraid_state::exprraid_protection_r) WRITE8_MEMBER(exprraid_state::sound_cpu_command_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_slave, INPUT_LINE_NMI, PULSE_LINE); } @@ -272,7 +272,7 @@ static ADDRESS_MAP_START( slave_map, AS_PROGRAM, 8, exprraid_state ) AM_RANGE(0x0000, 0x1fff) AM_RAM AM_RANGE(0x2000, 0x2001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w) AM_RANGE(0x4000, 0x4001) AM_DEVREADWRITE_LEGACY("ym2", ym3526_r, ym3526_w) - AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_r) + AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/f1gp.c b/src/mame/drivers/f1gp.c index cecd19a12b8..a9bf01d103b 100644 --- a/src/mame/drivers/f1gp.c +++ b/src/mame/drivers/f1gp.c @@ -71,7 +71,7 @@ WRITE16_MEMBER(f1gp_state::sound_command_w) if (ACCESSING_BITS_0_7) { m_pending_command = 1; - soundlatch_w(space, offset, data & 0xff); + soundlatch_byte_w(space, offset, data & 0xff); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } } @@ -152,7 +152,7 @@ static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, f1gp_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x00) AM_WRITE(f1gp_sh_bankswitch_w) // f1gp AM_RANGE(0x0c, 0x0c) AM_WRITE(f1gp_sh_bankswitch_w) // f1gp2 - AM_RANGE(0x14, 0x14) AM_READ(soundlatch_r) AM_WRITE(pending_command_clear_w) + AM_RANGE(0x14, 0x14) AM_READ(soundlatch_byte_r) AM_WRITE(pending_command_clear_w) AM_RANGE(0x18, 0x1b) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/fantland.c b/src/mame/drivers/fantland.c index c276fdc8db6..da64538d4da 100644 --- a/src/mame/drivers/fantland.c +++ b/src/mame/drivers/fantland.c @@ -75,7 +75,7 @@ WRITE16_MEMBER(fantland_state::fantland_nmi_enable_16_w) WRITE8_MEMBER(fantland_state::fantland_soundlatch_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_audio_cpu, INPUT_LINE_NMI, PULSE_LINE); } @@ -292,13 +292,13 @@ static ADDRESS_MAP_START( fantland_sound_map, AS_PROGRAM, 8, fantland_state ) ADDRESS_MAP_END static ADDRESS_MAP_START( fantland_sound_iomap, AS_IO, 8, fantland_state ) - AM_RANGE( 0x0080, 0x0080 ) AM_READ(soundlatch_r ) + AM_RANGE( 0x0080, 0x0080 ) AM_READ(soundlatch_byte_r ) AM_RANGE( 0x0100, 0x0101 ) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w ) AM_RANGE( 0x0180, 0x0180 ) AM_DEVWRITE_LEGACY("dac", dac_w ) ADDRESS_MAP_END static ADDRESS_MAP_START( galaxygn_sound_iomap, AS_IO, 8, fantland_state ) - AM_RANGE( 0x0080, 0x0080 ) AM_READ(soundlatch_r ) + AM_RANGE( 0x0080, 0x0080 ) AM_READ(soundlatch_byte_r ) AM_RANGE( 0x0100, 0x0101 ) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w ) ADDRESS_MAP_END @@ -400,7 +400,7 @@ static void borntofi_adpcm_int_3(device_t *device) { borntofi_adpcm_int(device, static ADDRESS_MAP_START( borntofi_sound_map, AS_PROGRAM, 8, fantland_state ) AM_RANGE( 0x00000, 0x003ff ) AM_RAM - AM_RANGE( 0x04000, 0x04000 ) AM_READ(soundlatch_r) + AM_RANGE( 0x04000, 0x04000 ) AM_READ(soundlatch_byte_r) AM_RANGE( 0x04000, 0x0401f ) AM_WRITE(borntofi_msm5205_w) AM_RANGE( 0x08000, 0x0ffff ) AM_ROM AM_RANGE( 0xf8000, 0xfffff ) AM_ROM @@ -419,7 +419,7 @@ static ADDRESS_MAP_START( wheelrun_sound_map, AS_PROGRAM, 8, fantland_state ) AM_RANGE(0xb000, 0xb000) AM_WRITENOP // on a car crash / hit AM_RANGE(0xc000, 0xc000) AM_WRITENOP // "" - AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_r ) // during NMI + AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_byte_r ) // during NMI ADDRESS_MAP_END diff --git a/src/mame/drivers/fastfred.c b/src/mame/drivers/fastfred.c index e7039705d69..16b548db197 100644 --- a/src/mame/drivers/fastfred.c +++ b/src/mame/drivers/fastfred.c @@ -199,7 +199,7 @@ static ADDRESS_MAP_START( fastfred_map, AS_PROGRAM, 8, fastfred_state ) AM_RANGE(0xf007, 0xf007) AM_WRITE_LEGACY(fastfred_flip_screen_y_w) AM_RANGE(0xf116, 0xf116) AM_WRITE_LEGACY(fastfred_flip_screen_x_w) AM_RANGE(0xf117, 0xf117) AM_WRITE_LEGACY(fastfred_flip_screen_y_w) - AM_RANGE(0xf800, 0xf800) AM_READWRITE(watchdog_reset_r, soundlatch_w) + AM_RANGE(0xf800, 0xf800) AM_READWRITE(watchdog_reset_r, soundlatch_byte_w) ADDRESS_MAP_END @@ -254,13 +254,13 @@ static ADDRESS_MAP_START( imago_map, AS_PROGRAM, 8, fastfred_state ) AM_RANGE(0xf007, 0xf007) AM_WRITE_LEGACY(fastfred_flip_screen_y_w) AM_RANGE(0xf400, 0xf400) AM_WRITENOP // writes 0 or 2 AM_RANGE(0xf401, 0xf401) AM_WRITE_LEGACY(imago_sprites_bank_w) - AM_RANGE(0xf800, 0xf800) AM_READNOP AM_WRITE(soundlatch_w) + AM_RANGE(0xf800, 0xf800) AM_READNOP AM_WRITE(soundlatch_byte_w) ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, fastfred_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM AM_RANGE(0x2000, 0x23ff) AM_RAM - AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_r) AM_WRITE_LEGACY(sound_nmi_mask_w) + AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) AM_WRITE_LEGACY(sound_nmi_mask_w) AM_RANGE(0x4000, 0x4000) AM_WRITEONLY // Reset PSG's AM_RANGE(0x5000, 0x5001) AM_DEVWRITE_LEGACY("ay8910.1", ay8910_address_data_w) AM_RANGE(0x6000, 0x6001) AM_DEVWRITE_LEGACY("ay8910.2", ay8910_address_data_w) diff --git a/src/mame/drivers/fcombat.c b/src/mame/drivers/fcombat.c index 72b21e0521f..77148779677 100644 --- a/src/mame/drivers/fcombat.c +++ b/src/mame/drivers/fcombat.c @@ -126,14 +126,14 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, fcombat_state ) AM_RANGE(0xec00, 0xec00) AM_WRITE(ec00_w) AM_RANGE(0xed00, 0xed00) AM_WRITE(ed00_w) AM_RANGE(0xee00, 0xee00) AM_WRITE(ee00_w) // related to protection ? - doesn't seem to have any effect - AM_RANGE(0xef00, 0xef00) AM_WRITE(soundlatch_w) + AM_RANGE(0xef00, 0xef00) AM_WRITE(soundlatch_byte_w) ADDRESS_MAP_END static ADDRESS_MAP_START( audio_map, AS_PROGRAM, 8, fcombat_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x4000, 0x47ff) AM_RAM - AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_r) + AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) AM_RANGE(0x8001, 0x8001) AM_DEVREAD_LEGACY("ay1", ay8910_r) AM_RANGE(0x8002, 0x8003) AM_DEVWRITE_LEGACY("ay1", ay8910_data_address_w) AM_RANGE(0xa001, 0xa001) AM_DEVREAD_LEGACY("ay2", ay8910_r) diff --git a/src/mame/drivers/fcrash.c b/src/mame/drivers/fcrash.c index cdde4a35eca..358e0927805 100644 --- a/src/mame/drivers/fcrash.c +++ b/src/mame/drivers/fcrash.c @@ -46,7 +46,7 @@ static WRITE16_HANDLER( fcrash_soundlatch_w ) if (ACCESSING_BITS_0_7) { - state->soundlatch_w(*space, 0, data & 0xff); + state->soundlatch_byte_w(*space, 0, data & 0xff); device_set_input_line(state->m_audiocpu, 0, HOLD_LINE); } } @@ -399,7 +399,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, cps_state ) AM_RANGE(0xd800, 0xd801) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w) AM_RANGE(0xdc00, 0xdc01) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w) AM_RANGE(0xe000, 0xe000) AM_WRITE_LEGACY(fcrash_snd_bankswitch_w) - AM_RANGE(0xe400, 0xe400) AM_READ(soundlatch_r) + AM_RANGE(0xe400, 0xe400) AM_READ(soundlatch_byte_r) AM_RANGE(0xe800, 0xe800) AM_WRITE_LEGACY(fcrash_msm5205_0_data_w) AM_RANGE(0xec00, 0xec00) AM_WRITE_LEGACY(fcrash_msm5205_1_data_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/finalizr.c b/src/mame/drivers/finalizr.c index c1b7576427f..bd7dee2ceb5 100644 --- a/src/mame/drivers/finalizr.c +++ b/src/mame/drivers/finalizr.c @@ -109,7 +109,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, finalizr_state ) AM_RANGE(0x081a, 0x081a) AM_DEVWRITE_LEGACY("snsnd", sn76496_w) /* This address triggers the SN chip to read the data port. */ AM_RANGE(0x081b, 0x081b) AM_WRITENOP /* Loads the snd command into the snd latch */ AM_RANGE(0x081c, 0x081c) AM_WRITE(finalizr_i8039_irq_w) /* custom sound chip */ - AM_RANGE(0x081d, 0x081d) AM_WRITE(soundlatch_w) /* custom sound chip */ + AM_RANGE(0x081d, 0x081d) AM_WRITE(soundlatch_byte_w) /* custom sound chip */ AM_RANGE(0x2000, 0x23ff) AM_RAM AM_BASE(m_colorram) AM_RANGE(0x2400, 0x27ff) AM_RAM AM_BASE_SIZE(m_videoram, m_videoram_size) AM_RANGE(0x2800, 0x2bff) AM_RAM AM_BASE(m_colorram2) @@ -126,7 +126,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, finalizr_state ) ADDRESS_MAP_END static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, finalizr_state ) - AM_RANGE(0x00, 0xff) AM_READ(soundlatch_r) + AM_RANGE(0x00, 0xff) AM_READ(soundlatch_byte_r) AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE_LEGACY("dac", dac_w) AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(i8039_irqen_w) AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_WRITE(i8039_T0_w) diff --git a/src/mame/drivers/firefox.c b/src/mame/drivers/firefox.c index e2d118c9e38..277ac3b63f7 100644 --- a/src/mame/drivers/firefox.c +++ b/src/mame/drivers/firefox.c @@ -297,13 +297,13 @@ CUSTOM_INPUT_MEMBER(firefox_state::soundflag_r) READ8_MEMBER(firefox_state::sound_to_main_r) { m_sound_to_main_flag = 0; - return soundlatch2_r(space, 0); + return soundlatch2_byte_r(space, 0); } WRITE8_MEMBER(firefox_state::main_to_sound_w) { m_main_to_sound_flag = 1; - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -317,13 +317,13 @@ WRITE8_MEMBER(firefox_state::sound_reset_w) READ8_MEMBER(firefox_state::main_to_sound_r) { m_main_to_sound_flag = 0; - return soundlatch_r(space, 0); + return soundlatch_byte_r(space, 0); } WRITE8_MEMBER(firefox_state::sound_to_main_w) { m_sound_to_main_flag = 1; - soundlatch2_w(space, 0, data); + soundlatch2_byte_w(space, 0, data); } diff --git a/src/mame/drivers/firetrap.c b/src/mame/drivers/firetrap.c index 518a5d31736..6339181a09b 100644 --- a/src/mame/drivers/firetrap.c +++ b/src/mame/drivers/firetrap.c @@ -303,7 +303,7 @@ WRITE8_MEMBER(firetrap_state::firetrap_8751_w) WRITE8_MEMBER(firetrap_state::firetrap_sound_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } @@ -400,7 +400,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, firetrap_state ) AM_RANGE(0x2000, 0x2000) AM_WRITE(firetrap_adpcm_data_w) /* ADPCM data for the MSM5205 chip */ AM_RANGE(0x2400, 0x2400) AM_WRITE(firetrap_sound_2400_w) AM_RANGE(0x2800, 0x2800) AM_WRITE(firetrap_sound_bankselect_w) - AM_RANGE(0x3400, 0x3400) AM_READ(soundlatch_r) + AM_RANGE(0x3400, 0x3400) AM_READ(soundlatch_byte_r) AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank2") AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/flkatck.c b/src/mame/drivers/flkatck.c index 38aa65fb4a0..77ff97a744c 100644 --- a/src/mame/drivers/flkatck.c +++ b/src/mame/drivers/flkatck.c @@ -69,7 +69,7 @@ WRITE8_MEMBER(flkatck_state::flkatck_ls138_w) flkatck_bankswitch_w(space, 0, data); break; case 0x05: /* sound code number */ - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); break; case 0x06: /* Cause interrupt on audio CPU */ device_set_input_line(m_audiocpu, 0, HOLD_LINE); @@ -110,7 +110,7 @@ static ADDRESS_MAP_START( flkatck_sound_map, AS_PROGRAM, 8, flkatck_state ) // AM_RANGE(0x9001, 0x9001) AM_RAM /* ??? */ AM_RANGE(0x9004, 0x9004) AM_READNOP /* ??? */ AM_RANGE(0x9006, 0x9006) AM_WRITENOP /* ??? */ - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) /* soundlatch_r */ + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) /* soundlatch_byte_r */ AM_RANGE(0xb000, 0xb00d) AM_DEVREADWRITE_LEGACY("konami", k007232_r, k007232_w) /* 007232 registers */ AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) /* YM2151 */ ADDRESS_MAP_END diff --git a/src/mame/drivers/flower.c b/src/mame/drivers/flower.c index 4981211df28..080a0b83c32 100644 --- a/src/mame/drivers/flower.c +++ b/src/mame/drivers/flower.c @@ -102,7 +102,7 @@ WRITE8_MEMBER(flower_state::flower_coin_lockout_w) WRITE8_MEMBER(flower_state::sound_command_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); if (*m_sn_nmi_enable & 1) cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); @@ -135,7 +135,7 @@ static ADDRESS_MAP_START( flower_sound_cpu, AS_PROGRAM, 8, flower_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x4000, 0x4000) AM_WRITE(flower_soundcpu_irq_ack) AM_RANGE(0x4001, 0x4001) AM_WRITEONLY AM_BASE(m_sn_nmi_enable) - AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_r) + AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) AM_RANGE(0x8000, 0x803f) AM_DEVWRITE_LEGACY("flower", flower_sound1_w) AM_RANGE(0xa000, 0xa03f) AM_DEVWRITE_LEGACY("flower", flower_sound2_w) AM_RANGE(0xc000, 0xc7ff) AM_RAM diff --git a/src/mame/drivers/flstory.c b/src/mame/drivers/flstory.c index cf14306a40c..8a51f0698fe 100644 --- a/src/mame/drivers/flstory.c +++ b/src/mame/drivers/flstory.c @@ -45,7 +45,7 @@ static TIMER_CALLBACK( nmi_callback ) WRITE8_MEMBER(flstory_state::sound_command_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); machine().scheduler().synchronize(FUNC(nmi_callback), data); } @@ -444,7 +444,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, flstory_state ) AM_RANGE(0xca00, 0xca0d) AM_DEVWRITE_LEGACY("msm", msm5232_w) AM_RANGE(0xcc00, 0xcc00) AM_DEVWRITE_LEGACY("msm", sound_control_0_w) AM_RANGE(0xce00, 0xce00) AM_DEVWRITE_LEGACY("msm", sound_control_1_w) - AM_RANGE(0xd800, 0xd800) AM_READ(soundlatch_r) AM_WRITE(to_main_w) + AM_RANGE(0xd800, 0xd800) AM_READ(soundlatch_byte_r) AM_WRITE(to_main_w) AM_RANGE(0xda00, 0xda00) AM_READNOP AM_WRITE(nmi_enable_w) /* unknown read*/ AM_RANGE(0xdc00, 0xdc00) AM_WRITE(nmi_disable_w) AM_RANGE(0xde00, 0xde00) AM_READNOP AM_DEVWRITE_LEGACY("dac", dac_w) /* signed 8-bit DAC & unknown read */ diff --git a/src/mame/drivers/fromanc2.c b/src/mame/drivers/fromanc2.c index 89600be8823..82a1f5e721b 100644 --- a/src/mame/drivers/fromanc2.c +++ b/src/mame/drivers/fromanc2.c @@ -40,8 +40,8 @@ static INTERRUPT_GEN( fromanc2_interrupt ) WRITE16_MEMBER(fromanc2_state::fromanc2_sndcmd_w) { - soundlatch_w(space, offset, (data >> 8) & 0xff); // 1P (LEFT) - soundlatch2_w(space, offset, data & 0xff); // 2P (RIGHT) + soundlatch_byte_w(space, offset, (data >> 8) & 0xff); // 1P (LEFT) + soundlatch2_byte_w(space, offset, data & 0xff); // 2P (RIGHT) device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); m_sndcpu_nmi_flag = 0; @@ -292,8 +292,8 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( fromanc2_sound_io_map, AS_IO, 8, fromanc2_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r) AM_WRITENOP // snd cmd (1P) / ? - AM_RANGE(0x04, 0x04) AM_READ(soundlatch2_r) // snd cmd (2P) + AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r) AM_WRITENOP // snd cmd (1P) / ? + AM_RANGE(0x04, 0x04) AM_READ(soundlatch2_byte_r) // snd cmd (2P) AM_RANGE(0x08, 0x0b) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w) AM_RANGE(0x0c, 0x0c) AM_READ(fromanc2_sndcpu_nmi_clr) ADDRESS_MAP_END diff --git a/src/mame/drivers/funkyjet.c b/src/mame/drivers/funkyjet.c index 4a6517efa6c..40633a02126 100644 --- a/src/mame/drivers/funkyjet.c +++ b/src/mame/drivers/funkyjet.c @@ -124,7 +124,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, funkyjet_state ) AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0x120000, 0x120001) AM_DEVREADWRITE("oki", okim6295_device, read, write) AM_RANGE(0x130000, 0x130001) AM_NOP /* This board only has 1 oki chip */ - AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_r) + AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_byte_r) AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8") AM_RANGE(0x1fec00, 0x1fec01) AM_WRITE_LEGACY(h6280_timer_w) AM_RANGE(0x1ff400, 0x1ff403) AM_WRITE_LEGACY(h6280_irq_status_w) diff --git a/src/mame/drivers/funybubl.c b/src/mame/drivers/funybubl.c index 0f3dd856235..2e6804518b2 100644 --- a/src/mame/drivers/funybubl.c +++ b/src/mame/drivers/funybubl.c @@ -67,7 +67,7 @@ WRITE8_MEMBER(funybubl_state::funybubl_cpurombank_w) WRITE8_MEMBER(funybubl_state::funybubl_soundcommand_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_audiocpu, 0, HOLD_LINE); } @@ -104,7 +104,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, funybubl_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x9000, 0x9000) AM_DEVWRITE_LEGACY("oki", funybubl_oki_bank_sw) AM_RANGE(0x9800, 0x9800) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/fuukifg2.c b/src/mame/drivers/fuukifg2.c index ff927399162..b62060603f3 100644 --- a/src/mame/drivers/fuukifg2.c +++ b/src/mame/drivers/fuukifg2.c @@ -78,7 +78,7 @@ WRITE16_MEMBER(fuuki16_state::fuuki16_sound_command_w) { if (ACCESSING_BITS_0_7) { - soundlatch_w(space,0,data & 0xff); + soundlatch_byte_w(space,0,data & 0xff); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); // device_spin_until_time(&space.device(), attotime::from_usec(50)); // Allow the other CPU to reply machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(50)); // Fixes glitching in rasters @@ -140,7 +140,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( fuuki16_sound_io_map, AS_IO, 8, fuuki16_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x00) AM_WRITE(fuuki16_sound_rombank_w) // ROM Bank - AM_RANGE(0x11, 0x11) AM_READ(soundlatch_r) AM_WRITENOP // From Main CPU / ? To Main CPU ? + AM_RANGE(0x11, 0x11) AM_READ(soundlatch_byte_r) AM_WRITENOP // From Main CPU / ? To Main CPU ? AM_RANGE(0x20, 0x20) AM_DEVWRITE_LEGACY("oki", fuuki16_oki_banking_w) // Oki Banking AM_RANGE(0x30, 0x30) AM_WRITENOP // ? In the NMI routine AM_RANGE(0x40, 0x41) AM_DEVWRITE_LEGACY("ym1", ym2203_w) diff --git a/src/mame/drivers/gaelco.c b/src/mame/drivers/gaelco.c index a8224200b5c..c9bb666b052 100644 --- a/src/mame/drivers/gaelco.c +++ b/src/mame/drivers/gaelco.c @@ -36,7 +36,7 @@ WRITE16_MEMBER(gaelco_state::bigkarnk_sound_command_w) if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_audiocpu, M6809_FIRQ_LINE, HOLD_LINE); } } @@ -139,7 +139,7 @@ static ADDRESS_MAP_START( bigkarnk_snd_map, AS_PROGRAM, 8, gaelco_state ) AM_RANGE(0x0800, 0x0801) AM_DEVREADWRITE("oki", okim6295_device, read, write) /* OKI6295 */ // AM_RANGE(0x0900, 0x0900) AM_WRITENOP /* enable sound output? */ AM_RANGE(0x0a00, 0x0a01) AM_DEVREADWRITE_LEGACY("ymsnd", ym3812_r, ym3812_w) /* YM3812 */ - AM_RANGE(0x0b00, 0x0b00) AM_READ(soundlatch_r) /* Sound latch */ + AM_RANGE(0x0b00, 0x0b00) AM_READ(soundlatch_byte_r) /* Sound latch */ AM_RANGE(0x0c00, 0xffff) AM_ROM /* ROM */ ADDRESS_MAP_END diff --git a/src/mame/drivers/gaiden.c b/src/mame/drivers/gaiden.c index 6e21f09d6d0..ddc641554e5 100644 --- a/src/mame/drivers/gaiden.c +++ b/src/mame/drivers/gaiden.c @@ -140,9 +140,9 @@ WRITE16_MEMBER(gaiden_state::gaiden_sound_command_w) { if (ACCESSING_BITS_0_7) - soundlatch_w(space, 0, data & 0xff); /* Ninja Gaiden */ + soundlatch_byte_w(space, 0, data & 0xff); /* Ninja Gaiden */ if (ACCESSING_BITS_8_15) - soundlatch_w(space, 0, data >> 8); /* Tecmo Knight */ + soundlatch_byte_w(space, 0, data >> 8); /* Tecmo Knight */ device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } @@ -151,7 +151,7 @@ WRITE16_MEMBER(gaiden_state::drgnbowl_sound_command_w) if (ACCESSING_BITS_8_15) { - soundlatch_w(space, 0, data >> 8); + soundlatch_byte_w(space, 0, data >> 8); device_set_input_line(m_audiocpu, 0, HOLD_LINE); } } @@ -440,7 +440,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, gaiden_state ) AM_RANGE(0xf810, 0xf811) AM_DEVWRITE_LEGACY("ym1", ym2203_w) AM_RANGE(0xf820, 0xf821) AM_DEVWRITE_LEGACY("ym2", ym2203_w) AM_RANGE(0xfc00, 0xfc00) AM_NOP /* ?? */ - AM_RANGE(0xfc20, 0xfc20) AM_READ(soundlatch_r) + AM_RANGE(0xfc20, 0xfc20) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static ADDRESS_MAP_START( drgnbowl_sound_map, AS_PROGRAM, 8, gaiden_state ) @@ -452,7 +452,7 @@ static ADDRESS_MAP_START( drgnbowl_sound_port_map, AS_IO, 8, gaiden_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0x80, 0x80) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_r) + AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static INPUT_PORTS_START( common ) @@ -906,7 +906,7 @@ static ADDRESS_MAP_START( mastninj_sound_map, AS_PROGRAM, 8, gaiden_state ) AM_RANGE(0xc400, 0xc401) AM_DEVWRITE_LEGACY("ym1", ym2203_w) AM_RANGE(0xc800, 0xc801) AM_DEVWRITE_LEGACY("ym2", ym2203_w) // AM_RANGE(0xfc00, 0xfc00) AM_NOP /* ?? */ -// AM_RANGE(0xfc20, 0xfc20) AM_READ(soundlatch_r) +// AM_RANGE(0xfc20, 0xfc20) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static ADDRESS_MAP_START( mastninj_map, AS_PROGRAM, 16, gaiden_state ) diff --git a/src/mame/drivers/galaxian.c b/src/mame/drivers/galaxian.c index ba83e67a856..5ca067b6d38 100644 --- a/src/mame/drivers/galaxian.c +++ b/src/mame/drivers/galaxian.c @@ -639,7 +639,7 @@ static const ppi8255_interface konami_ppi8255_1_intf = DEVCB_NULL, /* Port A read */ DEVCB_NULL, /* Port B read */ DEVCB_INPUT_PORT("IN3"), /* Port C read */ - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_w), /* Port A write */ + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_w), /* Port A write */ DEVCB_HANDLER(konami_sound_control_w), /* Port B write */ DEVCB_HANDLER(konami_portc_1_w) /* Port C write */ }; @@ -742,7 +742,7 @@ static const ppi8255_interface scramble_ppi8255_1_intf = DEVCB_NULL, /* Port A read */ DEVCB_NULL, /* Port B read */ DEVCB_HANDLER(scramble_protection_r), /* Port C read */ - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_w), /* Port A write */ + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_w), /* Port A write */ DEVCB_HANDLER(konami_sound_control_w), /* Port B write */ DEVCB_HANDLER(scramble_protection_w) /* Port C write */ }; @@ -765,7 +765,7 @@ static READ8_DEVICE_HANDLER( explorer_sound_latch_r ) { galaxian_state *state = device->machine().driver_data<galaxian_state>(); cputag_set_input_line(device->machine(), "audiocpu", 0, CLEAR_LINE); - return state->soundlatch_r(*device->machine().device("audiocpu")->memory().space(AS_PROGRAM), 0); + return state->soundlatch_byte_r(*device->machine().device("audiocpu")->memory().space(AS_PROGRAM), 0); } @@ -808,7 +808,7 @@ static WRITE8_DEVICE_HANDLER( sfx_sample_control_w ) static const ppi8255_interface sfx_ppi8255_2_intf = { - DEVCB_DRIVER_MEMBER(driver_device, soundlatch2_r), /* Port A read */ + DEVCB_DRIVER_MEMBER(driver_device, soundlatch2_byte_r), /* Port A read */ DEVCB_NULL, /* Port B read */ DEVCB_NULL, /* Port C read */ DEVCB_NULL, /* Port A write */ @@ -1068,7 +1068,7 @@ static const ppi8255_interface scorpion_ppi8255_1_intf = DEVCB_NULL, /* Port A read */ DEVCB_NULL, /* Port B read */ DEVCB_HANDLER(scorpion_protection_r), /* Port C read */ - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_w), /* Port A write */ + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_w), /* Port A write */ DEVCB_HANDLER(konami_sound_control_w), /* Port B write */ DEVCB_HANDLER(scorpion_protection_w) /* Port C write */ }; @@ -1203,7 +1203,7 @@ static WRITE8_HANDLER( kingball_sound2_w ) { galaxian_state *state = space->machine().driver_data<galaxian_state>(); state->m_kingball_sound = (state->m_kingball_sound & ~0x02) | (data << 1); - state->soundlatch_w(*space, 0, state->m_kingball_sound | 0xf0); + state->soundlatch_byte_w(*space, 0, state->m_kingball_sound | 0xf0); } @@ -1284,7 +1284,7 @@ static READ8_HANDLER( jumpbug_protection_r ) static WRITE8_HANDLER( checkman_sound_command_w ) { galaxian_state *state = space->machine().driver_data<galaxian_state>(); - state->soundlatch_w(*space, 0, data); + state->soundlatch_byte_w(*space, 0, data); cputag_set_input_line(space->machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -1842,7 +1842,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( checkman_sound_portmap, AS_IO, 8, galaxian_state ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x03, 0x03) AM_READ(soundlatch_r) + AM_RANGE(0x03, 0x03) AM_READ(soundlatch_byte_r) AM_RANGE(0x04, 0x05) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) AM_RANGE(0x06, 0x06) AM_DEVREAD_LEGACY("aysnd", ay8910_r) ADDRESS_MAP_END @@ -1869,7 +1869,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( kingball_sound_portmap, AS_IO, 8, galaxian_state ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_MIRROR(0xff) AM_READ(soundlatch_r) AM_DEVWRITE_LEGACY("dac", kingball_dac_w) + AM_RANGE(0x00, 0x00) AM_MIRROR(0xff) AM_READ(soundlatch_byte_r) AM_DEVWRITE_LEGACY("dac", kingball_dac_w) ADDRESS_MAP_END @@ -1974,7 +1974,7 @@ static const ay8910_interface frogger_ay8910_interface = { AY8910_DISCRETE_OUTPUT, {RES_K(5.1), RES_K(5.1), RES_K(5.1)}, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_HANDLER(frogger_sound_timer_r), DEVCB_NULL, DEVCB_NULL @@ -1984,7 +1984,7 @@ static const ay8910_interface konami_ay8910_interface_1 = { AY8910_DISCRETE_OUTPUT, {RES_K(5.1), RES_K(5.1), RES_K(5.1)}, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_HANDLER(konami_sound_timer_r), DEVCB_NULL, DEVCB_NULL @@ -2026,7 +2026,7 @@ static const ay8910_interface sfx_ay8910_interface = AY8910_DEFAULT_LOADS, DEVCB_NULL, DEVCB_NULL, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch2_w), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch2_byte_w), DEVCB_HANDLER(sfx_sample_control_w) }; @@ -2044,7 +2044,7 @@ static const ay8910_interface checkmaj_ay8910_interface = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL @@ -3390,7 +3390,7 @@ static DRIVER_INIT( explorer ) space->install_read_port(0x8001, 0x8001, 0, 0xffc, "IN1"); space->install_read_port(0x8002, 0x8002, 0, 0xffc, "IN2"); space->install_read_port(0x8003, 0x8003, 0, 0xffc, "IN3"); - space->install_write_handler(0x8000, 0x8000, 0, 0xfff, write8_delegate(FUNC(galaxian_state::soundlatch_w),state)); + space->install_write_handler(0x8000, 0x8000, 0, 0xfff, write8_delegate(FUNC(galaxian_state::soundlatch_byte_w),state)); space->install_legacy_write_handler(0x9000, 0x9000, 0, 0xfff, FUNC(explorer_sound_control_w)); } @@ -3460,7 +3460,7 @@ static DRIVER_INIT( froggrmc ) /* video extensions */ common_init(machine, NULL, frogger_draw_background, frogger_extend_tile_info, frogger_extend_sprite_info); - space->install_write_handler(0xa800, 0xa800, 0, 0x7ff, write8_delegate(FUNC(galaxian_state::soundlatch_w),state)); + space->install_write_handler(0xa800, 0xa800, 0, 0x7ff, write8_delegate(FUNC(galaxian_state::soundlatch_byte_w),state)); space->install_legacy_write_handler(0xb001, 0xb001, 0, 0x7f8, FUNC(froggrmc_sound_control_w)); /* actually needs 2k of RAM */ diff --git a/src/mame/drivers/galaxold.c b/src/mame/drivers/galaxold.c index 1aa584e6b56..5ba79d4d899 100644 --- a/src/mame/drivers/galaxold.c +++ b/src/mame/drivers/galaxold.c @@ -798,7 +798,7 @@ static ADDRESS_MAP_START( harem_cpu2_io, AS_IO, 8, galaxold_state ) AM_RANGE(0x20, 0x20) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) AM_RANGE(0x40, 0x40) AM_DEVWRITE_LEGACY("ay3", ay8910_address_w) AM_RANGE(0x80, 0x80) AM_DEVWRITE_LEGACY("ay3", ay8910_data_w) - AM_RANGE(0x80, 0x80) AM_READ(soundlatch_r) + AM_RANGE(0x80, 0x80) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static ADDRESS_MAP_START( hunchbkg, AS_PROGRAM, 8, galaxold_state ) diff --git a/src/mame/drivers/galivan.c b/src/mame/drivers/galivan.c index 314b59cac9b..9f95438ee84 100644 --- a/src/mame/drivers/galivan.c +++ b/src/mame/drivers/galivan.c @@ -37,12 +37,12 @@ Takahiro Nogi (nogi@kt.rim.or.jp) 1999/12/17 - WRITE8_MEMBER(galivan_state::galivan_sound_command_w) { - soundlatch_w(space,0,((data & 0x7f) << 1) | 1); + soundlatch_byte_w(space,0,((data & 0x7f) << 1) | 1); } READ8_MEMBER(galivan_state::soundlatch_clear_r) { - soundlatch_clear_w(space, 0, 0); + soundlatch_clear_byte_w(space, 0, 0); return 0; } @@ -118,7 +118,7 @@ static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, galivan_state ) AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("dac1", dac_w) AM_RANGE(0x03, 0x03) AM_DEVWRITE_LEGACY("dac2", dac_w) AM_RANGE(0x04, 0x04) AM_READ(soundlatch_clear_r) - AM_RANGE(0x06, 0x06) AM_READ(soundlatch_r) + AM_RANGE(0x06, 0x06) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/galspnbl.c b/src/mame/drivers/galspnbl.c index c4410972d55..7e59c7992fb 100644 --- a/src/mame/drivers/galspnbl.c +++ b/src/mame/drivers/galspnbl.c @@ -31,7 +31,7 @@ WRITE16_MEMBER(galspnbl_state::soundcommand_w) if (ACCESSING_BITS_0_7) { - soundlatch_w(space,offset,data & 0xff); + soundlatch_byte_w(space,offset,data & 0xff); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } } @@ -67,7 +67,7 @@ static ADDRESS_MAP_START( audio_map, AS_PROGRAM, 8, galspnbl_state ) AM_RANGE(0xf800, 0xf800) AM_DEVREADWRITE("oki", okim6295_device, read, write) AM_RANGE(0xf810, 0xf811) AM_DEVWRITE_LEGACY("ymsnd", ym3812_w) AM_RANGE(0xfc00, 0xfc00) AM_NOP /* irq ack ?? */ - AM_RANGE(0xfc20, 0xfc20) AM_READ(soundlatch_r) + AM_RANGE(0xfc20, 0xfc20) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/gameplan.c b/src/mame/drivers/gameplan.c index a3ade7d2aa6..1ad5d2d07ed 100644 --- a/src/mame/drivers/gameplan.c +++ b/src/mame/drivers/gameplan.c @@ -167,7 +167,7 @@ static WRITE8_DEVICE_HANDLER( audio_trigger_w ) static const via6522_interface via_2_interface = { - DEVCB_NULL, DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), /*inputs : A/B */ + DEVCB_NULL, DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), /*inputs : A/B */ DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, /*inputs : CA/B1,CA/B2 */ DEVCB_HANDLER(audio_cmd_w), DEVCB_NULL, /*outputs: A/B */ DEVCB_NULL, DEVCB_NULL, DEVCB_HANDLER(audio_trigger_w), DEVCB_HANDLER(audio_reset_w), /*outputs: CA/B1,CA/B2 */ @@ -196,7 +196,7 @@ static WRITE8_DEVICE_HANDLER( r6532_soundlatch_w ) { gameplan_state *gameplan = device->machine().driver_data<gameplan_state>(); address_space *space = device->machine().device("maincpu")->memory().space(AS_PROGRAM); - gameplan->soundlatch_w(*space, 0, data); + gameplan->soundlatch_byte_w(*space, 0, data); } diff --git a/src/mame/drivers/gbusters.c b/src/mame/drivers/gbusters.c index 49751ee730a..3cfde6fede8 100644 --- a/src/mame/drivers/gbusters.c +++ b/src/mame/drivers/gbusters.c @@ -150,7 +150,7 @@ WRITE8_MEMBER(gbusters_state::k052109_051960_w) static ADDRESS_MAP_START( gbusters_map, AS_PROGRAM, 8, gbusters_state ) AM_RANGE(0x1f80, 0x1f80) AM_WRITE(gbusters_coin_counter_w) /* coin counters */ - AM_RANGE(0x1f84, 0x1f84) AM_WRITE(soundlatch_w) /* sound code # */ + AM_RANGE(0x1f84, 0x1f84) AM_WRITE(soundlatch_byte_w) /* sound code # */ AM_RANGE(0x1f88, 0x1f88) AM_WRITE(gbusters_sh_irqtrigger_w) /* cause interrupt on audio CPU */ AM_RANGE(0x1f8c, 0x1f8c) AM_WRITE(watchdog_reset_w) /* watchdog reset */ AM_RANGE(0x1f90, 0x1f90) AM_READ_PORT("SYSTEM") @@ -171,7 +171,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( gbusters_sound_map, AS_PROGRAM, 8, gbusters_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM /* ROM 878h01.rom */ AM_RANGE(0x8000, 0x87ff) AM_RAM /* RAM */ - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) /* soundlatch_r */ + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) /* soundlatch_byte_r */ AM_RANGE(0xb000, 0xb00d) AM_DEVREADWRITE_LEGACY("k007232", k007232_r, k007232_w) /* 007232 registers */ AM_RANGE(0xc001, 0xc001) AM_DEVREAD_LEGACY("ymsnd", ym2151_status_port_r) /* YM 2151 */ AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) /* YM 2151 */ diff --git a/src/mame/drivers/gijoe.c b/src/mame/drivers/gijoe.c index b3ec98d3ff8..21536540c24 100644 --- a/src/mame/drivers/gijoe.c +++ b/src/mame/drivers/gijoe.c @@ -142,7 +142,7 @@ WRITE16_MEMBER(gijoe_state::sound_cmd_w) if (ACCESSING_BITS_0_7) { data &= 0xff; - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); } } @@ -153,7 +153,7 @@ WRITE16_MEMBER(gijoe_state::sound_irq_w) READ16_MEMBER(gijoe_state::sound_status_r) { - return soundlatch2_r(space, 0); + return soundlatch2_byte_r(space, 0); } static void sound_nmi( device_t *device ) @@ -197,8 +197,8 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, gijoe_state ) AM_RANGE(0x0000, 0xebff) AM_ROM AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_RANGE(0xf800, 0xfa2f) AM_DEVREADWRITE("k054539", k054539_device, read, write) - AM_RANGE(0xfc00, 0xfc00) AM_WRITE(soundlatch2_w) - AM_RANGE(0xfc02, 0xfc02) AM_READ(soundlatch_r) + AM_RANGE(0xfc00, 0xfc00) AM_WRITE(soundlatch2_byte_w) + AM_RANGE(0xfc02, 0xfc02) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static INPUT_PORTS_START( gijoe ) diff --git a/src/mame/drivers/ginganin.c b/src/mame/drivers/ginganin.c index b4363f4608f..e1858d6cc1f 100644 --- a/src/mame/drivers/ginganin.c +++ b/src/mame/drivers/ginganin.c @@ -93,7 +93,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, ginganin_state ) AM_RANGE(0x0000, 0x07ff) AM_RAM AM_RANGE(0x0800, 0x0807) AM_DEVREADWRITE("6840ptm", ptm6840_device, read, write) - AM_RANGE(0x1800, 0x1800) AM_READ(soundlatch_r) + AM_RANGE(0x1800, 0x1800) AM_READ(soundlatch_byte_r) AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ymsnd", y8950_w) AM_RANGE(0x2800, 0x2801) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) AM_RANGE(0x4000, 0xffff) AM_ROM diff --git a/src/mame/drivers/gladiatr.c b/src/mame/drivers/gladiatr.c index 6aa17bf3157..7f6f793f3f6 100644 --- a/src/mame/drivers/gladiatr.c +++ b/src/mame/drivers/gladiatr.c @@ -292,7 +292,7 @@ static WRITE8_DEVICE_HANDLER( glad_adpcm_w ) static WRITE8_HANDLER( glad_cpu_sound_command_w ) { gladiatr_state *state = space->machine().driver_data<gladiatr_state>(); - state->soundlatch_w(*space,0,data); + state->soundlatch_byte_w(*space,0,data); cputag_set_input_line(space->machine(), "audiocpu", INPUT_LINE_NMI, ASSERT_LINE); } @@ -300,7 +300,7 @@ static READ8_HANDLER( glad_cpu_sound_command_r ) { gladiatr_state *state = space->machine().driver_data<gladiatr_state>(); cputag_set_input_line(space->machine(), "audiocpu", INPUT_LINE_NMI, CLEAR_LINE); - return state->soundlatch_r(*space,0); + return state->soundlatch_byte_r(*space,0); } static WRITE8_HANDLER( gladiatr_flipscreen_w ) diff --git a/src/mame/drivers/gng.c b/src/mame/drivers/gng.c index 6b1aa4543de..9fa1f51b583 100644 --- a/src/mame/drivers/gng.c +++ b/src/mame/drivers/gng.c @@ -52,7 +52,7 @@ static ADDRESS_MAP_START( gng_map, AS_PROGRAM, 8, gng_state ) AM_RANGE(0x3004, 0x3004) AM_READ_PORT("DSW2") AM_RANGE(0x3800, 0x38ff) AM_WRITE(paletteram_RRRRGGGGBBBBxxxx_byte_split_hi_w) AM_SHARE("paletteram2") AM_RANGE(0x3900, 0x39ff) AM_WRITE(paletteram_RRRRGGGGBBBBxxxx_byte_split_lo_w) AM_SHARE("paletteram") - AM_RANGE(0x3a00, 0x3a00) AM_WRITE(soundlatch_w) + AM_RANGE(0x3a00, 0x3a00) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x3b08, 0x3b09) AM_WRITE(gng_bgscrollx_w) AM_RANGE(0x3b0a, 0x3b0b) AM_WRITE(gng_bgscrolly_w) AM_RANGE(0x3c00, 0x3c00) AM_NOP /* watchdog? */ @@ -69,7 +69,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, gng_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0xc000, 0xc7ff) AM_RAM - AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_r) + AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_byte_r) AM_RANGE(0xe000, 0xe001) AM_DEVWRITE_LEGACY("ym1", ym2203_w) AM_RANGE(0xe002, 0xe003) AM_DEVWRITE_LEGACY("ym2", ym2203_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/go2000.c b/src/mame/drivers/go2000.c index 8cd60b392f6..de4881d500a 100644 --- a/src/mame/drivers/go2000.c +++ b/src/mame/drivers/go2000.c @@ -54,7 +54,7 @@ public: WRITE16_MEMBER(go2000_state::sound_cmd_w) { - soundlatch_w(space, offset, data & 0xff); + soundlatch_byte_w(space, offset, data & 0xff); device_set_input_line(m_soundcpu, 0, HOLD_LINE); } @@ -84,7 +84,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( go2000_sound_io, AS_IO, 8, go2000_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r) + AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r) AM_RANGE(0x00, 0x00) AM_DEVWRITE_LEGACY("dac1", dac_w) AM_RANGE(0x03, 0x03) AM_WRITE(go2000_pcm_1_bankswitch_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/goal92.c b/src/mame/drivers/goal92.c index 18dafb2ad2b..7ab887e7dd9 100644 --- a/src/mame/drivers/goal92.c +++ b/src/mame/drivers/goal92.c @@ -19,7 +19,7 @@ WRITE16_MEMBER(goal92_state::goal92_sound_command_w) { if (ACCESSING_BITS_8_15) { - soundlatch_w(space, 0, (data >> 8) & 0xff); + soundlatch_byte_w(space, 0, (data >> 8) & 0xff); device_set_input_line(m_audiocpu, 0, HOLD_LINE); } } @@ -87,7 +87,7 @@ static ADDRESS_MAP_START( sound_cpu, AS_PROGRAM, 8, goal92_state ) AM_RANGE(0xe800, 0xe801) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w) AM_RANGE(0xec00, 0xec01) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w) AM_RANGE(0xf000, 0xf7ff) AM_RAM - AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_r) + AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static INPUT_PORTS_START( goal92 ) diff --git a/src/mame/drivers/goindol.c b/src/mame/drivers/goindol.c index a28fc839b55..9c80b854d35 100644 --- a/src/mame/drivers/goindol.c +++ b/src/mame/drivers/goindol.c @@ -85,7 +85,7 @@ static ADDRESS_MAP_START( goindol_map, AS_PROGRAM, 8, goindol_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1") AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_BASE(m_ram) - AM_RANGE(0xc800, 0xc800) AM_READNOP AM_WRITE(soundlatch_w) // watchdog? + AM_RANGE(0xc800, 0xc800) AM_READNOP AM_WRITE(soundlatch_byte_w) // watchdog? AM_RANGE(0xc810, 0xc810) AM_WRITE(goindol_bankswitch_w) AM_RANGE(0xc820, 0xc820) AM_READ_PORT("DIAL") AM_RANGE(0xc820, 0xd820) AM_WRITEONLY AM_BASE(m_fg_scrolly) @@ -111,7 +111,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, goindol_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0xa000, 0xa001) AM_DEVWRITE_LEGACY("ymsnd", ym2203_w) AM_RANGE(0xc000, 0xc7ff) AM_RAM - AM_RANGE(0xd800, 0xd800) AM_READ(soundlatch_r) + AM_RANGE(0xd800, 0xd800) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/gotcha.c b/src/mame/drivers/gotcha.c index 3fc7a296738..68150fe914b 100644 --- a/src/mame/drivers/gotcha.c +++ b/src/mame/drivers/gotcha.c @@ -119,7 +119,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, gotcha_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0xc002, 0xc003) AM_DEVWRITE("oki", okim6295_device, write) // TWO addresses! - AM_RANGE(0xc006, 0xc006) AM_READ(soundlatch_r) + AM_RANGE(0xc006, 0xc006) AM_READ(soundlatch_byte_r) AM_RANGE(0xd000, 0xd7ff) AM_RAM ADDRESS_MAP_END diff --git a/src/mame/drivers/gradius3.c b/src/mame/drivers/gradius3.c index bd2a2ea7d5a..b4d1e17c212 100644 --- a/src/mame/drivers/gradius3.c +++ b/src/mame/drivers/gradius3.c @@ -134,7 +134,7 @@ WRITE16_MEMBER(gradius3_state::cpuB_irqtrigger_w) WRITE16_MEMBER(gradius3_state::sound_command_w) { if (ACCESSING_BITS_8_15) - soundlatch_w(space, 0, (data >> 8) & 0xff); + soundlatch_byte_w(space, 0, (data >> 8) & 0xff); } WRITE16_MEMBER(gradius3_state::sound_irq_w) @@ -191,7 +191,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( gradius3_s_map, AS_PROGRAM, 8, gradius3_state ) AM_RANGE(0x0000, 0xefff) AM_ROM AM_RANGE(0xf000, 0xf000) AM_DEVWRITE_LEGACY("k007232", sound_bank_w) /* 007232 bankswitch */ - AM_RANGE(0xf010, 0xf010) AM_READ(soundlatch_r) + AM_RANGE(0xf010, 0xf010) AM_READ(soundlatch_byte_r) AM_RANGE(0xf020, 0xf02d) AM_DEVREADWRITE_LEGACY("k007232", k007232_r, k007232_w) AM_RANGE(0xf030, 0xf031) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0xf800, 0xffff) AM_RAM diff --git a/src/mame/drivers/grchamp.c b/src/mame/drivers/grchamp.c index 51c964e0bb4..39f0bd95a4f 100644 --- a/src/mame/drivers/grchamp.c +++ b/src/mame/drivers/grchamp.c @@ -189,7 +189,7 @@ WRITE8_MEMBER(grchamp_state::cpu0_outputs_w) case 0x0e: /* OUT14 */ /* O-21 connector */ - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); break; } @@ -563,7 +563,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, grchamp_state ) AM_RANGE(0x4803, 0x4803) AM_MIRROR(0x07f8) AM_DEVREAD_LEGACY("ay2", ay8910_r) AM_RANGE(0x4804, 0x4805) AM_MIRROR(0x07fa) AM_DEVWRITE_LEGACY("ay3", ay8910_address_data_w) AM_RANGE(0x4805, 0x4805) AM_MIRROR(0x07fa) AM_DEVREAD_LEGACY("ay3", ay8910_r) - AM_RANGE(0x5000, 0x5000) AM_READ(soundlatch_r) + AM_RANGE(0x5000, 0x5000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/gstriker.c b/src/mame/drivers/gstriker.c index 1541f21febc..0feb4a63c7f 100644 --- a/src/mame/drivers/gstriker.c +++ b/src/mame/drivers/gstriker.c @@ -194,7 +194,7 @@ WRITE16_MEMBER(gstriker_state::sound_command_w) if (ACCESSING_BITS_0_7) { m_pending_command = 1; - soundlatch_w(space, offset, data & 0xff); + soundlatch_byte_w(space, offset, data & 0xff); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } } @@ -309,7 +309,7 @@ static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, gstriker_state ) AM_RANGE(0x00, 0x03) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w) AM_RANGE(0x04, 0x04) AM_WRITE(gs_sh_bankswitch_w) AM_RANGE(0x08, 0x08) AM_WRITE(gs_sh_pending_command_clear_w) - AM_RANGE(0x0c, 0x0c) AM_READ(soundlatch_r) + AM_RANGE(0x0c, 0x0c) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/gsword.c b/src/mame/drivers/gsword.c index 631600da579..3838267d464 100644 --- a/src/mame/drivers/gsword.c +++ b/src/mame/drivers/gsword.c @@ -327,7 +327,7 @@ static WRITE8_DEVICE_HANDLER( gsword_adpcm_data_w ) static WRITE8_HANDLER( adpcm_soundcommand_w ) { gsword_state *state = space->machine().driver_data<gsword_state>(); - state->soundlatch_w(*space, 0, data); + state->soundlatch_byte_w(*space, 0, data); cputag_set_input_line(space->machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -382,7 +382,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( cpu3_map, AS_PROGRAM, 8, gsword_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0x8000) AM_DEVWRITE_LEGACY("msm", gsword_adpcm_data_w) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/gunsmoke.c b/src/mame/drivers/gunsmoke.c index 96899cd2566..60174362193 100644 --- a/src/mame/drivers/gunsmoke.c +++ b/src/mame/drivers/gunsmoke.c @@ -106,7 +106,7 @@ static ADDRESS_MAP_START( gunsmoke_map, AS_PROGRAM, 8, gunsmoke_state ) AM_RANGE(0xc003, 0xc003) AM_READ_PORT("DSW1") AM_RANGE(0xc004, 0xc004) AM_READ_PORT("DSW2") AM_RANGE(0xc4c9, 0xc4cb) AM_READ(gunsmoke_protection_r) - AM_RANGE(0xc800, 0xc800) AM_WRITE(soundlatch_w) + AM_RANGE(0xc800, 0xc800) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xc804, 0xc804) AM_WRITE(gunsmoke_c804_w) // ROM bank switch, screen flip AM_RANGE(0xc806, 0xc806) AM_WRITE(watchdog_reset_w) AM_RANGE(0xd000, 0xd3ff) AM_RAM_WRITE(gunsmoke_videoram_w) AM_BASE(m_videoram) @@ -121,7 +121,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, gunsmoke_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0xc000, 0xc7ff) AM_RAM - AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_r) + AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_byte_r) AM_RANGE(0xe000, 0xe001) AM_DEVWRITE_LEGACY("ym1", ym2203_w) AM_RANGE(0xe002, 0xe003) AM_DEVWRITE_LEGACY("ym2", ym2203_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/gyruss.c b/src/mame/drivers/gyruss.c index 46974125fd4..4f71d814a76 100644 --- a/src/mame/drivers/gyruss.c +++ b/src/mame/drivers/gyruss.c @@ -164,7 +164,7 @@ static ADDRESS_MAP_START( main_cpu1_map, AS_PROGRAM, 8, gyruss_state ) AM_RANGE(0xc0a0, 0xc0a0) AM_READ_PORT("P1") AM_RANGE(0xc0c0, 0xc0c0) AM_READ_PORT("P2") AM_RANGE(0xc0e0, 0xc0e0) AM_READ_PORT("DSW1") - AM_RANGE(0xc100, 0xc100) AM_READ_PORT("DSW3") AM_WRITE(soundlatch_w) + AM_RANGE(0xc100, 0xc100) AM_READ_PORT("DSW3") AM_WRITE(soundlatch_byte_w) AM_RANGE(0xc180, 0xc180) AM_WRITE(master_nmi_mask_w) AM_RANGE(0xc185, 0xc185) AM_WRITEONLY AM_BASE(m_flipscreen) ADDRESS_MAP_END @@ -182,7 +182,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( audio_cpu1_map, AS_PROGRAM, 8, gyruss_state ) AM_RANGE(0x0000, 0x5fff) AM_ROM AM_RANGE(0x6000, 0x63ff) AM_RAM - AM_RANGE(0x8000, 0x8000) AM_READ(soundlatch_r) + AM_RANGE(0x8000, 0x8000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static ADDRESS_MAP_START( audio_cpu1_io_map, AS_IO, 8, gyruss_state ) @@ -203,7 +203,7 @@ static ADDRESS_MAP_START( audio_cpu1_io_map, AS_IO, 8, gyruss_state ) AM_RANGE(0x11, 0x11) AM_DEVREAD_LEGACY("ay5", ay8910_r) AM_RANGE(0x12, 0x12) AM_DEVWRITE_LEGACY("ay5", ay8910_data_w) AM_RANGE(0x14, 0x14) AM_WRITE(gyruss_i8039_irq_w) - AM_RANGE(0x18, 0x18) AM_WRITE(soundlatch2_w) + AM_RANGE(0x18, 0x18) AM_WRITE(soundlatch2_byte_w) ADDRESS_MAP_END static ADDRESS_MAP_START( audio_cpu2_map, AS_PROGRAM, 8, gyruss_state ) @@ -211,7 +211,7 @@ static ADDRESS_MAP_START( audio_cpu2_map, AS_PROGRAM, 8, gyruss_state ) ADDRESS_MAP_END static ADDRESS_MAP_START( audio_cpu2_io_map, AS_IO, 8, gyruss_state ) - AM_RANGE(0x00, 0xff) AM_READ(soundlatch2_r) + AM_RANGE(0x00, 0xff) AM_READ(soundlatch2_byte_r) AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE_LEGACY("discrete", gyruss_dac_w) AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(gyruss_irq_clear_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/halleys.c b/src/mame/drivers/halleys.c index eb6176cac2b..590948636c5 100644 --- a/src/mame/drivers/halleys.c +++ b/src/mame/drivers/halleys.c @@ -1616,7 +1616,7 @@ WRITE8_MEMBER(halleys_state::soundcommand_w) { m_io_ram[0x8a] = data; - soundlatch_w(space,offset,data); + soundlatch_byte_w(space,offset,data); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -1684,7 +1684,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, halleys_state ) AM_RANGE(0x4803, 0x4803) AM_DEVREAD_LEGACY("ay3", ay8910_r) AM_RANGE(0x4804, 0x4805) AM_DEVWRITE_LEGACY("ay4", ay8910_address_data_w) AM_RANGE(0x4805, 0x4805) AM_DEVREAD_LEGACY("ay4", ay8910_r) - AM_RANGE(0x5000, 0x5000) AM_READ(soundlatch_r) + AM_RANGE(0x5000, 0x5000) AM_READ(soundlatch_byte_r) AM_RANGE(0xe000, 0xefff) AM_ROM // space for diagnostic ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/hcastle.c b/src/mame/drivers/hcastle.c index 53071113ee3..6d60df87bf7 100644 --- a/src/mame/drivers/hcastle.c +++ b/src/mame/drivers/hcastle.c @@ -41,7 +41,7 @@ static ADDRESS_MAP_START( hcastle_map, AS_PROGRAM, 8, hcastle_state ) AM_RANGE(0x0200, 0x0207) AM_WRITE(hcastle_pf2_control_w) AM_RANGE(0x0220, 0x023f) AM_RAM /* rowscroll? */ AM_RANGE(0x0400, 0x0400) AM_WRITE(hcastle_bankswitch_w) - AM_RANGE(0x0404, 0x0404) AM_WRITE(soundlatch_w) + AM_RANGE(0x0404, 0x0404) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x0408, 0x0408) AM_WRITE(hcastle_soundirq_w) AM_RANGE(0x040c, 0x040c) AM_WRITE(watchdog_reset_w) AM_RANGE(0x0410, 0x0410) AM_READ_PORT("SYSTEM") AM_WRITE(hcastle_coin_w) @@ -81,7 +81,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, hcastle_state ) AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ymsnd", ym3812_r, ym3812_w) AM_RANGE(0xb000, 0xb00d) AM_DEVREADWRITE_LEGACY("konami1", k007232_r, k007232_w) AM_RANGE(0xc000, 0xc000) AM_DEVWRITE_LEGACY("konami1", sound_bank_w) /* 7232 bankswitch */ - AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_r) + AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END /*****************************************************************************/ diff --git a/src/mame/drivers/himesiki.c b/src/mame/drivers/himesiki.c index 58bcff10101..dde03b5acea 100644 --- a/src/mame/drivers/himesiki.c +++ b/src/mame/drivers/himesiki.c @@ -99,7 +99,7 @@ WRITE8_MEMBER(himesiki_state::himesiki_rombank_w) WRITE8_MEMBER(himesiki_state::himesiki_sound_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); device_set_input_line(m_subcpu, INPUT_LINE_NMI, PULSE_LINE); } @@ -137,7 +137,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( himesiki_iom1, AS_IO, 8, himesiki_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ym2203", ym2203_r, ym2203_w) - AM_RANGE(0x04, 0x04) AM_READ(soundlatch_r) + AM_RANGE(0x04, 0x04) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END /****************************************************************************/ diff --git a/src/mame/drivers/homedata.c b/src/mame/drivers/homedata.c index ef8ef6d2d92..d94730d0b3f 100644 --- a/src/mame/drivers/homedata.c +++ b/src/mame/drivers/homedata.c @@ -289,7 +289,7 @@ WRITE8_MEMBER(homedata_state::mrokumei_keyboard_select_w) READ8_MEMBER(homedata_state::mrokumei_sound_io_r) { if (m_sndbank & 4) - return(soundlatch_r(space, 0)); + return(soundlatch_byte_r(space, 0)); else return machine().region("audiocpu")->base()[0x10000 + offset + (m_sndbank & 1) * 0x10000]; } @@ -317,7 +317,7 @@ WRITE8_MEMBER(homedata_state::mrokumei_sound_io_w) WRITE8_MEMBER(homedata_state::mrokumei_sound_cmd_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); device_set_input_line(m_audiocpu, 0, HOLD_LINE); } diff --git a/src/mame/drivers/hvyunit.c b/src/mame/drivers/hvyunit.c index 6fc113c1386..42a7f13c120 100644 --- a/src/mame/drivers/hvyunit.c +++ b/src/mame/drivers/hvyunit.c @@ -252,7 +252,7 @@ READ8_MEMBER(hvyunit_state::mermaid_status_r) WRITE8_MEMBER(hvyunit_state::trigger_nmi_on_sound_cpu2) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_sound_cpu, INPUT_LINE_NMI, PULSE_LINE); } @@ -464,7 +464,7 @@ static ADDRESS_MAP_START( sound_io, AS_IO, 8, hvyunit_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x00) AM_WRITE(sound_bankswitch_w) AM_RANGE(0x02, 0x03) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w) - AM_RANGE(0x04, 0x04) AM_READ(soundlatch_r) + AM_RANGE(0x04, 0x04) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/hyperspt.c b/src/mame/drivers/hyperspt.c index 55979110eaf..8d6d4d30af1 100644 --- a/src/mame/drivers/hyperspt.c +++ b/src/mame/drivers/hyperspt.c @@ -40,7 +40,7 @@ static ADDRESS_MAP_START( hyperspt_map, AS_PROGRAM, 8, hyperspt_state ) AM_RANGE(0x1481, 0x1481) AM_WRITE_LEGACY(konami_sh_irqtrigger_w) /* cause interrupt on audio CPU */ AM_RANGE(0x1483, 0x1484) AM_WRITE(hyperspt_coin_counter_w) AM_RANGE(0x1487, 0x1487) AM_WRITE(irq_mask_w) /* Interrupt enable */ - AM_RANGE(0x1500, 0x1500) AM_WRITE(soundlatch_w) + AM_RANGE(0x1500, 0x1500) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x1600, 0x1600) AM_READ_PORT("DSW2") AM_RANGE(0x1680, 0x1680) AM_READ_PORT("SYSTEM") AM_RANGE(0x1681, 0x1681) AM_READ_PORT("P1_P2") @@ -61,7 +61,7 @@ static ADDRESS_MAP_START( roadf_map, AS_PROGRAM, 8, hyperspt_state ) AM_RANGE(0x1481, 0x1481) AM_WRITE_LEGACY(konami_sh_irqtrigger_w) /* cause interrupt on audio CPU */ AM_RANGE(0x1483, 0x1484) AM_WRITE(hyperspt_coin_counter_w) AM_RANGE(0x1487, 0x1487) AM_WRITE(irq_mask_w) /* Interrupt enable */ - AM_RANGE(0x1500, 0x1500) AM_WRITE(soundlatch_w) + AM_RANGE(0x1500, 0x1500) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x1600, 0x1600) AM_READ_PORT("DSW2") AM_RANGE(0x1680, 0x1680) AM_READ_PORT("SYSTEM") AM_RANGE(0x1681, 0x1681) AM_READ_PORT("P1") @@ -77,7 +77,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, hyperspt_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x4000, 0x4fff) AM_RAM - AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_r) + AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) AM_RANGE(0x8000, 0x8000) AM_READ_LEGACY(hyperspt_sh_timer_r) AM_RANGE(0xa000, 0xa000) AM_DEVWRITE_LEGACY("vlm", vlm5030_data_w) /* speech data */ AM_RANGE(0xc000, 0xdfff) AM_DEVWRITE_LEGACY("vlm", hyperspt_sound_w) /* speech and output control */ @@ -89,7 +89,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( soundb_map, AS_PROGRAM, 8, hyperspt_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x4000, 0x4fff) AM_RAM - AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_r) + AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) AM_RANGE(0x8000, 0x8000) AM_READ_LEGACY(hyperspt_sh_timer_r) AM_RANGE(0xa000, 0xa000) AM_NOP AM_RANGE(0xc000, 0xdfff) AM_DEVWRITE_LEGACY("hyprolyb_adpcm", hyprolyb_adpcm_w) /* speech and output control */ diff --git a/src/mame/drivers/inufuku.c b/src/mame/drivers/inufuku.c index 3c1e74c3285..d2f46c47ffd 100644 --- a/src/mame/drivers/inufuku.c +++ b/src/mame/drivers/inufuku.c @@ -90,7 +90,7 @@ WRITE16_MEMBER(inufuku_state::inufuku_soundcommand_w) return; m_pending_command = 1; - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } } @@ -170,7 +170,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( inufuku_sound_io_map, AS_IO, 8, inufuku_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x00) AM_WRITE(inufuku_soundrombank_w) - AM_RANGE(0x04, 0x04) AM_READ(soundlatch_r) AM_WRITE(pending_command_clear_w) + AM_RANGE(0x04, 0x04) AM_READ(soundlatch_byte_r) AM_WRITE(pending_command_clear_w) AM_RANGE(0x08, 0x0b) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/ironhors.c b/src/mame/drivers/ironhors.c index 67bd03a88cb..0569889e8bc 100644 --- a/src/mame/drivers/ironhors.c +++ b/src/mame/drivers/ironhors.c @@ -64,7 +64,7 @@ static ADDRESS_MAP_START( master_map, AS_PROGRAM, 8, ironhors_state ) AM_RANGE(0x0020, 0x003f) AM_RAM AM_BASE(m_scroll) AM_RANGE(0x0040, 0x005f) AM_RAM AM_RANGE(0x0060, 0x00df) AM_RAM - AM_RANGE(0x0800, 0x0800) AM_WRITE(soundlatch_w) + AM_RANGE(0x0800, 0x0800) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x0900, 0x0900) AM_READ_PORT("DSW3") AM_WRITE(ironhors_sh_irqtrigger_w) AM_RANGE(0x0a00, 0x0a00) AM_READ_PORT("DSW2") AM_WRITE(ironhors_palettebank_w) AM_RANGE(0x0b00, 0x0b00) AM_READ_PORT("DSW1") AM_WRITE(ironhors_flipscreen_w) @@ -87,7 +87,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( slave_map, AS_PROGRAM, 8, ironhors_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x4000, 0x43ff) AM_RAM - AM_RANGE(0x8000, 0x8000) AM_READ(soundlatch_r) + AM_RANGE(0x8000, 0x8000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static ADDRESS_MAP_START( slave_io_map, AS_IO, 8, ironhors_state ) @@ -103,7 +103,7 @@ static ADDRESS_MAP_START( farwest_master_map, AS_PROGRAM, 8, ironhors_state ) AM_RANGE(0x31db, 0x31fa) AM_RAM AM_BASE(m_scroll) AM_RANGE(0x0040, 0x005f) AM_RAM AM_RANGE(0x0060, 0x00ff) AM_RAM - AM_RANGE(0x0800, 0x0800) AM_WRITE(soundlatch_w) + AM_RANGE(0x0800, 0x0800) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x0900, 0x0900) /*AM_READ_PORT("DSW3") */AM_WRITE(ironhors_sh_irqtrigger_w) AM_RANGE(0x0a00, 0x0a00) AM_READ_PORT("DSW2") //AM_WRITE(ironhors_palettebank_w) AM_RANGE(0x0b00, 0x0b00) AM_READ_PORT("DSW1") AM_WRITE(ironhors_flipscreen_w) @@ -442,7 +442,7 @@ static READ8_DEVICE_HANDLER( farwest_soundlatch_r ) { ironhors_state *state = device->machine().driver_data<ironhors_state>(); - return state->soundlatch_r(*state->m_soundcpu->memory().space(AS_PROGRAM), 0); + return state->soundlatch_byte_r(*state->m_soundcpu->memory().space(AS_PROGRAM), 0); } static const ym2203_interface farwest_ym2203_config = diff --git a/src/mame/drivers/jack.c b/src/mame/drivers/jack.c index a8c5d8e517b..0079462abf9 100644 --- a/src/mame/drivers/jack.c +++ b/src/mame/drivers/jack.c @@ -65,7 +65,7 @@ static READ8_DEVICE_HANDLER( timer_r ) WRITE8_MEMBER(jack_state::jack_sh_command_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_audiocpu, 0, HOLD_LINE); } @@ -776,7 +776,7 @@ static const ay8910_interface ay8910_config = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_DEVICE_HANDLER("audiocpu", timer_r) }; diff --git a/src/mame/drivers/jangou.c b/src/mame/drivers/jangou.c index 9a5128e6a1a..36634f81292 100644 --- a/src/mame/drivers/jangou.c +++ b/src/mame/drivers/jangou.c @@ -301,14 +301,14 @@ static READ8_DEVICE_HANDLER( input_system_r ) WRITE8_MEMBER(jangou_state::sound_latch_w) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_cpu_1, INPUT_LINE_NMI, ASSERT_LINE); } READ8_MEMBER(jangou_state::sound_latch_r) { device_set_input_line(m_cpu_1, INPUT_LINE_NMI, CLEAR_LINE); - return soundlatch_r(space, 0); + return soundlatch_byte_r(space, 0); } /* Jangou HC-55516 CVSD */ diff --git a/src/mame/drivers/junofrst.c b/src/mame/drivers/junofrst.c index 5b8e1c72e4a..61a9c3add55 100644 --- a/src/mame/drivers/junofrst.c +++ b/src/mame/drivers/junofrst.c @@ -299,7 +299,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, junofrst_state ) AM_RANGE(0x8033, 0x8033) AM_WRITEONLY AM_BASE(m_scroll) /* not used in Juno */ AM_RANGE(0x8034, 0x8035) AM_WRITE(flip_screen_w) AM_RANGE(0x8040, 0x8040) AM_WRITE(junofrst_sh_irqtrigger_w) - AM_RANGE(0x8050, 0x8050) AM_WRITE(soundlatch_w) + AM_RANGE(0x8050, 0x8050) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x8060, 0x8060) AM_WRITE(junofrst_bankselect_w) AM_RANGE(0x8070, 0x8073) AM_WRITE(junofrst_blitter_w) AM_RANGE(0x8100, 0x8fff) AM_RAM @@ -311,11 +311,11 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( audio_map, AS_PROGRAM, 8, junofrst_state ) AM_RANGE(0x0000, 0x0fff) AM_ROM AM_RANGE(0x2000, 0x23ff) AM_RAM - AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_r) + AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) AM_RANGE(0x4000, 0x4000) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) AM_RANGE(0x4001, 0x4001) AM_DEVREAD_LEGACY("aysnd", ay8910_r) AM_RANGE(0x4002, 0x4002) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) - AM_RANGE(0x5000, 0x5000) AM_WRITE(soundlatch2_w) + AM_RANGE(0x5000, 0x5000) AM_WRITE(soundlatch2_byte_w) AM_RANGE(0x6000, 0x6000) AM_WRITE(junofrst_i8039_irq_w) ADDRESS_MAP_END @@ -326,7 +326,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( mcu_io_map, AS_IO, 8, junofrst_state ) - AM_RANGE(0x00, 0xff) AM_READ(soundlatch2_r) + AM_RANGE(0x00, 0xff) AM_READ(soundlatch2_byte_r) AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE_LEGACY("dac", dac_w) AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(i8039_irqen_and_status_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/kaneko16.c b/src/mame/drivers/kaneko16.c index 8b3232d2d9d..63c1acf1050 100644 --- a/src/mame/drivers/kaneko16.c +++ b/src/mame/drivers/kaneko16.c @@ -307,7 +307,7 @@ WRITE16_MEMBER(kaneko16_state::kaneko16_soundlatch_w) { if (ACCESSING_BITS_8_15) { - soundlatch_w(space, 0, (data & 0xff00) >> 8 ); + soundlatch_byte_w(space, 0, (data & 0xff00) >> 8 ); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } } @@ -887,7 +887,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( blazeon_soundport, AS_IO, 8, kaneko16_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x02, 0x03) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) - AM_RANGE(0x06, 0x06) AM_READ(soundlatch_r) + AM_RANGE(0x06, 0x06) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/kangaroo.c b/src/mame/drivers/kangaroo.c index eddba041428..f17d70951d8 100644 --- a/src/mame/drivers/kangaroo.c +++ b/src/mame/drivers/kangaroo.c @@ -258,7 +258,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, kangaroo_state ) AM_RANGE(0xe000, 0xe3ff) AM_RAM AM_RANGE(0xe400, 0xe400) AM_MIRROR(0x03ff) AM_READ_PORT("DSW0") AM_RANGE(0xe800, 0xe80a) AM_MIRROR(0x03f0) AM_WRITE(kangaroo_video_control_w) AM_BASE(m_video_control) - AM_RANGE(0xec00, 0xec00) AM_MIRROR(0x00ff) AM_READ_PORT("IN0") AM_WRITE(soundlatch_w) + AM_RANGE(0xec00, 0xec00) AM_MIRROR(0x00ff) AM_READ_PORT("IN0") AM_WRITE(soundlatch_byte_w) AM_RANGE(0xed00, 0xed00) AM_MIRROR(0x00ff) AM_READ_PORT("IN1") AM_WRITE(kangaroo_coin_counter_w) AM_RANGE(0xee00, 0xee00) AM_MIRROR(0x00ff) AM_READ_PORT("IN2") ADDRESS_MAP_END @@ -274,7 +274,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, kangaroo_state ) AM_RANGE(0x0000, 0x0fff) AM_ROM AM_RANGE(0x4000, 0x43ff) AM_MIRROR(0x0c00) AM_RAM - AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x0fff) AM_READ(soundlatch_r) + AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x0fff) AM_READ(soundlatch_byte_r) AM_RANGE(0x7000, 0x7000) AM_MIRROR(0x0fff) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x0fff) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) ADDRESS_MAP_END @@ -284,7 +284,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, kangaroo_state ) AM_RANGE(0x0000, 0x0fff) AM_ROM AM_RANGE(0x4000, 0x43ff) AM_MIRROR(0x0c00) AM_RAM - AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x0fff) AM_READ(soundlatch_r) + AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x0fff) AM_READ(soundlatch_byte_r) AM_RANGE(0x7000, 0x7000) AM_MIRROR(0x0fff) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x0fff) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/karnov.c b/src/mame/drivers/karnov.c index 623b2130ad5..2af4fa0a82a 100644 --- a/src/mame/drivers/karnov.c +++ b/src/mame/drivers/karnov.c @@ -361,7 +361,7 @@ WRITE16_MEMBER(karnov_state::karnov_control_w) return; case 2: /* SONREQ (Sound CPU byte) */ - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); break; @@ -440,7 +440,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( karnov_sound_map, AS_PROGRAM, 8, karnov_state ) AM_RANGE(0x0000, 0x05ff) AM_RAM - AM_RANGE(0x0800, 0x0800) AM_READ(soundlatch_r) + AM_RANGE(0x0800, 0x0800) AM_READ(soundlatch_byte_r) AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym1", ym2203_w) AM_RANGE(0x1800, 0x1801) AM_DEVWRITE_LEGACY("ym2", ym3526_w) AM_RANGE(0x8000, 0xffff) AM_ROM diff --git a/src/mame/drivers/kas89.c b/src/mame/drivers/kas89.c index ac90b45424b..33e9d400085 100644 --- a/src/mame/drivers/kas89.c +++ b/src/mame/drivers/kas89.c @@ -377,7 +377,7 @@ WRITE8_MEMBER(kas89_state::sound_comm_w) else { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_audiocpu, 0, ASSERT_LINE ); } } @@ -576,7 +576,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( audio_io, AS_IO, 8, kas89_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x00) AM_WRITE(int_ack_w) // comm out (1st Z80). seems to write here the value previously read through soundlatch (port 0x02). - AM_RANGE(0x02, 0x02) AM_READ(soundlatch_r) + AM_RANGE(0x02, 0x02) AM_READ(soundlatch_byte_r) AM_RANGE(0x04, 0x04) AM_DEVREAD_LEGACY("aysnd", ay8910_r) AM_RANGE(0x04, 0x05) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_address_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/kchamp.c b/src/mame/drivers/kchamp.c index 3bf1bc53670..aa6ca54ce6f 100644 --- a/src/mame/drivers/kchamp.c +++ b/src/mame/drivers/kchamp.c @@ -94,7 +94,7 @@ static WRITE8_DEVICE_HANDLER( sound_control_w ) WRITE8_MEMBER(kchamp_state::sound_command_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff); } @@ -132,7 +132,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( kchampvs_sound_io_map, AS_IO, 8, kchamp_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ay1", ay8910_data_address_w) - AM_RANGE(0x01, 0x01) AM_READ(soundlatch_r) + AM_RANGE(0x01, 0x01) AM_READ(soundlatch_byte_r) AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) AM_RANGE(0x04, 0x04) AM_WRITE(sound_msm_w) AM_RANGE(0x05, 0x05) AM_DEVWRITE_LEGACY("msm", sound_control_w) @@ -187,7 +187,7 @@ static ADDRESS_MAP_START( kchamp_sound_io_map, AS_IO, 8, kchamp_state ) AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("dac", dac_w) AM_RANGE(0x05, 0x05) AM_WRITE(kc_sound_control_w) - AM_RANGE(0x06, 0x06) AM_READ(soundlatch_r) + AM_RANGE(0x06, 0x06) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static INPUT_PORTS_START( kchampvs ) diff --git a/src/mame/drivers/kingdrby.c b/src/mame/drivers/kingdrby.c index 936e2adb2e3..c57ab917a34 100644 --- a/src/mame/drivers/kingdrby.c +++ b/src/mame/drivers/kingdrby.c @@ -281,7 +281,7 @@ static WRITE8_DEVICE_HANDLER( sound_cmd_w ) cputag_set_input_line(device->machine(), "soundcpu", INPUT_LINE_NMI, PULSE_LINE); state->m_sound_cmd = data; /* soundlatch is unneeded since we are already using perfect interleave. */ - // soundlatch_w(space,0, data); + // soundlatch_byte_w(space,0, data); } diff --git a/src/mame/drivers/kingobox.c b/src/mame/drivers/kingobox.c index ddedaf4d2bf..90223cebcc1 100644 --- a/src/mame/drivers/kingobox.c +++ b/src/mame/drivers/kingobox.c @@ -39,7 +39,7 @@ WRITE8_MEMBER(kingofb_state::scroll_interrupt_w) WRITE8_MEMBER(kingofb_state::sound_command_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line_and_vector(m_audio_cpu, 0, HOLD_LINE, 0xff); } @@ -439,7 +439,7 @@ static const ay8910_interface ay8910_config = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r) + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r) }; static INTERRUPT_GEN( kingofb_interrupt ) diff --git a/src/mame/drivers/kncljoe.c b/src/mame/drivers/kncljoe.c index 9fd5e33e239..1ad546c684e 100644 --- a/src/mame/drivers/kncljoe.c +++ b/src/mame/drivers/kncljoe.c @@ -37,7 +37,7 @@ WRITE8_MEMBER(kncljoe_state::sound_cmd_w) { if ((data & 0x80) == 0) - soundlatch_w(space, 0, data & 0x7f); + soundlatch_byte_w(space, 0, data & 0x7f); else device_set_input_line(m_soundcpu, 0, ASSERT_LINE); } @@ -235,7 +235,7 @@ static const ay8910_interface ay8910_config = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_NULL, DEVCB_NULL, DEVCB_HANDLER(unused_w) diff --git a/src/mame/drivers/ksayakyu.c b/src/mame/drivers/ksayakyu.c index f74d67dfbfa..0ee6c7d6710 100644 --- a/src/mame/drivers/ksayakyu.c +++ b/src/mame/drivers/ksayakyu.c @@ -87,7 +87,7 @@ WRITE8_MEMBER(ksayakyu_state::bank_select_w) WRITE8_MEMBER(ksayakyu_state::latch_w) { m_sound_status &= ~0x80; - soundlatch_w(space, 0, data | 0x80); + soundlatch_byte_w(space, 0, data | 0x80); } READ8_MEMBER(ksayakyu_state::sound_status_r) @@ -98,7 +98,7 @@ READ8_MEMBER(ksayakyu_state::sound_status_r) WRITE8_MEMBER(ksayakyu_state::tomaincpu_w) { m_sound_status |= 0x80; - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); } static ADDRESS_MAP_START( maincpu_map, AS_PROGRAM, 8, ksayakyu_state ) @@ -188,7 +188,7 @@ static const ay8910_interface ay8910_interface_1 = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_NULL, DEVCB_NULL, DEVCB_HANDLER(dummy1_w) diff --git a/src/mame/drivers/ladyfrog.c b/src/mame/drivers/ladyfrog.c index 42678e96c5e..c4ad32ac881 100644 --- a/src/mame/drivers/ladyfrog.c +++ b/src/mame/drivers/ladyfrog.c @@ -82,7 +82,7 @@ static TIMER_CALLBACK( nmi_callback ) WRITE8_MEMBER(ladyfrog_state::sound_command_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); machine().scheduler().synchronize(FUNC(nmi_callback), data); } @@ -157,7 +157,7 @@ static ADDRESS_MAP_START( ladyfrog_sound_map, AS_PROGRAM, 8, ladyfrog_state ) AM_RANGE(0xca00, 0xca00) AM_WRITENOP AM_RANGE(0xcb00, 0xcb00) AM_WRITENOP AM_RANGE(0xcc00, 0xcc00) AM_WRITENOP - AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_r) AM_WRITE(to_main_w) + AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_byte_r) AM_WRITE(to_main_w) AM_RANGE(0xd200, 0xd200) AM_READNOP AM_WRITE(nmi_enable_w) AM_RANGE(0xd400, 0xd400) AM_WRITE(nmi_disable_w) AM_RANGE(0xd600, 0xd600) AM_WRITENOP diff --git a/src/mame/drivers/laserbat.c b/src/mame/drivers/laserbat.c index adac0403ec1..420d4cffe38 100644 --- a/src/mame/drivers/laserbat.c +++ b/src/mame/drivers/laserbat.c @@ -189,7 +189,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( catnmous_io_map, AS_IO, 8, laserbat_state ) - AM_RANGE(0x00, 0x00) AM_WRITE(soundlatch_w) // soundlatch ? + AM_RANGE(0x00, 0x00) AM_WRITE(soundlatch_byte_w) // soundlatch ? AM_RANGE(0x01, 0x01) AM_WRITE(video_extra_w) AM_RANGE(0x02, 0x02) AM_READ(laserbat_input_r) AM_RANGE(0x02, 0x02) AM_WRITENOP // unknown @@ -650,7 +650,7 @@ static const ay8910_interface ay8910_config = AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, DEVCB_NULL, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_NULL,//ay8910_port0a_w, DEVCB_NULL }; diff --git a/src/mame/drivers/lasso.c b/src/mame/drivers/lasso.c index 215372df550..7db0b10f10f 100644 --- a/src/mame/drivers/lasso.c +++ b/src/mame/drivers/lasso.c @@ -49,13 +49,13 @@ static INPUT_CHANGED( coin_inserted ) /* Write to the sound latch and generate an IRQ on the sound CPU */ WRITE8_MEMBER(lasso_state::sound_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); generic_pulse_irq_line(m_audiocpu, 0, 1); } WRITE8_MEMBER(lasso_state::pinbo_sound_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); device_set_input_line(m_audiocpu, 0, HOLD_LINE); } @@ -100,7 +100,7 @@ static ADDRESS_MAP_START( lasso_audio_map, AS_PROGRAM, 8, lasso_state ) AM_RANGE(0xb000, 0xb000) AM_WRITEONLY AM_BASE(m_chip_data) AM_RANGE(0xb001, 0xb001) AM_WRITE(sound_select_w) AM_RANGE(0xb004, 0xb004) AM_READ(sound_status_r) - AM_RANGE(0xb005, 0xb005) AM_READ(soundlatch_r) + AM_RANGE(0xb005, 0xb005) AM_READ(soundlatch_byte_r) AM_RANGE(0xf000, 0xffff) AM_ROM AM_REGION("audiocpu", 0x7000) ADDRESS_MAP_END @@ -138,7 +138,7 @@ static ADDRESS_MAP_START( chameleo_audio_map, AS_PROGRAM, 8, lasso_state ) AM_RANGE(0xb000, 0xb000) AM_WRITEONLY AM_BASE(m_chip_data) AM_RANGE(0xb001, 0xb001) AM_WRITE(sound_select_w) AM_RANGE(0xb004, 0xb004) AM_READ(sound_status_r) - AM_RANGE(0xb005, 0xb005) AM_READ(soundlatch_r) + AM_RANGE(0xb005, 0xb005) AM_READ(soundlatch_byte_r) AM_RANGE(0xf000, 0xffff) AM_ROM AM_REGION("audiocpu", 0x7000) ADDRESS_MAP_END @@ -169,7 +169,7 @@ static ADDRESS_MAP_START( wwjgtin_audio_map, AS_PROGRAM, 8, lasso_state ) AM_RANGE(0xb001, 0xb001) AM_WRITE(sound_select_w) AM_RANGE(0xb003, 0xb003) AM_DEVWRITE_LEGACY("dac", dac_w) AM_RANGE(0xb004, 0xb004) AM_READ(sound_status_r) - AM_RANGE(0xb005, 0xb005) AM_READ(soundlatch_r) + AM_RANGE(0xb005, 0xb005) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END @@ -203,7 +203,7 @@ static ADDRESS_MAP_START( pinbo_audio_io_map, AS_IO, 8, lasso_state ) AM_RANGE(0x02, 0x02) AM_DEVREAD_LEGACY("ay1", ay8910_r) AM_RANGE(0x04, 0x05) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) AM_RANGE(0x06, 0x06) AM_DEVREAD_LEGACY("ay2", ay8910_r) - AM_RANGE(0x08, 0x08) AM_READ(soundlatch_r) AM_WRITENOP /* ??? */ + AM_RANGE(0x08, 0x08) AM_READ(soundlatch_byte_r) AM_WRITENOP /* ??? */ AM_RANGE(0x14, 0x14) AM_WRITENOP /* ??? */ ADDRESS_MAP_END diff --git a/src/mame/drivers/lastduel.c b/src/mame/drivers/lastduel.c index 60c899577cb..c73ce6adeae 100644 --- a/src/mame/drivers/lastduel.c +++ b/src/mame/drivers/lastduel.c @@ -127,7 +127,7 @@ Notes: WRITE16_MEMBER(lastduel_state::lastduel_sound_w) { if (ACCESSING_BITS_0_7) - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); } /******************************************************************************/ @@ -170,7 +170,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, lastduel_state ) AM_RANGE(0xe000, 0xe7ff) AM_RAM AM_RANGE(0xe800, 0xe801) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r,ym2203_w) AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r,ym2203_w) - AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_r) + AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END WRITE8_MEMBER(lastduel_state::mg_bankswitch_w) @@ -185,7 +185,7 @@ static ADDRESS_MAP_START( madgear_sound_map, AS_PROGRAM, 8, lastduel_state ) AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r,ym2203_w) AM_RANGE(0xf002, 0xf003) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r,ym2203_w) AM_RANGE(0xf004, 0xf004) AM_DEVWRITE("oki", okim6295_device, write) - AM_RANGE(0xf006, 0xf006) AM_READ(soundlatch_r) + AM_RANGE(0xf006, 0xf006) AM_READ(soundlatch_byte_r) AM_RANGE(0xf00a, 0xf00a) AM_WRITE(mg_bankswitch_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/legionna.c b/src/mame/drivers/legionna.c index 69cff44eb81..9c1f5baa51b 100644 --- a/src/mame/drivers/legionna.c +++ b/src/mame/drivers/legionna.c @@ -234,7 +234,7 @@ static ADDRESS_MAP_START( cupsocbl_sound_mem, AS_PROGRAM, 8, legionna_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x9000, 0x9000) AM_DEVWRITE_LEGACY("oki", okim_rombank_w) AM_RANGE(0x9800, 0x9800) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END /*****************************************************************************/ diff --git a/src/mame/drivers/lemmings.c b/src/mame/drivers/lemmings.c index 4e61d720708..288795f3acf 100644 --- a/src/mame/drivers/lemmings.c +++ b/src/mame/drivers/lemmings.c @@ -79,7 +79,7 @@ WRITE16_MEMBER(lemmings_state::lemmings_palette_24bit_w) WRITE16_MEMBER(lemmings_state::lemmings_sound_w) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_audiocpu, 1, HOLD_LINE); } @@ -114,7 +114,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, lemmings_state ) AM_RANGE(0x0000, 0x07ff) AM_RAM AM_RANGE(0x0800, 0x0801) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r,ym2151_w) AM_RANGE(0x1000, 0x1000) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0x1800, 0x1800) AM_READ(soundlatch_r) AM_WRITE(lemmings_sound_ack_w) + AM_RANGE(0x1800, 0x1800) AM_READ(soundlatch_byte_r) AM_WRITE(lemmings_sound_ack_w) AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/lethal.c b/src/mame/drivers/lethal.c index 336a317ec35..e0f629ef758 100644 --- a/src/mame/drivers/lethal.c +++ b/src/mame/drivers/lethal.c @@ -213,7 +213,7 @@ static INTERRUPT_GEN(lethalen_interrupt) WRITE8_MEMBER(lethal_state::sound_cmd_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); } WRITE8_MEMBER(lethal_state::sound_irq_w) @@ -479,8 +479,8 @@ static ADDRESS_MAP_START( le_sound, AS_PROGRAM, 8, lethal_state ) AM_RANGE(0x0000, 0xefff) AM_ROM AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_RANGE(0xf800, 0xfa2f) AM_DEVREADWRITE("k054539", k054539_device, read, write) - AM_RANGE(0xfc00, 0xfc00) AM_WRITE(soundlatch2_w) - AM_RANGE(0xfc02, 0xfc02) AM_READ(soundlatch_r) + AM_RANGE(0xfc00, 0xfc00) AM_WRITE(soundlatch2_byte_w) + AM_RANGE(0xfc02, 0xfc02) AM_READ(soundlatch_byte_r) AM_RANGE(0xfc03, 0xfc03) AM_READNOP ADDRESS_MAP_END diff --git a/src/mame/drivers/liberate.c b/src/mame/drivers/liberate.c index 7e04abc5810..e36430a8dab 100644 --- a/src/mame/drivers/liberate.c +++ b/src/mame/drivers/liberate.c @@ -314,7 +314,7 @@ static ADDRESS_MAP_START( prosoccr_sound_map, AS_PROGRAM, 8, liberate_state ) AM_RANGE(0x4000, 0x4000) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) AM_RANGE(0x6000, 0x6000) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) AM_RANGE(0x8000, 0x8000) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) AM_RANGE(0xc000, 0xc000) AM_WRITENOP //irq ack AM_RANGE(0xe000, 0xffff) AM_ROM ADDRESS_MAP_END @@ -326,7 +326,7 @@ static ADDRESS_MAP_START( liberate_sound_map, AS_PROGRAM, 8, liberate_state ) AM_RANGE(0x4000, 0x4000) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) AM_RANGE(0x7000, 0x7000) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) AM_RANGE(0x8000, 0x8000) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) - AM_RANGE(0xb000, 0xb000) AM_READ(soundlatch_r) + AM_RANGE(0xb000, 0xb000) AM_READ(soundlatch_byte_r) AM_RANGE(0xc000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/limenko.c b/src/mame/drivers/limenko.c index cf3290f334a..e1a93b20896 100644 --- a/src/mame/drivers/limenko.c +++ b/src/mame/drivers/limenko.c @@ -119,7 +119,7 @@ WRITE32_MEMBER(limenko_state::fg_videoram_w) WRITE32_MEMBER(limenko_state::spotty_soundlatch_w) { - soundlatch_w(space, 0, (data >> 16) & 0xff); + soundlatch_byte_w(space, 0, (data >> 16) & 0xff); } CUSTOM_INPUT_MEMBER(limenko_state::spriteram_bit_r) @@ -222,7 +222,7 @@ READ8_MEMBER(limenko_state::spotty_sound_r) // check m_spotty_sound_cmd bits... if(m_spotty_sound_cmd == 0xf7) - return soundlatch_r(space,0); + return soundlatch_byte_r(space,0); else return machine().device<okim6295_device>("oki")->read(space,0); } diff --git a/src/mame/drivers/lkage.c b/src/mame/drivers/lkage.c index 87431953e72..082e28ee33d 100644 --- a/src/mame/drivers/lkage.c +++ b/src/mame/drivers/lkage.c @@ -106,7 +106,7 @@ static TIMER_CALLBACK( nmi_callback ) WRITE8_MEMBER(lkage_state::lkage_sound_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); machine().scheduler().synchronize(FUNC(nmi_callback), data); } @@ -187,7 +187,7 @@ static ADDRESS_MAP_START( lkage_sound_map, AS_PROGRAM, 8, lkage_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x9000, 0x9001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r,ym2203_w) AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r,ym2203_w) - AM_RANGE(0xb000, 0xb000) AM_READ(soundlatch_r) AM_WRITENOP /* ??? */ + AM_RANGE(0xb000, 0xb000) AM_READ(soundlatch_byte_r) AM_WRITENOP /* ??? */ AM_RANGE(0xb001, 0xb001) AM_READNOP /* ??? */ AM_WRITE(lkage_sh_nmi_enable_w) AM_RANGE(0xb002, 0xb002) AM_WRITE(lkage_sh_nmi_disable_w) AM_RANGE(0xb003, 0xb003) AM_WRITENOP diff --git a/src/mame/drivers/looping.c b/src/mame/drivers/looping.c index fa4f17c674c..d4b43c1b7e8 100644 --- a/src/mame/drivers/looping.c +++ b/src/mame/drivers/looping.c @@ -358,7 +358,7 @@ static WRITE_LINE_DEVICE_HANDLER( looping_spcint ) WRITE8_MEMBER(looping_state::looping_soundlatch_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); cputag_set_input_line_and_vector(machine(), "audiocpu", 0, ASSERT_LINE, 4); } @@ -605,7 +605,7 @@ static const ay8910_interface ay8910_config = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL diff --git a/src/mame/drivers/lordgun.c b/src/mame/drivers/lordgun.c index 296a35882c3..973236b9e53 100644 --- a/src/mame/drivers/lordgun.c +++ b/src/mame/drivers/lordgun.c @@ -256,8 +256,8 @@ READ16_MEMBER(lordgun_state::lordgun_gun_1_y_r) WRITE16_MEMBER(lordgun_state::lordgun_soundlatch_w) { - if (ACCESSING_BITS_0_7) soundlatch_w (space, 0, (data >> 0) & 0xff); - if (ACCESSING_BITS_8_15) soundlatch2_w(space, 0, (data >> 8) & 0xff); + if (ACCESSING_BITS_0_7) soundlatch_byte_w (space, 0, (data >> 0) & 0xff); + if (ACCESSING_BITS_8_15) soundlatch2_byte_w(space, 0, (data >> 8) & 0xff); cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -343,16 +343,16 @@ static WRITE8_DEVICE_HANDLER( lordgun_okibank_w ) static ADDRESS_MAP_START( lordgun_soundio_map, AS_IO, 8, lordgun_state ) AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ymsnd", ym3812_w ) AM_RANGE(0x2000, 0x2000) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch2_r ) - AM_RANGE(0x4000, 0x4000) AM_READ(soundlatch_r ) + AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch2_byte_r ) + AM_RANGE(0x4000, 0x4000) AM_READ(soundlatch_byte_r ) AM_RANGE(0x5000, 0x5000) AM_READNOP AM_RANGE(0x6000, 0x6000) AM_DEVWRITE_LEGACY("oki", lordgun_okibank_w ) ADDRESS_MAP_END static ADDRESS_MAP_START( aliencha_soundio_map, AS_IO, 8, lordgun_state ) - AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch2_r ) - AM_RANGE(0x4000, 0x4000) AM_READ(soundlatch_r ) + AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch2_byte_r ) + AM_RANGE(0x4000, 0x4000) AM_READ(soundlatch_byte_r ) AM_RANGE(0x5000, 0x5000) AM_WRITENOP // writes 03 then 07 at end of NMI AM_RANGE(0x7000, 0x7000) AM_DEVREAD_LEGACY("ymf", ymf278b_r) AM_RANGE(0x7000, 0x7005) AM_DEVWRITE_LEGACY("ymf", ymf278b_w) diff --git a/src/mame/drivers/lwings.c b/src/mame/drivers/lwings.c index 06aaef6147b..139349c500d 100644 --- a/src/mame/drivers/lwings.c +++ b/src/mame/drivers/lwings.c @@ -127,7 +127,7 @@ WRITE8_MEMBER(lwings_state::avengers_protection_w) else if (pc == 0x0445) { m_soundstate = 0x80; - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); } } @@ -320,7 +320,7 @@ static ADDRESS_MAP_START( lwings_map, AS_PROGRAM, 8, lwings_state ) AM_RANGE(0xf80a, 0xf80a) AM_READ_PORT("P2") AM_RANGE(0xf80b, 0xf80b) AM_READ_PORT("DSWA") AM_RANGE(0xf80a, 0xf80b) AM_WRITE(lwings_bg1_scrolly_w) - AM_RANGE(0xf80c, 0xf80c) AM_READ_PORT("DSWB") AM_WRITE(soundlatch_w) + AM_RANGE(0xf80c, 0xf80c) AM_READ_PORT("DSWB") AM_WRITE(soundlatch_byte_w) AM_RANGE(0xf80d, 0xf80d) AM_WRITE(watchdog_reset_w) AM_RANGE(0xf80e, 0xf80e) AM_WRITE(lwings_bankswitch_w) ADDRESS_MAP_END @@ -344,15 +344,15 @@ static ADDRESS_MAP_START( trojan_map, AS_PROGRAM, 8, lwings_state ) AM_RANGE(0xf809, 0xf809) AM_READ_PORT("P1") AM_RANGE(0xf80a, 0xf80a) AM_READ_PORT("P2") AM_RANGE(0xf80b, 0xf80b) AM_READ_PORT("DSWA") - AM_RANGE(0xf80c, 0xf80c) AM_READ_PORT("DSWB") AM_WRITE(soundlatch_w) - AM_RANGE(0xf80d, 0xf80d) AM_WRITE(soundlatch2_w) + AM_RANGE(0xf80c, 0xf80c) AM_READ_PORT("DSWB") AM_WRITE(soundlatch_byte_w) + AM_RANGE(0xf80d, 0xf80d) AM_WRITE(soundlatch2_byte_w) AM_RANGE(0xf80e, 0xf80e) AM_WRITE(lwings_bankswitch_w) ADDRESS_MAP_END static ADDRESS_MAP_START( lwings_sound_map, AS_PROGRAM, 8, lwings_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0xc000, 0xc7ff) AM_RAM - AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_r) + AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_byte_r) AM_RANGE(0xe000, 0xe001) AM_DEVWRITE_LEGACY("2203a", ym2203_w) AM_RANGE(0xe002, 0xe003) AM_DEVWRITE_LEGACY("2203b", ym2203_w) AM_RANGE(0xe006, 0xe006) AM_READ(avengers_soundlatch2_r) //AT: (avengers061gre) @@ -372,7 +372,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( trojan_adpcm_io_map, AS_IO, 8, lwings_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch2_r) + AM_RANGE(0x00, 0x00) AM_READ(soundlatch2_byte_r) AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("5205", msm5205_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/m107.c b/src/mame/drivers/m107.c index 0b151ccd4ff..0e524c5203d 100644 --- a/src/mame/drivers/m107.c +++ b/src/mame/drivers/m107.c @@ -92,8 +92,8 @@ WRITE16_MEMBER(m107_state::m107_bankswitch_w) WRITE16_MEMBER(m107_state::m107_soundlatch_w) { cputag_set_input_line(machine(), "soundcpu", NEC_INPUT_LINE_INTP1, ASSERT_LINE); - soundlatch_w(space, 0, data & 0xff); -// logerror("soundlatch_w %02x\n",data); + soundlatch_byte_w(space, 0, data & 0xff); +// logerror("soundlatch_byte_w %02x\n",data); } READ16_MEMBER(m107_state::m107_sound_status_r) @@ -104,7 +104,7 @@ READ16_MEMBER(m107_state::m107_sound_status_r) READ16_MEMBER(m107_state::m107_soundlatch_r) { cputag_set_input_line(machine(), "soundcpu", NEC_INPUT_LINE_INTP1, CLEAR_LINE); - return soundlatch_r(space, offset) | 0xff00; + return soundlatch_byte_r(space, offset) | 0xff00; } WRITE16_MEMBER(m107_state::m107_sound_irq_ack_w) diff --git a/src/mame/drivers/m63.c b/src/mame/drivers/m63.c index 86134ca5f7f..d308d0ebc5b 100644 --- a/src/mame/drivers/m63.c +++ b/src/mame/drivers/m63.c @@ -426,7 +426,7 @@ READ8_MEMBER(m63_state::snddata_r) { switch (m_p2 & 0xf0) { - case 0x60: return soundlatch_r(space, 0); ; + case 0x60: return soundlatch_byte_r(space, 0); ; case 0x70: return machine().region("user1")->base()[((m_p1 & 0x1f) << 8) | offset]; } return 0xff; @@ -459,7 +459,7 @@ static ADDRESS_MAP_START( m63_map, AS_PROGRAM, 8, m63_state ) AM_RANGE(0xf002, 0xf002) AM_WRITE(m63_flipscreen_w) AM_RANGE(0xf003, 0xf003) AM_WRITE(m63_palbank_w) AM_RANGE(0xf006, 0xf007) AM_WRITE(coin_w) - AM_RANGE(0xf800, 0xf800) AM_READ_PORT("P1") AM_WRITE(soundlatch_w) + AM_RANGE(0xf800, 0xf800) AM_READ_PORT("P1") AM_WRITE(soundlatch_byte_w) AM_RANGE(0xf801, 0xf801) AM_READ_PORT("P2") AM_WRITENOP /* continues game when in stop mode (cleared by NMI handler) */ AM_RANGE(0xf802, 0xf802) AM_READ_PORT("DSW1") AM_RANGE(0xf803, 0xf803) AM_WRITE(snd_irq_w) @@ -482,7 +482,7 @@ static ADDRESS_MAP_START( fghtbskt_map, AS_PROGRAM, 8, m63_state ) AM_RANGE(0xf003, 0xf003) AM_READ_PORT("DSW") AM_RANGE(0xf000, 0xf000) AM_WRITE(snd_irq_w) AM_RANGE(0xf001, 0xf001) AM_WRITENOP - AM_RANGE(0xf002, 0xf002) AM_WRITE(soundlatch_w) + AM_RANGE(0xf002, 0xf002) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xf800, 0xf800) AM_WRITENOP AM_RANGE(0xf801, 0xf801) AM_WRITE(nmi_mask_w) AM_RANGE(0xf802, 0xf802) AM_WRITE(fghtbskt_flipscreen_w) diff --git a/src/mame/drivers/m72.c b/src/mame/drivers/m72.c index fa981c94d4c..60e7d1a2e4c 100644 --- a/src/mame/drivers/m72.c +++ b/src/mame/drivers/m72.c @@ -1076,7 +1076,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( rtype_sound_portmap, AS_IO, 8, m72_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) - AM_RANGE(0x02, 0x02) AM_READ(soundlatch_r) + AM_RANGE(0x02, 0x02) AM_READ(soundlatch_byte_r) AM_RANGE(0x06, 0x06) AM_DEVWRITE_LEGACY("m72", m72_sound_irq_ack_w) AM_RANGE(0x84, 0x84) AM_DEVREAD_LEGACY("m72", m72_sample_r) ADDRESS_MAP_END @@ -1084,7 +1084,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, m72_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) - AM_RANGE(0x02, 0x02) AM_READ(soundlatch_r) + AM_RANGE(0x02, 0x02) AM_READ(soundlatch_byte_r) AM_RANGE(0x06, 0x06) AM_DEVWRITE_LEGACY("m72", m72_sound_irq_ack_w) AM_RANGE(0x82, 0x82) AM_DEVWRITE_LEGACY("m72", m72_sample_w) AM_RANGE(0x84, 0x84) AM_DEVREAD_LEGACY("m72", m72_sample_r) @@ -1093,7 +1093,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( rtype2_sound_portmap, AS_IO, 8, m72_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) - AM_RANGE(0x80, 0x80) AM_READ(soundlatch_r) + AM_RANGE(0x80, 0x80) AM_READ(soundlatch_byte_r) AM_RANGE(0x80, 0x81) AM_DEVWRITE_LEGACY("m72", rtype2_sample_addr_w) AM_RANGE(0x82, 0x82) AM_DEVWRITE_LEGACY("m72", m72_sample_w) AM_RANGE(0x83, 0x83) AM_DEVWRITE_LEGACY("m72", m72_sound_irq_ack_w) @@ -1105,7 +1105,7 @@ static ADDRESS_MAP_START( poundfor_sound_portmap, AS_IO, 8, m72_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x10, 0x13) AM_DEVWRITE_LEGACY("m72", poundfor_sample_addr_w) AM_RANGE(0x40, 0x41) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) - AM_RANGE(0x42, 0x42) AM_READ(soundlatch_r) + AM_RANGE(0x42, 0x42) AM_READ(soundlatch_byte_r) AM_RANGE(0x42, 0x42) AM_DEVWRITE_LEGACY("m72", m72_sound_irq_ack_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/m90.c b/src/mame/drivers/m90.c index e7ac2318010..aad4025e27b 100644 --- a/src/mame/drivers/m90.c +++ b/src/mame/drivers/m90.c @@ -58,7 +58,7 @@ WRITE16_MEMBER(m90_state::dynablsb_sound_command_w) { if (ACCESSING_BITS_0_7) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_NMI, PULSE_LINE); } } @@ -131,7 +131,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( m90_sound_cpu_io_map, AS_IO, 8, m90_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) - AM_RANGE(0x80, 0x80) AM_READ(soundlatch_r) + AM_RANGE(0x80, 0x80) AM_READ(soundlatch_byte_r) AM_RANGE(0x80, 0x81) AM_DEVWRITE_LEGACY("m72", rtype2_sample_addr_w) AM_RANGE(0x82, 0x82) AM_DEVWRITE_LEGACY("m72", m72_sample_w) AM_RANGE(0x83, 0x83) AM_DEVWRITE_LEGACY("m72", m72_sound_irq_ack_w) @@ -141,7 +141,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( dynablsb_sound_cpu_io_map, AS_IO, 8, m90_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) - AM_RANGE(0x80, 0x80) AM_READ(soundlatch_r) + AM_RANGE(0x80, 0x80) AM_READ(soundlatch_byte_r) AM_RANGE(0x82, 0x82) AM_DEVWRITE_LEGACY("dac", dac_signed_w) ADDRESS_MAP_END @@ -149,7 +149,7 @@ static ADDRESS_MAP_START( m99_sound_cpu_io_map, AS_IO, 8, m90_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("m72", poundfor_sample_addr_w) AM_RANGE(0x40, 0x41) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) - AM_RANGE(0x42, 0x42) AM_READ(soundlatch_r) + AM_RANGE(0x42, 0x42) AM_READ(soundlatch_byte_r) AM_RANGE(0x42, 0x42) AM_DEVWRITE_LEGACY("m72", m72_sound_irq_ack_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/m92.c b/src/mame/drivers/m92.c index ae701feb48b..aa91a06271d 100644 --- a/src/mame/drivers/m92.c +++ b/src/mame/drivers/m92.c @@ -297,7 +297,7 @@ CUSTOM_INPUT_MEMBER(m92_state::m92_sprite_busy_r) WRITE16_MEMBER(m92_state::m92_soundlatch_w) { cputag_set_input_line(machine(), "soundcpu", NEC_INPUT_LINE_INTP1, ASSERT_LINE); - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); } READ16_MEMBER(m92_state::m92_sound_status_r) @@ -309,7 +309,7 @@ READ16_MEMBER(m92_state::m92_sound_status_r) READ16_MEMBER(m92_state::m92_soundlatch_r) { cputag_set_input_line(machine(), "soundcpu", NEC_INPUT_LINE_INTP1, CLEAR_LINE); - return soundlatch_r(space, offset) | 0xff00; + return soundlatch_byte_r(space, offset) | 0xff00; } WRITE16_MEMBER(m92_state::m92_sound_irq_ack_w) diff --git a/src/mame/drivers/madalien.c b/src/mame/drivers/madalien.c index 9038d225299..7b3292c4e5c 100644 --- a/src/mame/drivers/madalien.c +++ b/src/mame/drivers/madalien.c @@ -55,14 +55,14 @@ WRITE8_MEMBER(madalien_state::madalien_output_w) WRITE8_MEMBER(madalien_state::madalien_sound_command_w) { cputag_set_input_line(machine(), "audiocpu", 0, ASSERT_LINE); - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); } READ8_MEMBER(madalien_state::madalien_sound_command_r) { cputag_set_input_line(machine(), "audiocpu", 0, CLEAR_LINE); - return soundlatch_r(space, offset); + return soundlatch_byte_r(space, offset); } @@ -87,7 +87,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, madalien_state ) AM_RANGE(0x8001, 0x8001) AM_MIRROR(0x0ff0) AM_DEVREADWRITE("crtc", mc6845_device, register_r, register_w) AM_RANGE(0x8004, 0x8004) AM_MIRROR(0x0ff0) AM_WRITEONLY AM_BASE(m_video_control) AM_RANGE(0x8005, 0x8005) AM_MIRROR(0x0ff0) AM_WRITE(madalien_output_w) - AM_RANGE(0x8006, 0x8006) AM_MIRROR(0x0ff0) AM_READ(soundlatch2_r) AM_WRITE(madalien_sound_command_w) + AM_RANGE(0x8006, 0x8006) AM_MIRROR(0x0ff0) AM_READ(soundlatch2_byte_r) AM_WRITE(madalien_sound_command_w) AM_RANGE(0x8008, 0x8008) AM_MIRROR(0x07f0) AM_RAM_READ(shift_r) AM_BASE(m_shift_hi) AM_RANGE(0x8009, 0x8009) AM_MIRROR(0x07f0) AM_RAM_READ(shift_rev_r) AM_BASE(m_shift_lo) AM_RANGE(0x800b, 0x800b) AM_MIRROR(0x07f0) AM_WRITEONLY AM_BASE(m_video_flags) @@ -109,7 +109,7 @@ static ADDRESS_MAP_START( audio_map, AS_PROGRAM, 8, madalien_state ) AM_RANGE(0x6000, 0x6003) AM_MIRROR(0x1ffc) AM_RAM /* unknown device in an epoxy block, might be tilt detection */ AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x1ffc) AM_READ(madalien_sound_command_r) AM_RANGE(0x8000, 0x8001) AM_MIRROR(0x1ffc) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) - AM_RANGE(0x8002, 0x8002) AM_MIRROR(0x1ffc) AM_WRITE(soundlatch2_w) + AM_RANGE(0x8002, 0x8002) AM_MIRROR(0x1ffc) AM_WRITE(soundlatch2_byte_w) AM_RANGE(0xf800, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/madmotor.c b/src/mame/drivers/madmotor.c index c99798483b6..6c1836a1ba7 100644 --- a/src/mame/drivers/madmotor.c +++ b/src/mame/drivers/madmotor.c @@ -29,7 +29,7 @@ WRITE16_MEMBER(madmotor_state::madmotor_sound_w) if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_audiocpu, 0, HOLD_LINE); } } @@ -72,7 +72,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, madmotor_state ) AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE_LEGACY("ym2", ym2151_r,ym2151_w) AM_RANGE(0x120000, 0x120001) AM_DEVREADWRITE("oki1", okim6295_device, read, write) AM_RANGE(0x130000, 0x130001) AM_DEVREADWRITE("oki2", okim6295_device, read, write) - AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_r) + AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_byte_r) AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8") AM_RANGE(0x1fec00, 0x1fec01) AM_WRITE_LEGACY(h6280_timer_w) AM_RANGE(0x1ff400, 0x1ff403) AM_WRITE_LEGACY(h6280_irq_status_w) diff --git a/src/mame/drivers/mainevt.c b/src/mame/drivers/mainevt.c index 36e9ce6b395..7f41147344e 100644 --- a/src/mame/drivers/mainevt.c +++ b/src/mame/drivers/mainevt.c @@ -162,7 +162,7 @@ WRITE8_MEMBER(mainevt_state::k052109_051960_w) static ADDRESS_MAP_START( mainevt_map, AS_PROGRAM, 8, mainevt_state ) AM_RANGE(0x1f80, 0x1f80) AM_WRITE(mainevt_bankswitch_w) - AM_RANGE(0x1f84, 0x1f84) AM_WRITE(soundlatch_w) /* probably */ + AM_RANGE(0x1f84, 0x1f84) AM_WRITE(soundlatch_byte_w) /* probably */ AM_RANGE(0x1f88, 0x1f88) AM_WRITE(mainevt_sh_irqtrigger_w) /* probably */ AM_RANGE(0x1f8c, 0x1f8d) AM_WRITENOP /* ??? */ AM_RANGE(0x1f90, 0x1f90) AM_WRITE(mainevt_coin_w) /* coin counters + lamps */ @@ -187,7 +187,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( devstors_map, AS_PROGRAM, 8, mainevt_state ) AM_RANGE(0x1f80, 0x1f80) AM_WRITE(mainevt_bankswitch_w) - AM_RANGE(0x1f84, 0x1f84) AM_WRITE(soundlatch_w) /* probably */ + AM_RANGE(0x1f84, 0x1f84) AM_WRITE(soundlatch_byte_w) /* probably */ AM_RANGE(0x1f88, 0x1f88) AM_WRITE(mainevt_sh_irqtrigger_w) /* probably */ AM_RANGE(0x1f90, 0x1f90) AM_WRITE(mainevt_coin_w) /* coin counters + lamps */ AM_RANGE(0x1fb2, 0x1fb2) AM_WRITE(dv_nmienable_w) @@ -213,7 +213,7 @@ static ADDRESS_MAP_START( mainevt_sound_map, AS_PROGRAM, 8, mainevt_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0x83ff) AM_RAM AM_RANGE(0x9000, 0x9000) AM_DEVWRITE_LEGACY("upd", upd7759_port_w) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) AM_RANGE(0xb000, 0xb00d) AM_DEVREADWRITE_LEGACY("k007232", k007232_r,k007232_w) AM_RANGE(0xd000, 0xd000) AM_DEVREAD_LEGACY("upd", mainevt_sh_busy_r) AM_RANGE(0xe000, 0xe000) AM_WRITE(mainevt_sh_irqcontrol_w) @@ -223,7 +223,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( devstors_sound_map, AS_PROGRAM, 8, mainevt_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0x83ff) AM_RAM - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) AM_RANGE(0xb000, 0xb00d) AM_DEVREADWRITE_LEGACY("k007232", k007232_r,k007232_w) AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r,ym2151_w) AM_RANGE(0xe000, 0xe000) AM_WRITE(devstor_sh_irqcontrol_w) diff --git a/src/mame/drivers/mainsnk.c b/src/mame/drivers/mainsnk.c index f3282fd5b47..3d40cab24a8 100644 --- a/src/mame/drivers/mainsnk.c +++ b/src/mame/drivers/mainsnk.c @@ -116,13 +116,13 @@ WRITE8_MEMBER(mainsnk_state::sound_command_w) { m_sound_cpu_busy = 1; - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } READ8_MEMBER(mainsnk_state::sound_command_r) { - return soundlatch_r(space, 0); + return soundlatch_byte_r(space, 0); } READ8_MEMBER(mainsnk_state::sound_ack_r) diff --git a/src/mame/drivers/mario.c b/src/mame/drivers/mario.c index c7cf4c8c42c..caa9d70d3cb 100644 --- a/src/mame/drivers/mario.c +++ b/src/mame/drivers/mario.c @@ -159,7 +159,7 @@ static ADDRESS_MAP_START( masao_map, AS_PROGRAM, 8, mario_state ) AM_RANGE(0x7c00, 0x7c00) AM_READ_PORT("IN0") AM_RANGE(0x7c80, 0x7c80) AM_READ_PORT("IN1") AM_RANGE(0x7d00, 0x7d00) AM_WRITE(mario_scroll_w) - AM_RANGE(0x7e00, 0x7e00) AM_WRITE(soundlatch_w) + AM_RANGE(0x7e00, 0x7e00) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x7e80, 0x7e80) AM_WRITE(mario_gfxbank_w) AM_RANGE(0x7e82, 0x7e82) AM_WRITE(mario_flip_w) AM_RANGE(0x7e83, 0x7e83) AM_WRITE(mario_palettebank_w) diff --git a/src/mame/drivers/matmania.c b/src/mame/drivers/matmania.c index b9677f9df0a..c2224d5213a 100644 --- a/src/mame/drivers/matmania.c +++ b/src/mame/drivers/matmania.c @@ -46,13 +46,13 @@ The driver has been updated accordingly. WRITE8_MEMBER(matmania_state::matmania_sh_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); device_set_input_line(m_audiocpu, M6502_IRQ_LINE, HOLD_LINE); } WRITE8_MEMBER(matmania_state::maniach_sh_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); device_set_input_line(m_audiocpu, M6809_IRQ_LINE, HOLD_LINE); } @@ -105,7 +105,7 @@ static ADDRESS_MAP_START( matmania_sound_map, AS_PROGRAM, 8, matmania_state ) AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ay1", ay8910_data_address_w) AM_RANGE(0x2002, 0x2003) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) AM_RANGE(0x2004, 0x2004) AM_DEVWRITE_LEGACY("dac", dac_signed_w) - AM_RANGE(0x2007, 0x2007) AM_READ(soundlatch_r) + AM_RANGE(0x2007, 0x2007) AM_READ(soundlatch_byte_r) AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END @@ -113,7 +113,7 @@ static ADDRESS_MAP_START( maniach_sound_map, AS_PROGRAM, 8, matmania_state ) AM_RANGE(0x0000, 0x0fff) AM_RAM AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ymsnd", ym3526_w) AM_RANGE(0x2002, 0x2002) AM_DEVWRITE_LEGACY("dac", dac_signed_w) - AM_RANGE(0x2004, 0x2004) AM_READ(soundlatch_r) + AM_RANGE(0x2004, 0x2004) AM_READ(soundlatch_byte_r) AM_RANGE(0x4000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/mcatadv.c b/src/mame/drivers/mcatadv.c index 1a866d46883..6b793d52d94 100644 --- a/src/mame/drivers/mcatadv.c +++ b/src/mame/drivers/mcatadv.c @@ -147,7 +147,7 @@ Stephh's notes (based on the games M68000 code and some tests) : WRITE16_MEMBER(mcatadv_state::mcat_soundlatch_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_soundcpu, INPUT_LINE_NMI, PULSE_LINE); } @@ -220,7 +220,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( mcatadv_sound_io_map, AS_IO, 8, mcatadv_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x80, 0x80) AM_READWRITE(soundlatch_r, soundlatch2_w) + AM_RANGE(0x80, 0x80) AM_READWRITE(soundlatch_byte_r, soundlatch2_byte_w) ADDRESS_MAP_END @@ -235,7 +235,7 @@ static ADDRESS_MAP_START( nost_sound_io_map, AS_IO, 8, mcatadv_state ) AM_RANGE(0x00, 0x03) AM_DEVWRITE_LEGACY("ymsnd", ym2610_w) AM_RANGE(0x04, 0x07) AM_DEVREAD_LEGACY("ymsnd", ym2610_r) AM_RANGE(0x40, 0x40) AM_WRITE(mcatadv_sound_bw_w) - AM_RANGE(0x80, 0x80) AM_READWRITE(soundlatch_r, soundlatch2_w) + AM_RANGE(0x80, 0x80) AM_READWRITE(soundlatch_byte_r, soundlatch2_byte_w) ADDRESS_MAP_END /*** Inputs ***/ diff --git a/src/mame/drivers/megasys1.c b/src/mame/drivers/megasys1.c index 02faac7f2da..cf32c21f59b 100644 --- a/src/mame/drivers/megasys1.c +++ b/src/mame/drivers/megasys1.c @@ -433,7 +433,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( z80_sound_map, AS_PROGRAM, 8, megasys1_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0xc000, 0xc7ff) AM_RAM - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) AM_RANGE(0xf000, 0xf000) AM_WRITENOP /* ?? */ ADDRESS_MAP_END @@ -3811,7 +3811,7 @@ static DRIVER_INIT( edfbl ) //device_t *oki1 = machine.device("oki1"); megasys1_state *state = machine.driver_data<megasys1_state>(); machine.device("maincpu")->memory().space(AS_PROGRAM)->install_read_handler(0xe0000, 0xe000f, read16_delegate(FUNC(megasys1_state::edfbl_input_r),state)); - //machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(*oki1, 0xe000e, 0xe000f, FUNC(soundlatch_w)); + //machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(*oki1, 0xe000e, 0xe000f, FUNC(soundlatch_byte_w)); } static DRIVER_INIT( hayaosi1 ) diff --git a/src/mame/drivers/megazone.c b/src/mame/drivers/megazone.c index 109d61c06f8..346aae87b27 100644 --- a/src/mame/drivers/megazone.c +++ b/src/mame/drivers/megazone.c @@ -100,7 +100,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( megazone_sound_map, AS_PROGRAM, 8, megazone_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM AM_RANGE(0x2000, 0x2000) AM_WRITE(megazone_i8039_irq_w) /* START line. Interrupts 8039 */ - AM_RANGE(0x4000, 0x4000) AM_WRITE(soundlatch_w) /* CODE line. Command Interrupts 8039 */ + AM_RANGE(0x4000, 0x4000) AM_WRITE(soundlatch_byte_w) /* CODE line. Command Interrupts 8039 */ AM_RANGE(0x6000, 0x6000) AM_READ_PORT("IN0") /* IO Coin */ AM_RANGE(0x6001, 0x6001) AM_READ_PORT("IN1") /* P1 IO */ AM_RANGE(0x6002, 0x6002) AM_READ_PORT("IN2") /* P2 IO */ @@ -124,7 +124,7 @@ static ADDRESS_MAP_START( megazone_i8039_map, AS_PROGRAM, 8, megazone_state ) ADDRESS_MAP_END static ADDRESS_MAP_START( megazone_i8039_io_map, AS_IO, 8, megazone_state ) - AM_RANGE(0x00, 0xff) AM_READ(soundlatch_r) + AM_RANGE(0x00, 0xff) AM_READ(soundlatch_byte_r) AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE_LEGACY("dac", dac_w) AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(i8039_irqen_and_status_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/meijinsn.c b/src/mame/drivers/meijinsn.c index 2c8b91fc75b..6284a141f02 100644 --- a/src/mame/drivers/meijinsn.c +++ b/src/mame/drivers/meijinsn.c @@ -98,7 +98,7 @@ public: WRITE16_MEMBER(meijinsn_state::sound_w) { if (ACCESSING_BITS_0_7) - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); } READ16_MEMBER(meijinsn_state::alpha_mcu_r) @@ -190,7 +190,7 @@ static ADDRESS_MAP_START( meijinsn_sound_io_map, AS_IO, 8, meijinsn_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) AM_RANGE(0x01, 0x01) AM_DEVREAD_LEGACY("aysnd", ay8910_r) - AM_RANGE(0x02, 0x02) AM_WRITE(soundlatch_clear_w) + AM_RANGE(0x02, 0x02) AM_WRITE(soundlatch_clear_byte_w) AM_RANGE(0x06, 0x06) AM_WRITENOP ADDRESS_MAP_END @@ -326,7 +326,7 @@ static const ay8910_interface ay8910_config = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r) + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r) }; static MACHINE_START( meijinsn ) diff --git a/src/mame/drivers/metro.c b/src/mame/drivers/metro.c index 858a3cd382d..f87428ee730 100644 --- a/src/mame/drivers/metro.c +++ b/src/mame/drivers/metro.c @@ -352,9 +352,9 @@ static int metro_io_callback( device_t *device, int ioline, int state ) switch (ioline) { case UPD7810_RXD: /* read the RxD line */ - data = driver_state->soundlatch_r(*space, 0); + data = driver_state->soundlatch_byte_r(*space, 0); state = data & 1; - driver_state->soundlatch_w(*space, 0, data >> 1); + driver_state->soundlatch_byte_w(*space, 0, data >> 1); break; default: logerror("upd7810 ioline %d not handled\n", ioline); @@ -368,7 +368,7 @@ WRITE16_MEMBER(metro_state::metro_soundlatch_w) if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); device_spin_until_interrupt(&space.device()); m_busy_sndcpu = 1; @@ -1686,7 +1686,7 @@ ADDRESS_MAP_END WRITE16_MEMBER(metro_state::blzntrnd_sound_w) { - soundlatch_w(space, offset, data >> 8); + soundlatch_byte_w(space, offset, data >> 8); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } @@ -1719,7 +1719,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( blzntrnd_sound_io_map, AS_IO, 8, metro_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x00) AM_WRITE(blzntrnd_sh_bankswitch_w) - AM_RANGE(0x40, 0x40) AM_READ(soundlatch_r) AM_WRITENOP + AM_RANGE(0x40, 0x40) AM_READ(soundlatch_byte_r) AM_WRITENOP AM_RANGE(0x80, 0x83) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r,ym2610_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/midyunit.c b/src/mame/drivers/midyunit.c index 319836d0628..93aeca006fa 100644 --- a/src/mame/drivers/midyunit.c +++ b/src/mame/drivers/midyunit.c @@ -196,7 +196,7 @@ static ADDRESS_MAP_START( yawdim_sound_map, AS_PROGRAM, 8, midyunit_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x9000, 0x97ff) AM_DEVWRITE_LEGACY("oki", yawdim_oki_bank_w) AM_RANGE(0x9800, 0x9fff) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xa000, 0xa7ff) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa7ff) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/mikie.c b/src/mame/drivers/mikie.c index 4bd156c900d..6d3c4802a06 100644 --- a/src/mame/drivers/mikie.c +++ b/src/mame/drivers/mikie.c @@ -102,7 +102,7 @@ static ADDRESS_MAP_START( mikie_map, AS_PROGRAM, 8, mikie_state ) AM_RANGE(0x2100, 0x2100) AM_WRITE(watchdog_reset_w) AM_RANGE(0x2200, 0x2200) AM_WRITE(mikie_palettebank_w) AM_RANGE(0x2300, 0x2300) AM_WRITENOP // ??? - AM_RANGE(0x2400, 0x2400) AM_READ_PORT("SYSTEM") AM_WRITE(soundlatch_w) + AM_RANGE(0x2400, 0x2400) AM_READ_PORT("SYSTEM") AM_WRITE(soundlatch_byte_w) AM_RANGE(0x2401, 0x2401) AM_READ_PORT("P1") AM_RANGE(0x2402, 0x2402) AM_READ_PORT("P2") AM_RANGE(0x2403, 0x2403) AM_READ_PORT("DSW3") @@ -122,7 +122,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, mikie_state ) AM_RANGE(0x8000, 0x8000) AM_WRITENOP // sound command latch AM_RANGE(0x8001, 0x8001) AM_WRITENOP // ??? AM_RANGE(0x8002, 0x8002) AM_DEVWRITE_LEGACY("sn1", sn76496_w) // trigger read of latch - AM_RANGE(0x8003, 0x8003) AM_READ(soundlatch_r) + AM_RANGE(0x8003, 0x8003) AM_READ(soundlatch_byte_r) AM_RANGE(0x8004, 0x8004) AM_DEVWRITE_LEGACY("sn2", sn76496_w) // trigger read of latch AM_RANGE(0x8005, 0x8005) AM_READ(mikie_sh_timer_r) AM_RANGE(0x8079, 0x8079) AM_WRITENOP // ??? diff --git a/src/mame/drivers/mirax.c b/src/mame/drivers/mirax.c index 13d91c446f7..4da5d5249d2 100644 --- a/src/mame/drivers/mirax.c +++ b/src/mame/drivers/mirax.c @@ -248,7 +248,7 @@ WRITE8_MEMBER(mirax_state::nmi_mask_w) WRITE8_MEMBER(mirax_state::mirax_sound_cmd_w) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -295,7 +295,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( mirax_sound_map, AS_PROGRAM, 8, mirax_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM AM_RANGE(0x8000, 0x8fff) AM_RAM - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) AM_RANGE(0xe000, 0xe000) AM_WRITENOP AM_RANGE(0xe001, 0xe001) AM_WRITENOP diff --git a/src/mame/drivers/missb2.c b/src/mame/drivers/missb2.c index 4bf831d7b18..53a9ba33678 100644 --- a/src/mame/drivers/missb2.c +++ b/src/mame/drivers/missb2.c @@ -201,7 +201,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, missb2_state ) AM_RANGE(0x8000, 0x8fff) AM_RAM AM_RANGE(0x9000, 0x9000) AM_DEVREADWRITE("oki", okim6295_device, read, write) AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ymsnd", ym3526_r, ym3526_w) - AM_RANGE(0xb000, 0xb000) AM_READ(soundlatch_r) AM_WRITENOP // message for main cpu + AM_RANGE(0xb000, 0xb000) AM_READ(soundlatch_byte_r) AM_WRITENOP // message for main cpu AM_RANGE(0xb001, 0xb001) AM_READNOP AM_WRITE(bublbobl_sh_nmi_enable_w) // bit 0: message pending for main cpu, bit 1: message pending for sound cpu AM_RANGE(0xb002, 0xb002) AM_WRITE(bublbobl_sh_nmi_disable_w) AM_RANGE(0xe000, 0xefff) AM_ROM // space for diagnostic ROM? diff --git a/src/mame/drivers/mitchell.c b/src/mame/drivers/mitchell.c index a24d68be973..f752c1073ed 100644 --- a/src/mame/drivers/mitchell.c +++ b/src/mame/drivers/mitchell.c @@ -386,12 +386,12 @@ static ADDRESS_MAP_START( mstworld_sound_map, AS_PROGRAM, 8, mitchell_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x9000, 0x9000) AM_DEVWRITE_LEGACY("oki", oki_banking_w) AM_RANGE(0x9800, 0x9800) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END WRITE8_MEMBER(mitchell_state::mstworld_sound_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_audiocpu, 0, HOLD_LINE); } diff --git a/src/mame/drivers/momoko.c b/src/mame/drivers/momoko.c index f8bc65742ce..dcaf9bd666f 100644 --- a/src/mame/drivers/momoko.c +++ b/src/mame/drivers/momoko.c @@ -61,7 +61,7 @@ static ADDRESS_MAP_START( momoko_map, AS_PROGRAM, 8, momoko_state ) AM_RANGE(0xd400, 0xd400) AM_READ_PORT("IN0") AM_WRITENOP /* interrupt ack? */ AM_RANGE(0xd402, 0xd402) AM_READ_PORT("IN1") AM_WRITE(momoko_flipscreen_w) AM_RANGE(0xd404, 0xd404) AM_WRITE(watchdog_reset_w) - AM_RANGE(0xd406, 0xd406) AM_READ_PORT("DSW0") AM_WRITE(soundlatch_w) + AM_RANGE(0xd406, 0xd406) AM_READ_PORT("DSW0") AM_WRITE(soundlatch_byte_w) AM_RANGE(0xd407, 0xd407) AM_READ_PORT("DSW1") AM_RANGE(0xd800, 0xdbff) AM_RAM_WRITE(paletteram_xxxxRRRRGGGGBBBB_byte_be_w) AM_SHARE("paletteram") AM_RANGE(0xdc00, 0xdc00) AM_WRITE(momoko_fg_scrolly_w) @@ -217,7 +217,7 @@ static const ym2203_interface ym2203_config = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL diff --git a/src/mame/drivers/moo.c b/src/mame/drivers/moo.c index 53a5d16a57c..4e55c07da1c 100644 --- a/src/mame/drivers/moo.c +++ b/src/mame/drivers/moo.c @@ -158,14 +158,14 @@ WRITE16_MEMBER(moo_state::sound_cmd1_w) if ((data & 0x00ff0000) == 0) { data &= 0xff; - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); } } WRITE16_MEMBER(moo_state::sound_cmd2_w) { if ((data & 0x00ff0000) == 0) - soundlatch2_w(space, 0, data & 0xff); + soundlatch2_byte_w(space, 0, data & 0xff); } WRITE16_MEMBER(moo_state::sound_irq_w) @@ -175,7 +175,7 @@ WRITE16_MEMBER(moo_state::sound_irq_w) READ16_MEMBER(moo_state::sound_status_r) { - return soundlatch3_r(space, 0); + return soundlatch3_byte_r(space, 0); } WRITE8_MEMBER(moo_state::sound_bankswitch_w) @@ -361,9 +361,9 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, moo_state ) AM_RANGE(0xc000, 0xdfff) AM_RAM AM_RANGE(0xe000, 0xe22f) AM_DEVREADWRITE("k054539", k054539_device, read, write) AM_RANGE(0xec00, 0xec01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r,ym2151_w) - AM_RANGE(0xf000, 0xf000) AM_WRITE(soundlatch3_w) - AM_RANGE(0xf002, 0xf002) AM_READ(soundlatch_r) - AM_RANGE(0xf003, 0xf003) AM_READ(soundlatch2_r) + AM_RANGE(0xf000, 0xf000) AM_WRITE(soundlatch3_byte_w) + AM_RANGE(0xf002, 0xf002) AM_READ(soundlatch_byte_r) + AM_RANGE(0xf003, 0xf003) AM_READ(soundlatch2_byte_r) AM_RANGE(0xf800, 0xf800) AM_WRITE(sound_bankswitch_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/ms32.c b/src/mame/drivers/ms32.c index 4ee30dd712b..3022142beb4 100644 --- a/src/mame/drivers/ms32.c +++ b/src/mame/drivers/ms32.c @@ -219,7 +219,7 @@ READ32_MEMBER(ms32_state::ms32_read_inputs3) WRITE32_MEMBER(ms32_state::ms32_sound_w) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, ASSERT_LINE); // give the Z80 time to respond @@ -1347,7 +1347,7 @@ static TIMER_DEVICE_CALLBACK(ms32_interrupt) READ8_MEMBER(ms32_state::latch_r) { cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, CLEAR_LINE); - return soundlatch_r(space,0)^0xff; + return soundlatch_byte_r(space,0)^0xff; } WRITE8_MEMBER(ms32_state::ms32_snd_bank_w) diff --git a/src/mame/drivers/msisaac.c b/src/mame/drivers/msisaac.c index 89cf1475fdb..7995f9f5322 100644 --- a/src/mame/drivers/msisaac.c +++ b/src/mame/drivers/msisaac.c @@ -33,7 +33,7 @@ static TIMER_CALLBACK( nmi_callback ) WRITE8_MEMBER(msisaac_state::sound_command_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); machine().scheduler().synchronize(FUNC(nmi_callback), data); } @@ -267,7 +267,7 @@ static ADDRESS_MAP_START( msisaac_sound_map, AS_PROGRAM, 8, msisaac_state ) AM_RANGE(0x8010, 0x801d) AM_DEVWRITE_LEGACY("msm", msm5232_w) AM_RANGE(0x8020, 0x8020) AM_DEVWRITE_LEGACY("msm", sound_control_0_w) AM_RANGE(0x8030, 0x8030) AM_WRITE(sound_control_1_w) - AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_r) + AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_byte_r) AM_RANGE(0xc001, 0xc001) AM_WRITE(nmi_enable_w) AM_RANGE(0xc002, 0xc002) AM_WRITE(nmi_disable_w) AM_RANGE(0xc003, 0xc003) AM_WRITENOP /*???*/ /* this is NOT mixer_enable */ diff --git a/src/mame/drivers/mugsmash.c b/src/mame/drivers/mugsmash.c index 6ab1db7eb40..3a151b299c1 100644 --- a/src/mame/drivers/mugsmash.c +++ b/src/mame/drivers/mugsmash.c @@ -55,7 +55,7 @@ WRITE16_MEMBER(mugsmash_state::mugsmash_reg2_w) switch (offset) { case 1: - soundlatch_w(space, 1, data & 0xff); + soundlatch_byte_w(space, 1, data & 0xff); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE ); break; @@ -196,7 +196,7 @@ static ADDRESS_MAP_START( mugsmash_sound_map, AS_PROGRAM, 8, mugsmash_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x8800, 0x8801) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r,ym2151_w) AM_RANGE(0x9800, 0x9800) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/munchmo.c b/src/mame/drivers/munchmo.c index acc07f5b002..81b6f663e2e 100644 --- a/src/mame/drivers/munchmo.c +++ b/src/mame/drivers/munchmo.c @@ -61,7 +61,7 @@ static INTERRUPT_GEN( mnchmobl_sound_irq ) WRITE8_MEMBER(munchmo_state::mnchmobl_soundlatch_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_audiocpu, 0, HOLD_LINE ); } @@ -110,7 +110,7 @@ ADDRESS_MAP_END /* memory map provided thru schematics */ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, munchmo_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM - AM_RANGE(0x2000, 0x3fff) AM_READ(soundlatch_r) + AM_RANGE(0x2000, 0x3fff) AM_READ(soundlatch_byte_r) AM_RANGE(0x4000, 0x4fff) AM_DEVWRITE_LEGACY("ay1", ay8910_data_w) AM_RANGE(0x5000, 0x5fff) AM_DEVWRITE_LEGACY("ay1", ay8910_address_w) AM_RANGE(0x6000, 0x6fff) AM_DEVWRITE_LEGACY("ay2", ay8910_data_w) diff --git a/src/mame/drivers/mystwarr.c b/src/mame/drivers/mystwarr.c index 0c93489e65e..30245c3069a 100644 --- a/src/mame/drivers/mystwarr.c +++ b/src/mame/drivers/mystwarr.c @@ -162,23 +162,23 @@ static INTERRUPT_GEN(ddd_interrupt) WRITE16_MEMBER(mystwarr_state::sound_cmd1_w) { - soundlatch_w(space, 0, data&0xff); + soundlatch_byte_w(space, 0, data&0xff); } WRITE16_MEMBER(mystwarr_state::sound_cmd1_msb_w) { - soundlatch_w(space, 0, data>>8); + soundlatch_byte_w(space, 0, data>>8); } WRITE16_MEMBER(mystwarr_state::sound_cmd2_w) { - soundlatch2_w(space, 0, data&0xff); + soundlatch2_byte_w(space, 0, data&0xff); return; } WRITE16_MEMBER(mystwarr_state::sound_cmd2_msb_w) { - soundlatch2_w(space, 0, data>>8); + soundlatch2_byte_w(space, 0, data>>8); return; } @@ -189,7 +189,7 @@ WRITE16_MEMBER(mystwarr_state::sound_irq_w) READ16_MEMBER(mystwarr_state::sound_status_r) { - int latch = soundlatch3_r(space,0); + int latch = soundlatch3_byte_r(space,0); if ((latch & 0xf) == 0xe) latch |= 1; @@ -198,7 +198,7 @@ READ16_MEMBER(mystwarr_state::sound_status_r) READ16_MEMBER(mystwarr_state::sound_status_msb_r) { - int latch = soundlatch3_r(space,0); + int latch = soundlatch3_byte_r(space,0); if ((latch & 0xf) == 0xe) latch |= 1; @@ -583,9 +583,9 @@ static ADDRESS_MAP_START( mystwarr_sound_map, AS_PROGRAM, 8, mystwarr_state ) AM_RANGE(0xe230, 0xe3ff) AM_RAM AM_RANGE(0xe400, 0xe62f) AM_DEVREADWRITE("konami2", k054539_device, read, write) AM_RANGE(0xe630, 0xe7ff) AM_RAM - AM_RANGE(0xf000, 0xf000) AM_WRITE(soundlatch3_w) - AM_RANGE(0xf002, 0xf002) AM_READ(soundlatch_r) - AM_RANGE(0xf003, 0xf003) AM_READ(soundlatch2_r) + AM_RANGE(0xf000, 0xf000) AM_WRITE(soundlatch3_byte_w) + AM_RANGE(0xf002, 0xf002) AM_READ(soundlatch_byte_r) + AM_RANGE(0xf003, 0xf003) AM_READ(soundlatch2_byte_r) AM_RANGE(0xf800, 0xf800) AM_WRITE(sound_bankswitch_w) AM_RANGE(0xfff0, 0xfff3) AM_WRITENOP // unknown write ADDRESS_MAP_END diff --git a/src/mame/drivers/nbmj8991.c b/src/mame/drivers/nbmj8991.c index 4d738b77d71..f6758e56994 100644 --- a/src/mame/drivers/nbmj8991.c +++ b/src/mame/drivers/nbmj8991.c @@ -48,20 +48,20 @@ Notes: WRITE8_MEMBER(nbmj8991_state::nbmj8991_soundbank_w) { - if (!(data & 0x80)) soundlatch_clear_w(space, 0, 0); + if (!(data & 0x80)) soundlatch_clear_byte_w(space, 0, 0); memory_set_bank(machine(), "bank1", data & 0x03); } WRITE8_MEMBER(nbmj8991_state::nbmj8991_sound_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); } READ8_MEMBER(nbmj8991_state::nbmj8991_sound_r) { int data; - data = soundlatch_r(space,0); + data = soundlatch_byte_r(space,0); return data; } diff --git a/src/mame/drivers/nbmj9195.c b/src/mame/drivers/nbmj9195.c index 60073463161..288d42d06cd 100644 --- a/src/mame/drivers/nbmj9195.c +++ b/src/mame/drivers/nbmj9195.c @@ -47,17 +47,17 @@ WRITE8_MEMBER(nbmj9195_state::nbmj9195_soundbank_w) READ8_MEMBER(nbmj9195_state::nbmj9195_sound_r) { - return soundlatch_r(space, 0); + return soundlatch_byte_r(space, 0); } WRITE8_MEMBER(nbmj9195_state::nbmj9195_sound_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); } WRITE8_MEMBER(nbmj9195_state::nbmj9195_soundclr_w) { - soundlatch_clear_w(space, 0, 0); + soundlatch_clear_byte_w(space, 0, 0); } static void nbmj9195_outcoin_flag_w(address_space *space, int data) diff --git a/src/mame/drivers/nemesis.c b/src/mame/drivers/nemesis.c index 4ad6c934dcb..17243c4ca93 100644 --- a/src/mame/drivers/nemesis.c +++ b/src/mame/drivers/nemesis.c @@ -241,7 +241,7 @@ READ16_MEMBER(nemesis_state::selected_ip_word_r) WRITE16_MEMBER(nemesis_state::nemesis_soundlatch_word_w) { if (ACCESSING_BITS_0_7) - soundlatch_w(space, offset, data & 0xff); + soundlatch_byte_w(space, offset, data & 0xff); } static WRITE8_DEVICE_HANDLER( gx400_speech_start_w ) @@ -426,7 +426,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, nemesis_state ) AM_RANGE(0x4000, 0x47ff) AM_RAM AM_RANGE(0xa000, 0xafff) AM_DEVWRITE_LEGACY("k007232", k005289_pitch_A_w) AM_RANGE(0xc000, 0xcfff) AM_DEVWRITE_LEGACY("k007232", k005289_pitch_B_w) - AM_RANGE(0xe001, 0xe001) AM_READ(soundlatch_r) + AM_RANGE(0xe001, 0xe001) AM_READ(soundlatch_byte_r) AM_RANGE(0xe003, 0xe003) AM_DEVWRITE_LEGACY("k007232", k005289_keylatch_A_w) AM_RANGE(0xe004, 0xe004) AM_DEVWRITE_LEGACY("k007232", k005289_keylatch_B_w) AM_RANGE(0xe005, 0xe005) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) @@ -443,7 +443,7 @@ static ADDRESS_MAP_START( gx400_sound_map, AS_PROGRAM, 8, nemesis_state ) AM_RANGE(0xa000, 0xafff) AM_DEVWRITE_LEGACY("k007232", k005289_pitch_A_w) AM_RANGE(0xc000, 0xcfff) AM_DEVWRITE_LEGACY("k007232", k005289_pitch_B_w) AM_RANGE(0xe000, 0xe000) AM_DEVWRITE_LEGACY("vlm", vlm5030_data_w) - AM_RANGE(0xe001, 0xe001) AM_READ(soundlatch_r) + AM_RANGE(0xe001, 0xe001) AM_READ(soundlatch_byte_r) AM_RANGE(0xe003, 0xe003) AM_DEVWRITE_LEGACY("k007232", k005289_keylatch_A_w) AM_RANGE(0xe004, 0xe004) AM_DEVWRITE_LEGACY("k007232", k005289_keylatch_B_w) AM_RANGE(0xe005, 0xe005) AM_DEVWRITE_LEGACY("ay2", ay8910_address_w) @@ -569,7 +569,7 @@ READ8_MEMBER(nemesis_state::wd_r) static ADDRESS_MAP_START( sal_sound_map, AS_PROGRAM, 8, nemesis_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0x87ff) AM_RAM - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) AM_RANGE(0xb000, 0xb00d) AM_DEVREADWRITE_LEGACY("k007232", k007232_r, k007232_w) AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0xd000, 0xd000) AM_DEVWRITE_LEGACY("vlm", vlm5030_data_w) @@ -580,7 +580,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( blkpnthr_sound_map, AS_PROGRAM, 8, nemesis_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0x87ff) AM_RAM - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) AM_RANGE(0xb000, 0xb00d) AM_DEVREADWRITE_LEGACY("k007232", k007232_r, k007232_w) AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0xe000, 0xe000) AM_READ(wd_r) /* watchdog?? */ @@ -597,7 +597,7 @@ static ADDRESS_MAP_START( city_sound_map, AS_PROGRAM, 8, nemesis_state ) AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ymsnd", ym3812_r, ym3812_w) AM_RANGE(0xb000, 0xb00d) AM_DEVREADWRITE_LEGACY("k007232", k007232_r, k007232_w) AM_RANGE(0xc000, 0xc000) AM_DEVWRITE_LEGACY("k007232", city_sound_bank_w) /* 7232 bankswitch */ - AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_r) + AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END /******************************************************************************/ diff --git a/src/mame/drivers/neogeo.c b/src/mame/drivers/neogeo.c index c859ca1c528..4ec5ae69de5 100644 --- a/src/mame/drivers/neogeo.c +++ b/src/mame/drivers/neogeo.c @@ -571,7 +571,7 @@ WRITE16_MEMBER(neogeo_state::audio_command_w) /* accessing the LSB only is not mapped */ if (mem_mask != 0x00ff) { - soundlatch_w(space, 0, data >> 8); + soundlatch_byte_w(space, 0, data >> 8); audio_cpu_assert_nmi(machine()); @@ -585,7 +585,7 @@ WRITE16_MEMBER(neogeo_state::audio_command_w) READ8_MEMBER(neogeo_state::audio_command_r) { - UINT8 ret = soundlatch_r(space, 0); + UINT8 ret = soundlatch_byte_r(space, 0); if (LOG_CPU_COMM) logerror(" AUD CPU PC %04x: audio_command_r %02x\n", cpu_get_pc(&space.device()), ret); diff --git a/src/mame/drivers/neoprint.c b/src/mame/drivers/neoprint.c index ba0cb155980..fe9722cf799 100644 --- a/src/mame/drivers/neoprint.c +++ b/src/mame/drivers/neoprint.c @@ -173,7 +173,7 @@ WRITE16_MEMBER(neoprint_state::audio_command_w) /* accessing the LSB only is not mapped */ if (mem_mask != 0x00ff) { - soundlatch_w(space, 0, data >> 8); + soundlatch_byte_w(space, 0, data >> 8); audio_cpu_assert_nmi(machine()); @@ -187,7 +187,7 @@ WRITE16_MEMBER(neoprint_state::audio_command_w) READ8_MEMBER(neoprint_state::audio_command_r) { - UINT8 ret = soundlatch_r(space, 0); + UINT8 ret = soundlatch_byte_r(space, 0); //if (LOG_CPU_COMM) logerror(" AUD CPU PC %04x: audio_command_r %02x\n", cpu_get_pc(&space.device()), ret); diff --git a/src/mame/drivers/ninjakd2.c b/src/mame/drivers/ninjakd2.c index 06153b92915..2de939173ef 100644 --- a/src/mame/drivers/ninjakd2.c +++ b/src/mame/drivers/ninjakd2.c @@ -397,7 +397,7 @@ static ADDRESS_MAP_START( ninjakd2_main_cpu, AS_PROGRAM, 8, ninjakd2_state ) AM_RANGE(0xc002, 0xc002) AM_READ_PORT("PAD2") AM_RANGE(0xc003, 0xc003) AM_READ_PORT("DIPSW1") AM_RANGE(0xc004, 0xc004) AM_READ_PORT("DIPSW2") - AM_RANGE(0xc200, 0xc200) AM_WRITE(soundlatch_w) + AM_RANGE(0xc200, 0xc200) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xc201, 0xc201) AM_WRITE(ninjakd2_soundreset_w) // sound reset + flip screen AM_RANGE(0xc202, 0xc202) AM_WRITE(ninjakd2_bankselect_w) AM_RANGE(0xc203, 0xc203) AM_WRITE(ninjakd2_sprite_overdraw_w) @@ -423,7 +423,7 @@ static ADDRESS_MAP_START( mnight_main_cpu, AS_PROGRAM, 8, ninjakd2_state ) AM_RANGE(0xf802, 0xf802) AM_READ_PORT("PAD2") AM_RANGE(0xf803, 0xf803) AM_READ_PORT("DIPSW1") AM_RANGE(0xf804, 0xf804) AM_READ_PORT("DIPSW2") - AM_RANGE(0xfa00, 0xfa00) AM_WRITE(soundlatch_w) + AM_RANGE(0xfa00, 0xfa00) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xfa01, 0xfa01) AM_WRITE(ninjakd2_soundreset_w) AM_RANGE(0xfa02, 0xfa02) AM_WRITE(ninjakd2_bankselect_w) AM_RANGE(0xfa03, 0xfa03) AM_WRITE(ninjakd2_sprite_overdraw_w) @@ -444,7 +444,7 @@ static ADDRESS_MAP_START( robokid_main_cpu, AS_PROGRAM, 8, ninjakd2_state ) AM_RANGE(0xdc02, 0xdc02) AM_READ_PORT("PAD2") AM_RANGE(0xdc03, 0xdc03) AM_READ_PORT("DIPSW1") AM_RANGE(0xdc04, 0xdc04) AM_READ_PORT("DIPSW2") - AM_RANGE(0xdc00, 0xdc00) AM_WRITE(soundlatch_w) + AM_RANGE(0xdc00, 0xdc00) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xdc01, 0xdc01) AM_WRITE(ninjakd2_soundreset_w) // sound reset + flip screen AM_RANGE(0xdc02, 0xdc02) AM_WRITE(robokid_bankselect_w) AM_RANGE(0xdc03, 0xdc03) AM_WRITE(ninjakd2_sprite_overdraw_w) @@ -464,7 +464,7 @@ static ADDRESS_MAP_START( omegaf_main_cpu, AS_PROGRAM, 8, ninjakd2_state ) AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1") AM_RANGE(0xc000, 0xc000) AM_READ_PORT("KEYCOIN") AM_RANGE(0xc001, 0xc003) AM_READ(omegaf_io_protection_r) - AM_RANGE(0xc000, 0xc000) AM_WRITE(soundlatch_w) + AM_RANGE(0xc000, 0xc000) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xc001, 0xc001) AM_WRITE(ninjakd2_soundreset_w) // sound reset + flip screen AM_RANGE(0xc002, 0xc002) AM_WRITE(robokid_bankselect_w) AM_RANGE(0xc003, 0xc003) AM_WRITE(ninjakd2_sprite_overdraw_w) @@ -490,7 +490,7 @@ static ADDRESS_MAP_START( ninjakd2_sound_cpu, AS_PROGRAM, 8, ninjakd2_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0xbfff) AM_ROM AM_RANGE(0xc000, 0xc7ff) AM_RAM - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) AM_RANGE(0xf000, 0xf000) AM_WRITE(ninjakd2_pcm_play_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/niyanpai.c b/src/mame/drivers/niyanpai.c index 2470f9d6211..6c6d914ad16 100644 --- a/src/mame/drivers/niyanpai.c +++ b/src/mame/drivers/niyanpai.c @@ -62,17 +62,17 @@ static void niyanpai_soundbank_w(running_machine &machine, int data) READ8_MEMBER(niyanpai_state::niyanpai_sound_r) { - return soundlatch_r(space, 0); + return soundlatch_byte_r(space, 0); } WRITE16_MEMBER(niyanpai_state::niyanpai_sound_w) { - soundlatch_w(space, 0, ((data >> 8) & 0xff)); + soundlatch_byte_w(space, 0, ((data >> 8) & 0xff)); } WRITE8_MEMBER(niyanpai_state::niyanpai_soundclr_w) { - soundlatch_clear_w(space, 0, 0); + soundlatch_clear_byte_w(space, 0, 0); } diff --git a/src/mame/drivers/nmg5.c b/src/mame/drivers/nmg5.c index ce8e9cd5c45..9530349f6b8 100644 --- a/src/mame/drivers/nmg5.c +++ b/src/mame/drivers/nmg5.c @@ -282,7 +282,7 @@ WRITE16_MEMBER(nmg5_state::nmg5_soundlatch_w) if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_soundcpu, INPUT_LINE_NMI, PULSE_LINE); } } @@ -386,7 +386,7 @@ static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, nmg5_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x00) AM_DEVWRITE_LEGACY("oki", oki_banking_w) AM_RANGE(0x10, 0x11) AM_DEVREADWRITE_LEGACY("ymsnd", ym3812_r, ym3812_w) - AM_RANGE(0x18, 0x18) AM_READ(soundlatch_r) + AM_RANGE(0x18, 0x18) AM_READ(soundlatch_byte_r) AM_RANGE(0x1c, 0x1c) AM_DEVREADWRITE("oki", okim6295_device, read, write) ADDRESS_MAP_END diff --git a/src/mame/drivers/nmk16.c b/src/mame/drivers/nmk16.c index cc3cd35af56..c6d796b32b9 100644 --- a/src/mame/drivers/nmk16.c +++ b/src/mame/drivers/nmk16.c @@ -205,7 +205,7 @@ WRITE16_MEMBER(nmk16_state::ssmissin_sound_w) { if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE); } } @@ -270,7 +270,7 @@ WRITE16_MEMBER(nmk16_state::macross2_sound_reset_w) WRITE16_MEMBER(nmk16_state::macross2_sound_command_w) { if (ACCESSING_BITS_0_7) - soundlatch_w(space,0,data & 0xff); + soundlatch_byte_w(space,0,data & 0xff); } WRITE8_MEMBER(nmk16_state::macross2_sound_bank_w) @@ -302,7 +302,7 @@ WRITE16_MEMBER(nmk16_state::afega_soundlatch_w) { if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data&0xff); + soundlatch_byte_w(space, 0, data&0xff); cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE); } } @@ -386,7 +386,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( tharrier_sound_map, AS_PROGRAM, 8, nmk16_state ) AM_RANGE(0x0000, 0xbfff) AM_ROM AM_RANGE(0xc000, 0xc7ff) AM_RAM - AM_RANGE(0xf000, 0xf000) AM_READWRITE(soundlatch_r,soundlatch2_w) + AM_RANGE(0xf000, 0xf000) AM_READWRITE(soundlatch_byte_r,soundlatch2_byte_w) AM_RANGE(0xf400, 0xf400) AM_DEVREADWRITE("oki1", okim6295_device, read, write) AM_RANGE(0xf500, 0xf500) AM_DEVREADWRITE("oki2", okim6295_device, read, write) AM_RANGE(0xf600, 0xf600) AM_WRITE(tharrier_oki6295_bankswitch_0_w) @@ -938,7 +938,7 @@ static ADDRESS_MAP_START( ssmissin_sound_map, AS_PROGRAM, 8, nmk16_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x9000, 0x9000) AM_WRITE(ssmissin_soundbank_w) AM_RANGE(0x9800, 0x9800) AM_DEVREADWRITE("oki1", okim6295_device, read, write) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static ADDRESS_MAP_START( strahl_map, AS_PROGRAM, 16, nmk16_state ) @@ -1079,7 +1079,7 @@ static ADDRESS_MAP_START( raphero_sound_mem_map, AS_PROGRAM, 8, nmk16_state ) AM_RANGE(0xc810, 0xc817) AM_DEVWRITE_LEGACY("nmk112", nmk112_okibank_w) // AM_RANGE(0xc810, 0xc817) AM_WRITE(okibank_w) AM_RANGE(0xd000, 0xd000) AM_WRITE(raphero_sound_rombank_w) - AM_RANGE(0xd800, 0xd800) AM_READWRITE(soundlatch_r, soundlatch2_w) // main cpu + AM_RANGE(0xd800, 0xd800) AM_READWRITE(soundlatch_byte_r, soundlatch2_byte_w) // main cpu AM_RANGE(0xe000, 0xffff) AM_RAM ADDRESS_MAP_END @@ -1089,7 +1089,7 @@ static ADDRESS_MAP_START( macross2_sound_map, AS_PROGRAM, 8, nmk16_state ) AM_RANGE(0xa000, 0xa000) AM_READNOP /* IRQ ack? watchdog? */ AM_RANGE(0xc000, 0xdfff) AM_RAM AM_RANGE(0xe001, 0xe001) AM_WRITE(macross2_sound_bank_w) - AM_RANGE(0xf000, 0xf000) AM_READWRITE(soundlatch_r,soundlatch2_w) /* from 68000 */ + AM_RANGE(0xf000, 0xf000) AM_READWRITE(soundlatch_byte_r,soundlatch2_byte_w) /* from 68000 */ ADDRESS_MAP_END static ADDRESS_MAP_START( macross2_sound_io_map, AS_IO, 8, nmk16_state ) @@ -4684,7 +4684,7 @@ static ADDRESS_MAP_START( afega_sound_cpu, AS_PROGRAM, 8, nmk16_state ) AM_RANGE(0x0004, 0x0004) AM_WRITENOP // bug in sound prg? AM_RANGE(0x0000, 0xefff) AM_ROM AM_RANGE(0xf000, 0xf7ff) AM_RAM // RAM - AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_r) // From Main CPU + AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_byte_r) // From Main CPU AM_RANGE(0xf808, 0xf809) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) // YM2151 AM_RANGE(0xf80a, 0xf80a) AM_DEVREADWRITE("oki1", okim6295_device, read, write) // M6295 ADDRESS_MAP_END @@ -4692,7 +4692,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( firehawk_sound_cpu, AS_PROGRAM, 8, nmk16_state ) AM_RANGE(0x0000, 0xefff) AM_ROM AM_RANGE(0xf000, 0xf7ff) AM_RAM - AM_RANGE(0xfff0, 0xfff0) AM_READ(soundlatch_r) + AM_RANGE(0xfff0, 0xfff0) AM_READ(soundlatch_byte_r) AM_RANGE(0xfff2, 0xfff2) AM_DEVWRITE_LEGACY("oki2", spec2k_oki1_banking_w ) AM_RANGE(0xfff8, 0xfff8) AM_DEVREADWRITE("oki2", okim6295_device, read, write) AM_RANGE(0xfffa, 0xfffa) AM_DEVREADWRITE("oki1", okim6295_device, read, write) @@ -4715,7 +4715,7 @@ static ADDRESS_MAP_START( twinactn_sound_cpu, AS_PROGRAM, 8, nmk16_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x9000, 0x9000) AM_DEVWRITE_LEGACY("oki1", twinactn_oki_bank_w) AM_RANGE(0x9800, 0x9800) AM_DEVREADWRITE("oki1", okim6295_device, read, write) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) // From Main CPU + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) // From Main CPU ADDRESS_MAP_END /*************************************************************************** diff --git a/src/mame/drivers/nycaptor.c b/src/mame/drivers/nycaptor.c index 170d97871dc..aa25a833e0a 100644 --- a/src/mame/drivers/nycaptor.c +++ b/src/mame/drivers/nycaptor.c @@ -282,7 +282,7 @@ static TIMER_CALLBACK( nmi_callback ) WRITE8_MEMBER(nycaptor_state::sound_command_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); machine().scheduler().synchronize(FUNC(nmi_callback), data); } @@ -388,7 +388,7 @@ static ADDRESS_MAP_START( nycaptor_sound_map, AS_PROGRAM, 8, nycaptor_state ) AM_RANGE(0xca00, 0xca00) AM_WRITENOP AM_RANGE(0xcb00, 0xcb00) AM_WRITENOP AM_RANGE(0xcc00, 0xcc00) AM_WRITENOP - AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_r) AM_WRITE(to_main_w) + AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_byte_r) AM_WRITE(to_main_w) AM_RANGE(0xd200, 0xd200) AM_READNOP AM_WRITE(nmi_enable_w) AM_RANGE(0xd400, 0xd400) AM_WRITE(nmi_disable_w) AM_RANGE(0xd600, 0xd600) AM_WRITENOP diff --git a/src/mame/drivers/nyny.c b/src/mame/drivers/nyny.c index 17920269d82..5b166d28531 100644 --- a/src/mame/drivers/nyny.c +++ b/src/mame/drivers/nyny.c @@ -442,7 +442,7 @@ static const mc6845_interface mc6845_intf = WRITE8_MEMBER(nyny_state::audio_1_command_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_audiocpu, M6800_IRQ_LINE, HOLD_LINE); } @@ -450,7 +450,7 @@ WRITE8_MEMBER(nyny_state::audio_1_command_w) WRITE8_MEMBER(nyny_state::audio_1_answer_w) { - soundlatch3_w(space, 0, data); + soundlatch3_byte_w(space, 0, data); device_set_input_line(m_maincpu, M6809_IRQ_LINE, HOLD_LINE); } @@ -495,7 +495,7 @@ static const ay8910_interface ay8910_64_interface = WRITE8_MEMBER(nyny_state::audio_2_command_w) { - soundlatch2_w(space, 0, (data & 0x60) >> 5); + soundlatch2_byte_w(space, 0, (data & 0x60) >> 5); device_set_input_line(m_audiocpu2, M6800_IRQ_LINE, BIT(data, 7) ? CLEAR_LINE : ASSERT_LINE); } @@ -538,7 +538,7 @@ static ADDRESS_MAP_START( nyny_main_map, AS_PROGRAM, 8, nyny_state ) AM_RANGE(0xa100, 0xa100) AM_MIRROR(0x00fe) AM_DEVWRITE("crtc", mc6845_device, address_w) AM_RANGE(0xa101, 0xa101) AM_MIRROR(0x00fe) AM_DEVWRITE("crtc", mc6845_device, register_w) AM_RANGE(0xa200, 0xa20f) AM_MIRROR(0x00f0) AM_READWRITE(nyny_pia_1_2_r, nyny_pia_1_2_w) - AM_RANGE(0xa300, 0xa300) AM_MIRROR(0x00ff) AM_READ(soundlatch3_r) AM_WRITE(audio_1_command_w) + AM_RANGE(0xa300, 0xa300) AM_MIRROR(0x00ff) AM_READ(soundlatch3_byte_r) AM_WRITE(audio_1_command_w) AM_RANGE(0xa400, 0xa7ff) AM_NOP AM_RANGE(0xa800, 0xbfff) AM_ROM AM_RANGE(0xc000, 0xdfff) AM_RAM @@ -550,7 +550,7 @@ static ADDRESS_MAP_START( nyny_audio_1_map, AS_PROGRAM, 8, nyny_state ) ADDRESS_MAP_GLOBAL_MASK(0x7fff) AM_RANGE(0x0000, 0x007f) AM_RAM /* internal RAM */ AM_RANGE(0x0080, 0x0fff) AM_NOP - AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x0fff) AM_READ(soundlatch_r) AM_WRITE(audio_1_answer_w) + AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x0fff) AM_READ(soundlatch_byte_r) AM_WRITE(audio_1_answer_w) AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x0fff) AM_READ_PORT("SW3") AM_RANGE(0x3000, 0x3000) AM_MIRROR(0x0ffc) AM_DEVREAD_LEGACY("ay1", ay8910_r) AM_RANGE(0x3000, 0x3001) AM_MIRROR(0x0ffc) AM_DEVWRITE_LEGACY("ay1", ay8910_data_address_w) @@ -567,7 +567,7 @@ static ADDRESS_MAP_START( nyny_audio_2_map, AS_PROGRAM, 8, nyny_state ) ADDRESS_MAP_GLOBAL_MASK(0x7fff) AM_RANGE(0x0000, 0x007f) AM_RAM /* internal RAM */ AM_RANGE(0x0080, 0x0fff) AM_NOP - AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x0fff) AM_READ(soundlatch2_r) + AM_RANGE(0x1000, 0x1000) AM_MIRROR(0x0fff) AM_READ(soundlatch2_byte_r) AM_RANGE(0x2000, 0x2000) AM_MIRROR(0x0ffe) AM_DEVREAD_LEGACY("ay3", ay8910_r) AM_RANGE(0x2000, 0x2001) AM_MIRROR(0x0ffe) AM_DEVWRITE_LEGACY("ay3", ay8910_data_address_w) AM_RANGE(0x3000, 0x6fff) AM_NOP diff --git a/src/mame/drivers/olibochu.c b/src/mame/drivers/olibochu.c index 949a09de2a2..751799fd962 100644 --- a/src/mame/drivers/olibochu.c +++ b/src/mame/drivers/olibochu.c @@ -241,7 +241,7 @@ WRITE8_MEMBER(olibochu_state::sound_command_w) for (c = 15; c >= 0; c--) if (m_cmd & (1 << c)) break; - if (c >= 0) soundlatch_w(space, 0, 15 - c); + if (c >= 0) soundlatch_byte_w(space, 0, 15 - c); } @@ -267,7 +267,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( olibochu_sound_map, AS_PROGRAM, 8, olibochu_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM AM_RANGE(0x6000, 0x63ff) AM_RAM - AM_RANGE(0x7000, 0x7000) AM_READ(soundlatch_r) /* likely ay8910 input port, not direct */ + AM_RANGE(0x7000, 0x7000) AM_READ(soundlatch_byte_r) /* likely ay8910 input port, not direct */ AM_RANGE(0x7000, 0x7001) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) AM_RANGE(0x7004, 0x7004) AM_WRITENOP //sound filter? AM_RANGE(0x7006, 0x7006) AM_WRITENOP //irq ack? diff --git a/src/mame/drivers/omegrace.c b/src/mame/drivers/omegrace.c index a2d22a7e140..096f3cd6e5f 100644 --- a/src/mame/drivers/omegrace.c +++ b/src/mame/drivers/omegrace.c @@ -326,7 +326,7 @@ WRITE8_MEMBER(omegrace_state::omegrace_leds_w) WRITE8_MEMBER(omegrace_state::omegrace_soundlatch_w) { - soundlatch_w (space, offset, data); + soundlatch_byte_w (space, offset, data); cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE); } @@ -378,7 +378,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_port, AS_IO, 8, omegrace_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r) /* likely ay8910 input port, not direct */ + AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r) /* likely ay8910 input port, not direct */ AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) AM_RANGE(0x02, 0x03) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/oneshot.c b/src/mame/drivers/oneshot.c index cd6b2885818..ec4f1c1b19d 100644 --- a/src/mame/drivers/oneshot.c +++ b/src/mame/drivers/oneshot.c @@ -125,7 +125,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( oneshot_sound_map, AS_PROGRAM, 8, oneshot_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM - AM_RANGE(0x8000, 0x8000) AM_READWRITE(soundlatch_r,soundlatch_w) + AM_RANGE(0x8000, 0x8000) AM_READWRITE(soundlatch_byte_r,soundlatch_byte_w) AM_RANGE(0x8001, 0x87ff) AM_RAM AM_RANGE(0xe000, 0xe001) AM_DEVREADWRITE_LEGACY("ymsnd", ym3812_r,ym3812_w) AM_RANGE(0xe010, 0xe010) AM_DEVREADWRITE("oki", okim6295_device, read, write) diff --git a/src/mame/drivers/onetwo.c b/src/mame/drivers/onetwo.c index e55c8784d99..188a39c0339 100644 --- a/src/mame/drivers/onetwo.c +++ b/src/mame/drivers/onetwo.c @@ -129,7 +129,7 @@ WRITE8_MEMBER(onetwo_state::onetwo_coin_counters_w) WRITE8_MEMBER(onetwo_state::onetwo_soundlatch_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } @@ -183,7 +183,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_cpu, AS_PROGRAM, 8, onetwo_state ) AM_RANGE(0x0000, 0x5fff) AM_ROM AM_RANGE(0xf000, 0xf7ff) AM_RAM - AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_r) + AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static ADDRESS_MAP_START( sound_cpu_io, AS_IO, 8, onetwo_state ) @@ -191,7 +191,7 @@ static ADDRESS_MAP_START( sound_cpu_io, AS_IO, 8, onetwo_state ) AM_RANGE(0x00, 0x00) AM_DEVREADWRITE_LEGACY("ymsnd", ym3812_status_port_r, ym3812_control_port_w) AM_RANGE(0x20, 0x20) AM_DEVWRITE_LEGACY("ymsnd", ym3812_write_port_w) AM_RANGE(0x40, 0x40) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xc0, 0xc0) AM_WRITE(soundlatch_clear_w) + AM_RANGE(0xc0, 0xc0) AM_WRITE(soundlatch_clear_byte_w) ADDRESS_MAP_END /************************************* diff --git a/src/mame/drivers/othello.c b/src/mame/drivers/othello.c index 67764012b2f..43efc95eead 100644 --- a/src/mame/drivers/othello.c +++ b/src/mame/drivers/othello.c @@ -196,14 +196,14 @@ static ADDRESS_MAP_START( main_portmap, AS_IO, 8, othello_state ) AM_RANGE(0x87, 0x87) AM_READ(unk_87_r) AM_RANGE(0x8a, 0x8a) AM_WRITE(unk_8a_w) AM_RANGE(0x8c, 0x8c) AM_READWRITE(unk_8c_r, unk_8c_w) - AM_RANGE(0x8d, 0x8d) AM_READWRITE(sound_ack_r, soundlatch_w) + AM_RANGE(0x8d, 0x8d) AM_READWRITE(sound_ack_r, soundlatch_byte_w) AM_RANGE(0x8f, 0x8f) AM_WRITE(unk_8f_w) ADDRESS_MAP_END READ8_MEMBER(othello_state::latch_r) { - int retval = soundlatch_r(space, 0); - soundlatch_clear_w(space, 0, 0); + int retval = soundlatch_byte_r(space, 0); + soundlatch_clear_byte_w(space, 0, 0); return retval; } diff --git a/src/mame/drivers/pandoras.c b/src/mame/drivers/pandoras.c index 6270259edf5..cdd282c1ec2 100644 --- a/src/mame/drivers/pandoras.c +++ b/src/mame/drivers/pandoras.c @@ -135,7 +135,7 @@ static ADDRESS_MAP_START( pandoras_master_map, AS_PROGRAM, 8, pandoras_state ) AM_RANGE(0x1800, 0x1807) AM_WRITE(pandoras_int_control_w) /* INT control */ AM_RANGE(0x1a00, 0x1a00) AM_WRITE(pandoras_scrolly_w) /* bg scroll */ AM_RANGE(0x1c00, 0x1c00) AM_WRITE(pandoras_z80_irqtrigger_w) /* cause INT on the Z80 */ - AM_RANGE(0x1e00, 0x1e00) AM_WRITE(soundlatch_w) /* sound command to the Z80 */ + AM_RANGE(0x1e00, 0x1e00) AM_WRITE(soundlatch_byte_w) /* sound command to the Z80 */ AM_RANGE(0x2000, 0x2000) AM_WRITE(pandoras_cpub_irqtrigger_w) /* cause FIRQ on CPU B */ AM_RANGE(0x2001, 0x2001) AM_WRITE(watchdog_reset_w) /* watchdog reset */ AM_RANGE(0x4000, 0x5fff) AM_ROM /* space for diagnostic ROM */ @@ -164,12 +164,12 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( pandoras_sound_map, AS_PROGRAM, 8, pandoras_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM /* ROM */ AM_RANGE(0x2000, 0x23ff) AM_RAM /* RAM */ - AM_RANGE(0x4000, 0x4000) AM_READ(soundlatch_r) /* soundlatch_r */ + AM_RANGE(0x4000, 0x4000) AM_READ(soundlatch_byte_r) /* soundlatch_byte_r */ AM_RANGE(0x6000, 0x6000) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_w) /* AY-8910 */ AM_RANGE(0x6001, 0x6001) AM_DEVREAD_LEGACY("aysnd", ay8910_r) /* AY-8910 */ AM_RANGE(0x6002, 0x6002) AM_DEVWRITE_LEGACY("aysnd", ay8910_data_w) /* AY-8910 */ AM_RANGE(0x8000, 0x8000) AM_WRITE(pandoras_i8039_irqtrigger_w) /* cause INT on the 8039 */ - AM_RANGE(0xa000, 0xa000) AM_WRITE(soundlatch2_w) /* sound command to the 8039 */ + AM_RANGE(0xa000, 0xa000) AM_WRITE(soundlatch2_byte_w) /* sound command to the 8039 */ ADDRESS_MAP_END static ADDRESS_MAP_START( pandoras_i8039_map, AS_PROGRAM, 8, pandoras_state ) @@ -177,7 +177,7 @@ static ADDRESS_MAP_START( pandoras_i8039_map, AS_PROGRAM, 8, pandoras_state ) ADDRESS_MAP_END static ADDRESS_MAP_START( pandoras_i8039_io_map, AS_IO, 8, pandoras_state ) - AM_RANGE(0x00, 0xff) AM_READ(soundlatch2_r) + AM_RANGE(0x00, 0xff) AM_READ(soundlatch2_byte_r) AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_DEVWRITE_LEGACY("dac", dac_w) AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(i8039_irqen_and_status_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/pass.c b/src/mame/drivers/pass.c index 5a57a51e945..6669da02023 100644 --- a/src/mame/drivers/pass.c +++ b/src/mame/drivers/pass.c @@ -127,10 +127,10 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( pass_sound_io_map, AS_IO, 8, pass_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r) + AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r) AM_RANGE(0x70, 0x71) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w) AM_RANGE(0x80, 0x80) AM_DEVWRITE("oki", okim6295_device, write) - AM_RANGE(0xc0, 0xc0) AM_WRITE(soundlatch_clear_w) + AM_RANGE(0xc0, 0xc0) AM_WRITE(soundlatch_clear_byte_w) ADDRESS_MAP_END /* todo : work out function of unknown but used dsw */ diff --git a/src/mame/drivers/pbaction.c b/src/mame/drivers/pbaction.c index c6723417195..c52b0b0d198 100644 --- a/src/mame/drivers/pbaction.c +++ b/src/mame/drivers/pbaction.c @@ -72,7 +72,7 @@ Stephh's notes (based on the game Z80 code and some tests) : WRITE8_MEMBER(pbaction_state::pbaction_sh_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0x00); } @@ -104,7 +104,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( pbaction_sound_map, AS_PROGRAM, 8, pbaction_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM AM_RANGE(0x4000, 0x47ff) AM_RAM - AM_RANGE(0x8000, 0x8000) AM_READ(soundlatch_r) + AM_RANGE(0x8000, 0x8000) AM_READ(soundlatch_byte_r) AM_RANGE(0xffff, 0xffff) AM_WRITENOP /* watchdog? */ ADDRESS_MAP_END diff --git a/src/mame/drivers/pcktgal.c b/src/mame/drivers/pcktgal.c index c64a396765b..95097deddb5 100644 --- a/src/mame/drivers/pcktgal.c +++ b/src/mame/drivers/pcktgal.c @@ -40,7 +40,7 @@ WRITE8_MEMBER(pcktgal_state::pcktgal_sound_bank_w) WRITE8_MEMBER(pcktgal_state::pcktgal_sound_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -94,7 +94,7 @@ static ADDRESS_MAP_START( pcktgal_sound_map, AS_PROGRAM, 8, pcktgal_state ) AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym2", ym3812_w) AM_RANGE(0x1800, 0x1800) AM_WRITE(pcktgal_adpcm_data_w) /* ADPCM data for the MSM5205 chip */ AM_RANGE(0x2000, 0x2000) AM_WRITE(pcktgal_sound_bank_w) - AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_r) + AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) AM_RANGE(0x3400, 0x3400) AM_DEVREAD_LEGACY("msm", pcktgal_adpcm_reset_r) /* ? not sure */ AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank3") AM_RANGE(0x8000, 0xffff) AM_ROM diff --git a/src/mame/drivers/pgm.c b/src/mame/drivers/pgm.c index 7416ee59bb7..f12b5a3fda5 100644 --- a/src/mame/drivers/pgm.c +++ b/src/mame/drivers/pgm.c @@ -276,7 +276,7 @@ WRITE16_MEMBER(pgm_state::m68k_l1_w) { if (PGMLOGERROR) logerror("SL 1 m68.w %02x (%06x) IRQ\n", data & 0xff, cpu_get_pc(&space.device())); - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_soundcpu, INPUT_LINE_NMI, PULSE_LINE ); } } @@ -285,7 +285,7 @@ WRITE8_MEMBER(pgm_state::z80_l3_w) { if (PGMLOGERROR) logerror("SL 3 z80.w %02x (%04x)\n", data, cpu_get_pc(&space.device())); - soundlatch3_w(space, 0, data); + soundlatch3_byte_w(space, 0, data); } void pgm_sound_irq( device_t *device, int level ) @@ -310,9 +310,9 @@ ADDRESS_MAP_END ADDRESS_MAP_START( pgm_z80_io, AS_IO, 8, pgm_state ) AM_RANGE(0x8000, 0x8003) AM_DEVREADWRITE_LEGACY("ics", ics2115_device::read, ics2115_device::write) - AM_RANGE(0x8100, 0x81ff) AM_READ(soundlatch3_r) AM_WRITE(z80_l3_w) - AM_RANGE(0x8200, 0x82ff) AM_READWRITE(soundlatch_r, soundlatch_w) - AM_RANGE(0x8400, 0x84ff) AM_READWRITE(soundlatch2_r, soundlatch2_w) + AM_RANGE(0x8100, 0x81ff) AM_READ(soundlatch3_byte_r) AM_WRITE(z80_l3_w) + AM_RANGE(0x8200, 0x82ff) AM_READWRITE(soundlatch_byte_r, soundlatch_byte_w) + AM_RANGE(0x8400, 0x84ff) AM_READWRITE(soundlatch2_byte_r, soundlatch2_byte_w) ADDRESS_MAP_END /*** 68000 (main CPU) + variants for protection devices **********************/ diff --git a/src/mame/drivers/pitnrun.c b/src/mame/drivers/pitnrun.c index 003a2ad9eed..97d369154e3 100644 --- a/src/mame/drivers/pitnrun.c +++ b/src/mame/drivers/pitnrun.c @@ -105,7 +105,7 @@ static ADDRESS_MAP_START( pitnrun_map, AS_PROGRAM, 8, pitnrun_state ) AM_RANGE(0xb005, 0xb005) AM_WRITE(pitnrun_char_bank_select) AM_RANGE(0xb006, 0xb006) AM_WRITE(pitnrun_hflip_w) AM_RANGE(0xb007, 0xb007) AM_WRITE(pitnrun_vflip_w) - AM_RANGE(0xb800, 0xb800) AM_READ_PORT("INPUTS") AM_WRITE(soundlatch_w) + AM_RANGE(0xb800, 0xb800) AM_READ_PORT("INPUTS") AM_WRITE(soundlatch_byte_w) AM_RANGE(0xc800, 0xc801) AM_WRITE(pitnrun_scroll_w) AM_RANGE(0xc802, 0xc802) AM_WRITENOP/* VP(VF?)MCV - not used ?*/ AM_RANGE(0xc804, 0xc804) AM_WRITE(pitnrun_mcu_data_w) @@ -124,7 +124,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( pitnrun_sound_io_map, AS_IO, 8, pitnrun_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_WRITE(soundlatch_clear_w) + AM_RANGE(0x00, 0x00) AM_WRITE(soundlatch_clear_byte_w) AM_RANGE(0x8c, 0x8d) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) AM_RANGE(0x8e, 0x8f) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) AM_RANGE(0x8f, 0x8f) AM_DEVREAD_LEGACY("ay1", ay8910_r) @@ -216,8 +216,8 @@ static const ay8910_interface ay8910_config = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_NULL, DEVCB_NULL }; diff --git a/src/mame/drivers/plygonet.c b/src/mame/drivers/plygonet.c index 96364dd01cd..041fb1c2ec5 100644 --- a/src/mame/drivers/plygonet.c +++ b/src/mame/drivers/plygonet.c @@ -161,7 +161,7 @@ static INTERRUPT_GEN(polygonet_interrupt) /* sound CPU communications */ READ32_MEMBER(polygonet_state::sound_r) { - int latch = soundlatch3_r(space, 0); + int latch = soundlatch3_byte_r(space, 0); if ((latch == 0xd) || (latch == 0xe)) latch = 0xf; /* hack: until 54539 NMI disable found */ @@ -172,11 +172,11 @@ WRITE32_MEMBER(polygonet_state::sound_w) { if (ACCESSING_BITS_8_15) { - soundlatch_w(space, 0, (data>>8)&0xff); + soundlatch_byte_w(space, 0, (data>>8)&0xff); } else { - soundlatch2_w(space, 0, data&0xff); + soundlatch2_byte_w(space, 0, data&0xff); } } @@ -570,9 +570,9 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, polygonet_state ) AM_RANGE(0xe230, 0xe3ff) AM_RAM AM_RANGE(0xe400, 0xe62f) AM_DEVREADWRITE("konami2", k054539_device, read, write) AM_RANGE(0xe630, 0xe7ff) AM_RAM - AM_RANGE(0xf000, 0xf000) AM_WRITE(soundlatch3_w) - AM_RANGE(0xf002, 0xf002) AM_READ(soundlatch_r) - AM_RANGE(0xf003, 0xf003) AM_READ(soundlatch2_r) + AM_RANGE(0xf000, 0xf000) AM_WRITE(soundlatch3_byte_w) + AM_RANGE(0xf002, 0xf002) AM_READ(soundlatch_byte_r) + AM_RANGE(0xf003, 0xf003) AM_READ(soundlatch2_byte_r) AM_RANGE(0xf800, 0xf800) AM_WRITE(sound_bankswitch_w) AM_RANGE(0xfff1, 0xfff3) AM_WRITENOP ADDRESS_MAP_END diff --git a/src/mame/drivers/pokechmp.c b/src/mame/drivers/pokechmp.c index ef61165a4b9..d38e9a7ab45 100644 --- a/src/mame/drivers/pokechmp.c +++ b/src/mame/drivers/pokechmp.c @@ -87,7 +87,7 @@ WRITE8_MEMBER(pokechmp_state::pokechmp_sound_bank_w) WRITE8_MEMBER(pokechmp_state::pokechmp_sound_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -136,7 +136,7 @@ static ADDRESS_MAP_START( pokechmp_sound_map, AS_PROGRAM, 8, pokechmp_state ) AM_RANGE(0x1800, 0x1800) AM_WRITENOP /* MSM5205 chip on Pocket Gal, not connected here? */ // AM_RANGE(0x2000, 0x2000) AM_WRITE(pokechmp_sound_bank_w)/ * might still be sound bank */ AM_RANGE(0x2800, 0x2800) AM_DEVREADWRITE("oki", okim6295_device, read, write) // extra - AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_r) + AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) // AM_RANGE(0x3400, 0x3400) AM_READ_LEGACY(pokechmp_adpcm_reset_r) /* ? not sure */ AM_RANGE(0x4000, 0x7fff) AM_ROMBANK("bank3") AM_RANGE(0x8000, 0xffff) AM_ROM diff --git a/src/mame/drivers/poo.c b/src/mame/drivers/poo.c index c0e9d7a0315..6c12fec690c 100644 --- a/src/mame/drivers/poo.c +++ b/src/mame/drivers/poo.c @@ -142,7 +142,7 @@ WRITE8_MEMBER(poo_state::unk_w) /* soundlatch write */ WRITE8_MEMBER(poo_state::sound_cmd_w) { - soundlatch_w(space, 0, (data & 0xff)); + soundlatch_byte_w(space, 0, (data & 0xff)); cputag_set_input_line(machine(), "subcpu", 0, HOLD_LINE); } @@ -322,7 +322,7 @@ static const ay8910_interface ay8910_config = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_DRIVER_MEMBER(poo_state, timer_r), DEVCB_NULL, DEVCB_NULL diff --git a/src/mame/drivers/pooyan.c b/src/mame/drivers/pooyan.c index 7da909f8882..47d52b3219f 100644 --- a/src/mame/drivers/pooyan.c +++ b/src/mame/drivers/pooyan.c @@ -61,7 +61,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, pooyan_state ) AM_RANGE(0xa0c0, 0xa0c0) AM_MIRROR(0x5e1f) AM_READ_PORT("IN2") AM_RANGE(0xa0e0, 0xa0e0) AM_MIRROR(0x5e1f) AM_READ_PORT("DSW0") AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x5e7f) AM_WRITE(watchdog_reset_w) - AM_RANGE(0xa100, 0xa100) AM_MIRROR(0x5e7f) AM_WRITE(soundlatch_w) + AM_RANGE(0xa100, 0xa100) AM_MIRROR(0x5e7f) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xa180, 0xa180) AM_MIRROR(0x5e78) AM_WRITE(irq_enable_w) AM_RANGE(0xa181, 0xa181) AM_MIRROR(0x5e78) AM_WRITE_LEGACY(timeplt_sh_irqtrigger_w) AM_RANGE(0xa183, 0xa183) AM_MIRROR(0x5e78) AM_WRITENOP // ??? diff --git a/src/mame/drivers/portrait.c b/src/mame/drivers/portrait.c index 00b1a45f3dd..03845a691d5 100644 --- a/src/mame/drivers/portrait.c +++ b/src/mame/drivers/portrait.c @@ -122,7 +122,7 @@ static ADDRESS_MAP_START( portrait_map, AS_PROGRAM, 8, portrait_state ) AM_RANGE(0x8800, 0x8fff) AM_RAM_WRITE(portrait_fgvideo_write) AM_BASE(m_fgvideoram) AM_RANGE(0x9000, 0x91ff) AM_RAM AM_BASE_SIZE(m_spriteram, m_spriteram_size) AM_RANGE(0x9200, 0x97ff) AM_RAM - AM_RANGE(0xa000, 0xa000) AM_WRITE(soundlatch_w) + AM_RANGE(0xa000, 0xa000) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xa010, 0xa010) AM_WRITENOP // ? AM_RANGE(0xa000, 0xa000) AM_READ_PORT("DSW1") AM_RANGE(0xa004, 0xa004) AM_READ_PORT("DSW2") diff --git a/src/mame/drivers/powerins.c b/src/mame/drivers/powerins.c index f69d4146f25..2586d502c14 100644 --- a/src/mame/drivers/powerins.c +++ b/src/mame/drivers/powerins.c @@ -62,7 +62,7 @@ WRITE16_MEMBER(powerins_state::powerins_okibank_w) WRITE16_MEMBER(powerins_state::powerins_soundlatch_w) { if (ACCESSING_BITS_0_7) - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); } READ8_MEMBER(powerins_state::powerinb_fake_ym2203_r) @@ -114,7 +114,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( powerins_sound_map, AS_PROGRAM, 8, powerins_state ) AM_RANGE(0x0000, 0xbfff) AM_ROM AM_RANGE(0xc000, 0xdfff) AM_RAM - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) // AM_RANGE(0xe000, 0xe000) AM_WRITENOP // ? written only once ? // AM_RANGE(0xe001, 0xe001) AM_WRITENOP // ? ADDRESS_MAP_END diff --git a/src/mame/drivers/ppmast93.c b/src/mame/drivers/ppmast93.c index 661e0526efc..b3d8f759408 100644 --- a/src/mame/drivers/ppmast93.c +++ b/src/mame/drivers/ppmast93.c @@ -196,13 +196,13 @@ static ADDRESS_MAP_START( ppmast93_cpu1_io, AS_IO, 8, ppmast93_state ) AM_RANGE(0x06, 0x06) AM_READ_PORT("DSW1") AM_RANGE(0x08, 0x08) AM_READ_PORT("DSW2") - AM_RANGE(0x00, 0x00) AM_WRITE(soundlatch_w) + AM_RANGE(0x00, 0x00) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x04, 0x04) AM_WRITE(ppmast93_port4_w) ADDRESS_MAP_END static ADDRESS_MAP_START( ppmast93_cpu2_map, AS_PROGRAM, 8, ppmast93_state ) AM_RANGE(0x0000, 0xfbff) AM_ROM AM_REGION("sub", 0x10000) - AM_RANGE(0xfc00, 0xfc00) AM_READ(soundlatch_r) + AM_RANGE(0xfc00, 0xfc00) AM_READ(soundlatch_byte_r) AM_RANGE(0xfd00, 0xffff) AM_RAM ADDRESS_MAP_END diff --git a/src/mame/drivers/prehisle.c b/src/mame/drivers/prehisle.c index f2c8a12ae22..23eaccaf37d 100644 --- a/src/mame/drivers/prehisle.c +++ b/src/mame/drivers/prehisle.c @@ -19,7 +19,7 @@ WRITE16_MEMBER(prehisle_state::prehisle_sound16_w) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -54,7 +54,7 @@ static WRITE8_DEVICE_HANDLER( D7759_upd_reset_w ) static ADDRESS_MAP_START( prehisle_sound_map, AS_PROGRAM, 8, prehisle_state ) AM_RANGE(0x0000, 0xefff) AM_ROM AM_RANGE(0xf000, 0xf7ff) AM_RAM - AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_r) + AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_byte_r) AM_RANGE(0xf800, 0xf800) AM_WRITENOP // ??? ADDRESS_MAP_END diff --git a/src/mame/drivers/psychic5.c b/src/mame/drivers/psychic5.c index 6cb470da73b..1e5eed7fcde 100644 --- a/src/mame/drivers/psychic5.c +++ b/src/mame/drivers/psychic5.c @@ -411,7 +411,7 @@ static ADDRESS_MAP_START( psychic5_main_map, AS_PROGRAM, 8, psychic5_state ) AM_RANGE(0x8000, 0xbfff) AM_RAMBANK("bank1") AM_RANGE(0xc000, 0xdfff) AM_READWRITE(psychic5_paged_ram_r, psychic5_paged_ram_w) AM_RANGE(0xe000, 0xefff) AM_RAM - AM_RANGE(0xf000, 0xf000) AM_RAM_WRITE(soundlatch_w) + AM_RANGE(0xf000, 0xf000) AM_RAM_WRITE(soundlatch_byte_w) AM_RANGE(0xf001, 0xf001) AM_READNOP AM_WRITE(psychic5_coin_counter_w) AM_RANGE(0xf002, 0xf002) AM_READWRITE(psychic5_bankselect_r, psychic5_bankselect_w) AM_RANGE(0xf003, 0xf003) AM_READWRITE(psychic5_vram_page_select_r, psychic5_vram_page_select_w) @@ -425,7 +425,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( psychic5_sound_map, AS_PROGRAM, 8, psychic5_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0xc000, 0xc7ff) AM_RAM - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static ADDRESS_MAP_START( psychic5_soundport_map, AS_IO, 8, psychic5_state ) @@ -441,7 +441,7 @@ static ADDRESS_MAP_START( bombsa_main_map, AS_PROGRAM, 8, psychic5_state ) AM_RANGE(0xc000, 0xcfff) AM_RAM /* ports look like the other games */ - AM_RANGE(0xd000, 0xd000) AM_WRITE(soundlatch_w) // confirmed + AM_RANGE(0xd000, 0xd000) AM_WRITE(soundlatch_byte_w) // confirmed AM_RANGE(0xd001, 0xd001) AM_WRITE(bombsa_flipscreen_w) AM_RANGE(0xd002, 0xd002) AM_READWRITE(psychic5_bankselect_r, bombsa_bankselect_w) AM_RANGE(0xd003, 0xd003) AM_READWRITE(psychic5_vram_page_select_r, psychic5_vram_page_select_w) @@ -457,7 +457,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( bombsa_sound_map, AS_PROGRAM, 8, psychic5_state ) AM_RANGE(0x0000, 0xbfff) AM_ROM AM_RANGE(0xc000, 0xc7ff) AM_RAM - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) AM_RANGE(0xf000, 0xf000) AM_WRITEONLY // Is this a confirm of some sort? ADDRESS_MAP_END diff --git a/src/mame/drivers/pturn.c b/src/mame/drivers/pturn.c index 1dd7adf990c..9a974edc926 100644 --- a/src/mame/drivers/pturn.c +++ b/src/mame/drivers/pturn.c @@ -236,7 +236,7 @@ WRITE8_MEMBER(pturn_state::nmi_sub_enable_w) WRITE8_MEMBER(pturn_state::sound_w) { - soundlatch_w(space,0,data); + soundlatch_byte_w(space,0,data); } @@ -344,7 +344,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sub_map, AS_PROGRAM, 8, pturn_state ) AM_RANGE(0x0000, 0x0fff) AM_ROM AM_RANGE(0x2000, 0x23ff) AM_RAM - AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_r) AM_WRITE(nmi_sub_enable_w) + AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) AM_WRITE(nmi_sub_enable_w) AM_RANGE(0x4000, 0x4000) AM_RAM AM_RANGE(0x5000, 0x5001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) AM_RANGE(0x6000, 0x6001) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) @@ -478,7 +478,7 @@ static MACHINE_RESET( pturn ) { pturn_state *state = machine.driver_data<pturn_state>(); address_space *space = machine.device("maincpu")->memory().space(AS_PROGRAM); - state->soundlatch_clear_w(*space,0,0); + state->soundlatch_clear_byte_w(*space,0,0); } static MACHINE_CONFIG_START( pturn, pturn_state ) diff --git a/src/mame/drivers/punchout.c b/src/mame/drivers/punchout.c index 152df756a11..9b6e6339b3b 100644 --- a/src/mame/drivers/punchout.c +++ b/src/mame/drivers/punchout.c @@ -350,8 +350,8 @@ static ADDRESS_MAP_START( punchout_io_map, AS_IO, 8, punchout_state ) AM_RANGE(0x00, 0x00) AM_READ_PORT("IN0") AM_RANGE(0x01, 0x01) AM_READ_PORT("IN1") AM_RANGE(0x00, 0x01) AM_WRITENOP /* the 2A03 #1 is not present */ - AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW2") AM_WRITE(soundlatch_w) - AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW1") AM_WRITE(soundlatch2_w) + AM_RANGE(0x02, 0x02) AM_READ_PORT("DSW2") AM_WRITE(soundlatch_byte_w) + AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW1") AM_WRITE(soundlatch2_byte_w) AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("vlm", vlm5030_data_w) /* VLM5030 */ // AM_RANGE(0x05, 0x05) AM_WRITENOP /* unused */ // AM_RANGE(0x06, 0x06) AM_WRITENOP @@ -370,8 +370,8 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( punchout_sound_map, AS_PROGRAM, 8, punchout_state ) AM_RANGE(0x0000, 0x07ff) AM_RAM - AM_RANGE(0x4016, 0x4016) AM_READ(soundlatch_r) - AM_RANGE(0x4017, 0x4017) AM_READ(soundlatch2_r) + AM_RANGE(0x4016, 0x4016) AM_READ(soundlatch_byte_r) + AM_RANGE(0x4017, 0x4017) AM_READ(soundlatch2_byte_r) AM_RANGE(0x4000, 0x4017) AM_DEVREADWRITE_LEGACY("nes", nes_psg_r,nes_psg_w) AM_RANGE(0xe000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/pushman.c b/src/mame/drivers/pushman.c index be33fc96549..daed2e2c862 100644 --- a/src/mame/drivers/pushman.c +++ b/src/mame/drivers/pushman.c @@ -44,7 +44,7 @@ WRITE16_MEMBER(pushman_state::pushman_flipscreen_w) WRITE16_MEMBER(pushman_state::pushman_control_w) { if (ACCESSING_BITS_8_15) - soundlatch_w(space, 0, (data >> 8) & 0xff); + soundlatch_byte_w(space, 0, (data >> 8) & 0xff); } READ16_MEMBER(pushman_state::pushman_68705_r) @@ -166,7 +166,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, pushman_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0xc000, 0xc7ff) AM_RAM - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, pushman_state ) diff --git a/src/mame/drivers/quasar.c b/src/mame/drivers/quasar.c index 3e0f99def0f..9d04b423868 100644 --- a/src/mame/drivers/quasar.c +++ b/src/mame/drivers/quasar.c @@ -100,19 +100,19 @@ static WRITE8_HANDLER( quasar_sh_command_w ) // not necessarily like this, but it seems to work better than direct mapping // (although schematics has it as direct - but then the schematics are wrong elsewhere to!) quasar_state *state = space->machine().driver_data<quasar_state>(); - state->soundlatch_w(*space, 0, (data & 8) + ((data >> 1) & 3) + ((data << 2) & 4)); + state->soundlatch_byte_w(*space, 0, (data & 8) + ((data >> 1) & 3) + ((data << 2) & 4)); } static READ8_HANDLER( quasar_sh_command_r ) { quasar_state *state = space->machine().driver_data<quasar_state>(); - return state->soundlatch_r(*space, 0) + (input_port_read(space->machine(), "DSW2") & 0x30); + return state->soundlatch_byte_r(*space, 0) + (input_port_read(space->machine(), "DSW2") & 0x30); } static READ8_HANDLER( audio_t1_r ) { quasar_state *state = space->machine().driver_data<quasar_state>(); - return (state->soundlatch_r(*space, 0) == 0); + return (state->soundlatch_byte_r(*space, 0) == 0); } // memory map taken from the manual diff --git a/src/mame/drivers/quizpun2.c b/src/mame/drivers/quizpun2.c index ef2fbe4e99b..e8958f29d3f 100644 --- a/src/mame/drivers/quizpun2.c +++ b/src/mame/drivers/quizpun2.c @@ -352,7 +352,7 @@ WRITE8_MEMBER(quizpun2_state::quizpun2_irq_ack) WRITE8_MEMBER(quizpun2_state::quizpun2_soundlatch_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -393,7 +393,7 @@ static ADDRESS_MAP_START( quizpun2_sound_io_map, AS_IO, 8, quizpun2_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE( 0x00, 0x00 ) AM_WRITENOP // IRQ end AM_RANGE( 0x20, 0x20 ) AM_WRITENOP // NMI end - AM_RANGE( 0x40, 0x40 ) AM_READ(soundlatch_r ) + AM_RANGE( 0x40, 0x40 ) AM_READ(soundlatch_byte_r ) AM_RANGE( 0x60, 0x61 ) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w ) ADDRESS_MAP_END diff --git a/src/mame/drivers/r2dtank.c b/src/mame/drivers/r2dtank.c index a6c685cea52..8096a9fa53e 100644 --- a/src/mame/drivers/r2dtank.c +++ b/src/mame/drivers/r2dtank.c @@ -106,7 +106,7 @@ static WRITE_LINE_DEVICE_HANDLER( main_cpu_irq ) READ8_MEMBER(r2dtank_state::audio_command_r) { - UINT8 ret = soundlatch_r(space, 0); + UINT8 ret = soundlatch_byte_r(space, 0); if (LOG_AUDIO_COMM) logerror("%08X CPU#1 Audio Command Read: %x\n", cpu_get_pc(&space.device()), ret); @@ -116,7 +116,7 @@ if (LOG_AUDIO_COMM) logerror("%08X CPU#1 Audio Command Read: %x\n", cpu_get_pc WRITE8_MEMBER(r2dtank_state::audio_command_w) { - soundlatch_w(space, 0, ~data); + soundlatch_byte_w(space, 0, ~data); cputag_set_input_line(machine(), "audiocpu", M6800_IRQ_LINE, HOLD_LINE); if (LOG_AUDIO_COMM) logerror("%08X CPU#0 Audio Command Write: %x\n", cpu_get_pc(&space.device()), data^0xff); @@ -125,7 +125,7 @@ if (LOG_AUDIO_COMM) logerror("%08X CPU#0 Audio Command Write: %x\n", cpu_get_ READ8_MEMBER(r2dtank_state::audio_answer_r) { - UINT8 ret = soundlatch2_r(space, 0); + UINT8 ret = soundlatch2_byte_r(space, 0); if (LOG_AUDIO_COMM) logerror("%08X CPU#0 Audio Answer Read: %x\n", cpu_get_pc(&space.device()), ret); return ret; @@ -138,7 +138,7 @@ WRITE8_MEMBER(r2dtank_state::audio_answer_w) if (cpu_get_pc(&space.device()) == 0xfb12) data = 0x00; - soundlatch2_w(space, 0, data); + soundlatch2_byte_w(space, 0, data); cputag_set_input_line(machine(), "maincpu", M6809_IRQ_LINE, HOLD_LINE); if (LOG_AUDIO_COMM) logerror("%08X CPU#1 Audio Answer Write: %x\n", cpu_get_pc(&space.device()), data); diff --git a/src/mame/drivers/rallyx.c b/src/mame/drivers/rallyx.c index 91e7b94cd59..93bf17d378e 100644 --- a/src/mame/drivers/rallyx.c +++ b/src/mame/drivers/rallyx.c @@ -345,7 +345,7 @@ static ADDRESS_MAP_START( jungler_map, AS_PROGRAM, 8, rallyx_state ) AM_RANGE(0xa180, 0xa180) AM_READ_PORT("DSW2") AM_RANGE(0xa000, 0xa00f) AM_MIRROR(0x00f0) AM_WRITEONLY AM_BASE(m_radarattr) // jungler writes to a03x AM_RANGE(0xa080, 0xa080) AM_WRITE(watchdog_reset_w) - AM_RANGE(0xa100, 0xa100) AM_WRITE(soundlatch_w) + AM_RANGE(0xa100, 0xa100) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xa130, 0xa130) AM_WRITE(rallyx_scrollx_w) /* only jungler and tactcian */ AM_RANGE(0xa140, 0xa140) AM_WRITE(rallyx_scrolly_w) /* only jungler and tactcian */ AM_RANGE(0xa180, 0xa187) AM_WRITE(locomotn_latch_w) diff --git a/src/mame/drivers/renegade.c b/src/mame/drivers/renegade.c index 9ce6e112fbf..c7cfc3c428c 100644 --- a/src/mame/drivers/renegade.c +++ b/src/mame/drivers/renegade.c @@ -214,7 +214,7 @@ static WRITE8_DEVICE_HANDLER( adpcm_play_w ) WRITE8_MEMBER(renegade_state::sound_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); cputag_set_input_line(machine(), "audiocpu", M6809_IRQ_LINE, HOLD_LINE); } @@ -663,7 +663,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( renegade_sound_map, AS_PROGRAM, 8, renegade_state ) AM_RANGE(0x0000, 0x0fff) AM_RAM - AM_RANGE(0x1000, 0x1000) AM_READ(soundlatch_r) + AM_RANGE(0x1000, 0x1000) AM_READ(soundlatch_byte_r) AM_RANGE(0x1800, 0x1800) AM_WRITENOP // this gets written the same values as 0x2000 AM_RANGE(0x2000, 0x2000) AM_DEVWRITE_LEGACY("adpcm", adpcm_play_w) AM_RANGE(0x2800, 0x2801) AM_DEVREADWRITE_LEGACY("ymsnd", ym3526_r,ym3526_w) diff --git a/src/mame/drivers/retofinv.c b/src/mame/drivers/retofinv.c index 112dcbf6e5c..728973aeedb 100644 --- a/src/mame/drivers/retofinv.c +++ b/src/mame/drivers/retofinv.c @@ -65,7 +65,7 @@ READ8_MEMBER(retofinv_state::cpu0_mf800_r) WRITE8_MEMBER(retofinv_state::soundcommand_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE); } @@ -135,7 +135,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, retofinv_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM AM_RANGE(0x2000, 0x27ff) AM_RAM - AM_RANGE(0x4000, 0x4000) AM_READ(soundlatch_r) + AM_RANGE(0x4000, 0x4000) AM_READ(soundlatch_byte_r) AM_RANGE(0x6000, 0x6000) AM_WRITE(cpu2_m6000_w) AM_RANGE(0x8000, 0x8000) AM_DEVWRITE_LEGACY("sn1", sn76496_w) AM_RANGE(0xa000, 0xa000) AM_DEVWRITE_LEGACY("sn2", sn76496_w) diff --git a/src/mame/drivers/rockrage.c b/src/mame/drivers/rockrage.c index c83292fb348..ebf48be5948 100644 --- a/src/mame/drivers/rockrage.c +++ b/src/mame/drivers/rockrage.c @@ -78,7 +78,7 @@ WRITE8_MEMBER(rockrage_state::rockrage_bankswitch_w) WRITE8_MEMBER(rockrage_state::rockrage_sh_irqtrigger_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); device_set_input_line(m_audiocpu, M6809_IRQ_LINE, HOLD_LINE); } @@ -118,7 +118,7 @@ static ADDRESS_MAP_START( rockrage_sound_map, AS_PROGRAM, 8, rockrage_state ) AM_RANGE(0x2000, 0x2000) AM_DEVWRITE_LEGACY("vlm", vlm5030_data_w) /* VLM5030 */ AM_RANGE(0x3000, 0x3000) AM_DEVREAD_LEGACY("vlm", rockrage_VLM5030_busy_r) /* VLM5030 */ AM_RANGE(0x4000, 0x4000) AM_DEVWRITE_LEGACY("vlm", rockrage_speech_w) /* VLM5030 */ - AM_RANGE(0x5000, 0x5000) AM_READ(soundlatch_r) /* soundlatch_r */ + AM_RANGE(0x5000, 0x5000) AM_READ(soundlatch_byte_r) /* soundlatch_byte_r */ AM_RANGE(0x6000, 0x6001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r,ym2151_w) /* YM 2151 */ AM_RANGE(0x7000, 0x77ff) AM_RAM /* RAM */ AM_RANGE(0x8000, 0xffff) AM_ROM /* ROM */ diff --git a/src/mame/drivers/rocnrope.c b/src/mame/drivers/rocnrope.c index 7eaacdca19d..3a12f4d48a0 100644 --- a/src/mame/drivers/rocnrope.c +++ b/src/mame/drivers/rocnrope.c @@ -62,7 +62,7 @@ static ADDRESS_MAP_START( rocnrope_map, AS_PROGRAM, 8, rocnrope_state ) AM_RANGE(0x8083, 0x8083) AM_WRITENOP /* Coin counter 1 */ AM_RANGE(0x8084, 0x8084) AM_WRITENOP /* Coin counter 2 */ AM_RANGE(0x8087, 0x8087) AM_WRITE(irq_mask_w) - AM_RANGE(0x8100, 0x8100) AM_WRITE(soundlatch_w) + AM_RANGE(0x8100, 0x8100) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x8182, 0x818d) AM_WRITE(rocnrope_interrupt_vector_w) AM_RANGE(0x6000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/rohga.c b/src/mame/drivers/rohga.c index 9d6e3ef0b39..72ae6ec4828 100644 --- a/src/mame/drivers/rohga.c +++ b/src/mame/drivers/rohga.c @@ -266,7 +266,7 @@ static ADDRESS_MAP_START( rohga_sound_map, AS_PROGRAM, 8, rohga_state ) AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r,ym2151_w) AM_RANGE(0x120000, 0x120001) AM_DEVREADWRITE("oki1", okim6295_device, read, write) AM_RANGE(0x130000, 0x130001) AM_DEVREADWRITE("oki2", okim6295_device, read, write) - AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_r) + AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_byte_r) AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8") AM_RANGE(0x1fec00, 0x1fec01) AM_WRITE_LEGACY(h6280_timer_w) AM_RANGE(0x1ff400, 0x1ff403) AM_WRITE_LEGACY(h6280_irq_status_w) diff --git a/src/mame/drivers/rollrace.c b/src/mame/drivers/rollrace.c index 038553b253c..4911a740233 100644 --- a/src/mame/drivers/rollrace.c +++ b/src/mame/drivers/rollrace.c @@ -43,7 +43,7 @@ static ADDRESS_MAP_START( rollrace_map, AS_PROGRAM, 8, rollrace_state ) AM_RANGE(0xd900, 0xd900) AM_READWRITE(ra_fake_d800_r,ra_fake_d800_w) /* protection ??*/ AM_RANGE(0xe000, 0xe3ff) AM_RAM AM_BASE(m_videoram) AM_RANGE(0xe400, 0xe47f) AM_RAM AM_BASE(m_colorram) - AM_RANGE(0xe800, 0xe800) AM_WRITE(soundlatch_w) + AM_RANGE(0xe800, 0xe800) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xec00, 0xec0f) AM_NOP /* Analog sound effects ?? ec00 sound enable ?*/ AM_RANGE(0xf000, 0xf0ff) AM_RAM AM_BASE_SIZE(m_spriteram, m_spriteram_size) AM_RANGE(0xf400, 0xf400) AM_WRITE(rollrace_backgroundcolor_w) @@ -64,7 +64,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( rollrace_sound_map, AS_PROGRAM, 8, rollrace_state ) AM_RANGE(0x0000, 0x0fff) AM_ROM AM_RANGE(0x2000, 0x2fff) AM_RAM - AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_r) AM_WRITE(sound_nmi_mask_w) + AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) AM_WRITE(sound_nmi_mask_w) AM_RANGE(0x4000, 0x4001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) AM_RANGE(0x5000, 0x5001) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) AM_RANGE(0x6000, 0x6001) AM_DEVWRITE_LEGACY("ay3", ay8910_address_data_w) diff --git a/src/mame/drivers/roul.c b/src/mame/drivers/roul.c index 8c11bd5ed73..2c28b0da21f 100644 --- a/src/mame/drivers/roul.c +++ b/src/mame/drivers/roul.c @@ -166,7 +166,7 @@ WRITE8_MEMBER(roul_state::blitter_cmd_w) WRITE8_MEMBER(roul_state::sound_latch_w) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "soundcpu", 0, HOLD_LINE); } @@ -202,7 +202,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_cpu_io_map, AS_IO, 8, roul_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r) + AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r) AM_RANGE(0x00, 0x01) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/royalmah.c b/src/mame/drivers/royalmah.c index 3be95954eb5..06946c985f1 100644 --- a/src/mame/drivers/royalmah.c +++ b/src/mame/drivers/royalmah.c @@ -757,7 +757,7 @@ READ8_MEMBER(royalmah_state::jansou_6405_r) WRITE8_MEMBER(royalmah_state::jansou_sound_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -788,7 +788,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( jansou_sub_iomap, AS_IO, 8, royalmah_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r) AM_DEVWRITE_LEGACY("dac", dac_w ) + AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r) AM_DEVWRITE_LEGACY("dac", dac_w ) ADDRESS_MAP_END diff --git a/src/mame/drivers/rungun.c b/src/mame/drivers/rungun.c index ace3e0e3f0f..9f17260ed21 100644 --- a/src/mame/drivers/rungun.c +++ b/src/mame/drivers/rungun.c @@ -146,13 +146,13 @@ WRITE16_MEMBER(rungun_state::rng_sysregs_w) WRITE16_MEMBER(rungun_state::sound_cmd1_w) { if (ACCESSING_BITS_8_15) - soundlatch_w(space, 0, data >> 8); + soundlatch_byte_w(space, 0, data >> 8); } WRITE16_MEMBER(rungun_state::sound_cmd2_w) { if (ACCESSING_BITS_8_15) - soundlatch2_w(space, 0, data >> 8); + soundlatch2_byte_w(space, 0, data >> 8); } WRITE16_MEMBER(rungun_state::sound_irq_w) @@ -247,8 +247,8 @@ static ADDRESS_MAP_START( rungun_sound_map, AS_PROGRAM, 8, rungun_state ) AM_RANGE(0xe400, 0xe62f) AM_DEVREADWRITE("k054539_1", k054539_device, read, write) AM_RANGE(0xe630, 0xe7ff) AM_RAM AM_RANGE(0xf000, 0xf000) AM_WRITE(sound_status_w) - AM_RANGE(0xf002, 0xf002) AM_READ(soundlatch_r) - AM_RANGE(0xf003, 0xf003) AM_READ(soundlatch2_r) + AM_RANGE(0xf002, 0xf002) AM_READ(soundlatch_byte_r) + AM_RANGE(0xf003, 0xf003) AM_READ(soundlatch2_byte_r) AM_RANGE(0xf800, 0xf800) AM_WRITE(z80ctrl_w) AM_RANGE(0xfff0, 0xfff3) AM_WRITENOP ADDRESS_MAP_END diff --git a/src/mame/drivers/sandscrp.c b/src/mame/drivers/sandscrp.c index 05497711297..d248548776b 100644 --- a/src/mame/drivers/sandscrp.c +++ b/src/mame/drivers/sandscrp.c @@ -222,7 +222,7 @@ READ16_MEMBER(sandscrp_state::sandscrp_soundlatch_word_r) { m_latch2_full = 0; - return soundlatch2_r(space,0); + return soundlatch2_byte_r(space,0); } WRITE16_MEMBER(sandscrp_state::sandscrp_soundlatch_word_w) @@ -231,7 +231,7 @@ WRITE16_MEMBER(sandscrp_state::sandscrp_soundlatch_word_w) if (ACCESSING_BITS_0_7) { m_latch1_full = 1; - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); device_spin_until_time(&space.device(), attotime::from_usec(100)); // Allow the other cpu to reply } @@ -291,14 +291,14 @@ READ8_MEMBER(sandscrp_state::sandscrp_soundlatch_r) { m_latch1_full = 0; - return soundlatch_r(space,0); + return soundlatch_byte_r(space,0); } WRITE8_MEMBER(sandscrp_state::sandscrp_soundlatch_w) { m_latch2_full = 1; - soundlatch2_w(space,0,data); + soundlatch2_byte_w(space,0,data); } static ADDRESS_MAP_START( sandscrp_soundmem, AS_PROGRAM, 8, sandscrp_state ) diff --git a/src/mame/drivers/sauro.c b/src/mame/drivers/sauro.c index 3f2e45c5550..8db538d3c4a 100644 --- a/src/mame/drivers/sauro.c +++ b/src/mame/drivers/sauro.c @@ -131,13 +131,13 @@ Stephh's notes (based on the games Z80 code and some tests) : WRITE8_MEMBER(sauro_state::sauro_sound_command_w) { data |= 0x80; - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); } READ8_MEMBER(sauro_state::sauro_sound_command_r) { - int ret = soundlatch_r(space, offset); - soundlatch_clear_w(space, offset, 0); + int ret = soundlatch_byte_r(space, offset); + soundlatch_clear_byte_w(space, offset, 0); return ret; } diff --git a/src/mame/drivers/sbasketb.c b/src/mame/drivers/sbasketb.c index 1d2f9e82acb..83e8196da69 100644 --- a/src/mame/drivers/sbasketb.c +++ b/src/mame/drivers/sbasketb.c @@ -79,7 +79,7 @@ static ADDRESS_MAP_START( sbasketb_map, AS_PROGRAM, 8, sbasketb_state ) AM_RANGE(0x3c81, 0x3c81) AM_WRITE(irq_mask_w) AM_RANGE(0x3c83, 0x3c84) AM_WRITE(sbasketb_coin_counter_w) AM_RANGE(0x3c85, 0x3c85) AM_WRITEONLY AM_BASE(m_spriteram_select) - AM_RANGE(0x3d00, 0x3d00) AM_WRITE(soundlatch_w) + AM_RANGE(0x3d00, 0x3d00) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x3d80, 0x3d80) AM_WRITE(sbasketb_sh_irqtrigger_w) AM_RANGE(0x3e00, 0x3e00) AM_READ_PORT("SYSTEM") AM_RANGE(0x3e01, 0x3e01) AM_READ_PORT("P1") @@ -94,7 +94,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sbasketb_sound_map, AS_PROGRAM, 8, sbasketb_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM AM_RANGE(0x4000, 0x43ff) AM_RAM - AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_r) + AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) AM_RANGE(0x8000, 0x8000) AM_READ_LEGACY(hyperspt_sh_timer_r) AM_RANGE(0xa000, 0xa000) AM_DEVWRITE_LEGACY("vlm", vlm5030_data_w) /* speech data */ AM_RANGE(0xc000, 0xdfff) AM_DEVWRITE_LEGACY("vlm", hyperspt_sound_w) /* speech and output controll */ diff --git a/src/mame/drivers/scobra.c b/src/mame/drivers/scobra.c index 670649eb34d..877baae9737 100644 --- a/src/mame/drivers/scobra.c +++ b/src/mame/drivers/scobra.c @@ -89,7 +89,7 @@ static const ay8910_interface hustler_ay8910_interface = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_HANDLER(frogger_portB_r), DEVCB_NULL, DEVCB_NULL @@ -647,7 +647,7 @@ static const ay8910_interface scobra_ay8910_interface_2 = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_HANDLER(scramble_portB_r), DEVCB_NULL, DEVCB_NULL diff --git a/src/mame/drivers/scotrsht.c b/src/mame/drivers/scotrsht.c index 69def1e04fb..27fbfd99a23 100644 --- a/src/mame/drivers/scotrsht.c +++ b/src/mame/drivers/scotrsht.c @@ -56,7 +56,7 @@ static INTERRUPT_GEN( scotrsht_interrupt ) WRITE8_MEMBER(scotrsht_state::scotrsht_soundlatch_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE); } @@ -87,7 +87,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( scotrsht_sound_map, AS_PROGRAM, 8, scotrsht_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x4000, 0x43ff) AM_RAM - AM_RANGE(0x8000, 0x8000) AM_READ(soundlatch_r) + AM_RANGE(0x8000, 0x8000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static ADDRESS_MAP_START( scotrsht_sound_port, AS_IO, 8, scotrsht_state ) diff --git a/src/mame/drivers/scramble.c b/src/mame/drivers/scramble.c index 2f91dd1e870..740b84bde89 100644 --- a/src/mame/drivers/scramble.c +++ b/src/mame/drivers/scramble.c @@ -198,7 +198,7 @@ static ADDRESS_MAP_START( hotshock_map, AS_PROGRAM, 8, scramble_state ) AM_RANGE(0x6006, 0x6006) AM_WRITE(galaxold_gfxbank_w) AM_RANGE(0x6801, 0x6801) AM_WRITE(galaxold_nmi_enable_w) AM_RANGE(0x7000, 0x7000) AM_WRITE(watchdog_reset_w) - AM_RANGE(0x8000, 0x8000) AM_READ_PORT("IN0") AM_WRITE(soundlatch_w) + AM_RANGE(0x8000, 0x8000) AM_READ_PORT("IN0") AM_WRITE(soundlatch_byte_w) AM_RANGE(0x8001, 0x8001) AM_READ_PORT("IN1") AM_RANGE(0x8002, 0x8002) AM_READ_PORT("IN2") AM_RANGE(0x8003, 0x8003) AM_READ_PORT("IN3") @@ -264,7 +264,7 @@ static ADDRESS_MAP_START( ad2083_map, AS_PROGRAM, 8, scramble_state ) AM_RANGE(0x6805, 0x6805) AM_WRITE(galaxold_coin_counter_1_w) AM_RANGE(0x6806, 0x6806) AM_WRITE(scrambold_background_red_w) AM_RANGE(0x6807, 0x6807) AM_WRITE(scrambold_background_green_w) - AM_RANGE(0x8000, 0x8000) AM_WRITE(soundlatch_w) + AM_RANGE(0x8000, 0x8000) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x9000, 0x9000) AM_WRITE_LEGACY(hotshock_sh_irqtrigger_w) AM_RANGE(0x7000, 0x7000) AM_READ(watchdog_reset_r) AM_RANGE(0x8000, 0x8000) AM_READ_PORT("IN0") @@ -1152,7 +1152,7 @@ static const ay8910_interface scramble_ay8910_interface_2 = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_HANDLER(scramble_portB_r), DEVCB_NULL, DEVCB_NULL diff --git a/src/mame/drivers/segae.c b/src/mame/drivers/segae.c index df40ddfb1af..c4449b06ef0 100644 --- a/src/mame/drivers/segae.c +++ b/src/mame/drivers/segae.c @@ -442,25 +442,25 @@ void systeme_state::driver_start() memory_configure_bank(machine(), "bank1", 0, 16, machine().region("maincpu")->base() + 0x10000, 0x4000); - if ( !strcmp( m_system->name, "ridleofp" ) ) + if ( !strcmp( system().name, "ridleofp" ) ) { m_maincpu->memory().space(AS_IO)->install_read_handler(0xf8, 0xf8, read8_delegate(FUNC(systeme_state::ridleofp_port_f8_read), this)); m_maincpu->memory().space(AS_IO)->install_write_handler(0xfa, 0xfa, write8_delegate(FUNC(systeme_state::ridleofp_port_fa_write), this)); } - else if ( !strcmp( m_system->name, "hangonjr" ) ) + else if ( !strcmp( system().name, "hangonjr" ) ) { m_maincpu->memory().space(AS_IO)->install_read_handler(0xf8, 0xf8, read8_delegate(FUNC(systeme_state::hangonjr_port_f8_read), this)); m_maincpu->memory().space(AS_IO)->install_write_handler(0xfa, 0xfa, write8_delegate(FUNC(systeme_state::hangonjr_port_fa_write), this)); } - else if ( !strcmp( m_system->name, "opaopa" ) ) + else if ( !strcmp( system().name, "opaopa" ) ) { mc8123_decrypt_rom(machine(), "maincpu", "user1", "bank1", 8); } - else if ( !strcmp( m_system->name, "fantzn2" ) ) + else if ( !strcmp( system().name, "fantzn2" ) ) { mc8123_decrypt_rom(machine(), "maincpu", "user1", NULL, 0); } - else if ( !strcmp( m_system->name, "astrofl" ) ) + else if ( !strcmp( system().name, "astrofl" ) ) { sega_315_5177_decode(machine(), "maincpu"); } diff --git a/src/mame/drivers/segag80r.c b/src/mame/drivers/segag80r.c index e716356ad8c..87e2ddb2f8a 100644 --- a/src/mame/drivers/segag80r.c +++ b/src/mame/drivers/segag80r.c @@ -287,7 +287,7 @@ static WRITE8_DEVICE_HANDLER( sindbadm_soundport_w ) { segag80r_state *state = device->machine().driver_data<segag80r_state>(); address_space *space = device->machine().device("maincpu")->memory().space(AS_PROGRAM); - state->soundlatch_w(*space, 0, data); + state->soundlatch_byte_w(*space, 0, data); cputag_set_input_line(device->machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); device->machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(50)); } @@ -383,7 +383,7 @@ static ADDRESS_MAP_START( sindbadm_sound_map, AS_PROGRAM, 8, segag80r_state ) AM_RANGE(0x8000, 0x87ff) AM_MIRROR(0x1800) AM_RAM AM_RANGE(0xa000, 0xa003) AM_MIRROR(0x1ffc) AM_DEVWRITE_LEGACY("sn1", sindbadm_SN76496_w) AM_RANGE(0xc000, 0xc003) AM_MIRROR(0x1ffc) AM_DEVWRITE_LEGACY("sn2", sindbadm_SN76496_w) - AM_RANGE(0xe000, 0xe000) AM_MIRROR(0x1fff) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe000) AM_MIRROR(0x1fff) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/segahang.c b/src/mame/drivers/segahang.c index 14f00d73ff2..98f5207cb24 100644 --- a/src/mame/drivers/segahang.c +++ b/src/mame/drivers/segahang.c @@ -290,7 +290,7 @@ static WRITE8_DEVICE_HANDLER( sound_latch_w ) { segas1x_state *state = device->machine().driver_data<segas1x_state>(); address_space *space = state->m_maincpu->memory().space(AS_PROGRAM); - state->soundlatch_w(*space, offset, data); + state->soundlatch_byte_w(*space, offset, data); } @@ -417,7 +417,7 @@ static READ8_HANDLER( sound_data_r ) /* assert ACK */ ppi8255_set_port_c(state->m_ppi8255_1, 0x00); - return state->soundlatch_r(*space, offset); + return state->soundlatch_byte_r(*space, offset); } diff --git a/src/mame/drivers/segaorun.c b/src/mame/drivers/segaorun.c index 6bdf97cce6a..652ee4d2228 100644 --- a/src/mame/drivers/segaorun.c +++ b/src/mame/drivers/segaorun.c @@ -369,7 +369,7 @@ static TIMER_CALLBACK( delayed_sound_data_w ) { segas1x_state *state = machine.driver_data<segas1x_state>(); address_space *space = state->m_maincpu->memory().space(AS_PROGRAM); - state->soundlatch_w(*space, 0, param); + state->soundlatch_byte_w(*space, 0, param); device_set_input_line(state->m_soundcpu, INPUT_LINE_NMI, ASSERT_LINE); } @@ -385,7 +385,7 @@ static READ8_HANDLER( sound_data_r ) segas1x_state *state = space->machine().driver_data<segas1x_state>(); device_set_input_line(state->m_soundcpu, INPUT_LINE_NMI, CLEAR_LINE); - return state->soundlatch_r(*space, offset); + return state->soundlatch_byte_r(*space, offset); } diff --git a/src/mame/drivers/segas16a.c b/src/mame/drivers/segas16a.c index bc4bed3329c..e6d61467187 100644 --- a/src/mame/drivers/segas16a.c +++ b/src/mame/drivers/segas16a.c @@ -194,7 +194,7 @@ static const ppi8255_interface single_ppi_intf = DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_w), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_w), DEVCB_HANDLER(video_control_w), DEVCB_HANDLER(tilemap_sound_w) }; @@ -433,7 +433,7 @@ static READ8_HANDLER( sound_data_r ) /* assert ACK */ ppi8255_set_port_c(state->m_ppi8255, 0x00); - return state->soundlatch_r(*space, offset); + return state->soundlatch_byte_r(*space, offset); } diff --git a/src/mame/drivers/segas16b.c b/src/mame/drivers/segas16b.c index d98eb5c0372..5f9c609a77c 100644 --- a/src/mame/drivers/segas16b.c +++ b/src/mame/drivers/segas16b.c @@ -1030,7 +1030,7 @@ static void sound_w(running_machine &machine, UINT8 data) if (state->m_soundcpu != NULL) { address_space *space = state->m_maincpu->memory().space(AS_PROGRAM); - state->soundlatch_w(*space, 0, data & 0xff); + state->soundlatch_byte_w(*space, 0, data & 0xff); device_set_input_line(state->m_soundcpu, 0, HOLD_LINE); } } @@ -1854,7 +1854,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, segas1x_state ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0xdfff) AM_ROMBANK("bank1") - AM_RANGE(0xe800, 0xe800) AM_READ(soundlatch_r) + AM_RANGE(0xe800, 0xe800) AM_READ(soundlatch_byte_r) AM_RANGE(0xf800, 0xffff) AM_RAM ADDRESS_MAP_END @@ -1864,7 +1864,7 @@ static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, segas1x_state ) AM_RANGE(0x00, 0x01) AM_MIRROR(0x3e) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0x40, 0x40) AM_MIRROR(0x3f) AM_DEVWRITE_LEGACY("upd", upd7759_control_w) AM_RANGE(0x80, 0x80) AM_MIRROR(0x3f) AM_DEVREADWRITE_LEGACY("upd", upd7759_status_r, upd7759_port_w) - AM_RANGE(0xc0, 0xc0) AM_MIRROR(0x3f) AM_READ(soundlatch_r) + AM_RANGE(0xc0, 0xc0) AM_MIRROR(0x3f) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/segas18.c b/src/mame/drivers/segas18.c index 49ca96c7c35..8faa3154ff2 100644 --- a/src/mame/drivers/segas18.c +++ b/src/mame/drivers/segas18.c @@ -142,7 +142,7 @@ static void sound_w(running_machine &machine, UINT8 data) segas1x_state *state = machine.driver_data<segas1x_state>(); address_space *space = state->m_maincpu->memory().space(AS_PROGRAM); - state->soundlatch_w(*space, 0, data & 0xff); + state->soundlatch_byte_w(*space, 0, data & 0xff); device_set_input_line(state->m_soundcpu, INPUT_LINE_NMI, PULSE_LINE); } @@ -634,7 +634,7 @@ static ADDRESS_MAP_START( sound_portmap, AS_IO, 8, segas1x_state ) AM_RANGE(0x80, 0x83) AM_MIRROR(0x0c) AM_DEVREADWRITE_LEGACY("ym1", ym3438_r, ym3438_w) AM_RANGE(0x90, 0x93) AM_MIRROR(0x0c) AM_DEVREADWRITE_LEGACY("ym2", ym3438_r, ym3438_w) AM_RANGE(0xa0, 0xa0) AM_MIRROR(0x1f) AM_WRITE_LEGACY(soundbank_w) - AM_RANGE(0xc0, 0xc0) AM_MIRROR(0x1f) AM_READ(soundlatch_r) AM_WRITE_LEGACY(mcu_data_w) + AM_RANGE(0xc0, 0xc0) AM_MIRROR(0x1f) AM_READ(soundlatch_byte_r) AM_WRITE_LEGACY(mcu_data_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/segaxbd.c b/src/mame/drivers/segaxbd.c index bbbe03c772b..0cf4e1e522a 100644 --- a/src/mame/drivers/segaxbd.c +++ b/src/mame/drivers/segaxbd.c @@ -379,7 +379,7 @@ static TIMER_CALLBACK( delayed_sound_data_w ) segas1x_state *state = machine.driver_data<segas1x_state>(); address_space *space = state->m_maincpu->memory().space(AS_PROGRAM); - state->soundlatch_w(*space, 0, param); + state->soundlatch_byte_w(*space, 0, param); device_set_input_line(state->m_soundcpu, INPUT_LINE_NMI, ASSERT_LINE); } @@ -403,7 +403,7 @@ static READ8_HANDLER( sound_data_r ) segas1x_state *state = space->machine().driver_data<segas1x_state>(); device_set_input_line(state->m_soundcpu, INPUT_LINE_NMI, CLEAR_LINE); - return state->soundlatch_r(*space, offset); + return state->soundlatch_byte_r(*space, offset); } diff --git a/src/mame/drivers/segaybd.c b/src/mame/drivers/segaybd.c index fcb2b6f87c0..47fcb0f8542 100644 --- a/src/mame/drivers/segaybd.c +++ b/src/mame/drivers/segaybd.c @@ -238,7 +238,7 @@ static TIMER_CALLBACK( delayed_sound_data_w ) segas1x_state *state = machine.driver_data<segas1x_state>(); address_space *space = state->m_maincpu->memory().space(AS_PROGRAM); - state->soundlatch_w(*space, 0, param); + state->soundlatch_byte_w(*space, 0, param); device_set_input_line(state->m_soundcpu, INPUT_LINE_NMI, ASSERT_LINE); } @@ -254,7 +254,7 @@ static READ8_HANDLER( sound_data_r ) { segas1x_state *state = space->machine().driver_data<segas1x_state>(); device_set_input_line(state->m_soundcpu, INPUT_LINE_NMI, CLEAR_LINE); - return state->soundlatch_r(*space, offset); + return state->soundlatch_byte_r(*space, offset); } diff --git a/src/mame/drivers/seta.c b/src/mame/drivers/seta.c index cecc440a3ce..74f80575255 100644 --- a/src/mame/drivers/seta.c +++ b/src/mame/drivers/seta.c @@ -1508,11 +1508,11 @@ static WRITE16_HANDLER( sub_ctrl_w ) break; case 4/2: // not sure - if (ACCESSING_BITS_0_7) state->soundlatch_w(*space, 0, data & 0xff); + if (ACCESSING_BITS_0_7) state->soundlatch_byte_w(*space, 0, data & 0xff); break; case 6/2: // not sure - if (ACCESSING_BITS_0_7) state->soundlatch2_w(*space, 0, data & 0xff); + if (ACCESSING_BITS_0_7) state->soundlatch2_byte_w(*space, 0, data & 0xff); break; } @@ -2759,7 +2759,7 @@ static WRITE16_HANDLER( utoukond_soundlatch_w ) if (ACCESSING_BITS_0_7) { cputag_set_input_line(space->machine(), "audiocpu", 0, HOLD_LINE); - state->soundlatch_w(*space, 0, data & 0xff); + state->soundlatch_byte_w(*space, 0, data & 0xff); } } @@ -3024,8 +3024,8 @@ static READ8_HANDLER( ff_r ) {return 0xff;} static ADDRESS_MAP_START( tndrcade_sub_map, AS_PROGRAM, 8, seta_state ) AM_RANGE(0x0000, 0x01ff) AM_RAM // RAM AM_RANGE(0x0800, 0x0800) AM_READ_LEGACY(ff_r) // ? (bits 0/1/2/3: 1 -> do test 0-ff/100-1e0/5001-57ff/banked rom) - //AM_RANGE(0x0800, 0x0800) AM_READ(soundlatch_r) // - //AM_RANGE(0x0801, 0x0801) AM_READ(soundlatch2_r) // + //AM_RANGE(0x0800, 0x0800) AM_READ(soundlatch_byte_r) // + //AM_RANGE(0x0801, 0x0801) AM_READ(soundlatch2_byte_r) // AM_RANGE(0x1000, 0x1000) AM_READ_PORT("P1") // P1 AM_RANGE(0x1000, 0x1000) AM_WRITE_LEGACY(sub_bankswitch_lockout_w) // ROM Bank + Coin Lockout AM_RANGE(0x1001, 0x1001) AM_READ_PORT("P2") // P2 @@ -3045,8 +3045,8 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( twineagl_sub_map, AS_PROGRAM, 8, seta_state ) AM_RANGE(0x0000, 0x01ff) AM_RAM // RAM - AM_RANGE(0x0800, 0x0800) AM_READ(soundlatch_r) // - AM_RANGE(0x0801, 0x0801) AM_READ(soundlatch2_r) // + AM_RANGE(0x0800, 0x0800) AM_READ(soundlatch_byte_r) // + AM_RANGE(0x0801, 0x0801) AM_READ(soundlatch2_byte_r) // AM_RANGE(0x1000, 0x1000) AM_READ_PORT("P1") // P1 AM_RANGE(0x1000, 0x1000) AM_WRITE_LEGACY(sub_bankswitch_lockout_w) // ROM Bank + Coin Lockout AM_RANGE(0x1001, 0x1001) AM_READ_PORT("P2") // P2 @@ -3087,8 +3087,8 @@ static READ8_HANDLER( downtown_ip_r ) static ADDRESS_MAP_START( downtown_sub_map, AS_PROGRAM, 8, seta_state ) AM_RANGE(0x0000, 0x01ff) AM_RAM // RAM - AM_RANGE(0x0800, 0x0800) AM_READ(soundlatch_r) // - AM_RANGE(0x0801, 0x0801) AM_READ(soundlatch2_r) // + AM_RANGE(0x0800, 0x0800) AM_READ(soundlatch_byte_r) // + AM_RANGE(0x0801, 0x0801) AM_READ(soundlatch2_byte_r) // AM_RANGE(0x1000, 0x1007) AM_READ_LEGACY(downtown_ip_r) // Input Ports AM_RANGE(0x1000, 0x1000) AM_WRITE_LEGACY(sub_bankswitch_lockout_w) // ROM Bank + Coin Lockout AM_RANGE(0x5000, 0x57ff) AM_RAM AM_BASE(m_sharedram) // Shared RAM @@ -3111,13 +3111,13 @@ static MACHINE_RESET(calibr50) static WRITE8_HANDLER( calibr50_soundlatch2_w ) { seta_state *state = space->machine().driver_data<seta_state>(); - state->soundlatch2_w(*space,0,data); + state->soundlatch2_byte_w(*space,0,data); device_spin_until_time(&space->device(), attotime::from_usec(50)); // Allow the other cpu to reply } static ADDRESS_MAP_START( calibr50_sub_map, AS_PROGRAM, 8, seta_state ) AM_RANGE(0x0000, 0x1fff) AM_DEVREADWRITE_LEGACY("x1snd", seta_sound_r,seta_sound_w) // Sound - AM_RANGE(0x4000, 0x4000) AM_READ(soundlatch_r) // From Main CPU + AM_RANGE(0x4000, 0x4000) AM_READ(soundlatch_byte_r) // From Main CPU AM_RANGE(0x4000, 0x4000) AM_WRITE_LEGACY(sub_bankswitch_w) // Bankswitching AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1") // Banked ROM AM_RANGE(0xc000, 0xffff) AM_ROM // ROM @@ -3131,8 +3131,8 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( metafox_sub_map, AS_PROGRAM, 8, seta_state ) AM_RANGE(0x0000, 0x01ff) AM_RAM // RAM - AM_RANGE(0x0800, 0x0800) AM_READ(soundlatch_r) // - AM_RANGE(0x0801, 0x0801) AM_READ(soundlatch2_r) // + AM_RANGE(0x0800, 0x0800) AM_READ(soundlatch_byte_r) // + AM_RANGE(0x0801, 0x0801) AM_READ(soundlatch2_byte_r) // AM_RANGE(0x1000, 0x1000) AM_READ_PORT("COINS") // Coins AM_RANGE(0x1000, 0x1000) AM_WRITE_LEGACY(sub_bankswitch_lockout_w) // ROM Bank + Coin Lockout AM_RANGE(0x1002, 0x1002) AM_READ_PORT("P1") // P1 @@ -3159,7 +3159,7 @@ static ADDRESS_MAP_START( utoukond_sound_io_map, AS_IO, 8, seta_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x03) AM_DEVREADWRITE_LEGACY("ymsnd", ym3438_r, ym3438_w) AM_RANGE(0x80, 0x80) AM_WRITENOP //? - AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_r) + AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END @@ -8569,7 +8569,7 @@ static ADDRESS_MAP_START( thunderlbl_sound_map, AS_PROGRAM, 8, seta_state ) ADDRESS_MAP_UNMAP_HIGH AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0xdfff) AM_ROM//ROMBANK("bank1") - AM_RANGE(0xe800, 0xe800) AM_READ(soundlatch_r) + AM_RANGE(0xe800, 0xe800) AM_READ(soundlatch_byte_r) AM_RANGE(0xf800, 0xffff) AM_RAM ADDRESS_MAP_END @@ -8579,7 +8579,7 @@ static ADDRESS_MAP_START( thunderlbl_sound_portmap, AS_IO, 8, seta_state ) AM_RANGE(0x00, 0x01) AM_MIRROR(0x3e) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) //AM_RANGE(0x40, 0x40) AM_MIRROR(0x3f) AM_DEVWRITE_LEGACY("upd", upd7759_control_w) //AM_RANGE(0x80, 0x80) AM_MIRROR(0x3f) AM_DEVREADWRITE_LEGACY("upd", upd7759_status_r, upd7759_port_w) - AM_RANGE(0xc0, 0xc0) AM_MIRROR(0x3f) AM_READ(soundlatch_r) + AM_RANGE(0xc0, 0xc0) AM_MIRROR(0x3f) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/sf.c b/src/mame/drivers/sf.c index 4a4f56d317c..5303628a589 100644 --- a/src/mame/drivers/sf.c +++ b/src/mame/drivers/sf.c @@ -44,7 +44,7 @@ WRITE16_MEMBER(sf_state::soundcmd_w) if (ACCESSING_BITS_0_7) { - soundlatch_w(space, offset, data & 0xff); + soundlatch_byte_w(space, offset, data & 0xff); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } } @@ -257,7 +257,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, sf_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0xc000, 0xc7ff) AM_RAM - AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_r) + AM_RANGE(0xc800, 0xc800) AM_READ(soundlatch_byte_r) AM_RANGE(0xe000, 0xe001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r,ym2151_w) ADDRESS_MAP_END @@ -272,7 +272,7 @@ static ADDRESS_MAP_START( sound2_io_map, AS_IO, 8, sf_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x00) AM_DEVWRITE_LEGACY("msm1", msm5205_w) AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("msm2", msm5205_w) - AM_RANGE(0x01, 0x01) AM_READ(soundlatch_r) + AM_RANGE(0x01, 0x01) AM_READ(soundlatch_byte_r) AM_RANGE(0x02, 0x02) AM_WRITE(sound2_bank_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/sfkick.c b/src/mame/drivers/sfkick.c index f64068deb50..2403b37f579 100644 --- a/src/mame/drivers/sfkick.c +++ b/src/mame/drivers/sfkick.c @@ -332,7 +332,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sfkick_io_map, AS_IO, 8, sfkick_state ) ADDRESS_MAP_UNMAP_HIGH ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE( 0xa0, 0xa7) AM_WRITE(soundlatch_w ) + AM_RANGE( 0xa0, 0xa7) AM_WRITE(soundlatch_byte_w ) AM_RANGE( 0x98, 0x9b) AM_DEVREADWRITE( "v9938", v9938_device, read, write) AM_RANGE( 0xa8, 0xab) AM_DEVREADWRITE_LEGACY("ppi8255", ppi8255_r, ppi8255_w) AM_RANGE( 0xb4, 0xb5) AM_RAM /* loopback ? req by sfkicka (MSX Bios leftover)*/ @@ -345,7 +345,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sfkick_sound_io_map, AS_IO, 8, sfkick_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r) + AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r) AM_RANGE(0x04, 0x05) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/shadfrce.c b/src/mame/drivers/shadfrce.c index a0d18443ba9..9946ab48bca 100644 --- a/src/mame/drivers/shadfrce.c +++ b/src/mame/drivers/shadfrce.c @@ -262,7 +262,7 @@ WRITE16_MEMBER(shadfrce_state::shadfrce_sound_brt_w) { if (ACCESSING_BITS_8_15) { - soundlatch_w(space, 1, data >> 8); + soundlatch_byte_w(space, 1, data >> 8); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE ); } else @@ -401,7 +401,7 @@ static ADDRESS_MAP_START( shadfrce_sound_map, AS_PROGRAM, 8, shadfrce_state ) AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_RANGE(0xc800, 0xc801) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0xd800, 0xd800) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) AM_RANGE(0xe800, 0xe800) AM_DEVWRITE_LEGACY("oki", oki_bankswitch_w) AM_RANGE(0xf000, 0xffff) AM_RAM ADDRESS_MAP_END diff --git a/src/mame/drivers/shangha3.c b/src/mame/drivers/shangha3.c index be6dcc7b0b1..10562569adf 100644 --- a/src/mame/drivers/shangha3.c +++ b/src/mame/drivers/shangha3.c @@ -109,7 +109,7 @@ WRITE16_MEMBER(shangha3_state::heberpop_sound_command_w) { if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line_and_vector(machine(), "audiocpu", 0, HOLD_LINE, 0xff); /* RST 38h */ } } @@ -176,7 +176,7 @@ static ADDRESS_MAP_START( heberpop_sound_io_map, AS_IO, 8, shangha3_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x03) AM_DEVREADWRITE_LEGACY("ymsnd", ym3438_r, ym3438_w) AM_RANGE(0x80, 0x80) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_r) + AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/shisen.c b/src/mame/drivers/shisen.c index 1125c30da9a..fc27733c4c7 100644 --- a/src/mame/drivers/shisen.c +++ b/src/mame/drivers/shisen.c @@ -67,7 +67,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( shisen_sound_io_map, AS_IO, 8, shisen_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) - AM_RANGE(0x80, 0x80) AM_READ(soundlatch_r) + AM_RANGE(0x80, 0x80) AM_READ(soundlatch_byte_r) AM_RANGE(0x80, 0x81) AM_DEVWRITE_LEGACY("m72", shisen_sample_addr_w) AM_RANGE(0x82, 0x82) AM_DEVWRITE_LEGACY("m72", m72_sample_w) AM_RANGE(0x83, 0x83) AM_DEVWRITE_LEGACY("m72", m72_sound_irq_ack_w) diff --git a/src/mame/drivers/shootout.c b/src/mame/drivers/shootout.c index 04e49015cbe..3a000335572 100644 --- a/src/mame/drivers/shootout.c +++ b/src/mame/drivers/shootout.c @@ -48,7 +48,7 @@ WRITE8_MEMBER(shootout_state::shootout_bankswitch_w) WRITE8_MEMBER(shootout_state::sound_cpu_command_w) { - soundlatch_w( space, offset, data ); + soundlatch_byte_w( space, offset, data ); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE ); } @@ -99,7 +99,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( shootout_sound_map, AS_PROGRAM, 8, shootout_state ) AM_RANGE(0x0000, 0x07ff) AM_RAM AM_RANGE(0x4000, 0x4001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r,ym2203_w) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) AM_RANGE(0xc000, 0xffff) AM_ROM AM_RANGE(0xd000, 0xd000) AM_WRITENOP // unknown, NOT irq/nmi mask ADDRESS_MAP_END diff --git a/src/mame/drivers/sidearms.c b/src/mame/drivers/sidearms.c index 526fe2eccb5..94e9b5397b4 100644 --- a/src/mame/drivers/sidearms.c +++ b/src/mame/drivers/sidearms.c @@ -74,7 +74,7 @@ static ADDRESS_MAP_START( sidearms_map, AS_PROGRAM, 8, sidearms_state ) AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1") AM_RANGE(0xc000, 0xc3ff) AM_RAM_WRITE(paletteram_xxxxBBBBRRRRGGGG_byte_split_lo_w) AM_SHARE("paletteram") AM_RANGE(0xc400, 0xc7ff) AM_RAM_WRITE(paletteram_xxxxBBBBRRRRGGGG_byte_split_hi_w) AM_SHARE("paletteram2") - AM_RANGE(0xc800, 0xc800) AM_READ_PORT("SYSTEM") AM_WRITE(soundlatch_w) + AM_RANGE(0xc800, 0xc800) AM_READ_PORT("SYSTEM") AM_WRITE(soundlatch_byte_w) AM_RANGE(0xc801, 0xc801) AM_READ_PORT("P1") AM_WRITE(sidearms_bankswitch_w) AM_RANGE(0xc802, 0xc802) AM_READ_PORT("P2") AM_WRITE(watchdog_reset_w) AM_RANGE(0xc803, 0xc803) AM_READ_PORT("DSW0") @@ -98,7 +98,7 @@ static ADDRESS_MAP_START( turtship_map, AS_PROGRAM, 8, sidearms_state ) AM_RANGE(0xe000, 0xe3ff) AM_RAM_WRITE(paletteram_xxxxBBBBRRRRGGGG_byte_split_lo_w) AM_SHARE("paletteram") AM_RANGE(0xe400, 0xe7ff) AM_RAM_WRITE(paletteram_xxxxBBBBRRRRGGGG_byte_split_hi_w) AM_SHARE("paletteram2") AM_RANGE(0xe800, 0xe807) AM_READ(turtship_ports_r) - AM_RANGE(0xe800, 0xe800) AM_WRITE(soundlatch_w) + AM_RANGE(0xe800, 0xe800) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xe801, 0xe801) AM_WRITE(sidearms_bankswitch_w) AM_RANGE(0xe802, 0xe802) AM_WRITE(watchdog_reset_w) AM_RANGE(0xe804, 0xe804) AM_WRITE(sidearms_c804_w) @@ -114,7 +114,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sidearms_sound_map, AS_PROGRAM, 8, sidearms_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0xc000, 0xc7ff) AM_RAM - AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_r) + AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_byte_r) AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r,ym2203_w) AM_RANGE(0xf002, 0xf003) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r,ym2203_w) ADDRESS_MAP_END @@ -144,7 +144,7 @@ static ADDRESS_MAP_START( whizz_map, AS_PROGRAM, 8, sidearms_state ) AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1") AM_RANGE(0xc000, 0xc3ff) AM_RAM_WRITE(paletteram_xxxxBBBBRRRRGGGG_byte_split_lo_w) AM_SHARE("paletteram") AM_RANGE(0xc400, 0xc7ff) AM_RAM_WRITE(paletteram_xxxxBBBBRRRRGGGG_byte_split_hi_w) AM_SHARE("paletteram2") - AM_RANGE(0xc800, 0xc800) AM_READ_PORT("DSW0") AM_WRITE(soundlatch_w) + AM_RANGE(0xc800, 0xc800) AM_READ_PORT("DSW0") AM_WRITE(soundlatch_byte_w) AM_RANGE(0xc801, 0xc801) AM_READ_PORT("DSW1") AM_WRITE(whizz_bankswitch_w) AM_RANGE(0xc802, 0xc802) AM_READ_PORT("DSW2") AM_WRITE(watchdog_reset_w) AM_RANGE(0xc803, 0xc803) AM_READ_PORT("IN0") AM_WRITENOP @@ -172,7 +172,7 @@ static ADDRESS_MAP_START( whizz_io_map, AS_IO, 8, sidearms_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0x40, 0x40) AM_WRITENOP - AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_r) + AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/sidepckt.c b/src/mame/drivers/sidepckt.c index 96ed88fc308..ec528383719 100644 --- a/src/mame/drivers/sidepckt.c +++ b/src/mame/drivers/sidepckt.c @@ -133,7 +133,7 @@ Stephh's notes (based on the games M6809 code and some tests) : WRITE8_MEMBER(sidepckt_state::sound_cpu_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -247,7 +247,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, sidepckt_state ) AM_RANGE(0x0000, 0x0fff) AM_RAM AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym1", ym2203_w) AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ym2", ym3526_w) - AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_r) + AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/skyfox.c b/src/mame/drivers/skyfox.c index 2bd1f5155e5..f9715877726 100644 --- a/src/mame/drivers/skyfox.c +++ b/src/mame/drivers/skyfox.c @@ -70,7 +70,7 @@ static ADDRESS_MAP_START( skyfox_sound_map, AS_PROGRAM, 8, skyfox_state ) AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r,ym2203_w) // YM2203 #1 // AM_RANGE(0xb000, 0xb001) AM_WRITENOP // ?? AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r,ym2203_w) // YM2203 #2 - AM_RANGE(0xb000, 0xb000) AM_READ(soundlatch_r) // From Main CPU + AM_RANGE(0xb000, 0xb000) AM_READ(soundlatch_byte_r) // From Main CPU ADDRESS_MAP_END diff --git a/src/mame/drivers/sliver.c b/src/mame/drivers/sliver.c index 30e9cfe0d77..cab51ac93fa 100644 --- a/src/mame/drivers/sliver.c +++ b/src/mame/drivers/sliver.c @@ -313,7 +313,7 @@ WRITE16_MEMBER(sliver_state::io_data_w) WRITE16_MEMBER(sliver_state::sound_w) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "audiocpu", MCS51_INT0_LINE, HOLD_LINE); } @@ -360,7 +360,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( soundmem_io, AS_IO, 8, sliver_state ) AM_RANGE(0x0100, 0x0100) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0x0101, 0x0101) AM_READ(soundlatch_r) + AM_RANGE(0x0101, 0x0101) AM_READ(soundlatch_byte_r) /* ports */ AM_RANGE(MCS51_PORT_P1, MCS51_PORT_P1) AM_WRITE(oki_setbank ) ADDRESS_MAP_END diff --git a/src/mame/drivers/snk.c b/src/mame/drivers/snk.c index 85e96278c26..db156f0ed94 100644 --- a/src/mame/drivers/snk.c +++ b/src/mame/drivers/snk.c @@ -318,7 +318,7 @@ WRITE8_MEMBER(snk_state::marvins_soundlatch_w) { m_marvins_sound_busy_flag = 1; - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE); } @@ -326,7 +326,7 @@ READ8_MEMBER(snk_state::marvins_soundlatch_r) { m_marvins_sound_busy_flag = 0; - return soundlatch_r(space, 0); + return soundlatch_byte_r(space, 0); } CUSTOM_INPUT_MEMBER(snk_state::marvins_sound_busy) @@ -368,14 +368,14 @@ static TIMER_CALLBACK( sgladiat_sndirq_update_callback ) WRITE8_MEMBER(snk_state::sgladiat_soundlatch_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); machine().scheduler().synchronize(FUNC(sgladiat_sndirq_update_callback), CMDIRQ_BUSY_ASSERT); } READ8_MEMBER(snk_state::sgladiat_soundlatch_r) { machine().scheduler().synchronize(FUNC(sgladiat_sndirq_update_callback), BUSY_CLEAR); - return soundlatch_r(space,0); + return soundlatch_byte_r(space,0); } READ8_MEMBER(snk_state::sgladiat_sound_nmi_ack_r) @@ -491,7 +491,7 @@ static const y8950_interface y8950_config_2 = WRITE8_MEMBER(snk_state::snk_soundlatch_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); machine().scheduler().synchronize(FUNC(sndirq_update_callback), CMDIRQ_BUSY_ASSERT); } @@ -541,7 +541,7 @@ READ8_MEMBER(snk_state::tnk3_ymirq_ack_r) READ8_MEMBER(snk_state::tnk3_busy_clear_r) { // it's uncertain whether the latch should be cleared here or when it's read - soundlatch_clear_w(space, 0, 0); + soundlatch_clear_byte_w(space, 0, 0); machine().scheduler().synchronize(FUNC(sndirq_update_callback), BUSY_CLEAR); return 0xff; } @@ -1434,7 +1434,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( tnk3_YM3526_sound_map, AS_PROGRAM, 8, snk_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0x87ff) AM_RAM - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) AM_RANGE(0xc000, 0xc000) AM_READ(tnk3_busy_clear_r) AM_RANGE(0xe000, 0xe001) AM_DEVREADWRITE_LEGACY("ym1", ym3526_r, ym3526_w) AM_RANGE(0xe004, 0xe004) AM_READ(tnk3_cmdirq_ack_r) @@ -1444,7 +1444,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( aso_YM3526_sound_map, AS_PROGRAM, 8, snk_state ) AM_RANGE(0x0000, 0xbfff) AM_ROM AM_RANGE(0xc000, 0xc7ff) AM_RAM - AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_r) + AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_byte_r) AM_RANGE(0xe000, 0xe000) AM_READ(tnk3_busy_clear_r) AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE_LEGACY("ym1", ym3526_r, ym3526_w) // AM_RANGE(0xf002, 0xf002) AM_READNOP unknown @@ -1455,7 +1455,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( YM3526_YM3526_sound_map, AS_PROGRAM, 8, snk_state ) AM_RANGE(0x0000, 0xbfff) AM_ROM AM_RANGE(0xc000, 0xcfff) AM_RAM - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) AM_RANGE(0xe800, 0xe800) AM_DEVREADWRITE_LEGACY("ym1", ym3526_status_port_r, ym3526_control_port_w) AM_RANGE(0xec00, 0xec00) AM_DEVWRITE_LEGACY("ym1", ym3526_write_port_w) AM_RANGE(0xf000, 0xf000) AM_DEVREADWRITE_LEGACY("ym2", ym3526_status_port_r, ym3526_control_port_w) @@ -1466,7 +1466,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( YM3812_sound_map, AS_PROGRAM, 8, snk_state ) AM_RANGE(0x0000, 0xbfff) AM_ROM AM_RANGE(0xc000, 0xcfff) AM_RAM - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) AM_RANGE(0xe800, 0xe800) AM_DEVREADWRITE_LEGACY("ym1", ym3812_status_port_r, ym3812_control_port_w) AM_RANGE(0xec00, 0xec00) AM_DEVWRITE_LEGACY("ym1", ym3812_write_port_w) AM_RANGE(0xf800, 0xf800) AM_READWRITE(snk_sound_status_r, snk_sound_status_w) @@ -1475,7 +1475,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( YM3526_Y8950_sound_map, AS_PROGRAM, 8, snk_state ) AM_RANGE(0x0000, 0xbfff) AM_ROM AM_RANGE(0xc000, 0xcfff) AM_RAM - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) AM_RANGE(0xe800, 0xe800) AM_DEVREADWRITE_LEGACY("ym1", ym3526_status_port_r, ym3526_control_port_w) AM_RANGE(0xec00, 0xec00) AM_DEVWRITE_LEGACY("ym1", ym3526_write_port_w) AM_RANGE(0xf000, 0xf000) AM_DEVREADWRITE_LEGACY("ym2", y8950_status_port_r, y8950_control_port_w) @@ -1486,7 +1486,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( YM3812_Y8950_sound_map, AS_PROGRAM, 8, snk_state ) AM_RANGE(0x0000, 0xbfff) AM_ROM AM_RANGE(0xc000, 0xcfff) AM_RAM - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) AM_RANGE(0xe800, 0xe800) AM_DEVREADWRITE_LEGACY("ym1", ym3812_status_port_r, ym3812_control_port_w) AM_RANGE(0xec00, 0xec00) AM_DEVWRITE_LEGACY("ym1", ym3812_write_port_w) AM_RANGE(0xf000, 0xf000) AM_DEVREADWRITE_LEGACY("ym2", y8950_status_port_r, y8950_control_port_w) @@ -1497,7 +1497,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( Y8950_sound_map, AS_PROGRAM, 8, snk_state ) AM_RANGE(0x0000, 0xbfff) AM_ROM AM_RANGE(0xc000, 0xcfff) AM_RAM - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) AM_RANGE(0xf000, 0xf000) AM_DEVREADWRITE_LEGACY("ym2", y8950_status_port_r, y8950_control_port_w) AM_RANGE(0xf400, 0xf400) AM_DEVWRITE_LEGACY("ym2", y8950_write_port_w) AM_RANGE(0xf800, 0xf800) AM_READWRITE(snk_sound_status_r, snk_sound_status_w) diff --git a/src/mame/drivers/snk68.c b/src/mame/drivers/snk68.c index 51e9f04fe95..c96f66fb7ac 100644 --- a/src/mame/drivers/snk68.c +++ b/src/mame/drivers/snk68.c @@ -108,7 +108,7 @@ WRITE16_MEMBER(snk68_state::sound_w) { if (ACCESSING_BITS_8_15) { - soundlatch_w(space, 0, data >> 8); + soundlatch_byte_w(space, 0, data >> 8); cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_NMI, PULSE_LINE); } } @@ -159,7 +159,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, snk68_state ) AM_RANGE(0x0000, 0xefff) AM_ROM AM_RANGE(0xf000, 0xf7ff) AM_RAM - AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_r) AM_WRITE(sound_status_w) + AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_byte_r) AM_WRITE(sound_status_w) ADDRESS_MAP_END static WRITE8_DEVICE_HANDLER( D7759_write_port_0_w ) diff --git a/src/mame/drivers/snowbros.c b/src/mame/drivers/snowbros.c index f6d04523595..0cfbcc1080a 100644 --- a/src/mame/drivers/snowbros.c +++ b/src/mame/drivers/snowbros.c @@ -175,7 +175,7 @@ static TIMER_DEVICE_CALLBACK( snowbros3_irq ) READ16_MEMBER(snowbros_state::snowbros_68000_sound_r) { - return soundlatch_r(space,offset); + return soundlatch_byte_r(space,offset); } @@ -183,14 +183,14 @@ WRITE16_MEMBER(snowbros_state::snowbros_68000_sound_w) { if (ACCESSING_BITS_0_7) { - soundlatch_w(space, offset, data & 0xff); + soundlatch_byte_w(space, offset, data & 0xff); cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_NMI, PULSE_LINE); } } WRITE16_MEMBER(snowbros_state::semicom_soundcmd_w) { - if (ACCESSING_BITS_0_7) soundlatch_w(space,0,data & 0xff); + if (ACCESSING_BITS_0_7) soundlatch_byte_w(space,0,data & 0xff); } /* Snow Bros Memory Map */ @@ -219,7 +219,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, snowbros_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x02, 0x03) AM_DEVREADWRITE_LEGACY("ymsnd", ym3812_r, ym3812_w) - AM_RANGE(0x04, 0x04) AM_READWRITE(soundlatch_r, soundlatch_w) /* goes back to the main CPU, checked during boot */ + AM_RANGE(0x04, 0x04) AM_READWRITE(soundlatch_byte_r, soundlatch_byte_w) /* goes back to the main CPU, checked during boot */ ADDRESS_MAP_END @@ -320,7 +320,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( honeydol_sound_io_map, AS_IO, 8, snowbros_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x02, 0x03) AM_DEVREADWRITE_LEGACY("ymsnd", ym3812_r, ym3812_w) // not connected? - AM_RANGE(0x04, 0x04) AM_READWRITE(soundlatch_r, soundlatch_w) /* goes back to the main CPU, checked during boot */ + AM_RANGE(0x04, 0x04) AM_READWRITE(soundlatch_byte_r, soundlatch_byte_w) /* goes back to the main CPU, checked during boot */ ADDRESS_MAP_END /* Twin Adventure */ @@ -329,7 +329,7 @@ WRITE16_MEMBER(snowbros_state::twinadv_68000_sound_w) { if (ACCESSING_BITS_0_7) { - soundlatch_w(space, offset, data & 0xff); + soundlatch_byte_w(space, offset, data & 0xff); cputag_set_input_line(machine(), "soundcpu", INPUT_LINE_NMI, PULSE_LINE); } } @@ -362,7 +362,7 @@ static WRITE8_DEVICE_HANDLER( twinadv_oki_bank_w ) static ADDRESS_MAP_START( twinadv_sound_io_map, AS_IO, 8, snowbros_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x02, 0x02) AM_READWRITE(soundlatch_r, soundlatch_w) // back to 68k? + AM_RANGE(0x02, 0x02) AM_READWRITE(soundlatch_byte_r, soundlatch_byte_w) // back to 68k? AM_RANGE(0x04, 0x04) AM_DEVWRITE_LEGACY("oki", twinadv_oki_bank_w) // oki bank? AM_RANGE(0x06, 0x06) AM_DEVREADWRITE("oki", okim6295_device, read, write) ADDRESS_MAP_END @@ -396,7 +396,7 @@ static ADDRESS_MAP_START( hyperpac_sound_map, AS_PROGRAM, 8, snowbros_state ) AM_RANGE(0xd000, 0xd7ff) AM_RAM AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r,ym2151_w) AM_RANGE(0xf002, 0xf002) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xf008, 0xf008) AM_READ(soundlatch_r) + AM_RANGE(0xf008, 0xf008) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END /* Same volume used for all samples at the Moment, could be right, we have no diff --git a/src/mame/drivers/solomon.c b/src/mame/drivers/solomon.c index 89bae6e3c17..0887b446cee 100644 --- a/src/mame/drivers/solomon.c +++ b/src/mame/drivers/solomon.c @@ -13,7 +13,7 @@ driver by Mirko Buffoni WRITE8_MEMBER(solomon_state::solomon_sh_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -69,7 +69,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, solomon_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x4000, 0x47ff) AM_RAM - AM_RANGE(0x8000, 0x8000) AM_READ(soundlatch_r) + AM_RANGE(0x8000, 0x8000) AM_READ(soundlatch_byte_r) AM_RANGE(0xffff, 0xffff) AM_WRITENOP /* watchdog? */ ADDRESS_MAP_END diff --git a/src/mame/drivers/sonson.c b/src/mame/drivers/sonson.c index 94b709a2608..7eb92f2e551 100644 --- a/src/mame/drivers/sonson.c +++ b/src/mame/drivers/sonson.c @@ -89,7 +89,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, sonson_state ) AM_RANGE(0x3005, 0x3005) AM_READ_PORT("DSW1") AM_RANGE(0x3006, 0x3006) AM_READ_PORT("DSW2") AM_RANGE(0x3008, 0x3008) AM_WRITENOP // might be Y scroll, but the game always sets it to 0 - AM_RANGE(0x3010, 0x3010) AM_WRITE(soundlatch_w) + AM_RANGE(0x3010, 0x3010) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x3018, 0x3018) AM_WRITE(sonson_flipscreen_w) AM_RANGE(0x3019, 0x3019) AM_WRITE(sonson_sh_irqtrigger_w) AM_RANGE(0x301e, 0x301e) AM_WRITE(sonson_coin2_counter_w) @@ -101,7 +101,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, sonson_state ) AM_RANGE(0x0000, 0x07ff) AM_RAM AM_RANGE(0x2000, 0x2001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) AM_RANGE(0x4000, 0x4001) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) AM_RANGE(0xe000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/sothello.c b/src/mame/drivers/sothello.c index 67a015c2d28..24bc6381133 100644 --- a/src/mame/drivers/sothello.c +++ b/src/mame/drivers/sothello.c @@ -144,7 +144,7 @@ static ADDRESS_MAP_START( maincpu_io_map, AS_IO, 8, sothello_state ) AM_RANGE( 0x31, 0x31) AM_READ(subcpu_halt_clear) AM_RANGE( 0x32, 0x32) AM_READ(subcpu_comm_status) AM_RANGE( 0x33, 0x33) AM_READ(soundcpu_status_r) - AM_RANGE( 0x40, 0x4f) AM_WRITE(soundlatch_w) + AM_RANGE( 0x40, 0x4f) AM_WRITE(soundlatch_byte_w) AM_RANGE( 0x50, 0x50) AM_WRITE(bank_w) AM_RANGE( 0x60, 0x61) AM_MIRROR(0x02) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w) /* not sure, but the A1 line is ignored, code @ $8b8 */ @@ -193,7 +193,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( soundcpu_io_map, AS_IO, 8, sothello_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r) + AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r) AM_RANGE(0x01, 0x01) AM_WRITE(msm_data_w) AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("msm", msm_cfg_w) AM_RANGE(0x03, 0x03) AM_WRITE(soundcpu_busyflag_set_w) diff --git a/src/mame/drivers/spbactn.c b/src/mame/drivers/spbactn.c index 1d9e95514f8..fe7d8e8c527 100644 --- a/src/mame/drivers/spbactn.c +++ b/src/mame/drivers/spbactn.c @@ -135,7 +135,7 @@ WRITE16_MEMBER(spbactn_state::soundcommand_w) { if (ACCESSING_BITS_0_7) { - soundlatch_w(space, offset, data & 0xff); + soundlatch_byte_w(space, offset, data & 0xff); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } } @@ -193,7 +193,7 @@ static ADDRESS_MAP_START( spbactn_sound_map, AS_PROGRAM, 8, spbactn_state ) AM_RANGE(0xf810, 0xf811) AM_DEVWRITE_LEGACY("ymsnd", ym3812_w) AM_RANGE(0xfc00, 0xfc00) AM_READNOP AM_WRITENOP /* irq ack ?? */ - AM_RANGE(0xfc20, 0xfc20) AM_READ(soundlatch_r) + AM_RANGE(0xfc20, 0xfc20) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/spcforce.c b/src/mame/drivers/spcforce.c index f38bd5f2c04..d647034ccaf 100644 --- a/src/mame/drivers/spcforce.c +++ b/src/mame/drivers/spcforce.c @@ -87,7 +87,7 @@ WRITE8_MEMBER(spcforce_state::irq_mask_w) static ADDRESS_MAP_START( spcforce_map, AS_PROGRAM, 8, spcforce_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x4000, 0x43ff) AM_RAM - AM_RANGE(0x7000, 0x7000) AM_READ_PORT("DSW") AM_WRITE(soundlatch_w) + AM_RANGE(0x7000, 0x7000) AM_READ_PORT("DSW") AM_WRITE(soundlatch_byte_w) AM_RANGE(0x7001, 0x7001) AM_READ_PORT("P1") AM_WRITE(spcforce_soundtrigger_w) AM_RANGE(0x7002, 0x7002) AM_READ_PORT("P2") AM_RANGE(0x700b, 0x700b) AM_WRITE(spcforce_flip_screen_w) @@ -103,7 +103,7 @@ static ADDRESS_MAP_START( spcforce_sound_map, AS_PROGRAM, 8, spcforce_state ) ADDRESS_MAP_END static ADDRESS_MAP_START( spcforce_sound_io_map, AS_IO, 8, spcforce_state ) - AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_READ(soundlatch_r) + AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_READ(soundlatch_byte_r) AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(spcforce_SN76496_latch_w) AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READWRITE(spcforce_SN76496_select_r, spcforce_SN76496_select_w) AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_READ(spcforce_t0_r) diff --git a/src/mame/drivers/spdodgeb.c b/src/mame/drivers/spdodgeb.c index ca3d326ac36..e8ef4867579 100644 --- a/src/mame/drivers/spdodgeb.c +++ b/src/mame/drivers/spdodgeb.c @@ -31,7 +31,7 @@ Notes: WRITE8_MEMBER(spdodgeb_state::sound_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); cputag_set_input_line(machine(), "audiocpu", M6809_IRQ_LINE, HOLD_LINE); } @@ -263,7 +263,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( spdodgeb_sound_map, AS_PROGRAM, 8, spdodgeb_state ) AM_RANGE(0x0000, 0x0fff) AM_RAM - AM_RANGE(0x1000, 0x1000) AM_READ(soundlatch_r) + AM_RANGE(0x1000, 0x1000) AM_READ(soundlatch_byte_r) AM_RANGE(0x2800, 0x2801) AM_DEVWRITE_LEGACY("ymsnd", ym3812_w) AM_RANGE(0x3800, 0x3807) AM_WRITE(spd_adpcm_w) AM_RANGE(0x8000, 0xffff) AM_ROM diff --git a/src/mame/drivers/speedspn.c b/src/mame/drivers/speedspn.c index 07f4530ec60..96b4f9fa2b7 100644 --- a/src/mame/drivers/speedspn.c +++ b/src/mame/drivers/speedspn.c @@ -92,7 +92,7 @@ WRITE8_MEMBER(speedspn_state::speedspn_banked_rom_change) WRITE8_MEMBER(speedspn_state::speedspn_sound_w) { - soundlatch_w(space, 1, data); + soundlatch_byte_w(space, 1, data); cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE); } @@ -135,7 +135,7 @@ static ADDRESS_MAP_START( speedspn_sound_map, AS_PROGRAM, 8, speedspn_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x9000, 0x9000) AM_DEVWRITE_LEGACY("oki", oki_banking_w) AM_RANGE(0x9800, 0x9800) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/splash.c b/src/mame/drivers/splash.c index 76c574fa5c6..89363150e49 100644 --- a/src/mame/drivers/splash.c +++ b/src/mame/drivers/splash.c @@ -53,7 +53,7 @@ WRITE16_MEMBER(splash_state::splash_sh_irqtrigger_w) { if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE); } } @@ -62,7 +62,7 @@ WRITE16_MEMBER(splash_state::roldf_sh_irqtrigger_w) { if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -123,7 +123,7 @@ static ADDRESS_MAP_START( splash_sound_map, AS_PROGRAM, 8, splash_state ) AM_RANGE(0x0000, 0xd7ff) AM_ROM /* ROM */ AM_RANGE(0xd800, 0xd800) AM_WRITE(splash_adpcm_data_w) /* ADPCM data for the MSM5205 chip */ // AM_RANGE(0xe000, 0xe000) AM_WRITENOP /* ??? */ - AM_RANGE(0xe800, 0xe800) AM_READ(soundlatch_r) /* Sound latch */ + AM_RANGE(0xe800, 0xe800) AM_READ(soundlatch_byte_r) /* Sound latch */ AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE_LEGACY("ymsnd", ym3812_r,ym3812_w) /* YM3812 */ AM_RANGE(0xf800, 0xffff) AM_RAM /* RAM */ ADDRESS_MAP_END @@ -204,7 +204,7 @@ static ADDRESS_MAP_START( roldfrog_sound_io_map, AS_IO, 8, splash_state ) AM_RANGE(0x40, 0x40) AM_NOP AM_RANGE(0x31, 0x31) AM_WRITE(sound_bank_w) AM_RANGE(0x37, 0x37) AM_WRITE(roldfrog_vblank_ack_w ) - AM_RANGE(0x70, 0x70) AM_READ(soundlatch_r) + AM_RANGE(0x70, 0x70) AM_READ(soundlatch_byte_r) AM_RANGE(0x0, 0xff) AM_READ(roldfrog_unk_r) ADDRESS_MAP_END @@ -222,7 +222,7 @@ WRITE16_MEMBER(splash_state::spr_write) WRITE16_MEMBER(splash_state::funystrp_sh_irqtrigger_w) { - soundlatch_w(space, 0, data>>8); + soundlatch_byte_w(space, 0, data>>8); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -285,7 +285,7 @@ static ADDRESS_MAP_START( funystrp_sound_io_map, AS_IO, 8, splash_state ) AM_RANGE(0x00, 0x00) AM_WRITE(msm1_data_w) AM_RANGE(0x01, 0x01) AM_WRITE(msm2_data_w) AM_RANGE(0x02, 0x02) AM_WRITE(sound_bank_w) - AM_RANGE(0x03, 0x03) AM_READ(soundlatch_r) + AM_RANGE(0x03, 0x03) AM_READ(soundlatch_byte_r) AM_RANGE(0x04, 0x04) AM_READ(int_source_r) AM_RANGE(0x06, 0x06) AM_WRITE(msm1_interrupt_w) AM_RANGE(0x07, 0x07) AM_WRITE(msm2_interrupt_w) diff --git a/src/mame/drivers/spy.c b/src/mame/drivers/spy.c index 88793816614..9584348f9a8 100644 --- a/src/mame/drivers/spy.c +++ b/src/mame/drivers/spy.c @@ -383,7 +383,7 @@ static ADDRESS_MAP_START( spy_map, AS_PROGRAM, 8, spy_state ) AM_RANGE(0x3f80, 0x3f80) AM_WRITE(bankswitch_w) AM_RANGE(0x3f90, 0x3f90) AM_WRITE(spy_3f90_w) AM_RANGE(0x3fa0, 0x3fa0) AM_WRITE(watchdog_reset_w) - AM_RANGE(0x3fb0, 0x3fb0) AM_WRITE(soundlatch_w) + AM_RANGE(0x3fb0, 0x3fb0) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x3fc0, 0x3fc0) AM_WRITE(spy_sh_irqtrigger_w) AM_RANGE(0x3fd0, 0x3fd0) AM_READ_PORT("SYSTEM") AM_RANGE(0x3fd1, 0x3fd1) AM_READ_PORT("P1") @@ -402,7 +402,7 @@ static ADDRESS_MAP_START( spy_sound_map, AS_PROGRAM, 8, spy_state ) AM_RANGE(0xa000, 0xa00d) AM_DEVREADWRITE_LEGACY("k007232_1", k007232_r, k007232_w) AM_RANGE(0xb000, 0xb00d) AM_DEVREADWRITE_LEGACY("k007232_2", k007232_r, k007232_w) AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ymsnd", ym3812_r,ym3812_w) - AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_r) + AM_RANGE(0xd000, 0xd000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/srumbler.c b/src/mame/drivers/srumbler.c index 23283321910..803112f853c 100644 --- a/src/mame/drivers/srumbler.c +++ b/src/mame/drivers/srumbler.c @@ -83,7 +83,7 @@ static ADDRESS_MAP_START( srumbler_map, AS_PROGRAM, 8, srumbler_state ) AM_RANGE(0x400b, 0x400b) AM_READ_PORT("DSW1") AM_RANGE(0x400c, 0x400c) AM_READ_PORT("DSW2") AM_RANGE(0x400a, 0x400d) AM_WRITE(srumbler_scroll_w) - AM_RANGE(0x400e, 0x400e) AM_WRITE(soundlatch_w) + AM_RANGE(0x400e, 0x400e) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x5000, 0x5fff) AM_ROMBANK("5000") AM_WRITE(srumbler_foreground_w) AM_BASE(m_foregroundram) /* Banked ROM */ AM_RANGE(0x6000, 0x6fff) AM_ROMBANK("6000") /* Banked ROM */ AM_RANGE(0x6000, 0x6fff) AM_WRITENOP /* Video RAM 2 ??? (not used) */ @@ -104,7 +104,7 @@ static ADDRESS_MAP_START( srumbler_sound_map, AS_PROGRAM, 8, srumbler_state ) AM_RANGE(0x8000, 0x8001) AM_DEVWRITE_LEGACY("ym1", ym2203_w) AM_RANGE(0xa000, 0xa001) AM_DEVWRITE_LEGACY("ym2", ym2203_w) AM_RANGE(0xc000, 0xc7ff) AM_RAM - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/sslam.c b/src/mame/drivers/sslam.c index e6295b6b588..b6f00667d96 100644 --- a/src/mame/drivers/sslam.c +++ b/src/mame/drivers/sslam.c @@ -373,7 +373,7 @@ static WRITE16_DEVICE_HANDLER( sslam_snd_w ) WRITE16_MEMBER(sslam_state::powerbls_sound_w) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "audiocpu", MCS51_INT1_LINE, HOLD_LINE); } @@ -432,7 +432,7 @@ READ8_MEMBER(sslam_state::playmark_snd_command_r) UINT8 data = 0; if ((m_oki_control & 0x38) == 0x30) { - data = soundlatch_r(space,0); + data = soundlatch_byte_r(space,0); } else if ((m_oki_control & 0x38) == 0x28) { data = (machine().device<okim6295_device>("oki")->read(space,0) & 0x0f); diff --git a/src/mame/drivers/ssozumo.c b/src/mame/drivers/ssozumo.c index d9f724d8389..b7fb5ec1c73 100644 --- a/src/mame/drivers/ssozumo.c +++ b/src/mame/drivers/ssozumo.c @@ -16,7 +16,7 @@ Driver by Takahiro Nogi (nogi@kt.rim.or.jp) 1999/10/04 WRITE8_MEMBER(ssozumo_state::ssozumo_sh_command_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); cputag_set_input_line(machine(), "audiocpu", M6502_IRQ_LINE, HOLD_LINE); } @@ -53,7 +53,7 @@ static ADDRESS_MAP_START( ssozumo_sound_map, AS_PROGRAM, 8, ssozumo_state ) AM_RANGE(0x2002, 0x2003) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) AM_RANGE(0x2004, 0x2004) AM_DEVWRITE_LEGACY("dac", dac_signed_w) AM_RANGE(0x2005, 0x2005) AM_WRITE(sound_nmi_mask_w) - AM_RANGE(0x2007, 0x2007) AM_READ(soundlatch_r) + AM_RANGE(0x2007, 0x2007) AM_READ(soundlatch_byte_r) AM_RANGE(0x4000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/stadhero.c b/src/mame/drivers/stadhero.c index 947c82d84e3..8e52e855123 100644 --- a/src/mame/drivers/stadhero.c +++ b/src/mame/drivers/stadhero.c @@ -45,7 +45,7 @@ WRITE16_MEMBER(stadhero_state::stadhero_control_w) case 4: /* Interrupt ack (VBL - IRQ 5) */ break; case 6: /* 6502 sound cpu */ - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); break; default: @@ -75,7 +75,7 @@ static ADDRESS_MAP_START( audio_map, AS_PROGRAM, 8, stadhero_state ) AM_RANGE(0x0000, 0x05ff) AM_RAM AM_RANGE(0x0800, 0x0801) AM_DEVWRITE_LEGACY("ym1", ym2203_w) AM_RANGE(0x1000, 0x1001) AM_DEVWRITE_LEGACY("ym2", ym3812_w) - AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_r) + AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) AM_RANGE(0x3800, 0x3800) AM_DEVREADWRITE("oki", okim6295_device, read, write) AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/sub.c b/src/mame/drivers/sub.c index 16772623524..cdf4bff17be 100644 --- a/src/mame/drivers/sub.c +++ b/src/mame/drivers/sub.c @@ -239,7 +239,7 @@ ADDRESS_MAP_END WRITE8_MEMBER(sub_state::subm_to_sound_w) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "soundcpu", 0, HOLD_LINE); } @@ -251,7 +251,7 @@ WRITE8_MEMBER(sub_state::nmi_mask_w) static ADDRESS_MAP_START( subm_io, AS_IO, 8, sub_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch2_r) AM_WRITE(subm_to_sound_w) // to/from sound CPU + AM_RANGE(0x00, 0x00) AM_READ(soundlatch2_byte_r) AM_WRITE(subm_to_sound_w) // to/from sound CPU ADDRESS_MAP_END static ADDRESS_MAP_START( subm_sound_map, AS_PROGRAM, 8, sub_state ) @@ -262,7 +262,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( subm_sound_io, AS_IO, 8, sub_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READWRITE(soundlatch_r, soundlatch2_w) // to/from main CPU + AM_RANGE(0x00, 0x00) AM_READWRITE(soundlatch_byte_r, soundlatch2_byte_w) // to/from main CPU AM_RANGE(0x40, 0x41) AM_DEVREADWRITE_LEGACY("ay1", ay8910_r, ay8910_address_data_w) AM_RANGE(0x80, 0x81) AM_DEVREADWRITE_LEGACY("ay2", ay8910_r, ay8910_address_data_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/suna16.c b/src/mame/drivers/suna16.c index f7c0ece736e..c080afb803f 100644 --- a/src/mame/drivers/suna16.c +++ b/src/mame/drivers/suna16.c @@ -42,7 +42,7 @@ WRITE16_MEMBER(suna16_state::suna16_soundlatch_w) { if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xff ); + soundlatch_byte_w(space, 0, data & 0xff ); } if (data & ~0xff) logerror("CPU#0 PC %06X - Sound latch unknown bits: %04X\n", cpu_get_pc(&space.device()), data); } @@ -202,9 +202,9 @@ static ADDRESS_MAP_START( bssoccer_sound_map, AS_PROGRAM, 8, suna16_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM // ROM AM_RANGE(0xf000, 0xf7ff) AM_RAM // RAM AM_RANGE(0xf800, 0xf801) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) // YM2151 - AM_RANGE(0xfc00, 0xfc00) AM_READ(soundlatch_r) // From Main CPU - AM_RANGE(0xfd00, 0xfd00) AM_WRITE(soundlatch2_w) // To PCM Z80 #1 - AM_RANGE(0xfe00, 0xfe00) AM_WRITE(soundlatch3_w) // To PCM Z80 #2 + AM_RANGE(0xfc00, 0xfc00) AM_READ(soundlatch_byte_r) // From Main CPU + AM_RANGE(0xfd00, 0xfd00) AM_WRITE(soundlatch2_byte_w) // To PCM Z80 #1 + AM_RANGE(0xfe00, 0xfe00) AM_WRITE(soundlatch3_byte_w) // To PCM Z80 #2 ADDRESS_MAP_END /*************************************************************************** @@ -215,7 +215,7 @@ static ADDRESS_MAP_START( uballoon_sound_map, AS_PROGRAM, 8, suna16_state ) AM_RANGE(0x0000, 0xefff) AM_ROM // ROM AM_RANGE(0xf000, 0xf7ff) AM_RAM // RAM AM_RANGE(0xf800, 0xf801) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) // YM2151 - AM_RANGE(0xfc00, 0xfc00) AM_READWRITE(soundlatch_r, soundlatch2_w) // To PCM Z80 + AM_RANGE(0xfc00, 0xfc00) AM_READWRITE(soundlatch_byte_r, soundlatch2_byte_w) // To PCM Z80 ADDRESS_MAP_END /*************************************************************************** @@ -226,7 +226,7 @@ static ADDRESS_MAP_START( sunaq_sound_map, AS_PROGRAM, 8, suna16_state ) AM_RANGE(0x0000, 0xe82f) AM_ROM // ROM AM_RANGE(0xe830, 0xf7ff) AM_RAM // RAM (writes to efxx, could be a program bug tho) AM_RANGE(0xf800, 0xf801) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) // YM2151 - AM_RANGE(0xfc00, 0xfc00) AM_READWRITE(soundlatch_r, soundlatch2_w) // To PCM Z80 + AM_RANGE(0xfc00, 0xfc00) AM_READWRITE(soundlatch_byte_r, soundlatch2_byte_w) // To PCM Z80 ADDRESS_MAP_END /*************************************************************************** @@ -238,8 +238,8 @@ static ADDRESS_MAP_START( bestbest_sound_map, AS_PROGRAM, 8, suna16_state ) AM_RANGE( 0xc000, 0xc001 ) AM_DEVWRITE_LEGACY("ymsnd", ym3526_w ) // AM_RANGE( 0xc002, 0xc003 ) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w ) // AY8910 AM_RANGE( 0xe000, 0xe7ff ) AM_RAM // RAM - AM_RANGE( 0xf000, 0xf000 ) AM_WRITE(soundlatch2_w ) // To PCM Z80 - AM_RANGE( 0xf800, 0xf800 ) AM_READ ( soundlatch_r ) // From Main CPU + AM_RANGE( 0xf000, 0xf000 ) AM_WRITE(soundlatch2_byte_w ) // To PCM Z80 + AM_RANGE( 0xf800, 0xf800 ) AM_READ ( soundlatch_byte_r ) // From Main CPU ADDRESS_MAP_END /*************************************************************************** @@ -299,7 +299,7 @@ static WRITE8_DEVICE_HANDLER( bssoccer_DAC_w ) static ADDRESS_MAP_START( bssoccer_pcm_1_io_map, AS_IO, 8, suna16_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch2_r) // From The Sound Z80 + AM_RANGE(0x00, 0x00) AM_READ(soundlatch2_byte_r) // From The Sound Z80 AM_RANGE(0x00, 0x00) AM_DEVWRITE_LEGACY("dac1", bssoccer_DAC_w) // 2 x DAC AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("dac2", bssoccer_DAC_w) // 2 x DAC AM_RANGE(0x03, 0x03) AM_WRITE(bssoccer_pcm_1_bankswitch_w) // Rom Bank @@ -307,7 +307,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( bssoccer_pcm_2_io_map, AS_IO, 8, suna16_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch3_r) // From The Sound Z80 + AM_RANGE(0x00, 0x00) AM_READ(soundlatch3_byte_r) // From The Sound Z80 AM_RANGE(0x00, 0x00) AM_DEVWRITE_LEGACY("dac3", bssoccer_DAC_w) // 2 x DAC AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("dac4", bssoccer_DAC_w) // 2 x DAC AM_RANGE(0x03, 0x03) AM_WRITE(bssoccer_pcm_2_bankswitch_w) // Rom Bank @@ -337,7 +337,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( uballoon_pcm_1_io_map, AS_IO, 8, suna16_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch2_r) // From The Sound Z80 + AM_RANGE(0x00, 0x00) AM_READ(soundlatch2_byte_r) // From The Sound Z80 AM_RANGE(0x00, 0x00) AM_DEVWRITE_LEGACY("dac1", bssoccer_DAC_w) // 2 x DAC AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("dac2", bssoccer_DAC_w) // 2 x DAC AM_RANGE(0x03, 0x03) AM_WRITE(uballoon_pcm_1_bankswitch_w) // Rom Bank @@ -361,7 +361,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( bestbest_pcm_1_iomap, AS_IO, 8, suna16_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ (soundlatch2_r ) // From The Sound Z80 + AM_RANGE(0x00, 0x00) AM_READ (soundlatch2_byte_r ) // From The Sound Z80 AM_RANGE(0x00, 0x00) AM_MIRROR(0x02) AM_DEVWRITE_LEGACY("dac1", bssoccer_DAC_w) // 2 x DAC AM_RANGE(0x01, 0x01) AM_MIRROR(0x02) AM_DEVWRITE_LEGACY("dac2", bssoccer_DAC_w) // 2 x DAC ADDRESS_MAP_END diff --git a/src/mame/drivers/suna8.c b/src/mame/drivers/suna8.c index 30c1b34b46c..564632bcd0e 100644 --- a/src/mame/drivers/suna8.c +++ b/src/mame/drivers/suna8.c @@ -513,8 +513,8 @@ static ADDRESS_MAP_START( hardhead_map, AS_PROGRAM, 8, suna8_state ) AM_RANGE(0xc000, 0xd7ff) AM_RAM // RAM AM_RANGE(0xd800, 0xd9ff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_byte_be_w) AM_SHARE("paletteram") // Palette AM_RANGE(0xda00, 0xda00) AM_RAM_READ(hardhead_ip_r) AM_BASE(m_hardhead_ip) // Input Port Select - AM_RANGE(0xda80, 0xda80) AM_READ(soundlatch2_r) AM_WRITE(hardhead_bankswitch_w ) // ROM Banking - AM_RANGE(0xdb00, 0xdb00) AM_WRITE(soundlatch_w ) // To Sound CPU + AM_RANGE(0xda80, 0xda80) AM_READ(soundlatch2_byte_r) AM_WRITE(hardhead_bankswitch_w ) // ROM Banking + AM_RANGE(0xdb00, 0xdb00) AM_WRITE(soundlatch_byte_w ) // To Sound CPU AM_RANGE(0xdb80, 0xdb80) AM_WRITE(hardhead_flipscreen_w ) // Flip Screen + Coin Lockout AM_RANGE(0xdc00, 0xdc00) AM_NOP // <- R (after bank select) AM_RANGE(0xdc80, 0xdc80) AM_NOP // <- R (after bank select) @@ -564,7 +564,7 @@ WRITE8_MEMBER(suna8_state::rranger_bankswitch_w) */ READ8_MEMBER(suna8_state::rranger_soundstatus_r) { - soundlatch2_r(space, offset); + soundlatch2_byte_r(space, offset); return 0x02; } @@ -578,7 +578,7 @@ WRITE8_MEMBER(suna8_state::sranger_prot_w) static ADDRESS_MAP_START( rranger_map, AS_PROGRAM, 8, suna8_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM // ROM AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1") // Banked ROM - AM_RANGE(0xc000, 0xc000) AM_READWRITE(watchdog_reset_r, soundlatch_w) // To Sound CPU + AM_RANGE(0xc000, 0xc000) AM_READWRITE(watchdog_reset_r, soundlatch_byte_w) // To Sound CPU AM_RANGE(0xc002, 0xc002) AM_WRITE(rranger_bankswitch_w ) // ROM Banking AM_RANGE(0xc002, 0xc002) AM_READ_PORT("P1") // P1 (Inputs) AM_RANGE(0xc003, 0xc003) AM_READ_PORT("P2") // P2 @@ -619,7 +619,7 @@ WRITE8_MEMBER(suna8_state::brickzn_palettebank_w) if (data & ~0x02) logerror("CPU #0 - PC %04X: unknown palettebank bits: %02X\n",cpu_get_pc(&space.device()),data); /* Also used as soundlatch - depending on c0c0? */ - soundlatch_w(space,0,data); + soundlatch_byte_w(space,0,data); } /* @@ -773,7 +773,7 @@ static ADDRESS_MAP_START( hardhea2_map, AS_PROGRAM, 8, suna8_state ) AM_RANGE(0xc380, 0xc380) AM_WRITE(hardhea2_nmi_w ) // ? NMI related ? AM_RANGE(0xc400, 0xc400) AM_WRITE(hardhea2_leds_w ) // Leds + Coin Counter AM_RANGE(0xc480, 0xc480) AM_WRITENOP // ~ROM Bank - AM_RANGE(0xc500, 0xc500) AM_WRITE(soundlatch_w ) // To Sound CPU + AM_RANGE(0xc500, 0xc500) AM_WRITE(soundlatch_byte_w ) // To Sound CPU // *** Protection AM_RANGE(0xc50f, 0xc50f) AM_WRITE(hardhea2_spritebank_1_w ) @@ -824,7 +824,7 @@ static ADDRESS_MAP_START( starfigh_map, AS_PROGRAM, 8, suna8_state ) AM_RANGE(0xc280, 0xc280) AM_WRITE(hardhea2_rombank_w ) // ROM Bank (?mirrored up to c2ff?) AM_RANGE(0xc300, 0xc300) AM_WRITE(hardhea2_flipscreen_w ) // Flip Screen AM_RANGE(0xc400, 0xc400) AM_WRITE(hardhea2_leds_w ) // Leds + Coin Counter - AM_RANGE(0xc500, 0xc500) AM_WRITE(soundlatch_w ) // To Sound CPU + AM_RANGE(0xc500, 0xc500) AM_WRITE(soundlatch_byte_w ) // To Sound CPU AM_RANGE(0xc600, 0xc7ff) AM_READWRITE(banked_paletteram_r, paletteram_RRRRGGGGBBBBxxxx_byte_be_w) AM_SHARE("paletteram" ) // Palette (Banked??) AM_RANGE(0xc800, 0xdfff) AM_RAM // RAM AM_RANGE(0xe000, 0xffff) AM_READWRITE(suna8_banked_spriteram_r, suna8_banked_spriteram_w) // Sprites (Banked) @@ -957,7 +957,7 @@ static ADDRESS_MAP_START( sparkman_map, AS_PROGRAM, 8, suna8_state ) AM_RANGE(0xc380, 0xc3ff) AM_WRITE(sparkman_cmd_prot_w ) // Protection AM_RANGE(0xc400, 0xc400) AM_WRITE(sparkman_leds_w ) // Leds AM_RANGE(0xc480, 0xc480) AM_WRITE(sparkman_coin_counter_w ) // Coin Counter - AM_RANGE(0xc500, 0xc500) AM_WRITE(soundlatch_w ) // To Sound CPU + AM_RANGE(0xc500, 0xc500) AM_WRITE(soundlatch_byte_w ) // To Sound CPU AM_RANGE(0xc600, 0xc7ff) AM_RAM_WRITE(paletteram_RRRRGGGGBBBBxxxx_byte_be_w) AM_SHARE("paletteram" ) // Palette (Banked??) AM_RANGE(0xc800, 0xdfff) AM_RAM_WRITE(suna8_wram_w) AM_BASE(m_wram) // RAM AM_RANGE(0xe000, 0xffff) AM_READWRITE(suna8_banked_spriteram_r, suna8_banked_spriteram_w) // Sprites (Banked) @@ -982,8 +982,8 @@ static ADDRESS_MAP_START( hardhead_sound_map, AS_PROGRAM, 8, suna8_state ) AM_RANGE(0xa002, 0xa003) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w ) AM_RANGE(0xc000, 0xc7ff) AM_RAM // RAM AM_RANGE(0xc800, 0xc800) AM_DEVREAD_LEGACY("ymsnd", ym3812_status_port_r) // ? unsure - AM_RANGE(0xd000, 0xd000) AM_WRITE(soundlatch2_w ) // - AM_RANGE(0xd800, 0xd800) AM_READ(soundlatch_r ) // From Main CPU + AM_RANGE(0xd000, 0xd000) AM_WRITE(soundlatch2_byte_w ) // + AM_RANGE(0xd800, 0xd800) AM_READ(soundlatch_byte_r ) // From Main CPU ADDRESS_MAP_END @@ -1002,8 +1002,8 @@ static ADDRESS_MAP_START( rranger_sound_map, AS_PROGRAM, 8, suna8_state ) AM_RANGE(0xa000, 0xa001) AM_DEVWRITE_LEGACY("ym1", ym2203_w ) // Samples + Music AM_RANGE(0xa002, 0xa003) AM_DEVWRITE_LEGACY("ym2", ym2203_w ) // Music + FX AM_RANGE(0xc000, 0xc7ff) AM_RAM // RAM - AM_RANGE(0xd000, 0xd000) AM_WRITE(soundlatch2_w ) // To Sound CPU - AM_RANGE(0xd800, 0xd800) AM_READ(soundlatch_r ) // From Main CPU + AM_RANGE(0xd000, 0xd000) AM_WRITE(soundlatch2_byte_w ) // To Sound CPU + AM_RANGE(0xd800, 0xd800) AM_READ(soundlatch_byte_r ) // From Main CPU ADDRESS_MAP_END @@ -1016,8 +1016,8 @@ static ADDRESS_MAP_START( brickzn_sound_map, AS_PROGRAM, 8, suna8_state ) AM_RANGE(0xc000, 0xc001) AM_DEVWRITE_LEGACY("ymsnd", ym3812_w ) AM_RANGE(0xc002, 0xc003) AM_DEVWRITE_LEGACY("aysnd", ay8910_address_data_w ) AM_RANGE(0xe000, 0xe7ff) AM_RAM // RAM - AM_RANGE(0xf000, 0xf000) AM_WRITE(soundlatch2_w ) // To PCM CPU - AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_r ) // From Main CPU + AM_RANGE(0xf000, 0xf000) AM_WRITE(soundlatch2_byte_w ) // To PCM CPU + AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_byte_r ) // From Main CPU ADDRESS_MAP_END @@ -1037,7 +1037,7 @@ WRITE8_MEMBER(suna8_state::brickzn_pcm_w) static ADDRESS_MAP_START( brickzn_pcm_io_map, AS_IO, 8, suna8_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch2_r ) // From Sound CPU + AM_RANGE(0x00, 0x00) AM_READ(soundlatch2_byte_r ) // From Sound CPU AM_RANGE(0x00, 0x03) AM_WRITE(brickzn_pcm_w ) // 4 x DAC ADDRESS_MAP_END diff --git a/src/mame/drivers/supbtime.c b/src/mame/drivers/supbtime.c index 3f972c76421..8a999aac588 100644 --- a/src/mame/drivers/supbtime.c +++ b/src/mame/drivers/supbtime.c @@ -52,7 +52,7 @@ READ16_MEMBER(supbtime_state::supbtime_controls_r) WRITE16_MEMBER(supbtime_state::sound_w) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_audiocpu, 0, HOLD_LINE); } @@ -100,7 +100,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, supbtime_state ) AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0x120000, 0x120001) AM_DEVREADWRITE("oki", okim6295_device, read, write) AM_RANGE(0x130000, 0x130001) AM_NOP /* This board only has 1 oki chip */ - AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_r) + AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_byte_r) AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8") AM_RANGE(0x1fec00, 0x1fec01) AM_WRITE_LEGACY(h6280_timer_w) AM_RANGE(0x1ff400, 0x1ff403) AM_WRITE_LEGACY(h6280_irq_status_w) diff --git a/src/mame/drivers/suprloco.c b/src/mame/drivers/suprloco.c index a35f6659fd2..09574971cf3 100644 --- a/src/mame/drivers/suprloco.c +++ b/src/mame/drivers/suprloco.c @@ -19,7 +19,7 @@ TODO: WRITE8_MEMBER(suprloco_state::suprloco_soundport_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); /* spin for a while to let the Z80 read the command (fixes hanging sound in Regulus) */ device_spin_until_time(&space.device(), attotime::from_usec(50)); @@ -47,7 +47,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, suprloco_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0xa000, 0xa003) AM_DEVWRITE_LEGACY("sn1", sn76496_w) AM_RANGE(0xc000, 0xc003) AM_DEVWRITE_LEGACY("sn2", sn76496_w) - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/suprslam.c b/src/mame/drivers/suprslam.c index d4487e00320..f9f52913297 100644 --- a/src/mame/drivers/suprslam.c +++ b/src/mame/drivers/suprslam.c @@ -95,7 +95,7 @@ WRITE16_MEMBER(suprslam_state::sound_command_w) if (ACCESSING_BITS_0_7) { m_pending_command = 1; - soundlatch_w(space, offset, data & 0xff); + soundlatch_byte_w(space, offset, data & 0xff); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } } @@ -154,7 +154,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, suprslam_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x00) AM_WRITE(suprslam_sh_bankswitch_w) - AM_RANGE(0x04, 0x04) AM_READ(soundlatch_r) AM_WRITE(pending_command_clear_w) + AM_RANGE(0x04, 0x04) AM_READ(soundlatch_byte_r) AM_WRITE(pending_command_clear_w) AM_RANGE(0x08, 0x0b) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/system1.c b/src/mame/drivers/system1.c index af9917dd68e..dd6f34fa54e 100644 --- a/src/mame/drivers/system1.c +++ b/src/mame/drivers/system1.c @@ -499,7 +499,7 @@ READ8_MEMBER(system1_state::sound_data_r) UINT8 initial_value = ppi8255_get_port_c(ppi); ppi8255_set_port_c(ppi, initial_value & ~0x40); ppi8255_set_port_c(ppi, initial_value | 0x40); - return soundlatch_r(space, offset); + return soundlatch_byte_r(space, offset); } /* if we have a Z80 PIO, get the data from the port and toggle the strobe */ @@ -518,7 +518,7 @@ READ8_MEMBER(system1_state::sound_data_r) WRITE8_MEMBER(system1_state::soundport_w) { /* boost interleave when communicating with the sound CPU */ - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); } diff --git a/src/mame/drivers/system16.c b/src/mame/drivers/system16.c index bbe7a9dfbff..fee6f7bc6a4 100644 --- a/src/mame/drivers/system16.c +++ b/src/mame/drivers/system16.c @@ -113,7 +113,7 @@ WRITE16_MEMBER(segas1x_bootleg_state::sound_command_nmi_w) if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_soundcpu, INPUT_LINE_NMI, PULSE_LINE); } } @@ -151,7 +151,7 @@ WRITE16_MEMBER(segas1x_bootleg_state::sound_command_w) if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_soundcpu, 0, HOLD_LINE); } } @@ -422,7 +422,7 @@ static ADDRESS_MAP_START(tturfbl_sound_map, AS_PROGRAM, 8, segas1x_bootleg_state AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0xbfff) AM_READ(tturfbl_soundbank_r) AM_RANGE(0xe000, 0xe000) AM_WRITE(tturfbl_soundbank_w) - AM_RANGE(0xe800, 0xe800) AM_READ(soundlatch_r) + AM_RANGE(0xe800, 0xe800) AM_READ(soundlatch_byte_r) AM_RANGE(0xf000, 0xf000) AM_WRITE(tturfbl_msm5205_data_w) AM_RANGE(0xf800, 0xffff) AM_RAM ADDRESS_MAP_END @@ -438,14 +438,14 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, segas1x_bootleg_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM - AM_RANGE(0xe800, 0xe800) AM_READ(soundlatch_r) + AM_RANGE(0xe800, 0xe800) AM_READ(soundlatch_byte_r) AM_RANGE(0xf800, 0xffff) AM_RAM ADDRESS_MAP_END static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, segas1x_bootleg_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) - AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_r) + AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END @@ -453,7 +453,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_7759_map, AS_PROGRAM, 8, segas1x_bootleg_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0xdfff) AM_ROMBANK("bank1") - AM_RANGE(0xe800, 0xe800) AM_READ(soundlatch_r) + AM_RANGE(0xe800, 0xe800) AM_READ(soundlatch_byte_r) AM_RANGE(0xf800, 0xffff) AM_RAM ADDRESS_MAP_END @@ -473,7 +473,7 @@ static ADDRESS_MAP_START( sound_7759_io_map, AS_IO, 8, segas1x_bootleg_state ) AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0x40, 0x40) AM_DEVWRITE_LEGACY("7759", upd7759_bank_w) AM_RANGE(0x80, 0x80) AM_DEVWRITE_LEGACY("7759", upd7759_port_w) - AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_r) + AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END @@ -532,7 +532,7 @@ ADDRESS_MAP_END */ static ADDRESS_MAP_START( fpointbl_sound_map, AS_PROGRAM, 8, segas1x_bootleg_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) AM_RANGE(0xf800, 0xffff) AM_RAM ADDRESS_MAP_END @@ -1056,7 +1056,7 @@ static ADDRESS_MAP_START( sound_18_io_map, AS_IO, 8, segas1x_bootleg_state ) AM_RANGE(0x80, 0x83) AM_DEVREADWRITE_LEGACY("3438.0", ym3438_r, ym3438_w) AM_RANGE(0x90, 0x93) AM_DEVREADWRITE_LEGACY("3438.1", ym3438_r, ym3438_w) AM_RANGE(0xa0, 0xa0) AM_WRITE(sys18_soundbank_w) - AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_r) + AM_RANGE(0xc0, 0xc0) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END @@ -1107,7 +1107,7 @@ WRITE16_MEMBER(segas1x_bootleg_state::sound_command_irq_w) if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_soundcpu, 0, HOLD_LINE); } } @@ -1230,7 +1230,7 @@ static ADDRESS_MAP_START(shdancbl_sound_map, AS_PROGRAM, 8, segas1x_bootleg_stat AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0xbfff) AM_READ(shdancbl_soundbank_r) AM_RANGE(0xc000, 0xc00f) AM_WRITENOP - AM_RANGE(0xc400, 0xc400) AM_READ(soundlatch_r) + AM_RANGE(0xc400, 0xc400) AM_READ(soundlatch_byte_r) AM_RANGE(0xc800, 0xc800) AM_WRITE(shdancbl_msm5205_data_w) AM_RANGE(0xcc00, 0xcc03) AM_DEVREADWRITE_LEGACY("3438.0", ym3438_r, ym3438_w) AM_RANGE(0xd000, 0xd003) AM_DEVREADWRITE_LEGACY("3438.1", ym3438_r, ym3438_w) diff --git a/src/mame/drivers/tagteam.c b/src/mame/drivers/tagteam.c index 9285e125e65..72c2ea20bf5 100644 --- a/src/mame/drivers/tagteam.c +++ b/src/mame/drivers/tagteam.c @@ -32,7 +32,7 @@ TODO: WRITE8_MEMBER(tagteam_state::sound_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); cputag_set_input_line(machine(), "audiocpu", M6502_IRQ_LINE, HOLD_LINE); } @@ -68,7 +68,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, tagteam_state ) AM_RANGE(0x2002, 0x2003) AM_DEVWRITE_LEGACY("ay2", ay8910_data_address_w) AM_RANGE(0x2004, 0x2004) AM_DEVWRITE_LEGACY("dac", dac_w) AM_RANGE(0x2005, 0x2005) AM_WRITE(sound_nmi_mask_w) - AM_RANGE(0x2007, 0x2007) AM_READ(soundlatch_r) + AM_RANGE(0x2007, 0x2007) AM_READ(soundlatch_byte_r) AM_RANGE(0x4000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/tail2nos.c b/src/mame/drivers/tail2nos.c index 8efe15abcea..9242a0c7984 100644 --- a/src/mame/drivers/tail2nos.c +++ b/src/mame/drivers/tail2nos.c @@ -22,7 +22,7 @@ WRITE16_MEMBER(tail2nos_state::sound_command_w) if (ACCESSING_BITS_0_7) { - soundlatch_w(space, offset, data & 0xff); + soundlatch_byte_w(space, offset, data & 0xff); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } } @@ -57,7 +57,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_port_map, AS_IO, 8, tail2nos_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x07, 0x07) AM_READ(soundlatch_r) AM_WRITENOP /* the write is a clear pending command */ + AM_RANGE(0x07, 0x07) AM_READ(soundlatch_byte_r) AM_WRITENOP /* the write is a clear pending command */ AM_RANGE(0x08, 0x0b) AM_DEVWRITE_LEGACY("ymsnd", ym2608_w) #if 0 AM_RANGE(0x18, 0x1b) AM_DEVREAD_LEGACY("ymsnd", ym2608_r) diff --git a/src/mame/drivers/taitosj.c b/src/mame/drivers/taitosj.c index 0d7b6d297be..3a2f553dec8 100644 --- a/src/mame/drivers/taitosj.c +++ b/src/mame/drivers/taitosj.c @@ -179,7 +179,7 @@ static WRITE8_DEVICE_HANDLER( taitosj_sndnmi_msk_w ) WRITE8_MEMBER(taitosj_state::taitosj_soundcommand_w) { - soundlatch_w(space,offset,data); + soundlatch_byte_w(space,offset,data); if (!m_sndnmi_disable) cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -346,7 +346,7 @@ static ADDRESS_MAP_START( taitosj_audio_map, AS_PROGRAM, 8, taitosj_state ) AM_RANGE(0x4803, 0x4803) AM_DEVREAD_LEGACY("ay3", ay8910_r) AM_RANGE(0x4804, 0x4805) AM_DEVWRITE_LEGACY("ay4", ay8910_address_data_w) AM_RANGE(0x4805, 0x4805) AM_DEVREAD_LEGACY("ay4", ay8910_r) - AM_RANGE(0x5000, 0x5000) AM_READ(soundlatch_r) + AM_RANGE(0x5000, 0x5000) AM_READ(soundlatch_byte_r) AM_RANGE(0xe000, 0xefff) AM_ROM /* space for diagnostic ROM */ ADDRESS_MAP_END diff --git a/src/mame/drivers/tankbust.c b/src/mame/drivers/tankbust.c index 01d531580ba..ff35eda7c8f 100644 --- a/src/mame/drivers/tankbust.c +++ b/src/mame/drivers/tankbust.c @@ -80,7 +80,7 @@ WRITE8_MEMBER(tankbust_state::tankbust_e0xx_w) m_irq_mask = data & 1; break; - case 1: /* 0xe001 (value 0 then 1) written right after the soundlatch_w */ + case 1: /* 0xe001 (value 0 then 1) written right after the soundlatch_byte_w */ machine().scheduler().synchronize(FUNC(soundirqline_callback), data); break; diff --git a/src/mame/drivers/taotaido.c b/src/mame/drivers/taotaido.c index 592009f6c9e..1f0f88581d5 100644 --- a/src/mame/drivers/taotaido.c +++ b/src/mame/drivers/taotaido.c @@ -83,7 +83,7 @@ WRITE16_MEMBER(taotaido_state::sound_command_w) if (ACCESSING_BITS_0_7) { m_pending_command = 1; - soundlatch_w(space, offset, data & 0xff); + soundlatch_byte_w(space, offset, data & 0xff); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } } @@ -139,7 +139,7 @@ static ADDRESS_MAP_START( sound_port_map, AS_IO, 8, taotaido_state ) AM_RANGE(0x00, 0x03) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w) AM_RANGE(0x04, 0x04) AM_WRITE(taotaido_sh_bankswitch_w) AM_RANGE(0x08, 0x08) AM_WRITE(pending_command_clear_w) - AM_RANGE(0x0c, 0x0c) AM_READ(soundlatch_r) + AM_RANGE(0x0c, 0x0c) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/tatsumi.c b/src/mame/drivers/tatsumi.c index 5f5923e357c..fb408842d81 100644 --- a/src/mame/drivers/tatsumi.c +++ b/src/mame/drivers/tatsumi.c @@ -199,7 +199,7 @@ READ16_MEMBER(tatsumi_state::cyclwarr_input2_r) WRITE16_MEMBER(tatsumi_state::cyclwarr_sound_w) { - soundlatch_w(space, 0, data >> 8); + soundlatch_byte_w(space, 0, data >> 8); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -338,7 +338,7 @@ static ADDRESS_MAP_START( cyclwarr_z80_map, AS_PROGRAM, 8, tatsumi_state ) AM_RANGE(0xe000, 0xffef) AM_RAM AM_RANGE(0xfff0, 0xfff1) AM_DEVREADWRITE_LEGACY("ymsnd", tatsumi_hack_ym2151_r, ym2151_w) AM_RANGE(0xfff4, 0xfff4) AM_DEVREAD_LEGACY("oki", tatsumi_hack_oki_r) AM_DEVWRITE("oki", okim6295_device, write) - AM_RANGE(0xfffc, 0xfffc) AM_READ(soundlatch_r) + AM_RANGE(0xfffc, 0xfffc) AM_READ(soundlatch_byte_r) AM_RANGE(0xfffe, 0xfffe) AM_WRITENOP ADDRESS_MAP_END diff --git a/src/mame/drivers/tbowl.c b/src/mame/drivers/tbowl.c index 9290b766539..7e78b9ffad6 100644 --- a/src/mame/drivers/tbowl.c +++ b/src/mame/drivers/tbowl.c @@ -69,7 +69,7 @@ WRITE8_MEMBER(tbowl_state::shared_w) WRITE8_MEMBER(tbowl_state::tbowl_sound_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -192,7 +192,7 @@ static ADDRESS_MAP_START( 6206A_map, AS_PROGRAM, 8, tbowl_state ) AM_RANGE(0xe004, 0xe005) AM_WRITE(tbowl_adpcm_vol_w) AM_RANGE(0xe006, 0xe006) AM_WRITENOP AM_RANGE(0xe007, 0xe007) AM_WRITENOP /* NMI acknowledge */ - AM_RANGE(0xe010, 0xe010) AM_READ(soundlatch_r) + AM_RANGE(0xe010, 0xe010) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END /*** Input Ports diff --git a/src/mame/drivers/tecmo.c b/src/mame/drivers/tecmo.c index 0b27260588d..f113b65165d 100644 --- a/src/mame/drivers/tecmo.c +++ b/src/mame/drivers/tecmo.c @@ -64,7 +64,7 @@ WRITE8_MEMBER(tecmo_state::tecmo_bankswitch_w) WRITE8_MEMBER(tecmo_state::tecmo_sound_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); cputag_set_input_line(machine(), "soundcpu",INPUT_LINE_NMI,PULSE_LINE); } @@ -221,7 +221,7 @@ static ADDRESS_MAP_START( rygar_sound_map, AS_PROGRAM, 8, tecmo_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x4000, 0x47ff) AM_RAM AM_RANGE(0x8000, 0x8001) AM_DEVWRITE_LEGACY("ymsnd", ym3812_w) - AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_r) AM_DEVWRITE_LEGACY("msm", tecmo_adpcm_start_w) + AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_byte_r) AM_DEVWRITE_LEGACY("msm", tecmo_adpcm_start_w) AM_RANGE(0xd000, 0xd000) AM_WRITE(tecmo_adpcm_end_w) AM_RANGE(0xe000, 0xe000) AM_DEVWRITE_LEGACY("msm", tecmo_adpcm_vol_w) AM_RANGE(0xf000, 0xf000) AM_WRITENOP /* NMI acknowledge */ @@ -233,7 +233,7 @@ static ADDRESS_MAP_START( tecmo_sound_map, AS_PROGRAM, 8, tecmo_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0xa000, 0xa001) AM_DEVWRITE_LEGACY("ymsnd", ym3812_w) - AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_r) AM_DEVWRITE_LEGACY("msm", tecmo_adpcm_start_w) + AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_byte_r) AM_DEVWRITE_LEGACY("msm", tecmo_adpcm_start_w) AM_RANGE(0xc400, 0xc400) AM_WRITE(tecmo_adpcm_end_w) AM_RANGE(0xc800, 0xc800) AM_DEVWRITE_LEGACY("msm", tecmo_adpcm_vol_w) AM_RANGE(0xcc00, 0xcc00) AM_WRITENOP /* NMI acknowledge */ diff --git a/src/mame/drivers/tecmo16.c b/src/mame/drivers/tecmo16.c index ffb39fca365..da704e4f081 100644 --- a/src/mame/drivers/tecmo16.c +++ b/src/mame/drivers/tecmo16.c @@ -36,7 +36,7 @@ WRITE16_MEMBER(tecmo16_state::tecmo16_sound_command_w) { if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0x00, data & 0xff); + soundlatch_byte_w(space, 0x00, data & 0xff); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } } @@ -96,7 +96,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, tecmo16_state ) AM_RANGE(0xf000, 0xfbff) AM_RAM /* Sound RAM */ AM_RANGE(0xfc00, 0xfc00) AM_DEVREADWRITE("oki", okim6295_device, read, write) AM_RANGE(0xfc04, 0xfc05) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) - AM_RANGE(0xfc08, 0xfc08) AM_READ(soundlatch_r) + AM_RANGE(0xfc08, 0xfc08) AM_READ(soundlatch_byte_r) AM_RANGE(0xfc0c, 0xfc0c) AM_NOP AM_RANGE(0xfffe, 0xffff) AM_RAM ADDRESS_MAP_END diff --git a/src/mame/drivers/tecmosys.c b/src/mame/drivers/tecmosys.c index faa6b0884be..c487f49d7dc 100644 --- a/src/mame/drivers/tecmosys.c +++ b/src/mame/drivers/tecmosys.c @@ -196,7 +196,7 @@ READ16_MEMBER(tecmosys_state::sound_r) if (ACCESSING_BITS_0_7) { machine().scheduler().synchronize(); - return soundlatch2_r(space, 0 ); + return soundlatch2_byte_r(space, 0 ); } return 0; @@ -207,7 +207,7 @@ WRITE16_MEMBER(tecmosys_state::sound_w) if (ACCESSING_BITS_0_7) { machine().scheduler().synchronize(); - soundlatch_w(space, 0x00, data & 0xff); + soundlatch_byte_w(space, 0x00, data & 0xff); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } } @@ -351,8 +351,8 @@ static ADDRESS_MAP_START( io_map, AS_IO, 8, tecmosys_state ) AM_RANGE(0x10, 0x10) AM_DEVREADWRITE("oki", okim6295_device, read, write) AM_RANGE(0x20, 0x20) AM_WRITE(tecmosys_oki_bank_w) AM_RANGE(0x30, 0x30) AM_WRITE(tecmosys_z80_bank_w) - AM_RANGE(0x40, 0x40) AM_READ(soundlatch_r) - AM_RANGE(0x50, 0x50) AM_WRITE(soundlatch2_w) + AM_RANGE(0x40, 0x40) AM_READ(soundlatch_byte_r) + AM_RANGE(0x50, 0x50) AM_WRITE(soundlatch2_byte_w) AM_RANGE(0x60, 0x61) AM_DEVREADWRITE_LEGACY("ymz", ymz280b_r, ymz280b_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/tehkanwc.c b/src/mame/drivers/tehkanwc.c index 865d75da5ed..6538b3c0a62 100644 --- a/src/mame/drivers/tehkanwc.c +++ b/src/mame/drivers/tehkanwc.c @@ -140,7 +140,7 @@ WRITE8_MEMBER(tehkanwc_state::tehkanwc_track_1_reset_w) WRITE8_MEMBER(tehkanwc_state::sound_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -151,7 +151,7 @@ static TIMER_CALLBACK( reset_callback ) WRITE8_MEMBER(tehkanwc_state::sound_answer_w) { - soundlatch2_w(space, 0, data); + soundlatch2_byte_w(space, 0, data); /* in Gridiron, the sound CPU goes in a tight loop after the self test, */ /* probably waiting to be reset by a watchdog */ @@ -232,7 +232,7 @@ static ADDRESS_MAP_START( main_mem, AS_PROGRAM, 8, tehkanwc_state ) AM_RANGE(0xf810, 0xf811) AM_READWRITE(tehkanwc_track_1_r, tehkanwc_track_1_reset_w) /* track 1 x/y */ AM_RANGE(0xf812, 0xf812) AM_WRITE(gridiron_led1_w) AM_RANGE(0xf813, 0xf813) AM_READ_PORT("P2BUT") - AM_RANGE(0xf820, 0xf820) AM_READ(soundlatch2_r) AM_WRITE(sound_command_w) /* answer from the sound CPU */ + AM_RANGE(0xf820, 0xf820) AM_READ(soundlatch2_byte_r) AM_WRITE(sound_command_w) /* answer from the sound CPU */ AM_RANGE(0xf840, 0xf840) AM_READ_PORT("DSW1") AM_WRITE(sub_cpu_halt_w) AM_RANGE(0xf850, 0xf850) AM_READ_PORT("DSW2") AM_WRITENOP /* ?? writes 0x00 or 0xff */ AM_RANGE(0xf860, 0xf860) AM_READ(watchdog_reset_r) AM_WRITE(tehkanwc_flipscreen_x_w) @@ -260,7 +260,7 @@ static ADDRESS_MAP_START( sound_mem, AS_PROGRAM, 8, tehkanwc_state ) AM_RANGE(0x8001, 0x8001) AM_DEVWRITE_LEGACY("msm", msm_reset_w)/* MSM51xx reset */ AM_RANGE(0x8002, 0x8002) AM_WRITENOP /* ?? written in the IRQ handler */ AM_RANGE(0x8003, 0x8003) AM_WRITENOP /* ?? written in the NMI handler */ - AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_r) AM_WRITE(sound_answer_w) + AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_byte_r) AM_WRITE(sound_answer_w) ADDRESS_MAP_END static ADDRESS_MAP_START( sound_port, AS_IO, 8, tehkanwc_state ) diff --git a/src/mame/drivers/terracre.c b/src/mame/drivers/terracre.c index 8513da4659e..4c1112b3061 100644 --- a/src/mame/drivers/terracre.c +++ b/src/mame/drivers/terracre.c @@ -146,12 +146,12 @@ READ16_MEMBER(terracre_state::horekid_IN2_r) WRITE16_MEMBER(terracre_state::amazon_sound_w) { - soundlatch_w(space,0,((data & 0x7f) << 1) | 1); + soundlatch_byte_w(space,0,((data & 0x7f) << 1) | 1); } READ8_MEMBER(terracre_state::soundlatch_clear_r) { - soundlatch_clear_w(space,0,0); + soundlatch_clear_byte_w(space,0,0); return 0; } @@ -239,7 +239,7 @@ static ADDRESS_MAP_START( sound_3526_io_map, AS_IO, 8, terracre_state ) AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("dac1", dac_signed_w) AM_RANGE(0x03, 0x03) AM_DEVWRITE_LEGACY("dac2", dac_signed_w) AM_RANGE(0x04, 0x04) AM_READ(soundlatch_clear_r) - AM_RANGE(0x06, 0x06) AM_READ(soundlatch_r) + AM_RANGE(0x06, 0x06) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static ADDRESS_MAP_START( sound_2203_io_map, AS_IO, 8, terracre_state ) @@ -248,7 +248,7 @@ static ADDRESS_MAP_START( sound_2203_io_map, AS_IO, 8, terracre_state ) AM_RANGE(0x02, 0x02) AM_DEVWRITE_LEGACY("dac1", dac_signed_w) AM_RANGE(0x03, 0x03) AM_DEVWRITE_LEGACY("dac2", dac_signed_w) AM_RANGE(0x04, 0x04) AM_READ(soundlatch_clear_r) - AM_RANGE(0x06, 0x06) AM_READ(soundlatch_r) + AM_RANGE(0x06, 0x06) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static INPUT_PORTS_START( terracre ) diff --git a/src/mame/drivers/thedeep.c b/src/mame/drivers/thedeep.c index 2dc2f84da8b..ac2d863b86c 100644 --- a/src/mame/drivers/thedeep.c +++ b/src/mame/drivers/thedeep.c @@ -45,7 +45,7 @@ WRITE8_MEMBER(thedeep_state::thedeep_nmi_w) WRITE8_MEMBER(thedeep_state::thedeep_sound_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -177,7 +177,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( audio_map, AS_PROGRAM, 8, thedeep_state ) AM_RANGE(0x0000, 0x07ff) AM_RAM AM_RANGE(0x0800, 0x0801) AM_DEVWRITE_LEGACY("ymsnd", ym2203_w) // - AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_r) // From Main CPU + AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) // From Main CPU AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/thepit.c b/src/mame/drivers/thepit.c index b3de2d18d32..f7aaf63d316 100644 --- a/src/mame/drivers/thepit.c +++ b/src/mame/drivers/thepit.c @@ -169,7 +169,7 @@ static ADDRESS_MAP_START( thepit_main_map, AS_PROGRAM, 8, thepit_state ) AM_RANGE(0xb004, 0xb005) AM_WRITENOP // Unused, but initialized AM_RANGE(0xb006, 0xb006) AM_WRITE(thepit_flip_screen_x_w) AM_RANGE(0xb007, 0xb007) AM_WRITE(thepit_flip_screen_y_w) - AM_RANGE(0xb800, 0xb800) AM_READWRITE(watchdog_reset_r, soundlatch_w) + AM_RANGE(0xb800, 0xb800) AM_READWRITE(watchdog_reset_r, soundlatch_byte_w) ADDRESS_MAP_END static ADDRESS_MAP_START( intrepid_main_map, AS_PROGRAM, 8, thepit_state ) @@ -191,7 +191,7 @@ static ADDRESS_MAP_START( intrepid_main_map, AS_PROGRAM, 8, thepit_state ) AM_RANGE(0xb005, 0xb005) AM_WRITE(intrepid_graphics_bank_w) AM_RANGE(0xb006, 0xb006) AM_WRITE(thepit_flip_screen_x_w) AM_RANGE(0xb007, 0xb007) AM_WRITE(thepit_flip_screen_y_w) - AM_RANGE(0xb800, 0xb800) AM_READWRITE(watchdog_reset_r, soundlatch_w) + AM_RANGE(0xb800, 0xb800) AM_READWRITE(watchdog_reset_r, soundlatch_byte_w) ADDRESS_MAP_END @@ -203,7 +203,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( audio_io_map, AS_IO, 8, thepit_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_WRITE(soundlatch_clear_w) + AM_RANGE(0x00, 0x00) AM_WRITE(soundlatch_clear_byte_w) AM_RANGE(0x8c, 0x8d) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) AM_RANGE(0x8d, 0x8d) AM_DEVREAD_LEGACY("ay2", ay8910_r) AM_RANGE(0x8e, 0x8f) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) @@ -629,7 +629,7 @@ static const ay8910_interface ay8910_config = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL diff --git a/src/mame/drivers/thunderx.c b/src/mame/drivers/thunderx.c index 0c9082f1f31..038352e7534 100644 --- a/src/mame/drivers/thunderx.c +++ b/src/mame/drivers/thunderx.c @@ -397,7 +397,7 @@ WRITE8_MEMBER(thunderx_state::k052109_051960_w) static ADDRESS_MAP_START( scontra_map, AS_PROGRAM, 8, thunderx_state ) AM_RANGE(0x1f80, 0x1f80) AM_WRITE(scontra_bankswitch_w) /* bankswitch control + coin counters */ - AM_RANGE(0x1f84, 0x1f84) AM_WRITE(soundlatch_w) + AM_RANGE(0x1f84, 0x1f84) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x1f88, 0x1f88) AM_WRITE(thunderx_sh_irqtrigger_w) /* cause interrupt on audio CPU */ AM_RANGE(0x1f8c, 0x1f8c) AM_WRITE(watchdog_reset_w) AM_RANGE(0x1f90, 0x1f90) AM_READ_PORT("SYSTEM") @@ -417,7 +417,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( thunderx_map, AS_PROGRAM, 8, thunderx_state ) AM_RANGE(0x1f80, 0x1f80) AM_WRITE(thunderx_videobank_w) - AM_RANGE(0x1f84, 0x1f84) AM_WRITE(soundlatch_w) + AM_RANGE(0x1f84, 0x1f84) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x1f88, 0x1f88) AM_WRITE(thunderx_sh_irqtrigger_w) /* cause interrupt on audio CPU */ AM_RANGE(0x1f8c, 0x1f8c) AM_WRITE(watchdog_reset_w) AM_RANGE(0x1f90, 0x1f90) AM_READ_PORT("SYSTEM") @@ -438,7 +438,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( scontra_sound_map, AS_PROGRAM, 8, thunderx_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM /* ROM */ AM_RANGE(0x8000, 0x87ff) AM_RAM /* RAM */ - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) /* soundlatch_r */ + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) /* soundlatch_byte_r */ AM_RANGE(0xb000, 0xb00d) AM_DEVREADWRITE_LEGACY("k007232", k007232_r, k007232_w) /* 007232 registers */ AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) /* YM2151 */ AM_RANGE(0xf000, 0xf000) AM_DEVWRITE_LEGACY("k007232", scontra_snd_bankswitch_w) /* 007232 bank select */ @@ -447,7 +447,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( thunderx_sound_map, AS_PROGRAM, 8, thunderx_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0x87ff) AM_RAM - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/tigeroad.c b/src/mame/drivers/tigeroad.c index f668bac9551..e08a588ce7f 100644 --- a/src/mame/drivers/tigeroad.c +++ b/src/mame/drivers/tigeroad.c @@ -139,7 +139,7 @@ static void f1dream_protection_w(address_space *space) else if ((prevpc == 0x27f8) || (prevpc == 0x511a) || (prevpc == 0x5142) || (prevpc == 0x516a)) { /* The main CPU stuffs the byte for the soundlatch into 0xfffffd.*/ - state->soundlatch_w(*space,2,state->m_ram16[0x3ffc/2]); + state->soundlatch_byte_w(*space,2,state->m_ram16[0x3ffc/2]); } } @@ -152,7 +152,7 @@ WRITE16_MEMBER(tigeroad_state::f1dream_control_w) WRITE16_MEMBER(tigeroad_state::tigeroad_soundcmd_w) { if (ACCESSING_BITS_8_15) - soundlatch_w(space,offset,data >> 8); + soundlatch_byte_w(space,offset,data >> 8); } static WRITE8_DEVICE_HANDLER( msm5205_w ) @@ -187,12 +187,12 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, tigeroad_state ) AM_RANGE(0x8000, 0x8001) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w) AM_RANGE(0xa000, 0xa001) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w) AM_RANGE(0xc000, 0xc7ff) AM_RAM - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static ADDRESS_MAP_START( sound_port_map, AS_IO, 8, tigeroad_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x7f, 0x7f) AM_WRITE(soundlatch2_w) + AM_RANGE(0x7f, 0x7f) AM_WRITE(soundlatch2_byte_w) ADDRESS_MAP_END static ADDRESS_MAP_START( sample_map, AS_PROGRAM, 8, tigeroad_state ) @@ -201,7 +201,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sample_port_map, AS_IO, 8, tigeroad_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch2_r) + AM_RANGE(0x00, 0x00) AM_READ(soundlatch2_byte_r) AM_RANGE(0x01, 0x01) AM_DEVWRITE_LEGACY("msm", msm5205_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/timelimt.c b/src/mame/drivers/timelimt.c index b919857696a..d36e9c9ce3d 100644 --- a/src/mame/drivers/timelimt.c +++ b/src/mame/drivers/timelimt.c @@ -21,7 +21,7 @@ Notes: static MACHINE_START( timelimt ) { - soundlatch_setclearedvalue( machine, 0 ); + machine.driver_data<timelimt_state>()->soundlatch_setclearedvalue( 0 ); } static MACHINE_RESET( timelimt ) @@ -54,7 +54,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, timelimt_state ) AM_RANGE(0xb000, 0xb000) AM_READ_PORT("DSW") AM_RANGE(0xb000, 0xb000) AM_WRITE(nmi_enable_w) /* nmi enable */ AM_RANGE(0xb003, 0xb003) AM_WRITE(sound_reset_w)/* sound reset ? */ - AM_RANGE(0xb800, 0xb800) AM_WRITE(soundlatch_w) /* sound write */ + AM_RANGE(0xb800, 0xb800) AM_WRITE(soundlatch_byte_w) /* sound write */ AM_RANGE(0xb800, 0xb800) AM_READNOP /* NMI ack? */ AM_RANGE(0xc800, 0xc800) AM_WRITE(timelimt_scroll_x_lsb_w) AM_RANGE(0xc801, 0xc801) AM_WRITE(timelimt_scroll_x_msb_w) @@ -75,7 +75,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, timelimt_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_WRITE(soundlatch_clear_w) + AM_RANGE(0x00, 0x00) AM_WRITE(soundlatch_clear_byte_w) AM_RANGE(0x8c, 0x8d) AM_DEVREADWRITE_LEGACY("ay1", ay8910_r, ay8910_address_data_w) AM_RANGE(0x8e, 0x8f) AM_DEVREADWRITE_LEGACY("ay2", ay8910_r, ay8910_address_data_w) ADDRESS_MAP_END @@ -210,7 +210,7 @@ static const ay8910_interface ay8910_config = { AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL diff --git a/src/mame/drivers/timeplt.c b/src/mame/drivers/timeplt.c index 1e14efa6386..fb8ee1517e7 100644 --- a/src/mame/drivers/timeplt.c +++ b/src/mame/drivers/timeplt.c @@ -120,7 +120,7 @@ static ADDRESS_MAP_START( timeplt_main_map, AS_PROGRAM, 8, timeplt_state ) AM_RANGE(0xa800, 0xafff) AM_RAM AM_RANGE(0xb000, 0xb0ff) AM_MIRROR(0x0b00) AM_RAM AM_BASE(m_spriteram) AM_RANGE(0xb400, 0xb4ff) AM_MIRROR(0x0b00) AM_RAM AM_BASE(m_spriteram2) - AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_WRITE(soundlatch_w) + AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_WRITE(watchdog_reset_w) AM_RANGE(0xc300, 0xc300) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_nmi_enable_w) AM_RANGE(0xc302, 0xc302) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_flipscreen_w) @@ -144,7 +144,7 @@ static ADDRESS_MAP_START( psurge_main_map, AS_PROGRAM, 8, timeplt_state ) AM_RANGE(0xa800, 0xafff) AM_RAM AM_RANGE(0xb000, 0xb0ff) AM_MIRROR(0x0b00) AM_RAM AM_BASE(m_spriteram) AM_RANGE(0xb400, 0xb4ff) AM_MIRROR(0x0b00) AM_RAM AM_BASE(m_spriteram2) - AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_WRITE(soundlatch_w) + AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_WRITE(watchdog_reset_w) AM_RANGE(0xc302, 0xc302) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_flipscreen_w) AM_RANGE(0xc304, 0xc304) AM_MIRROR(0x0cf1) AM_WRITE_LEGACY(timeplt_sh_irqtrigger_w) @@ -166,7 +166,7 @@ static ADDRESS_MAP_START( chkun_main_map, AS_PROGRAM, 8, timeplt_state ) AM_RANGE(0xa800, 0xafff) AM_RAM AM_RANGE(0xb000, 0xb0ff) AM_MIRROR(0x0b00) AM_RAM AM_BASE(m_spriteram) AM_RANGE(0xb400, 0xb4ff) AM_MIRROR(0x0b00) AM_RAM AM_BASE(m_spriteram2) - AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_WRITE(soundlatch_w) + AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x0cff) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xc200, 0xc200) AM_MIRROR(0x0cff) AM_WRITE(watchdog_reset_w) AM_RANGE(0xc300, 0xc300) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_nmi_enable_w) AM_RANGE(0xc302, 0xc302) AM_MIRROR(0x0cf1) AM_WRITE(timeplt_flipscreen_w) diff --git a/src/mame/drivers/tmnt.c b/src/mame/drivers/tmnt.c index ddff0d4baa7..0ffb66c8515 100644 --- a/src/mame/drivers/tmnt.c +++ b/src/mame/drivers/tmnt.c @@ -193,7 +193,7 @@ static INTERRUPT_GEN( lgtnfght_interrupt ) WRITE16_MEMBER(tmnt_state::tmnt_sound_command_w) { if (ACCESSING_BITS_0_7) - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); } static READ8_DEVICE_HANDLER( punkshot_sound_r ) @@ -214,7 +214,7 @@ static WRITE8_DEVICE_HANDLER( glfgreat_sound_w ) READ16_MEMBER(tmnt_state::prmrsocr_sound_r) { - return soundlatch3_r(space, 0); + return soundlatch3_byte_r(space, 0); } WRITE16_MEMBER(tmnt_state::prmrsocr_sound_cmd_w) @@ -223,9 +223,9 @@ WRITE16_MEMBER(tmnt_state::prmrsocr_sound_cmd_w) { data &= 0xff; if (offset == 0) - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); else - soundlatch2_w(space, 0, data); + soundlatch2_byte_w(space, 0, data); } } @@ -1096,7 +1096,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( mia_audio_map, AS_PROGRAM, 8, tmnt_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0x87ff) AM_RAM - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) AM_RANGE(0xb000, 0xb00d) AM_DEVREADWRITE_LEGACY("k007232", k007232_r, k007232_w) AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) ADDRESS_MAP_END @@ -1106,7 +1106,7 @@ static ADDRESS_MAP_START( tmnt_audio_map, AS_PROGRAM, 8, tmnt_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x9000, 0x9000) AM_READWRITE(tmnt_sres_r, tmnt_sres_w) /* title music & UPD7759C reset */ - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) AM_RANGE(0xb000, 0xb00d) AM_DEVREADWRITE_LEGACY("k007232", k007232_r, k007232_w) AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0xd000, 0xd000) AM_DEVWRITE_LEGACY("upd", upd7759_port_w) @@ -1174,9 +1174,9 @@ static ADDRESS_MAP_START( prmrsocr_audio_map, AS_PROGRAM, 8, tmnt_state ) AM_RANGE(0xc000, 0xdfff) AM_RAM AM_RANGE(0xe000, 0xe0ff) AM_DEVREADWRITE("k054539", k054539_device, read, write) AM_RANGE(0xe100, 0xe12f) AM_READWRITE(k054539_ctrl_r, k054539_ctrl_w) - AM_RANGE(0xf000, 0xf000) AM_WRITE(soundlatch3_w) - AM_RANGE(0xf002, 0xf002) AM_READ(soundlatch_r) - AM_RANGE(0xf003, 0xf003) AM_READ(soundlatch2_r) + AM_RANGE(0xf000, 0xf000) AM_WRITE(soundlatch3_byte_w) + AM_RANGE(0xf002, 0xf002) AM_READ(soundlatch_byte_r) + AM_RANGE(0xf003, 0xf003) AM_READ(soundlatch2_byte_r) AM_RANGE(0xf800, 0xf800) AM_WRITE(prmrsocr_audio_bankswitch_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/tnzs.c b/src/mame/drivers/tnzs.c index f255179c3e9..d0b3662a36e 100644 --- a/src/mame/drivers/tnzs.c +++ b/src/mame/drivers/tnzs.c @@ -807,7 +807,7 @@ ADDRESS_MAP_END WRITE8_MEMBER(tnzs_state::tnzsb_sound_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff); } @@ -856,7 +856,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( tnzsb_io_map, AS_IO, 8, tnzs_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w) - AM_RANGE(0x02, 0x02) AM_READ(soundlatch_r) + AM_RANGE(0x02, 0x02) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static ADDRESS_MAP_START( i8742_io_map, AS_IO, 8, tnzs_state ) diff --git a/src/mame/drivers/toaplan2.c b/src/mame/drivers/toaplan2.c index 77ca6ea4ade..d754258efc2 100644 --- a/src/mame/drivers/toaplan2.c +++ b/src/mame/drivers/toaplan2.c @@ -863,7 +863,7 @@ WRITE16_MEMBER(toaplan2_state::bgaregga_soundlatch_w) if (ACCESSING_BITS_0_7) { - soundlatch_w(space, offset, data & 0xff); + soundlatch_byte_w(space, offset, data & 0xff); device_set_input_line(m_sub_cpu, 0, HOLD_LINE); } } @@ -921,7 +921,7 @@ WRITE16_MEMBER(toaplan2_state::batrider_soundlatch_w) if (ACCESSING_BITS_0_7) { - soundlatch_w(space, offset, data & 0xff); + soundlatch_byte_w(space, offset, data & 0xff); device_set_input_line(m_sub_cpu, INPUT_LINE_NMI, ASSERT_LINE); } } @@ -932,7 +932,7 @@ WRITE16_MEMBER(toaplan2_state::batrider_soundlatch2_w) if (ACCESSING_BITS_0_7) { - soundlatch2_w(space, offset, data & 0xff); + soundlatch2_byte_w(space, offset, data & 0xff); device_set_input_line(m_sub_cpu, INPUT_LINE_NMI, ASSERT_LINE); } } @@ -1418,7 +1418,7 @@ static ADDRESS_MAP_START( bgaregga_sound_z80_mem, AS_PROGRAM, 8, toaplan2_state AM_RANGE(0xe006, 0xe008) AM_WRITE(raizing_oki_bankswitch_w) AM_RANGE(0xe00a, 0xe00a) AM_WRITE(raizing_z80_bankswitch_w) AM_RANGE(0xe00c, 0xe00c) AM_WRITE(bgaregga_E00C_w) - AM_RANGE(0xe01c, 0xe01c) AM_READ(soundlatch_r) + AM_RANGE(0xe01c, 0xe01c) AM_READ(soundlatch_byte_r) AM_RANGE(0xe01d, 0xe01d) AM_READ(bgaregga_E01D_r) ADDRESS_MAP_END @@ -1432,12 +1432,12 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( batrider_sound_z80_port, AS_IO, 8, toaplan2_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x40, 0x40) AM_WRITE(soundlatch3_w) - AM_RANGE(0x42, 0x42) AM_WRITE(soundlatch4_w) + AM_RANGE(0x40, 0x40) AM_WRITE(soundlatch3_byte_w) + AM_RANGE(0x42, 0x42) AM_WRITE(soundlatch4_byte_w) AM_RANGE(0x44, 0x44) AM_WRITE(batrider_sndirq_w) AM_RANGE(0x46, 0x46) AM_WRITE(batrider_clear_nmi_w) - AM_RANGE(0x48, 0x48) AM_READ(soundlatch_r) - AM_RANGE(0x4a, 0x4a) AM_READ(soundlatch2_r) + AM_RANGE(0x48, 0x48) AM_READ(soundlatch_byte_r) + AM_RANGE(0x4a, 0x4a) AM_READ(soundlatch2_byte_r) AM_RANGE(0x80, 0x81) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0x82, 0x82) AM_DEVREADWRITE("oki1", okim6295_device, read, write) AM_RANGE(0x84, 0x84) AM_DEVREADWRITE("oki2", okim6295_device, read, write) @@ -1454,12 +1454,12 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( bbakraid_sound_z80_port, AS_IO, 8, toaplan2_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x40, 0x40) AM_WRITE(soundlatch3_w) - AM_RANGE(0x42, 0x42) AM_WRITE(soundlatch4_w) + AM_RANGE(0x40, 0x40) AM_WRITE(soundlatch3_byte_w) + AM_RANGE(0x42, 0x42) AM_WRITE(soundlatch4_byte_w) AM_RANGE(0x44, 0x44) AM_WRITE(batrider_sndirq_w) AM_RANGE(0x46, 0x46) AM_WRITE(batrider_clear_nmi_w) - AM_RANGE(0x48, 0x48) AM_READ(soundlatch_r) - AM_RANGE(0x4a, 0x4a) AM_READ(soundlatch2_r) + AM_RANGE(0x48, 0x48) AM_READ(soundlatch_byte_r) + AM_RANGE(0x4a, 0x4a) AM_READ(soundlatch2_byte_r) AM_RANGE(0x80, 0x81) AM_DEVREADWRITE_LEGACY("ymz", ymz280b_r, ymz280b_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/toki.c b/src/mame/drivers/toki.c index 96427b9f72a..5a7228ae510 100644 --- a/src/mame/drivers/toki.c +++ b/src/mame/drivers/toki.c @@ -45,7 +45,7 @@ for now. Even at 12 this slowdown still happens a little. WRITE16_MEMBER(toki_state::tokib_soundcommand16_w) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE); } @@ -136,7 +136,7 @@ static ADDRESS_MAP_START( tokib_audio_map, AS_PROGRAM, 8, toki_state ) AM_RANGE(0xe400, 0xe400) AM_WRITE(toki_adpcm_data_w) AM_RANGE(0xec00, 0xec01) AM_MIRROR(0x0008) AM_DEVREADWRITE_LEGACY("ymsnd", ym3812_r, ym3812_w) AM_RANGE(0xf000, 0xf7ff) AM_RAM - AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_r) + AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END /*****************************************************************************/ diff --git a/src/mame/drivers/tp84.c b/src/mame/drivers/tp84.c index 91db77cfba7..cfee6ad7434 100644 --- a/src/mame/drivers/tp84.c +++ b/src/mame/drivers/tp84.c @@ -135,7 +135,7 @@ static ADDRESS_MAP_START( tp84_cpu1_map, AS_PROGRAM, 8, tp84_state ) AM_RANGE(0x3004, 0x3004) AM_WRITEONLY AM_BASE(m_flipscreen_x) AM_RANGE(0x3005, 0x3005) AM_WRITEONLY AM_BASE(m_flipscreen_y) AM_RANGE(0x3800, 0x3800) AM_WRITE(tp84_sh_irqtrigger_w) - AM_RANGE(0x3a00, 0x3a00) AM_WRITE(soundlatch_w) + AM_RANGE(0x3a00, 0x3a00) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x3c00, 0x3c00) AM_WRITEONLY AM_BASE(m_scroll_x) AM_RANGE(0x3e00, 0x3e00) AM_WRITEONLY AM_BASE(m_scroll_y) AM_RANGE(0x4000, 0x43ff) AM_RAM AM_BASE(m_bg_videoram) @@ -161,7 +161,7 @@ static ADDRESS_MAP_START( tp84b_cpu1_map, AS_PROGRAM, 8, tp84_state ) AM_RANGE(0x1c04, 0x1c04) AM_WRITEONLY AM_BASE(m_flipscreen_x) AM_RANGE(0x1c05, 0x1c05) AM_WRITEONLY AM_BASE(m_flipscreen_y) AM_RANGE(0x1e00, 0x1e00) AM_WRITE(tp84_sh_irqtrigger_w) - AM_RANGE(0x1e80, 0x1e80) AM_WRITE(soundlatch_w) + AM_RANGE(0x1e80, 0x1e80) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x1f00, 0x1f00) AM_WRITEONLY AM_BASE(m_scroll_x) AM_RANGE(0x1f80, 0x1f80) AM_WRITEONLY AM_BASE(m_scroll_y) AM_RANGE(0x8000, 0xffff) AM_ROM @@ -189,7 +189,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( audio_map, AS_PROGRAM, 8, tp84_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x4000, 0x43ff) AM_RAM - AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_r) + AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) AM_RANGE(0x8000, 0x8000) AM_READ(tp84_sh_timer_r) AM_RANGE(0xa000, 0xa1ff) AM_WRITE(tp84_filter_w) AM_RANGE(0xc000, 0xc000) AM_WRITENOP diff --git a/src/mame/drivers/trackfld.c b/src/mame/drivers/trackfld.c index 4a0e5e29df1..7f990fcf575 100644 --- a/src/mame/drivers/trackfld.c +++ b/src/mame/drivers/trackfld.c @@ -232,7 +232,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, trackfld_state ) AM_RANGE(0x1085, 0x1085) AM_MIRROR(0x0078) AM_WRITENOP /* CN3.2 */ AM_RANGE(0x1086, 0x1086) AM_MIRROR(0x0078) AM_WRITENOP /* CN3.4 */ AM_RANGE(0x1087, 0x1087) AM_MIRROR(0x0078) AM_WRITE(irq_mask_w) /* INT */ - AM_RANGE(0x1100, 0x1100) AM_MIRROR(0x007f) AM_WRITE(soundlatch_w) /* 32 */ + AM_RANGE(0x1100, 0x1100) AM_MIRROR(0x007f) AM_WRITE(soundlatch_byte_w) /* 32 */ AM_RANGE(0x1200, 0x1200) AM_MIRROR(0x007f) AM_READ_PORT("DSW2") AM_RANGE(0x1280, 0x1280) AM_MIRROR(0x007c) AM_READ_PORT("SYSTEM") AM_RANGE(0x1281, 0x1281) AM_MIRROR(0x007c) AM_READ_PORT("IN0") @@ -271,7 +271,7 @@ static ADDRESS_MAP_START( yieartf_map, AS_PROGRAM, 8, trackfld_state ) AM_RANGE(0x1085, 0x1085) AM_MIRROR(0x0078) AM_WRITENOP /* CN3.2 */ AM_RANGE(0x1086, 0x1086) AM_MIRROR(0x0078) AM_WRITENOP /* CN3.4 */ AM_RANGE(0x1087, 0x1087) AM_MIRROR(0x0078) AM_WRITE(irq_mask_w) /* INT */ -// AM_RANGE(0x1100, 0x1100) AM_MIRROR(0x007f) AM_WRITE(soundlatch_w) /* 32 */ +// AM_RANGE(0x1100, 0x1100) AM_MIRROR(0x007f) AM_WRITE(soundlatch_byte_w) /* 32 */ AM_RANGE(0x1200, 0x1200) AM_MIRROR(0x007f) AM_READ_PORT("DSW2") AM_RANGE(0x1280, 0x1280) AM_MIRROR(0x007c) AM_READ_PORT("SYSTEM") AM_RANGE(0x1281, 0x1281) AM_MIRROR(0x007c) AM_READ_PORT("IN0") @@ -298,7 +298,7 @@ static ADDRESS_MAP_START( reaktor_map, AS_PROGRAM, 8, trackfld_state ) AM_RANGE(0x9081, 0x9081) AM_WRITE_LEGACY(konami_sh_irqtrigger_w) /* cause interrupt on audio CPU */ AM_RANGE(0x9083, 0x9084) AM_WRITE(coin_w) AM_RANGE(0x9087, 0x9087) AM_WRITE(irq_mask_w) - AM_RANGE(0x9100, 0x9100) AM_WRITE(soundlatch_w) + AM_RANGE(0x9100, 0x9100) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x9200, 0x9200) AM_READ_PORT("DSW2") AM_RANGE(0x9280, 0x9280) AM_READ_PORT("SYSTEM") AM_RANGE(0x9281, 0x9281) AM_READ_PORT("IN0") @@ -331,7 +331,7 @@ static ADDRESS_MAP_START( mastkin_map, AS_PROGRAM, 8, trackfld_state ) AM_RANGE(0x10b1, 0x10b1) AM_READNOP AM_WRITE_LEGACY(konami_sh_irqtrigger_w) AM_RANGE(0x10b3, 0x10b4) AM_WRITE(coin_w) // actually not used AM_RANGE(0x10b7, 0x10b7) AM_READNOP AM_WRITE(irq_mask_w) - AM_RANGE(0x1100, 0x1100) AM_WRITE(soundlatch_w) + AM_RANGE(0x1100, 0x1100) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x1200, 0x1200) AM_READ_PORT("DSW2") AM_RANGE(0x1280, 0x1280) AM_READ_PORT("SYSTEM") AM_RANGE(0x1281, 0x1281) AM_READ_PORT("IN0") @@ -358,7 +358,7 @@ static ADDRESS_MAP_START( wizzquiz_map, AS_PROGRAM, 8, trackfld_state ) AM_RANGE(0x1081, 0x1081) AM_WRITE_LEGACY(konami_sh_irqtrigger_w) /* cause interrupt on audio CPU */ AM_RANGE(0x1083, 0x1084) AM_WRITE(coin_w) AM_RANGE(0x1087, 0x1087) AM_WRITE(irq_mask_w) - AM_RANGE(0x1100, 0x1100) AM_WRITE(soundlatch_w) + AM_RANGE(0x1100, 0x1100) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x1200, 0x1200) AM_READ_PORT("DSW2") AM_RANGE(0x1280, 0x1280) AM_READ_PORT("SYSTEM") AM_RANGE(0x1281, 0x1281) AM_READ_PORT("IN0") @@ -389,7 +389,7 @@ READ8_DEVICE_HANDLER( trackfld_SN76496_r ) static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, trackfld_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x4000, 0x43ff) AM_MIRROR(0x1c00) AM_RAM - AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x1fff) AM_READ(soundlatch_r) + AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x1fff) AM_READ(soundlatch_byte_r) AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x1fff) AM_READ_LEGACY(trackfld_sh_timer_r) AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1fff) AM_WRITE_LEGACY(konami_SN76496_latch_w) AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x1fff) AM_DEVREADWRITE_LEGACY("snsnd", trackfld_SN76496_r, konami_SN76496_w) @@ -403,7 +403,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( hyprolyb_sound_map, AS_PROGRAM, 8, trackfld_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x4000, 0x43ff) AM_MIRROR(0x1c00) AM_RAM - AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x1fff) AM_READ(soundlatch_r) + AM_RANGE(0x6000, 0x6000) AM_MIRROR(0x1fff) AM_READ(soundlatch_byte_r) AM_RANGE(0x8000, 0x8000) AM_MIRROR(0x1fff) AM_READ_LEGACY(trackfld_sh_timer_r) AM_RANGE(0xa000, 0xa000) AM_MIRROR(0x1fff) AM_WRITE_LEGACY(konami_SN76496_latch_w) AM_RANGE(0xc000, 0xc000) AM_MIRROR(0x1fff) AM_DEVREADWRITE_LEGACY("snsnd", trackfld_SN76496_r, konami_SN76496_w) diff --git a/src/mame/drivers/tryout.c b/src/mame/drivers/tryout.c index c7322ddc84d..cb6435354da 100644 --- a/src/mame/drivers/tryout.c +++ b/src/mame/drivers/tryout.c @@ -32,7 +32,7 @@ WRITE8_MEMBER(tryout_state::tryout_nmi_ack_w) WRITE8_MEMBER(tryout_state::tryout_sound_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE); } @@ -76,7 +76,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_cpu, AS_PROGRAM, 8, tryout_state ) AM_RANGE(0x0000, 0x07ff) AM_RAM AM_RANGE(0x4000, 0x4001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) AM_RANGE(0xd000, 0xd000) AM_WRITE(tryout_sound_irq_ack_w) AM_RANGE(0xc000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/tsamurai.c b/src/mame/drivers/tsamurai.c index 3520529da4f..0bbec4ff8af 100644 --- a/src/mame/drivers/tsamurai.c +++ b/src/mame/drivers/tsamurai.c @@ -299,7 +299,7 @@ READ8_MEMBER(tsamurai_state::vsgongf_a100_r) WRITE8_MEMBER(tsamurai_state::vsgongf_sound_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -333,7 +333,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_vsgongf_map, AS_PROGRAM, 8, tsamurai_state ) AM_RANGE(0x0000, 0x3fff) AM_ROM AM_RANGE(0x6000, 0x63ff) AM_RAM /* work RAM */ - AM_RANGE(0x8000, 0x8000) AM_READ(soundlatch_r) AM_WRITE(vsgongf_sound_nmi_enable_w) /* NMI enable */ + AM_RANGE(0x8000, 0x8000) AM_READ(soundlatch_byte_r) AM_WRITE(vsgongf_sound_nmi_enable_w) /* NMI enable */ AM_RANGE(0xa000, 0xa000) AM_DEVWRITE_LEGACY("dac", dac_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/tumbleb.c b/src/mame/drivers/tumbleb.c index 73d5fe3c446..67e12732484 100644 --- a/src/mame/drivers/tumbleb.c +++ b/src/mame/drivers/tumbleb.c @@ -350,7 +350,7 @@ READ16_MEMBER(tumbleb_state::tumblepb_prot_r) WRITE16_MEMBER(tumbleb_state::jumppop_sound_w) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_audiocpu, 0, ASSERT_LINE); } @@ -735,7 +735,7 @@ ADDRESS_MAP_END WRITE16_MEMBER(tumbleb_state::jumpkids_sound_w) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_audiocpu, 0, HOLD_LINE); } @@ -773,7 +773,7 @@ WRITE16_MEMBER(tumbleb_state::semicom_soundcmd_w) { if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); // needed for Super Trio which reads the sound with polling // device_spin_until_time(&space.device(), attotime::from_usec(100)); machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(20)); @@ -793,7 +793,7 @@ static ADDRESS_MAP_START( semicom_sound_map, AS_PROGRAM, 8, tumbleb_state ) AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0xf002, 0xf002) AM_DEVREADWRITE("oki", okim6295_device, read, write) //AM_RANGE(0xf006, 0xf006) ?? - AM_RANGE(0xf008, 0xf008) AM_READ(soundlatch_r) + AM_RANGE(0xf008, 0xf008) AM_READ(soundlatch_byte_r) AM_RANGE(0xf00e, 0xf00e) AM_WRITE(oki_sound_bank_w) ADDRESS_MAP_END @@ -802,7 +802,7 @@ static ADDRESS_MAP_START( suprtrio_sound_map, AS_PROGRAM, 8, tumbleb_state ) AM_RANGE(0xd000, 0xd7ff) AM_RAM AM_RANGE(0xf002, 0xf002) AM_DEVREADWRITE("oki", okim6295_device, read, write) //AM_RANGE(0xf006, 0xf006) ?? - AM_RANGE(0xf008, 0xf008) AM_READ(soundlatch_r) + AM_RANGE(0xf008, 0xf008) AM_READ(soundlatch_byte_r) AM_RANGE(0xf00e, 0xf00e) AM_WRITE(oki_sound_bank_w) ADDRESS_MAP_END @@ -820,7 +820,7 @@ ADDRESS_MAP_END READ8_MEMBER(tumbleb_state::jumppop_z80latch_r) { device_set_input_line(m_audiocpu, 0, CLEAR_LINE); - return soundlatch_r(space, 0); + return soundlatch_byte_r(space, 0); } static ADDRESS_MAP_START( jumppop_sound_io_map, AS_IO, 8, tumbleb_state ) @@ -868,7 +868,7 @@ static ADDRESS_MAP_START( jumpkids_sound_map, AS_PROGRAM, 8, tumbleb_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x9000, 0x9000) AM_WRITE(jumpkids_oki_bank_w) AM_RANGE(0x9800, 0x9800) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/tumblep.c b/src/mame/drivers/tumblep.c index 3ec90c2ff6f..3df42e5f662 100644 --- a/src/mame/drivers/tumblep.c +++ b/src/mame/drivers/tumblep.c @@ -70,14 +70,14 @@ READ16_MEMBER(tumblep_state::tumblep_prot_r) WRITE16_MEMBER(tumblep_state::tumblep_sound_w) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_audiocpu, 0, HOLD_LINE); } #ifdef UNUSED_FUNCTION WRITE16_MEMBER(tumblep_state::jumppop_sound_w) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(m_audiocpu, 0, ASSERT_LINE ); } #endif @@ -133,7 +133,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, tumblep_state ) AM_RANGE(0x110000, 0x110001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0x120000, 0x120001) AM_DEVREADWRITE("oki", okim6295_device, read, write) AM_RANGE(0x130000, 0x130001) AM_NOP /* This board only has 1 oki chip */ - AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_r) + AM_RANGE(0x140000, 0x140001) AM_READ(soundlatch_byte_r) AM_RANGE(0x1f0000, 0x1f1fff) AM_RAMBANK("bank8") AM_RANGE(0x1fec00, 0x1fec01) AM_WRITE_LEGACY(h6280_timer_w) AM_RANGE(0x1ff400, 0x1ff403) AM_WRITE_LEGACY(h6280_irq_status_w) diff --git a/src/mame/drivers/tutankhm.c b/src/mame/drivers/tutankhm.c index abbdc962ae1..643a7bbd066 100644 --- a/src/mame/drivers/tutankhm.c +++ b/src/mame/drivers/tutankhm.c @@ -135,7 +135,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, tutankhm_state ) AM_RANGE(0x8207, 0x8207) AM_MIRROR(0x00f8) AM_WRITE(tutankhm_flip_screen_y_w) AM_RANGE(0x8300, 0x8300) AM_MIRROR(0x00ff) AM_WRITE(tutankhm_bankselect_w) AM_RANGE(0x8600, 0x8600) AM_MIRROR(0x00ff) AM_WRITE_LEGACY(timeplt_sh_irqtrigger_w) - AM_RANGE(0x8700, 0x8700) AM_MIRROR(0x00ff) AM_WRITE(soundlatch_w) + AM_RANGE(0x8700, 0x8700) AM_MIRROR(0x00ff) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x8800, 0x8fff) AM_RAM AM_RANGE(0x9000, 0x9fff) AM_ROMBANK("bank1") AM_RANGE(0xa000, 0xffff) AM_ROM diff --git a/src/mame/drivers/twin16.c b/src/mame/drivers/twin16.c index 45eee737ba9..747db516b8e 100644 --- a/src/mame/drivers/twin16.c +++ b/src/mame/drivers/twin16.c @@ -104,7 +104,7 @@ READ16_MEMBER(twin16_state::twin16_gfx_rom2_r) WRITE16_MEMBER(twin16_state::sound_command_w) { COMBINE_DATA(&m_sound_command); - soundlatch_w(space, 0, m_sound_command&0xff ); + soundlatch_byte_w(space, 0, m_sound_command&0xff ); } WRITE16_MEMBER(twin16_state::twin16_CPUA_register_w) @@ -224,7 +224,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, twin16_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0x8fff) AM_RAM AM_RANGE(0x9000, 0x9000) AM_DEVWRITE_LEGACY("upd", twin16_upd_reset_w) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) AM_RANGE(0xb000, 0xb00d) AM_DEVREADWRITE_LEGACY("konami", k007232_r, k007232_w) AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0xd000, 0xd000) AM_DEVWRITE_LEGACY("upd", upd7759_port_w) diff --git a/src/mame/drivers/ultraman.c b/src/mame/drivers/ultraman.c index 1ce9eaa2234..09f311d42be 100644 --- a/src/mame/drivers/ultraman.c +++ b/src/mame/drivers/ultraman.c @@ -20,7 +20,7 @@ WRITE16_MEMBER(ultraman_state::sound_cmd_w) { if (ACCESSING_BITS_0_7) - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); } WRITE16_MEMBER(ultraman_state::sound_irq_trigger_w) @@ -57,7 +57,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, ultraman_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0xbfff) AM_RAM - AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_r) /* Sound latch read */ + AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_byte_r) /* Sound latch read */ // AM_RANGE(0xd000, 0xd000) AM_WRITENOP /* ??? */ AM_RANGE(0xe000, 0xe000) AM_DEVREADWRITE("oki", okim6295_device, read, write) /* M6295 */ AM_RANGE(0xf000, 0xf001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) /* YM2151 */ diff --git a/src/mame/drivers/vaportra.c b/src/mame/drivers/vaportra.c index a7478430ecc..039f05d4b3f 100644 --- a/src/mame/drivers/vaportra.c +++ b/src/mame/drivers/vaportra.c @@ -25,7 +25,7 @@ WRITE16_MEMBER(vaportra_state::vaportra_sound_w) /* Force synchronisation between CPUs with fake timer */ machine().scheduler().synchronize(); - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_audiocpu, 0, ASSERT_LINE); } @@ -72,7 +72,7 @@ ADDRESS_MAP_END READ8_MEMBER(vaportra_state::vaportra_soundlatch_r) { device_set_input_line(m_audiocpu, 0, CLEAR_LINE); - return soundlatch_r(space, offset); + return soundlatch_byte_r(space, offset); } static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, vaportra_state ) diff --git a/src/mame/drivers/vball.c b/src/mame/drivers/vball.c index 498a84cf850..b0cf2cd2257 100644 --- a/src/mame/drivers/vball.c +++ b/src/mame/drivers/vball.c @@ -171,7 +171,7 @@ WRITE8_MEMBER(vball_state::vb_bankswitch_w) /* The sound system comes all but verbatim from Double Dragon */ WRITE8_MEMBER(vball_state::cpu_sound_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -229,7 +229,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, vball_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x8800, 0x8801) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0x9800, 0x9803) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xA000, 0xA000) AM_READ(soundlatch_r) + AM_RANGE(0xA000, 0xA000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/vigilant.c b/src/mame/drivers/vigilant.c index 5d885906dab..583064f1f1b 100644 --- a/src/mame/drivers/vigilant.c +++ b/src/mame/drivers/vigilant.c @@ -110,7 +110,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_io_map, AS_IO, 8, vigilant_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) - AM_RANGE(0x80, 0x81) AM_READ(soundlatch_r) AM_DEVWRITE_LEGACY("m72", vigilant_sample_addr_w) /* STL / STH */ + AM_RANGE(0x80, 0x81) AM_READ(soundlatch_byte_r) AM_DEVWRITE_LEGACY("m72", vigilant_sample_addr_w) /* STL / STH */ AM_RANGE(0x82, 0x82) AM_DEVWRITE_LEGACY("m72", m72_sample_w) /* COUNT UP */ AM_RANGE(0x83, 0x83) AM_DEVWRITE_LEGACY("m72", m72_sound_irq_ack_w) /* IRQ clear */ AM_RANGE(0x84, 0x84) AM_DEVREAD_LEGACY("m72", m72_sample_r) /* S ROM C */ @@ -120,7 +120,7 @@ static ADDRESS_MAP_START( buccanrs_sound_io_map, AS_IO, 8, vigilant_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x01) AM_DEVREADWRITE_LEGACY("ym1", ym2203_r, ym2203_w) AM_RANGE(0x02, 0x03) AM_DEVREADWRITE_LEGACY("ym2", ym2203_r, ym2203_w) - AM_RANGE(0x80, 0x80) AM_READ(soundlatch_r) /* SDRE */ + AM_RANGE(0x80, 0x80) AM_READ(soundlatch_byte_r) /* SDRE */ AM_RANGE(0x80, 0x81) AM_DEVWRITE_LEGACY("m72", vigilant_sample_addr_w) /* STL / STH */ AM_RANGE(0x82, 0x82) AM_DEVWRITE_LEGACY("m72", m72_sample_w) /* COUNT UP */ AM_RANGE(0x83, 0x83) AM_DEVWRITE_LEGACY("m72", m72_sound_irq_ack_w) /* IRQ clear */ diff --git a/src/mame/drivers/vulgus.c b/src/mame/drivers/vulgus.c index e0e4f123a88..d20203f2052 100644 --- a/src/mame/drivers/vulgus.c +++ b/src/mame/drivers/vulgus.c @@ -57,7 +57,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, vulgus_state ) AM_RANGE(0xc002, 0xc002) AM_READ_PORT("P2") AM_RANGE(0xc003, 0xc003) AM_READ_PORT("DSW1") AM_RANGE(0xc004, 0xc004) AM_READ_PORT("DSW2") - AM_RANGE(0xc800, 0xc800) AM_WRITE(soundlatch_w) + AM_RANGE(0xc800, 0xc800) AM_WRITE(soundlatch_byte_w) AM_RANGE(0xc802, 0xc803) AM_RAM AM_BASE(m_scroll_low) AM_RANGE(0xc804, 0xc804) AM_WRITE(vulgus_c804_w) AM_RANGE(0xc805, 0xc805) AM_WRITE(vulgus_palette_bank_w) @@ -72,7 +72,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, vulgus_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM AM_RANGE(0x4000, 0x47ff) AM_RAM AM_RANGE(0x4000, 0x47ff) AM_WRITEONLY - AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_r) + AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) AM_RANGE(0x8000, 0x8001) AM_DEVWRITE_LEGACY("ay1", ay8910_address_data_w) AM_RANGE(0xc000, 0xc001) AM_DEVWRITE_LEGACY("ay2", ay8910_address_data_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/wc90.c b/src/mame/drivers/wc90.c index 62edc547b9d..925e2192eea 100644 --- a/src/mame/drivers/wc90.c +++ b/src/mame/drivers/wc90.c @@ -102,7 +102,7 @@ WRITE8_MEMBER(wc90_state::wc90_bankswitch1_w) WRITE8_MEMBER(wc90_state::wc90_sound_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -157,7 +157,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, wc90_state ) AM_RANGE(0xf000, 0xf7ff) AM_RAM AM_RANGE(0xf800, 0xf803) AM_DEVREADWRITE_LEGACY("ymsnd", ym2608_r, ym2608_w) AM_RANGE(0xfc00, 0xfc00) AM_READNOP /* ??? adpcm ??? */ - AM_RANGE(0xfc10, 0xfc10) AM_READ(soundlatch_r) + AM_RANGE(0xfc10, 0xfc10) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/wc90b.c b/src/mame/drivers/wc90b.c index 2b7ad223b00..7367ed03fac 100644 --- a/src/mame/drivers/wc90b.c +++ b/src/mame/drivers/wc90b.c @@ -116,7 +116,7 @@ WRITE8_MEMBER(wc90b_state::wc90b_bankswitch1_w) WRITE8_MEMBER(wc90b_state::wc90b_sound_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE); } @@ -178,7 +178,7 @@ static ADDRESS_MAP_START( sound_cpu, AS_PROGRAM, 8, wc90b_state ) AM_RANGE(0xe400, 0xe400) AM_WRITE(adpcm_data_w) AM_RANGE(0xe800, 0xe801) AM_DEVREADWRITE_LEGACY("ymsnd", ym2203_r, ym2203_w) AM_RANGE(0xf000, 0xf7ff) AM_RAM - AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_r) + AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/wecleman.c b/src/mame/drivers/wecleman.c index 7b34bf435f8..9b2643cb867 100644 --- a/src/mame/drivers/wecleman.c +++ b/src/mame/drivers/wecleman.c @@ -583,7 +583,7 @@ WRITE16_MEMBER(wecleman_state::wecleman_soundlatch_w) { if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xFF); + soundlatch_byte_w(space, 0, data & 0xFF); cputag_set_input_line(machine(), "audiocpu", 0, HOLD_LINE); } } @@ -627,7 +627,7 @@ static ADDRESS_MAP_START( wecleman_sound_map, AS_PROGRAM, 8, wecleman_state ) AM_RANGE(0x9000, 0x9000) AM_READ(multiply_r) // Protection AM_RANGE(0x9000, 0x9001) AM_WRITE(multiply_w) // Protection AM_RANGE(0x9006, 0x9006) AM_WRITENOP // ? - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) // From main CPU + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) // From main CPU AM_RANGE(0xb000, 0xb00d) AM_DEVREADWRITE_LEGACY("konami", k007232_r, k007232_w) // K007232 (Reading offset 5/b triggers the sample) AM_RANGE(0xc000, 0xc001) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0xf000, 0xf000) AM_DEVWRITE_LEGACY("konami", wecleman_K00723216_bank_w) // Samples banking @@ -643,7 +643,7 @@ WRITE16_MEMBER(wecleman_state::hotchase_soundlatch_w) { if (ACCESSING_BITS_0_7) { - soundlatch_w(space, 0, data & 0xFF); + soundlatch_byte_w(space, 0, data & 0xFF); cputag_set_input_line(machine(), "audiocpu", M6809_IRQ_LINE, HOLD_LINE); } } @@ -720,7 +720,7 @@ static ADDRESS_MAP_START( hotchase_sound_map, AS_PROGRAM, 8, wecleman_state ) AM_RANGE(0x3000, 0x300d) AM_DEVREADWRITE_LEGACY("konami3", hotchase_k007232_r, hotchase_k007232_w) AM_RANGE(0x4000, 0x4007) AM_WRITE(hotchase_sound_control_w) // Sound volume, banking, etc. AM_RANGE(0x5000, 0x5000) AM_WRITENOP // ? (written with 0 on IRQ, 1 on FIRQ) - AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_r) // From main CPU (Read on IRQ) + AM_RANGE(0x6000, 0x6000) AM_READ(soundlatch_byte_r) // From main CPU (Read on IRQ) AM_RANGE(0x7000, 0x7000) AM_WRITENOP // Command acknowledge ? AM_RANGE(0x8000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/welltris.c b/src/mame/drivers/welltris.c index a27cbaef8c9..4ebc0ccbb3b 100644 --- a/src/mame/drivers/welltris.c +++ b/src/mame/drivers/welltris.c @@ -334,7 +334,7 @@ WRITE16_MEMBER(welltris_state::sound_command_w) { m_pending_command = 1; - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } } @@ -385,7 +385,7 @@ static ADDRESS_MAP_START( sound_port_map, AS_IO, 8, welltris_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x00) AM_WRITE(welltris_sh_bankswitch_w) AM_RANGE(0x08, 0x0b) AM_DEVREADWRITE_LEGACY("ymsnd", ym2610_r, ym2610_w) - AM_RANGE(0x10, 0x10) AM_READ(soundlatch_r) + AM_RANGE(0x10, 0x10) AM_READ(soundlatch_byte_r) AM_RANGE(0x18, 0x18) AM_WRITE(pending_command_clear_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/wink.c b/src/mame/drivers/wink.c index b8a386c6852..f9e83350f9d 100644 --- a/src/mame/drivers/wink.c +++ b/src/mame/drivers/wink.c @@ -151,7 +151,7 @@ static ADDRESS_MAP_START( wink_io, AS_IO, 8, wink_state ) // AM_RANGE(0x23, 0x23) AM_WRITENOP //? // AM_RANGE(0x24, 0x24) AM_WRITENOP //cab Knocker like in q-bert! AM_RANGE(0x25, 0x27) AM_WRITE(wink_coin_counter_w) - AM_RANGE(0x40, 0x40) AM_WRITE(soundlatch_w) + AM_RANGE(0x40, 0x40) AM_WRITE(soundlatch_byte_w) AM_RANGE(0x60, 0x60) AM_WRITE(sound_irq_w) AM_RANGE(0x80, 0x80) AM_READ(analog_port_r) AM_RANGE(0xa0, 0xa0) AM_READ(player_inputs_r) @@ -168,7 +168,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( wink_sound_map, AS_PROGRAM, 8, wink_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM AM_RANGE(0x4000, 0x43ff) AM_RAM - AM_RANGE(0x8000, 0x8000) AM_READ(soundlatch_r) + AM_RANGE(0x8000, 0x8000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static ADDRESS_MAP_START( wink_sound_io, AS_IO, 8, wink_state ) diff --git a/src/mame/drivers/wiz.c b/src/mame/drivers/wiz.c index 995a2492697..74332bc8d14 100644 --- a/src/mame/drivers/wiz.c +++ b/src/mame/drivers/wiz.c @@ -180,7 +180,7 @@ WRITE8_MEMBER(wiz_state::sound_command_w) { // 0x90 triggers a jump to non-existant address(development system?) and must be filtered case 0x00: - if (data != 0x90) soundlatch_w(space, 0, data); + if (data != 0x90) soundlatch_byte_w(space, 0, data); break; // explosion sound trigger(analog?) @@ -261,20 +261,20 @@ WRITE8_MEMBER(wiz_state::wiz_sound_nmi_mask_w) static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, wiz_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM AM_RANGE(0x2000, 0x23ff) AM_RAM - AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_r) AM_WRITE(wiz_sound_nmi_mask_w) /* Stinger/Scion */ + AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) AM_WRITE(wiz_sound_nmi_mask_w) /* Stinger/Scion */ AM_RANGE(0x4000, 0x4001) AM_DEVWRITE_LEGACY("8910.3", ay8910_address_data_w) AM_RANGE(0x5000, 0x5001) AM_DEVWRITE_LEGACY("8910.1", ay8910_address_data_w) AM_RANGE(0x6000, 0x6001) AM_DEVWRITE_LEGACY("8910.2", ay8910_address_data_w) /* Wiz only */ - AM_RANGE(0x7000, 0x7000) AM_READ(soundlatch_r) AM_WRITE(wiz_sound_nmi_mask_w) /* Wiz */ + AM_RANGE(0x7000, 0x7000) AM_READ(soundlatch_byte_r) AM_WRITE(wiz_sound_nmi_mask_w) /* Wiz */ ADDRESS_MAP_END static ADDRESS_MAP_START( stinger_sound_map, AS_PROGRAM, 8, wiz_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM AM_RANGE(0x2000, 0x23ff) AM_RAM - AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_r) AM_WRITE(wiz_sound_nmi_mask_w) /* Stinger/Scion */ + AM_RANGE(0x3000, 0x3000) AM_READ(soundlatch_byte_r) AM_WRITE(wiz_sound_nmi_mask_w) /* Stinger/Scion */ AM_RANGE(0x5000, 0x5001) AM_DEVWRITE_LEGACY("8910.1", ay8910_address_data_w) AM_RANGE(0x6000, 0x6001) AM_DEVWRITE_LEGACY("8910.2", ay8910_address_data_w) /* Wiz only */ - AM_RANGE(0x7000, 0x7000) AM_READ(soundlatch_r) AM_WRITE(wiz_sound_nmi_mask_w) /* Wiz */ + AM_RANGE(0x7000, 0x7000) AM_READ(soundlatch_byte_r) AM_WRITE(wiz_sound_nmi_mask_w) /* Wiz */ ADDRESS_MAP_END diff --git a/src/mame/drivers/wwfsstar.c b/src/mame/drivers/wwfsstar.c index 0b57cf5e591..dc093aded09 100644 --- a/src/mame/drivers/wwfsstar.c +++ b/src/mame/drivers/wwfsstar.c @@ -182,7 +182,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, wwfsstar_state ) AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x8800, 0x8801) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0x9800, 0x9800) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END @@ -208,7 +208,7 @@ WRITE16_MEMBER(wwfsstar_state::wwfsstar_scrollwrite) WRITE16_MEMBER(wwfsstar_state::wwfsstar_soundwrite) { - soundlatch_w(space, 1, data & 0xff); + soundlatch_byte_w(space, 1, data & 0xff); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE ); } diff --git a/src/mame/drivers/wwfwfest.c b/src/mame/drivers/wwfwfest.c index 863175baf73..27b3fe8a88c 100644 --- a/src/mame/drivers/wwfwfest.c +++ b/src/mame/drivers/wwfwfest.c @@ -88,7 +88,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, wwfwfest_state ) AM_RANGE(0xc000, 0xc7ff) AM_RAM AM_RANGE(0xc800, 0xc801) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) AM_RANGE(0xd800, 0xd800) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_r) + AM_RANGE(0xe000, 0xe000) AM_READ(soundlatch_byte_r) AM_RANGE(0xe800, 0xe800) AM_DEVWRITE_LEGACY("oki", oki_bankswitch_w) ADDRESS_MAP_END @@ -163,7 +163,7 @@ static WRITE8_DEVICE_HANDLER( oki_bankswitch_w ) WRITE16_MEMBER(wwfwfest_state::wwfwfest_soundwrite) { - soundlatch_w(space,1,data & 0xff); + soundlatch_byte_w(space,1,data & 0xff); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE ); } diff --git a/src/mame/drivers/xain.c b/src/mame/drivers/xain.c index c8c57c70e4f..9ea0231c279 100644 --- a/src/mame/drivers/xain.c +++ b/src/mame/drivers/xain.c @@ -223,7 +223,7 @@ WRITE8_MEMBER(xain_state::xainCPUB_bankswitch_w) WRITE8_MEMBER(xain_state::xain_sound_command_w) { - soundlatch_w(space,offset,data); + soundlatch_byte_w(space,offset,data); cputag_set_input_line(machine(), "audiocpu", M6809_IRQ_LINE, HOLD_LINE); } @@ -437,7 +437,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, xain_state ) AM_RANGE(0x0000, 0x07ff) AM_RAM - AM_RANGE(0x1000, 0x1000) AM_READ(soundlatch_r) + AM_RANGE(0x1000, 0x1000) AM_READ(soundlatch_byte_r) AM_RANGE(0x2800, 0x2801) AM_DEVWRITE_LEGACY("ym1", ym2203_w) AM_RANGE(0x3000, 0x3001) AM_DEVWRITE_LEGACY("ym2", ym2203_w) AM_RANGE(0x4000, 0xffff) AM_ROM diff --git a/src/mame/drivers/xexex.c b/src/mame/drivers/xexex.c index a6bab22abe4..658e5d17b8f 100644 --- a/src/mame/drivers/xexex.c +++ b/src/mame/drivers/xexex.c @@ -211,17 +211,17 @@ WRITE16_MEMBER(xexex_state::sound_cmd1_w) { // anyone knows why 0x1a keeps lurking the sound queue in the world version??? if (m_strip_0x1a) - if (soundlatch2_r(space, 0) == 1 && data == 0x1a) + if (soundlatch2_byte_r(space, 0) == 1 && data == 0x1a) return; - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); } } WRITE16_MEMBER(xexex_state::sound_cmd2_w) { if (ACCESSING_BITS_0_7) - soundlatch2_w(space, 0, data & 0xff); + soundlatch2_byte_w(space, 0, data & 0xff); } WRITE16_MEMBER(xexex_state::sound_irq_w) @@ -231,7 +231,7 @@ WRITE16_MEMBER(xexex_state::sound_irq_w) READ16_MEMBER(xexex_state::sound_status_r) { - return soundlatch3_r(space, 0); + return soundlatch3_byte_r(space, 0); } static void reset_sound_region(running_machine &machine) @@ -365,9 +365,9 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, xexex_state ) AM_RANGE(0xc000, 0xdfff) AM_RAM AM_RANGE(0xe000, 0xe22f) AM_DEVREADWRITE("k054539", k054539_device, read, write) AM_RANGE(0xec00, 0xec01) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) - AM_RANGE(0xf000, 0xf000) AM_WRITE(soundlatch3_w) - AM_RANGE(0xf002, 0xf002) AM_READ(soundlatch_r) - AM_RANGE(0xf003, 0xf003) AM_READ(soundlatch2_r) + AM_RANGE(0xf000, 0xf000) AM_WRITE(soundlatch3_byte_w) + AM_RANGE(0xf002, 0xf002) AM_READ(soundlatch_byte_r) + AM_RANGE(0xf003, 0xf003) AM_READ(soundlatch2_byte_r) AM_RANGE(0xf800, 0xf800) AM_WRITE(sound_bankswitch_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/xmen.c b/src/mame/drivers/xmen.c index 281f1c8880e..ce63663c9ff 100644 --- a/src/mame/drivers/xmen.c +++ b/src/mame/drivers/xmen.c @@ -67,7 +67,7 @@ WRITE16_MEMBER(xmen_state::eeprom_w) READ16_MEMBER(xmen_state::sound_status_r) { - return soundlatch2_r(space, 0); + return soundlatch2_byte_r(space, 0); } WRITE16_MEMBER(xmen_state::sound_cmd_w) @@ -75,7 +75,7 @@ WRITE16_MEMBER(xmen_state::sound_cmd_w) if (ACCESSING_BITS_0_7) { data &= 0xff; - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); } } @@ -134,8 +134,8 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, xmen_state ) AM_RANGE(0xc000, 0xdfff) AM_RAM AM_RANGE(0xe000, 0xe22f) AM_DEVREADWRITE("k054539", k054539_device, read, write) AM_RANGE(0xe800, 0xe801) AM_MIRROR(0x0400) AM_DEVREADWRITE_LEGACY("ymsnd", ym2151_r, ym2151_w) - AM_RANGE(0xf000, 0xf000) AM_WRITE(soundlatch2_w) - AM_RANGE(0xf002, 0xf002) AM_READ(soundlatch_r) + AM_RANGE(0xf000, 0xf000) AM_WRITE(soundlatch2_byte_w) + AM_RANGE(0xf002, 0xf002) AM_READ(soundlatch_byte_r) AM_RANGE(0xf800, 0xf800) AM_WRITE(sound_bankswitch_w) ADDRESS_MAP_END diff --git a/src/mame/drivers/yunsun16.c b/src/mame/drivers/yunsun16.c index e3315c80218..1549ce29c9e 100644 --- a/src/mame/drivers/yunsun16.c +++ b/src/mame/drivers/yunsun16.c @@ -147,7 +147,7 @@ number 0 on each voice. That sample is 00000-00000. */ if ((data & 0xff) != 0x3a) { - soundlatch_w(space, 0, data & 0xff); + soundlatch_byte_w(space, 0, data & 0xff); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); } } @@ -176,7 +176,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( sound_port_map, AS_IO, 8, yunsun16_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x10, 0x11) AM_DEVREADWRITE_LEGACY("ymsnd", ym3812_r, ym3812_w ) - AM_RANGE(0x18, 0x18) AM_READ(soundlatch_r ) // From Main CPU + AM_RANGE(0x18, 0x18) AM_READ(soundlatch_byte_r ) // From Main CPU AM_RANGE(0x1c, 0x1c) AM_DEVREADWRITE("oki", okim6295_device, read, write) // M6295 ADDRESS_MAP_END diff --git a/src/mame/drivers/yunsung8.c b/src/mame/drivers/yunsung8.c index 55ba3ccc5bc..39fbfb57358 100644 --- a/src/mame/drivers/yunsung8.c +++ b/src/mame/drivers/yunsung8.c @@ -77,7 +77,7 @@ static ADDRESS_MAP_START( port_map, AS_IO, 8, yunsung8_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) AM_RANGE(0x00, 0x00) AM_READ_PORT("SYSTEM") AM_WRITE(yunsung8_videobank_w) // video RAM bank AM_RANGE(0x01, 0x01) AM_READ_PORT("P1") AM_WRITE(yunsung8_bankswitch_w) // ROM Bank + Layers Enable - AM_RANGE(0x02, 0x02) AM_READ_PORT("P2") AM_WRITE(soundlatch_w) // To Sound CPU + AM_RANGE(0x02, 0x02) AM_READ_PORT("P2") AM_WRITE(soundlatch_byte_w) // To Sound CPU AM_RANGE(0x03, 0x03) AM_READ_PORT("DSW1") AM_RANGE(0x04, 0x04) AM_READ_PORT("DSW2") AM_RANGE(0x06, 0x06) AM_WRITE(yunsung8_flipscreen_w) // Flip Screen @@ -120,7 +120,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, yunsung8_state ) AM_RANGE(0xe400, 0xe400) AM_WRITE(yunsung8_adpcm_w) AM_RANGE(0xec00, 0xec01) AM_DEVWRITE_LEGACY("ymsnd", ym3812_w) AM_RANGE(0xf000, 0xf7ff) AM_RAM - AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_r) // From Main CPU + AM_RANGE(0xf800, 0xf800) AM_READ(soundlatch_byte_r) // From Main CPU ADDRESS_MAP_END diff --git a/src/mame/drivers/zaccaria.c b/src/mame/drivers/zaccaria.c index 0710d9efd2b..f8108ad3604 100644 --- a/src/mame/drivers/zaccaria.c +++ b/src/mame/drivers/zaccaria.c @@ -184,7 +184,7 @@ static WRITE8_DEVICE_HANDLER( zaccaria_port1b_w ) WRITE8_MEMBER(zaccaria_state::sound_command_w) { - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); cputag_set_input_line(machine(), "audio2", 0, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE); } @@ -192,7 +192,7 @@ WRITE8_MEMBER(zaccaria_state::sound1_command_w) { pia6821_device *pia0 = machine().device<pia6821_device>("pia0"); pia0->ca1_w(data & 0x80); - soundlatch2_w(space, 0, data); + soundlatch2_byte_w(space, 0, data); } static WRITE8_DEVICE_HANDLER( mc1408_data_w ) @@ -330,7 +330,7 @@ static ADDRESS_MAP_START( sound_map_2, AS_PROGRAM, 8, zaccaria_state ) AM_RANGE(0x0090, 0x0093) AM_DEVREADWRITE("pia1", pia6821_device, read, write) AM_MIRROR(0x8F6C) AM_RANGE(0x1000, 0x1000) AM_DEVWRITE_LEGACY("dac2", mc1408_data_w) AM_MIRROR(0x83FF) /* MC1408 */ AM_RANGE(0x1400, 0x1400) AM_WRITE(sound1_command_w) AM_MIRROR(0xC3FF) - AM_RANGE(0x1800, 0x1800) AM_READ(soundlatch_r) AM_MIRROR(0xC3FF) + AM_RANGE(0x1800, 0x1800) AM_READ(soundlatch_byte_r) AM_MIRROR(0xC3FF) AM_RANGE(0x2000, 0x2fff) AM_ROM AM_MIRROR(0x8000) // rom 8 with A12 low AM_RANGE(0x3000, 0x3fff) AM_ROM AM_MIRROR(0x8000) // rom 7 with A12 low AM_RANGE(0x6000, 0x6fff) AM_ROM AM_MIRROR(0x8000) // rom 8 with A12 high @@ -531,7 +531,7 @@ static const ay8910_interface ay8910_config = AY8910_LEGACY_OUTPUT, AY8910_DEFAULT_LOADS, DEVCB_NULL, - DEVCB_DRIVER_MEMBER(driver_device, soundlatch2_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch2_byte_r), DEVCB_HANDLER(ay8910_port0a_w), DEVCB_NULL }; diff --git a/src/mame/drivers/zaxxon.c b/src/mame/drivers/zaxxon.c index 026c5d7299a..9484ef800f6 100644 --- a/src/mame/drivers/zaxxon.c +++ b/src/mame/drivers/zaxxon.c @@ -469,7 +469,7 @@ static ADDRESS_MAP_START( congo_map, AS_PROGRAM, 8, zaxxon_state ) AM_RANGE(0xc027, 0xc027) AM_MIRROR(0x1fc0) AM_WRITE(congo_color_bank_w) AM_RANGE(0xc028, 0xc029) AM_MIRROR(0x1fc4) AM_WRITE(zaxxon_bg_position_w) AM_RANGE(0xc030, 0xc033) AM_MIRROR(0x1fc4) AM_WRITE(congo_sprite_custom_w) - AM_RANGE(0xc038, 0xc03f) AM_MIRROR(0x1fc0) AM_WRITE(soundlatch_w) + AM_RANGE(0xc038, 0xc03f) AM_MIRROR(0x1fc0) AM_WRITE(soundlatch_byte_w) ADDRESS_MAP_END @@ -875,7 +875,7 @@ static const ppi8255_interface zaxxon_ppi_intf = static const ppi8255_interface congo_ppi_intf = { - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_r), + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_r), DEVCB_NULL, DEVCB_NULL, DEVCB_NULL, diff --git a/src/mame/drivers/zerozone.c b/src/mame/drivers/zerozone.c index 8dcbc961b0c..3bd9b6f4691 100644 --- a/src/mame/drivers/zerozone.c +++ b/src/mame/drivers/zerozone.c @@ -39,7 +39,7 @@ WRITE16_MEMBER( zerozone_state::sound_w ) { if (ACCESSING_BITS_8_15) { - soundlatch_w(space, offset, data >> 8); + soundlatch_byte_w(space, offset, data >> 8); device_set_input_line_and_vector(m_audiocpu, 0, HOLD_LINE, 0xff); } } @@ -64,7 +64,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, zerozone_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0x87ff) AM_RAM AM_RANGE(0x9800, 0x9800) AM_DEVREADWRITE("oki", okim6295_device, read, write) - AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_r) + AM_RANGE(0xa000, 0xa000) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END diff --git a/src/mame/drivers/zn.c b/src/mame/drivers/zn.c index c78620d7546..afc12505a88 100644 --- a/src/mame/drivers/zn.c +++ b/src/mame/drivers/zn.c @@ -666,7 +666,7 @@ static INTERRUPT_GEN( qsound_interrupt ) static WRITE32_HANDLER( zn_qsound_w ) { zn_state *state = space->machine().driver_data<zn_state>(); - state->soundlatch_w(*space, 0, data); + state->soundlatch_byte_w(*space, 0, data); cputag_set_input_line(space->machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); } @@ -711,7 +711,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( qsound_portmap, AS_IO, 8, zn_state ) ADDRESS_MAP_GLOBAL_MASK(0xff) - AM_RANGE(0x00, 0x00) AM_READ(soundlatch_r) + AM_RANGE(0x00, 0x00) AM_READ(soundlatch_byte_r) ADDRESS_MAP_END static MACHINE_CONFIG_DERIVED( coh1000c, zn1_1mb_vram ) @@ -1644,7 +1644,7 @@ static WRITE32_HANDLER( coh1002e_latch_w ) if (offset) cputag_set_input_line(space->machine(), "audiocpu", 2, HOLD_LINE); // irq 2 on the 68k else - state->soundlatch_w(*space, 0, data); + state->soundlatch_byte_w(*space, 0, data); } static DRIVER_INIT( coh1002e ) @@ -1666,7 +1666,7 @@ static ADDRESS_MAP_START( psarc_snd_map, AS_PROGRAM, 16, zn_state ) AM_RANGE(0x000000, 0x07ffff) AM_ROM AM_RANGE(0x080000, 0x0fffff) AM_RAM AM_RANGE(0x100000, 0x10001f) AM_DEVREADWRITE8_LEGACY("ymf", ymf271_r, ymf271_w, 0x00ff ) - AM_RANGE(0x180008, 0x180009) AM_READ8(soundlatch_r, 0x00ff ) + AM_RANGE(0x180008, 0x180009) AM_READ8(soundlatch_byte_r, 0x00ff ) AM_RANGE(0x000000, 0x07ffff) AM_WRITENOP AM_RANGE(0x100020, 0xffffff) AM_WRITENOP ADDRESS_MAP_END @@ -2522,7 +2522,7 @@ static READ32_HANDLER( cbaj_z80_r ) ready = state->m_cbaj_to_r3k; state->m_cbaj_to_r3k &= ~2; - return state->soundlatch2_r(*space,0) | ready<<24; + return state->soundlatch2_byte_r(*space,0) | ready<<24; } static WRITE32_HANDLER( cbaj_z80_w ) @@ -2562,7 +2562,7 @@ static WRITE8_HANDLER( cbaj_z80_latch_w ) zn_state *state = space->machine().driver_data<zn_state>(); state->m_cbaj_to_r3k |= 2; - state->soundlatch2_w(*space, 0, data); + state->soundlatch2_byte_w(*space, 0, data); } static READ8_HANDLER( cbaj_z80_ready_r ) diff --git a/src/mame/drivers/zodiack.c b/src/mame/drivers/zodiack.c index 4a02cdeffbb..5cb00b3a74a 100644 --- a/src/mame/drivers/zodiack.c +++ b/src/mame/drivers/zodiack.c @@ -126,7 +126,7 @@ static INTERRUPT_GEN( zodiack_sound_nmi_gen ) WRITE8_MEMBER( zodiack_state::master_soundlatch_w ) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); device_set_input_line(m_audiocpu, 0, HOLD_LINE); } @@ -146,7 +146,7 @@ static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, zodiack_state ) AM_RANGE(0x6082, 0x6082) AM_READ_PORT("DSW1") AM_RANGE(0x6083, 0x6083) AM_READ_PORT("IN0") AM_RANGE(0x6084, 0x6084) AM_READ_PORT("IN1") - AM_RANGE(0x6090, 0x6090) AM_READWRITE(soundlatch_r, master_soundlatch_w) + AM_RANGE(0x6090, 0x6090) AM_READWRITE(soundlatch_byte_r, master_soundlatch_w) AM_RANGE(0x7000, 0x7000) AM_READNOP AM_WRITE(watchdog_reset_w) /* NOP??? */ AM_RANGE(0x7100, 0x7100) AM_WRITE(nmi_mask_w) AM_RANGE(0x7200, 0x7200) AM_WRITE(flipscreen_w) @@ -163,7 +163,7 @@ static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, zodiack_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM AM_RANGE(0x2000, 0x23ff) AM_RAM AM_RANGE(0x4000, 0x4000) AM_WRITE(sound_nmi_enable_w) - AM_RANGE(0x6000, 0x6000) AM_READWRITE(soundlatch_r, soundlatch_w) + AM_RANGE(0x6000, 0x6000) AM_READWRITE(soundlatch_byte_r, soundlatch_byte_w) ADDRESS_MAP_END static ADDRESS_MAP_START( io_map, AS_IO, 8, zodiack_state ) diff --git a/src/mame/machine/ajax.c b/src/mame/machine/ajax.c index 104a071b6d9..2702b480a41 100644 --- a/src/mame/machine/ajax.c +++ b/src/mame/machine/ajax.c @@ -149,7 +149,7 @@ WRITE8_MEMBER(ajax_state::ajax_ls138_f10_w) device_set_input_line(m_audiocpu, 0, HOLD_LINE); break; case 0x02: /* Sound command number */ - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); break; case 0x03: /* Bankswitch + coin counters + priority*/ ajax_bankswitch_w(space, 0, data); diff --git a/src/mame/machine/bublbobl.c b/src/mame/machine/bublbobl.c index ba39c2b2e4e..9c7df8e198c 100644 --- a/src/mame/machine/bublbobl.c +++ b/src/mame/machine/bublbobl.c @@ -98,7 +98,7 @@ static TIMER_CALLBACK( nmi_callback ) WRITE8_MEMBER(bublbobl_state::bublbobl_sound_command_w) { - soundlatch_w(space, offset, data); + soundlatch_byte_w(space, offset, data); machine().scheduler().synchronize(FUNC(nmi_callback), data); } diff --git a/src/mame/machine/decocass.c b/src/mame/machine/decocass.c index 80e4aec543a..10899baebed 100644 --- a/src/mame/machine/decocass.c +++ b/src/mame/machine/decocass.c @@ -61,7 +61,7 @@ WRITE8_HANDLER( decocass_sound_command_w ) { decocass_state *state = space->machine().driver_data<decocass_state>(); LOG(2,("CPU %s sound command -> $%02x\n", space->device().tag(), data)); - state->soundlatch_w(*space, 0, data); + state->soundlatch_byte_w(*space, 0, data); state->m_sound_ack |= 0x80; /* remove snd cpu data ack bit. i don't see it in the schems, but... */ state->m_sound_ack &= ~0x40; @@ -71,7 +71,7 @@ WRITE8_HANDLER( decocass_sound_command_w ) READ8_HANDLER( decocass_sound_data_r ) { decocass_state *state = space->machine().driver_data<decocass_state>(); - UINT8 data = state->soundlatch2_r(*space, 0); + UINT8 data = state->soundlatch2_byte_r(*space, 0); LOG(2,("CPU %s sound data <- $%02x\n", space->device().tag(), data)); return data; } @@ -88,14 +88,14 @@ WRITE8_HANDLER( decocass_sound_data_w ) { decocass_state *state = space->machine().driver_data<decocass_state>(); LOG(2,("CPU %s sound data -> $%02x\n", space->device().tag(), data)); - state->soundlatch2_w(*space, 0, data); + state->soundlatch2_byte_w(*space, 0, data); state->m_sound_ack |= 0x40; } READ8_HANDLER( decocass_sound_command_r ) { decocass_state *state = space->machine().driver_data<decocass_state>(); - UINT8 data = state->soundlatch_r(*space, 0); + UINT8 data = state->soundlatch_byte_r(*space, 0); LOG(4,("CPU %s sound command <- $%02x\n", space->device().tag(), data)); device_set_input_line(state->m_audiocpu, M6502_IRQ_LINE, CLEAR_LINE); state->m_sound_ack &= ~0x80; diff --git a/src/mame/machine/decoprot.c b/src/mame/machine/decoprot.c index daad37533bf..726f12db926 100644 --- a/src/mame/machine/decoprot.c +++ b/src/mame/machine/decoprot.c @@ -111,7 +111,7 @@ WRITE16_HANDLER( deco16_104_prot_w ) /* Wizard Fire */ driver_device *state = space->machine().driver_data<driver_device>(); if (offset == (0x150 / 2)) { - state->soundlatch_w(*space, 0, data & 0xff); + state->soundlatch_byte_w(*space, 0, data & 0xff); cputag_set_input_line(space->machine(), "audiocpu", 0, HOLD_LINE); return; } @@ -231,7 +231,7 @@ WRITE16_HANDLER( deco16_60_prot_w ) /* Edward Randy */ driver_device *state = space->machine().driver_data<driver_device>(); if (offset == (0x64 / 2)) { - state->soundlatch_w(*space, 0, data & 0xff); + state->soundlatch_byte_w(*space, 0, data & 0xff); cputag_set_input_line(space->machine(), "audiocpu", 0, HOLD_LINE); } @@ -422,7 +422,7 @@ WRITE16_HANDLER( deco16_66_prot_w ) /* Mutant Fighter */ driver_device *state = space->machine().driver_data<driver_device>(); if (offset == (0x64 / 2)) { - state->soundlatch_w(*space, 0, data & 0xff); + state->soundlatch_byte_w(*space, 0, data & 0xff); cputag_set_input_line(space->machine(), "audiocpu", 0, HOLD_LINE); return; } @@ -610,7 +610,7 @@ WRITE16_HANDLER( deco16_104_cninja_prot_w ) driver_device *state = space->machine().driver_data<driver_device>(); if (offset == (0xa8 / 2)) { - state->soundlatch_w(*space, 0, data & 0xff); + state->soundlatch_byte_w(*space, 0, data & 0xff); cputag_set_input_line(space->machine(), "audiocpu", 0, HOLD_LINE); return; } @@ -674,7 +674,7 @@ WRITE16_HANDLER( deco16_146_funkyjet_prot_w ) if (offset == (0x10a >> 1)) { - state->soundlatch_w(*space, 0, data & 0xff); + state->soundlatch_byte_w(*space, 0, data & 0xff); cputag_set_input_line(space->machine(), "audiocpu", 0, HOLD_LINE); return; } @@ -794,7 +794,7 @@ WRITE16_HANDLER( deco16_104_rohga_prot_w ) driver_device *state = space->machine().driver_data<driver_device>(); if (offset == (0xa8 / 2)) { - state->soundlatch_w(*space, 0, data & 0xff); + state->soundlatch_byte_w(*space, 0, data & 0xff); cputag_set_input_line(space->machine(), "audiocpu", 0, HOLD_LINE); return; } @@ -1225,7 +1225,7 @@ static WRITE16_HANDLER( deco16_146_core_prot_w ) const int maskport=0x6c0; if (writeport == sndport) { - state->soundlatch_w(*space, 0, data & 0xff); + state->soundlatch_byte_w(*space, 0, data & 0xff); cputag_set_input_line(space->machine(), "audiocpu", 0, HOLD_LINE); return; } @@ -1755,7 +1755,7 @@ WRITE16_HANDLER( dietgo_104_prot_w ) driver_device *state = space->machine().driver_data<driver_device>(); if (offset == (0x380 / 2)) { - state->soundlatch_w(*space, 0, data & 0xff); + state->soundlatch_byte_w(*space, 0, data & 0xff); cputag_set_input_line(space->machine(), "audiocpu", 0, HOLD_LINE); return; } diff --git a/src/mame/machine/midyunit.c b/src/mame/machine/midyunit.c index 3466ca74750..adfb23cdb4a 100644 --- a/src/mame/machine/midyunit.c +++ b/src/mame/machine/midyunit.c @@ -616,7 +616,7 @@ WRITE16_MEMBER(midyunit_state::midyunit_sound_w) break; case SOUND_YAWDIM: - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); cputag_set_input_line(machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE); break; } diff --git a/src/mame/machine/scramble.c b/src/mame/machine/scramble.c index 0a8fc2dccd1..e60f262c895 100644 --- a/src/mame/machine/scramble.c +++ b/src/mame/machine/scramble.c @@ -162,7 +162,7 @@ const ppi8255_interface scramble_ppi_1_intf = DEVCB_NULL, /* Port A read */ DEVCB_NULL, /* Port B read */ DEVCB_NULL, /* Port C read */ - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_w), /* Port A write */ + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_w), /* Port A write */ DEVCB_HANDLER(scramble_sh_irqtrigger_w), /* Port B write */ DEVCB_NULL /* Port C write */ }; @@ -173,7 +173,7 @@ const ppi8255_interface stratgyx_ppi_1_intf = DEVCB_NULL, /* Port A read */ DEVCB_NULL, /* Port B read */ DEVCB_INPUT_PORT("IN3"), /* Port C read */ - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_w), /* Port A write */ + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_w), /* Port A write */ DEVCB_HANDLER(scramble_sh_irqtrigger_w), /* Port B write */ DEVCB_NULL /* Port C write */ }; @@ -184,7 +184,7 @@ const ppi8255_interface scramble_protection_ppi_1_intf = DEVCB_NULL, /* Port A read */ DEVCB_NULL, /* Port B read */ DEVCB_HANDLER(scramble_protection_r), /* Port C read */ - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_w), /* Port A write */ + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_w), /* Port A write */ DEVCB_HANDLER(scramble_sh_irqtrigger_w), /* Port B write */ DEVCB_HANDLER(scramble_protection_w) /* Port C write */ }; @@ -195,7 +195,7 @@ const ppi8255_interface mrkougar_ppi_1_intf = DEVCB_NULL, /* Port A read */ DEVCB_NULL, /* Port B read */ DEVCB_NULL, /* Port C read */ - DEVCB_DRIVER_MEMBER(driver_device, soundlatch_w), /* Port A write */ + DEVCB_DRIVER_MEMBER(driver_device, soundlatch_byte_w), /* Port A write */ DEVCB_HANDLER(mrkougar_sh_irqtrigger_w), /* Port B write */ DEVCB_NULL /* Port C write */ }; diff --git a/src/mame/machine/seicop.c b/src/mame/machine/seicop.c index 74da542ab0d..df259d91bc3 100644 --- a/src/mame/machine/seicop.c +++ b/src/mame/machine/seicop.c @@ -1713,7 +1713,7 @@ WRITE16_HANDLER( copdxbl_0_w ) case (0x740/2): { - state->soundlatch_w(*space, 0, data & 0xff); + state->soundlatch_byte_w(*space, 0, data & 0xff); cputag_set_input_line(space->machine(), "audiocpu", INPUT_LINE_NMI, PULSE_LINE ); break; } diff --git a/src/mame/video/cischeat.c b/src/mame/video/cischeat.c index 1a4d56580d0..385f17f5a91 100644 --- a/src/mame/video/cischeat.c +++ b/src/mame/video/cischeat.c @@ -410,7 +410,7 @@ READ16_MEMBER(cischeat_state::cischeat_vregs_r) } case 0x2200/2 : return input_port_read(machine(), "IN5"); // DSW 3 (4 bits) - case 0x2300/2 : return soundlatch2_r(space,0); // From sound cpu + case 0x2300/2 : return soundlatch2_byte_r(space,0); // From sound cpu default: SHOW_READ_ERROR("vreg %04X read!",offset*2); return m_vregs[offset]; @@ -496,7 +496,7 @@ READ16_MEMBER(cischeat_state::f1gpstar_vregs_r) case 0x0006/2 : return input_port_read(machine(), "IN3"); // ? Read at boot only - case 0x0008/2 : return soundlatch2_r(space,0); // From sound cpu + case 0x0008/2 : return soundlatch2_byte_r(space,0); // From sound cpu case 0x000c/2 : return input_port_read(machine(), "IN4"); // DSW 3 @@ -538,7 +538,7 @@ READ16_MEMBER(cischeat_state::wildplt_vregs_r) case 0x0004/2 : return input_port_read(machine(), "IN1"); // Buttons - case 0x0008/2 : return soundlatch2_r(space,0); // From sound cpu + case 0x0008/2 : return soundlatch2_byte_r(space,0); // From sound cpu case 0x0010/2 : // X, Y return input_port_read(machine(), "IN2") | (input_port_read(machine(), "IN3")<<8); diff --git a/src/mame/video/ginganin.c b/src/mame/video/ginganin.c index 258bdcc82af..159a7474c83 100644 --- a/src/mame/video/ginganin.c +++ b/src/mame/video/ginganin.c @@ -176,7 +176,7 @@ WRITE16_MEMBER(ginganin_state::ginganin_vregs16_w) machine().tilemap().set_flip_all(m_flipscreen ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0); break; case 7: - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_audiocpu, INPUT_LINE_NMI, PULSE_LINE); break; default: diff --git a/src/mame/video/liberate.c b/src/mame/video/liberate.c index ad92b054290..656ac2207a0 100644 --- a/src/mame/video/liberate.c +++ b/src/mame/video/liberate.c @@ -126,7 +126,7 @@ WRITE8_MEMBER(liberate_state::deco16_io_w) device_set_input_line(m_maincpu, DECO16_IRQ_LINE, CLEAR_LINE); break; case 9: /* Sound */ - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_audiocpu, M6502_IRQ_LINE, HOLD_LINE); break; } @@ -154,7 +154,7 @@ WRITE8_MEMBER(liberate_state::prosoccr_io_w) device_set_input_line(m_maincpu, DECO16_IRQ_LINE, CLEAR_LINE); break; case 9: /* Sound */ - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_audiocpu, M6502_IRQ_LINE, HOLD_LINE); break; } @@ -173,7 +173,7 @@ WRITE8_MEMBER(liberate_state::prosport_io_w) m_back_tilemap->mark_all_dirty(); break; case 2: /* Sound */ - soundlatch_w(space, 0, data); + soundlatch_byte_w(space, 0, data); device_set_input_line(m_audiocpu, M6502_IRQ_LINE, HOLD_LINE); break; case 4: /* Irq ack */ diff --git a/src/mame/video/skyfox.c b/src/mame/video/skyfox.c index 3ddcc223ad8..c4e834fba24 100644 --- a/src/mame/video/skyfox.c +++ b/src/mame/video/skyfox.c @@ -60,7 +60,7 @@ WRITE8_MEMBER(skyfox_state::skyfox_vregs_w) switch (offset) { case 0: m_bg_ctrl = data; break; - case 1: soundlatch_w(space, 0, data); break; + case 1: soundlatch_byte_w(space, 0, data); break; case 2: break; case 3: break; case 4: break; |