summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar AJR <ajrhacker@users.noreply.github.com>2019-02-01 09:49:16 -0500
committerGravatarGravatar AJR <ajrhacker@users.noreply.github.com>2019-02-01 09:49:16 -0500
commit348d53573879256b274b6a5384c9f42bc329f474 (patch) (github)
treeca6890cc5549927398386e92ac89c4d74f702b6c
parentb0e926586b5966160e2c0861132ccbeb3a35ebbd (diff)
downloadmame-348d53573879256b274b6a5384c9f42bc329f474.tar.bz2
mame-348d53573879256b274b6a5384c9f42bc329f474.zip
okim6258, okim6295: Simplify read/write handlers (nw)
-rw-r--r--src/devices/sound/okim6258.cpp6
-rw-r--r--src/devices/sound/okim6258.h6
-rw-r--r--src/devices/sound/okim6295.cpp28
-rw-r--r--src/devices/sound/okim6295.h7
-rw-r--r--src/mame/audio/atarijsa.cpp8
-rw-r--r--src/mame/drivers/aquarium.cpp4
-rw-r--r--src/mame/drivers/blackt96.cpp8
-rw-r--r--src/mame/drivers/drgnmst.cpp18
-rw-r--r--src/mame/drivers/kaneko16.cpp4
-rw-r--r--src/mame/drivers/kickgoal.cpp32
-rw-r--r--src/mame/drivers/laz_aftrshok.cpp2
-rw-r--r--src/mame/drivers/limenko.cpp2
-rw-r--r--src/mame/drivers/megasys1.cpp2
-rw-r--r--src/mame/drivers/metro.cpp6
-rw-r--r--src/mame/drivers/missb2.cpp4
-rw-r--r--src/mame/drivers/playmark.cpp6
-rw-r--r--src/mame/drivers/snowbros.cpp24
-rw-r--r--src/mame/drivers/spool99.cpp4
-rw-r--r--src/mame/drivers/sslam.cpp32
-rw-r--r--src/mame/drivers/taito_f3.cpp5
-rw-r--r--src/mame/drivers/tumbleb.cpp30
-rw-r--r--src/mame/drivers/x68k.cpp12
-rw-r--r--src/mame/machine/tatsumi.cpp2
23 files changed, 115 insertions, 137 deletions
diff --git a/src/devices/sound/okim6258.cpp b/src/devices/sound/okim6258.cpp
index 491229a4e81..a9477a5d7bc 100644
--- a/src/devices/sound/okim6258.cpp
+++ b/src/devices/sound/okim6258.cpp
@@ -262,7 +262,7 @@ int okim6258_device::get_vclk()
***********************************************************************************************/
-READ8_MEMBER( okim6258_device::status_r )
+uint8_t okim6258_device::status_r()
{
m_stream->update();
@@ -275,7 +275,7 @@ READ8_MEMBER( okim6258_device::status_r )
okim6258_data_w -- write to the control port of an OKIM6258-compatible chip
***********************************************************************************************/
-WRITE8_MEMBER( okim6258_device::data_w )
+void okim6258_device::data_w(uint8_t data)
{
/* update the stream */
m_stream->update();
@@ -291,7 +291,7 @@ WRITE8_MEMBER( okim6258_device::data_w )
***********************************************************************************************/
-WRITE8_MEMBER( okim6258_device::ctrl_w )
+void okim6258_device::ctrl_w(uint8_t data)
{
m_stream->update();
diff --git a/src/devices/sound/okim6258.h b/src/devices/sound/okim6258.h
index 6ca2c67532b..57f764d4eb7 100644
--- a/src/devices/sound/okim6258.h
+++ b/src/devices/sound/okim6258.h
@@ -33,9 +33,9 @@ public:
void set_type(int type) { m_adpcm_type = type; }
void set_outbits(int outbit) { m_output_bits = outbit; }
- DECLARE_READ8_MEMBER( status_r );
- DECLARE_WRITE8_MEMBER( data_w );
- DECLARE_WRITE8_MEMBER( ctrl_w );
+ uint8_t status_r();
+ void data_w(uint8_t data);
+ void ctrl_w(uint8_t data);
void set_divider(int val);
int get_vclk();
diff --git a/src/devices/sound/okim6295.cpp b/src/devices/sound/okim6295.cpp
index faf078e5f7c..10375f7736a 100644
--- a/src/devices/sound/okim6295.cpp
+++ b/src/devices/sound/okim6295.cpp
@@ -210,10 +210,10 @@ void okim6295_device::set_pin7(int pin7)
//-------------------------------------------------
-// read_status - read the status register
+// read - read the status register
//-------------------------------------------------
-uint8_t okim6295_device::read_status()
+uint8_t okim6295_device::read()
{
uint8_t result = 0xf0; // naname expects bits 4-7 to be 1
@@ -228,20 +228,10 @@ uint8_t okim6295_device::read_status()
//-------------------------------------------------
-// read - memory interface for read
+// write - write to the command register
//-------------------------------------------------
-READ8_MEMBER( okim6295_device::read )
-{
- return read_status();
-}
-
-
-//-------------------------------------------------
-// write_command - write to the command register
-//-------------------------------------------------
-
-void okim6295_device::write_command(uint8_t command)
+void okim6295_device::write(uint8_t command)
{
// if a command is pending, process the second half
if (m_command != -1)
@@ -323,16 +313,6 @@ void okim6295_device::write_command(uint8_t command)
}
-//-------------------------------------------------
-// write - memory interface for write
-//-------------------------------------------------
-
-WRITE8_MEMBER( okim6295_device::write )
-{
- write_command(data);
-}
-
-
//**************************************************************************
// OKIM VOICE
diff --git a/src/devices/sound/okim6295.h b/src/devices/sound/okim6295.h
index 536c76b3b10..0e836c29ad9 100644
--- a/src/devices/sound/okim6295.h
+++ b/src/devices/sound/okim6295.h
@@ -47,11 +47,8 @@ public:
// runtime configuration
void set_pin7(int pin7);
- uint8_t read_status();
- void write_command(uint8_t command);
-
- DECLARE_READ8_MEMBER( read );
- DECLARE_WRITE8_MEMBER( write );
+ uint8_t read();
+ void write(uint8_t command);
protected:
// device-level overrides
diff --git a/src/mame/audio/atarijsa.cpp b/src/mame/audio/atarijsa.cpp
index 27156f8bb4b..4a34fb674ba 100644
--- a/src/mame/audio/atarijsa.cpp
+++ b/src/mame/audio/atarijsa.cpp
@@ -364,11 +364,11 @@ READ8_MEMBER( atari_jsa_oki_base_device::oki_r )
{
// JSA IIIs selects the 2nd OKI via the low bit, so select it
if (m_oki2 != nullptr && offset == 1)
- return m_oki2->read(space, offset);
+ return m_oki2->read();
// OKI may not be populated at all
else if (m_oki1 != nullptr)
- return m_oki1->read(space, offset);
+ return m_oki1->read();
// if not present, return all 0xff
return 0xff;
@@ -384,11 +384,11 @@ WRITE8_MEMBER( atari_jsa_oki_base_device::oki_w )
{
// JSA IIIs selects the 2nd OKI via the low bit, so select it
if (m_oki2 != nullptr && offset == 1)
- m_oki2->write(space, offset, data);
+ m_oki2->write(data);
// OKI may not be populated at all
else if (m_oki1 != nullptr)
- m_oki1->write(space, offset, data);
+ m_oki1->write(data);
}
diff --git a/src/mame/drivers/aquarium.cpp b/src/mame/drivers/aquarium.cpp
index 0f3dd904512..ea2754444eb 100644
--- a/src/mame/drivers/aquarium.cpp
+++ b/src/mame/drivers/aquarium.cpp
@@ -87,13 +87,13 @@ uint8_t aquarium_state::aquarium_snd_bitswap( uint8_t scrambled_data )
READ8_MEMBER(aquarium_state::aquarium_oki_r)
{
- return aquarium_snd_bitswap(m_oki->read(space, offset));
+ return aquarium_snd_bitswap(m_oki->read());
}
WRITE8_MEMBER(aquarium_state::aquarium_oki_w)
{
logerror("%s:Writing %04x to the OKI M6295\n", machine().describe_context(), aquarium_snd_bitswap(data));
- m_oki->write(space, offset, (aquarium_snd_bitswap(data)));
+ m_oki->write(aquarium_snd_bitswap(data));
}
diff --git a/src/mame/drivers/blackt96.cpp b/src/mame/drivers/blackt96.cpp
index 28bb8f2f685..8e0ecb3e089 100644
--- a/src/mame/drivers/blackt96.cpp
+++ b/src/mame/drivers/blackt96.cpp
@@ -447,14 +447,14 @@ WRITE8_MEMBER(blackt96_state::blackt96_soundio_port_c_w)
if (((data & 0x02) == 0x00) && ((m_port_c_data & 0x02) == 0x02)) // high -> low on bit 0x02 writes to selected OKI
{
//logerror("%s: blackt96_soundio_port_c_w (write to OKI %02x) (oki selected is %02x)\n", machine().describe_context().c_str(), m_port_b_latch, m_oki_selected);
- if (m_oki_selected == 0) m_oki[0]->write(space, 0, m_port_b_latch);
- else if (m_oki_selected == 1) m_oki[1]->write(space, 0, m_port_b_latch);
+ if (m_oki_selected == 0) m_oki[0]->write(m_port_b_latch);
+ else if (m_oki_selected == 1) m_oki[1]->write(m_port_b_latch);
}
if (((data & 0x01) == 0x00) && ((m_port_c_data & 0x01) == 0x01)) // high -> low on bit 0x01 reads to selected OKI
{
- if (m_oki_selected == 0) m_port_b_latch = m_oki[0]->read(space, 0);
- else if (m_oki_selected == 1) m_port_b_latch = m_oki[1]->read(space, 0);
+ if (m_oki_selected == 0) m_port_b_latch = m_oki[0]->read();
+ else if (m_oki_selected == 1) m_port_b_latch = m_oki[1]->read();
}
m_port_c_data = data;
diff --git a/src/mame/drivers/drgnmst.cpp b/src/mame/drivers/drgnmst.cpp
index e731f9dbce3..67be3d857a5 100644
--- a/src/mame/drivers/drgnmst.cpp
+++ b/src/mame/drivers/drgnmst.cpp
@@ -77,8 +77,8 @@ READ8_MEMBER(drgnmst_state::snd_command_r)
switch (m_oki_control & 0x1f)
{
- case 0x12: data = (m_oki[1]->read(space, 0) & 0x0f); break;
- case 0x16: data = (m_oki[0]->read(space, 0) & 0x0f); break;
+ case 0x12: data = (m_oki[1]->read() & 0x0f); break;
+ case 0x16: data = (m_oki[0]->read() & 0x0f); break;
case 0x0b:
case 0x0f: data = m_snd_command; break;
default: break;
@@ -160,17 +160,17 @@ WRITE8_MEMBER(drgnmst_state::snd_control_w)
switch (m_oki_control & 0x1f)
{
- case 0x11:
+ case 0x11:
// logerror("Writing %02x to OKI1", m_oki_command);
// logerror(", PortC=%02x, Code=%02x, Bank0=%01x, Bank1=%01x\n", m_oki_control, m_snd_command, m_oki_bank[0], m_oki_bank[1]);
- m_oki[1]->write(space, 0, m_oki_command);
- break;
- case 0x15:
+ m_oki[1]->write(m_oki_command);
+ break;
+ case 0x15:
// logerror("Writing %02x to OKI0", m_oki_command);
// logerror(", PortC=%02x, Code=%02x, Bank0=%01x, Bank1=%01x\n", m_oki_control, m_snd_command, m_oki_bank[0], m_oki_bank[1]);
- m_oki[0]->write(space, 0, m_oki_command);
- break;
- default: break;
+ m_oki[0]->write(m_oki_command);
+ break;
+ default: break;
}
}
diff --git a/src/mame/drivers/kaneko16.cpp b/src/mame/drivers/kaneko16.cpp
index 48d46d876d9..087ff155783 100644
--- a/src/mame/drivers/kaneko16.cpp
+++ b/src/mame/drivers/kaneko16.cpp
@@ -243,7 +243,7 @@ READ16_MEMBER(kaneko16_berlwall_state::berlwall_oki_r)
mem_mask >>= 8;
}
- ret = m_oki[0]->read(space, offset, mem_mask);
+ ret = m_oki[0]->read();
ret = ret | ret << 8;
return ret;
@@ -257,7 +257,7 @@ WRITE16_MEMBER(kaneko16_berlwall_state::berlwall_oki_w)
mem_mask >>= 8;
}
- m_oki[0]->write(space, offset, data, mem_mask);
+ m_oki[0]->write(data);
}
READ16_MEMBER(kaneko16_berlwall_state::berlwall_spriteram_r)
diff --git a/src/mame/drivers/kickgoal.cpp b/src/mame/drivers/kickgoal.cpp
index 7628eb9026b..91af2885e69 100644
--- a/src/mame/drivers/kickgoal.cpp
+++ b/src/mame/drivers/kickgoal.cpp
@@ -66,7 +66,7 @@ WRITE16_MEMBER(kickgoal_state::actionhw_snd_w)
case 0xfe: m_okibank->set_entry(1); break;
case 0xff: m_okibank->set_entry(3); break;
case 0x78:
- m_oki->write_command(data);
+ m_oki->write(data);
m_snd_sam[0] = 00; m_snd_sam[1]= 00; m_snd_sam[2] = 00; m_snd_sam[3] = 00;
break;
default:
@@ -75,44 +75,44 @@ WRITE16_MEMBER(kickgoal_state::actionhw_snd_w)
if ((data & 0x80) && (m_snd_sam[3] != m_snd_new))
{
logerror("About to play sample %02x at vol %02x\n", m_snd_new, data);
- if ((m_oki->read_status() & 0x08) != 0x08)
+ if ((m_oki->read() & 0x08) != 0x08)
{
logerror("Playing sample %02x at vol %02x\n", m_snd_new, data);
- m_oki->write_command(m_snd_new);
- m_oki->write_command(data);
+ m_oki->write(m_snd_new);
+ m_oki->write(data);
}
m_snd_new = 00;
}
if ((data & 0x40) && (m_snd_sam[2] != m_snd_new))
{
logerror("About to play sample %02x at vol %02x\n", m_snd_new, data);
- if ((m_oki->read_status() & 0x04) != 0x04)
+ if ((m_oki->read() & 0x04) != 0x04)
{
logerror("Playing sample %02x at vol %02x\n", m_snd_new, data);
- m_oki->write_command(m_snd_new);
- m_oki->write_command(data);
+ m_oki->write(m_snd_new);
+ m_oki->write(data);
}
m_snd_new = 00;
}
if ((data & 0x20) && (m_snd_sam[1] != m_snd_new))
{
logerror("About to play sample %02x at vol %02x\n", m_snd_new, data);
- if ((m_oki->read_status() & 0x02) != 0x02)
+ if ((m_oki->read() & 0x02) != 0x02)
{
logerror("Playing sample %02x at vol %02x\n", m_snd_new, data);
- m_oki->write_command(m_snd_new);
- m_oki->write_command(data);
+ m_oki->write(m_snd_new);
+ m_oki->write(data);
}
m_snd_new = 00;
}
if ((data & 0x10) && (m_snd_sam[0] != m_snd_new))
{
logerror("About to play sample %02x at vol %02x\n", m_snd_new, data);
- if ((m_oki->read_status() & 0x01) != 0x01)
+ if ((m_oki->read() & 0x01) != 0x01)
{
logerror("Playing sample %02x at vol %02x\n", m_snd_new, data);
- m_oki->write_command(m_snd_new);
- m_oki->write_command(data);
+ m_oki->write(m_snd_new);
+ m_oki->write(data);
}
m_snd_new = 00;
}
@@ -127,7 +127,7 @@ WRITE16_MEMBER(kickgoal_state::actionhw_snd_w)
else /* Turn a channel off */
{
logerror("Turning channel %02x off\n", data);
- m_oki->write_command(data);
+ m_oki->write(data);
if (data & 0x40) m_snd_sam[3] = 00;
if (data & 0x20) m_snd_sam[2] = 00;
if (data & 0x10) m_snd_sam[1] = 00;
@@ -394,7 +394,7 @@ WRITE8_MEMBER(kickgoal_state::soundio_port_c_w)
{
if (!(data & 0x01))
{
- m_pic_portb = m_oki->read_status();
+ m_pic_portb = m_oki->read();
}
}
@@ -402,7 +402,7 @@ WRITE8_MEMBER(kickgoal_state::soundio_port_c_w)
{
if (!(data & 0x02))
{
- m_oki->write_command(m_pic_portb);
+ m_oki->write(m_pic_portb);
}
}
diff --git a/src/mame/drivers/laz_aftrshok.cpp b/src/mame/drivers/laz_aftrshok.cpp
index 06e15abd685..954f203c6de 100644
--- a/src/mame/drivers/laz_aftrshok.cpp
+++ b/src/mame/drivers/laz_aftrshok.cpp
@@ -134,7 +134,7 @@ void aftrshok_state::sound_data_w(u8 data)
void aftrshok_state::mcu_p3_w(u8 data)
{
if (!BIT(data, 1) && !BIT(data, 2))
- m_oki->write(machine().dummy_space(), 0, m_sound_data);
+ m_oki->write(m_sound_data);
}
void aftrshok_state::prog_map(address_map &map)
diff --git a/src/mame/drivers/limenko.cpp b/src/mame/drivers/limenko.cpp
index 05f0496496b..29d90ba92f6 100644
--- a/src/mame/drivers/limenko.cpp
+++ b/src/mame/drivers/limenko.cpp
@@ -273,7 +273,7 @@ READ8_MEMBER(limenko_state::spotty_sound_r)
if(m_spotty_sound_cmd == 0xf7)
return m_soundlatch->read(space,0);
else
- return m_oki->read(space,0);
+ return m_oki->read();
}
/*****************************************************************************************************
diff --git a/src/mame/drivers/megasys1.cpp b/src/mame/drivers/megasys1.cpp
index b65c15c48b4..34b19cf50a4 100644
--- a/src/mame/drivers/megasys1.cpp
+++ b/src/mame/drivers/megasys1.cpp
@@ -501,7 +501,7 @@ READ8_MEMBER(megasys1_state::oki_status_r)
if (m_ignore_oki_status == 1)
return 0;
else
- return m_oki[Chip]->read_status();
+ return m_oki[Chip]->read();
}
/***************************************************************************
diff --git a/src/mame/drivers/metro.cpp b/src/mame/drivers/metro.cpp
index 0ff15f8d71f..ea6a893e563 100644
--- a/src/mame/drivers/metro.cpp
+++ b/src/mame/drivers/metro.cpp
@@ -377,7 +377,7 @@ WRITE8_MEMBER(metro_state::upd7810_portb_w)
{
/* write */
if (!BIT(data, 4))
- m_oki->write(space, 0, m_porta);
+ m_oki->write(m_porta);
}
m_portb = data;
@@ -426,14 +426,14 @@ WRITE8_MEMBER(metro_state::daitorid_portb_w)
{
/* write */
if (!BIT(data, 4))
- m_oki->write(space, 0, m_porta);
+ m_oki->write(m_porta);
}
if (BIT(m_portb, 3) && !BIT(data, 3)) /* clock 1->0 */
{
/* read */
if (!BIT(data, 4))
- m_porta = m_oki->read(space, 0);
+ m_porta = m_oki->read();
}
m_portb = data;
diff --git a/src/mame/drivers/missb2.cpp b/src/mame/drivers/missb2.cpp
index e6fd8d6e23d..99fe7e73234 100644
--- a/src/mame/drivers/missb2.cpp
+++ b/src/mame/drivers/missb2.cpp
@@ -175,12 +175,12 @@ WRITE8_MEMBER(missb2_state::missb2_bg_bank_w)
WRITE8_MEMBER(missb2_state::missb2_oki_w)
{
- m_oki->write_command(bitswap<8>(data, 7,5,6,4,3,1,2,0));
+ m_oki->write(bitswap<8>(data, 7,5,6,4,3,1,2,0));
}
READ8_MEMBER(missb2_state::missb2_oki_r)
{
- return bitswap<8>(m_oki->read_status(), 7,5,6,4,3,1,2,0);
+ return bitswap<8>(m_oki->read(), 7,5,6,4,3,1,2,0);
}
/* Memory Maps */
diff --git a/src/mame/drivers/playmark.cpp b/src/mame/drivers/playmark.cpp
index fa581a0627b..688a8804a9f 100644
--- a/src/mame/drivers/playmark.cpp
+++ b/src/mame/drivers/playmark.cpp
@@ -186,7 +186,7 @@ READ8_MEMBER(playmark_state::playmark_snd_command_r)
}
else if ((m_oki_control & 0x38) == 0x28)
{
- data = (m_oki->read(space, 0) & 0x0f);
+ data = (m_oki->read() & 0x0f);
// logerror("PC$%03x PortB reading %02x from the OKI status port\n", m_maincpu->pcbase(), data);
}
@@ -238,7 +238,7 @@ WRITE8_MEMBER(playmark_state::playmark_snd_control_w)
if ((data & 0x38) == 0x18)
{
// logerror("PC$%03x Writing %02x to OKI1, PortC=%02x, Code=%02x\n",m_maincpu->pcbase(),m_oki_command,m_oki_control,m_snd_command);
- m_oki->write(space, 0, m_oki_command);
+ m_oki->write(m_oki_command);
}
}
@@ -254,7 +254,7 @@ WRITE8_MEMBER(playmark_state::hrdtimes_snd_control_w)
if ((data & 0x38) == 0x18)
{
// logerror("PC$%03x Writing %02x to OKI1, PortC=%02x, Code=%02x\n",m_maincpu->pcbase(),m_oki_command,m_oki_control,m_snd_command);
- m_oki->write(space, 0, m_oki_command);
+ m_oki->write(m_oki_command);
}
}
diff --git a/src/mame/drivers/snowbros.cpp b/src/mame/drivers/snowbros.cpp
index fb950b66082..17a3c4a0262 100644
--- a/src/mame/drivers/snowbros.cpp
+++ b/src/mame/drivers/snowbros.cpp
@@ -150,7 +150,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(snowbros_state::snowbros_irq)
TIMER_DEVICE_CALLBACK_MEMBER(snowbros_state::snowbros3_irq)
{
- int status = m_oki->read_status();
+ int status = m_oki->read();
int scanline = param;
if(scanline == 240)
@@ -166,8 +166,8 @@ TIMER_DEVICE_CALLBACK_MEMBER(snowbros_state::snowbros3_irq)
{
if ((status&0x08)==0x00)
{
- m_oki->write_command(0x80|m_sb3_music);
- m_oki->write_command(0x00|0x82);
+ m_oki->write(0x80|m_sb3_music);
+ m_oki->write(0x00|0x82);
}
}
@@ -175,7 +175,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(snowbros_state::snowbros3_irq)
{
if ((status&0x08)==0x08)
{
- m_oki->write_command(0x40); /* Stop playing music */
+ m_oki->write(0x40); /* Stop playing music */
}
}
@@ -424,22 +424,22 @@ void snowbros_state::sb3_play_music(int data)
void snowbros_state::sb3_play_sound (int data)
{
- int status = m_oki->read_status();
+ int status = m_oki->read();
if ((status&0x01)==0x00)
{
- m_oki->write_command(0x80|data);
- m_oki->write_command(0x00|0x12);
+ m_oki->write(0x80|data);
+ m_oki->write(0x00|0x12);
}
else if ((status&0x02)==0x00)
{
- m_oki->write_command(0x80|data);
- m_oki->write_command(0x00|0x22);
+ m_oki->write(0x80|data);
+ m_oki->write(0x00|0x22);
}
else if ((status&0x04)==0x00)
{
- m_oki->write_command(0x80|data);
- m_oki->write_command(0x00|0x42);
+ m_oki->write(0x80|data);
+ m_oki->write(0x00|0x42);
}
@@ -450,7 +450,7 @@ WRITE16_MEMBER(snowbros_state::sb3_sound_w)
if (data == 0x00fe)
{
m_sb3_music_is_playing = 0;
- m_oki->write_command(0x78); /* Stop sounds */
+ m_oki->write(0x78); /* Stop sounds */
}
else /* the alternating 0x00-0x2f or 0x30-0x5f might be something to do with the channels */
{
diff --git a/src/mame/drivers/spool99.cpp b/src/mame/drivers/spool99.cpp
index 14b5f4639be..f3797820436 100644
--- a/src/mame/drivers/spool99.cpp
+++ b/src/mame/drivers/spool99.cpp
@@ -208,7 +208,7 @@ READ8_MEMBER(spool99_state::spool99_io_r)
// case 0xafe5: return 1;
// case 0xafe6: return 1;
case 0xafe7: return m_eeprom->do_read();
- case 0xaff8: return m_oki->read(space,0);
+ case 0xaff8: return m_oki->read();
}
}
// printf("%04x %d\n",offset+0xaf00,io_switch);
@@ -267,7 +267,7 @@ READ8_MEMBER(spool99_state::vcarn_io_r)
case 0xa725: return ioport("HOLD3")->read();
case 0xa726: return ioport("HOLD4")->read();
case 0xa727: return ioport("HOLD2")->read();
- case 0xa780: return m_oki->read(space,0);
+ case 0xa780: return m_oki->read();
case 0xa7a0: return ioport("HOLD1")->read();
case 0xa7a1: return ioport("HOLD5")->read();
case 0xa7a2: return ioport("START")->read();
diff --git a/src/mame/drivers/sslam.cpp b/src/mame/drivers/sslam.cpp
index d9a2dbe60db..634bfc7eb90 100644
--- a/src/mame/drivers/sslam.cpp
+++ b/src/mame/drivers/sslam.cpp
@@ -219,7 +219,7 @@ static const uint8_t sslam_snd_loop[8][19] =
TIMER_CALLBACK_MEMBER(sslam_state::music_playback)
{
int pattern = 0;
- if ((m_oki->read_status() & 0x08) == 0)
+ if ((m_oki->read() & 0x08) == 0)
{
m_bar += 1;
pattern = sslam_snd_loop[m_melody][m_bar];
@@ -230,8 +230,8 @@ TIMER_CALLBACK_MEMBER(sslam_state::music_playback)
pattern = sslam_snd_loop[m_melody][m_bar];
}
logerror("Changing bar in music track to pattern %02x\n",pattern);
- m_oki->write_command(0x80 | pattern);
- m_oki->write_command(0x81);
+ m_oki->write(0x80 | pattern);
+ m_oki->write(0x81);
}
else if (pattern == 0x00) { /* Non-looped track. Stop playing it */
m_track = 0;
@@ -251,7 +251,7 @@ TIMER_CALLBACK_MEMBER(sslam_state::music_playback)
void sslam_state::sslam_play(int track, int data)
{
- int status = m_oki->read_status();
+ int status = m_oki->read();
if (data < 0x80) {
if (track) {
@@ -259,24 +259,24 @@ void sslam_state::sslam_play(int track, int data)
m_track = data;
m_bar = 0;
if (status & 0x08)
- m_oki->write_command(0x40);
- m_oki->write_command((0x80 | data));
- m_oki->write_command(0x81);
+ m_oki->write(0x40);
+ m_oki->write((0x80 | data));
+ m_oki->write(0x81);
m_music_timer->adjust(attotime::from_msec(4), 0, attotime::from_hz(250)); /* 250Hz for smooth sequencing */
}
}
else {
if ((status & 0x01) == 0) {
- m_oki->write_command((0x80 | data));
- m_oki->write_command(0x11);
+ m_oki->write((0x80 | data));
+ m_oki->write(0x11);
}
else if ((status & 0x02) == 0) {
- m_oki->write_command((0x80 | data));
- m_oki->write_command(0x21);
+ m_oki->write((0x80 | data));
+ m_oki->write(0x21);
}
else if ((status & 0x04) == 0) {
- m_oki->write_command((0x80 | data));
- m_oki->write_command(0x41);
+ m_oki->write((0x80 | data));
+ m_oki->write(0x41);
}
}
}
@@ -288,7 +288,7 @@ void sslam_state::sslam_play(int track, int data)
m_bar = 0;
}
data &= 0x7f;
- m_oki->write_command(data);
+ m_oki->write(data);
}
}
@@ -430,7 +430,7 @@ READ8_MEMBER(sslam_state::playmark_snd_command_r)
data = m_soundlatch->read(space,0);
}
else if ((m_oki_control & 0x38) == 0x28) {
- data = (m_oki->read(space,0) & 0x0f);
+ data = (m_oki->read() & 0x0f);
}
return data;
@@ -456,7 +456,7 @@ WRITE8_MEMBER(sslam_state::playmark_snd_control_w)
if ((data & 0x38) == 0x18)
{
- m_oki->write(space, 0, m_oki_command);
+ m_oki->write(m_oki_command);
}
// !(data & 0x80) -> sound enable
diff --git a/src/mame/drivers/taito_f3.cpp b/src/mame/drivers/taito_f3.cpp
index d77c43d9f47..f6586ae1caa 100644
--- a/src/mame/drivers/taito_f3.cpp
+++ b/src/mame/drivers/taito_f3.cpp
@@ -4106,12 +4106,13 @@ void taito_f3_state::init_bubsymph()
READ32_MEMBER(taito_f3_state::bubsympb_oki_r)
{
- return m_oki->read(space,0);
+ return m_oki->read();
}
+
WRITE32_MEMBER(taito_f3_state::bubsympb_oki_w)
{
//printf("write %08x %08x\n",data,mem_mask);
- if (ACCESSING_BITS_0_7) m_oki->write(space, 0,data&0xff);
+ if (ACCESSING_BITS_0_7) m_oki->write(data&0xff);
//if (mem_mask==0x000000ff) downcast<okim6295_device *>(device)->write(0,data&0xff);
if (ACCESSING_BITS_16_23)
{
diff --git a/src/mame/drivers/tumbleb.cpp b/src/mame/drivers/tumbleb.cpp
index a1bc8f73e50..2072512814e 100644
--- a/src/mame/drivers/tumbleb.cpp
+++ b/src/mame/drivers/tumbleb.cpp
@@ -321,12 +321,12 @@ WRITE16_MEMBER(tumbleb_state::tumblepb_oki_w)
{
if (mem_mask == 0xffff)
{
- m_oki->write(space, 0, data & 0xff);
+ m_oki->write(data & 0xff);
//printf("tumbleb_oki_w %04x %04x\n", data, mem_mask);
}
else
{
- m_oki->write(space, 0, (data >> 8) & 0xff);
+ m_oki->write((data >> 8) & 0xff);
//printf("tumbleb_oki_w %04x %04x\n", data, mem_mask);
}
/* STUFF IN OTHER BYTE TOO..*/
@@ -428,14 +428,14 @@ command 1 - stop?
void tumbleb_state::tumbleb2_playmusic(okim6295_device *oki)
{
- int status = oki->read_status();
+ int status = oki->read();
if (m_music_is_playing)
{
if (!BIT(status, 3))
{
- oki->write_command(0x80 | m_music_command);
- oki->write_command(0x00 | 0x82);
+ oki->write(0x80 | m_music_command);
+ oki->write(0x00 | 0x82);
}
}
}
@@ -476,22 +476,22 @@ void tumbleb_state::tumbleb2_set_music_bank( int bank )
void tumbleb_state::tumbleb2_play_sound( okim6295_device *oki, int data )
{
- int status = oki->read_status();
+ int status = oki->read();
if (!BIT(status, 0))
{
- oki->write_command(0x80 | data);
- oki->write_command(0x00 | 0x12);
+ oki->write(0x80 | data);
+ oki->write(0x00 | 0x12);
}
else if (!BIT(status, 1))
{
- oki->write_command(0x80 | data);
- oki->write_command(0x00 | 0x22);
+ oki->write(0x80 | data);
+ oki->write(0x00 | 0x22);
}
else if (!BIT(status, 2))
{
- oki->write_command(0x80 | data);
- oki->write_command(0x00 | 0x42);
+ oki->write(0x80 | data);
+ oki->write(0x00 | 0x42);
}
}
@@ -509,13 +509,13 @@ void tumbleb_state::tumbleb2_play_sound( okim6295_device *oki, int data )
void tumbleb_state::process_tumbleb2_music_command( okim6295_device *oki, int data )
{
- int status = oki->read_status();
+ int status = oki->read();
if (data == 1) // stop?
{
if (BIT(status, 3))
{
- oki->write_command(0x40); /* Stop playing music */
+ oki->write(0x40); /* Stop playing music */
m_music_is_playing = 0;
}
}
@@ -524,7 +524,7 @@ void tumbleb_state::process_tumbleb2_music_command( okim6295_device *oki, int da
if (m_music_is_playing != data)
{
m_music_is_playing = data;
- oki->write_command(0x40); // stop the current music
+ oki->write(0x40); // stop the current music
switch (data)
{
case 0x04: // map screen
diff --git a/src/mame/drivers/x68k.cpp b/src/mame/drivers/x68k.cpp
index 92d848b2348..268e903a736 100644
--- a/src/mame/drivers/x68k.cpp
+++ b/src/mame/drivers/x68k.cpp
@@ -1045,12 +1045,12 @@ WRITE8_MEMBER(x68k_state::adpcm_w)
{
switch(offset)
{
- case 0x00:
- m_okim6258->ctrl_w(space,0,data);
- break;
- case 0x01:
- m_okim6258->data_w(space,0,data);
- break;
+ case 0x00:
+ m_okim6258->ctrl_w(data);
+ break;
+ case 0x01:
+ m_okim6258->data_w(data);
+ break;
}
}
diff --git a/src/mame/machine/tatsumi.cpp b/src/mame/machine/tatsumi.cpp
index 24d9739db8d..5bcd279ba72 100644
--- a/src/mame/machine/tatsumi.cpp
+++ b/src/mame/machine/tatsumi.cpp
@@ -318,7 +318,7 @@ READ8_MEMBER(tatsumi_state::tatsumi_hack_ym2151_r)
READ8_MEMBER(cyclwarr_state::oki_status_xor_r)
{
- int r = m_oki->read(space,0);
+ int r = m_oki->read();
// Cycle Warriors and Big Fight access this with reversed activeness.
// this is particularly noticeable with the "We got em" sample played in CW at stage clear: