mirror of
https://github.com/holub/mame
synced 2025-04-26 02:07:14 +03:00
Merge pull request #4573 from cam900/fm_args
Remove unnecessary address_space arguments on FM sound chips read/wri…
This commit is contained in:
commit
83b1e31234
@ -205,7 +205,7 @@ READ8_MEMBER(a78_xm_device::read_04xx)
|
||||
if (BIT(m_reg, 4) && offset >= 0x50 && offset < 0x60)
|
||||
return m_pokey->read(space, offset & 0x0f);
|
||||
else if (m_ym_enabled && offset >= 0x60 && offset <= 0x61)
|
||||
return m_ym->read(space, offset & 1);
|
||||
return m_ym->read(offset & 1);
|
||||
else if (BIT(m_reg, 4) && offset >= 0x60 && offset < 0x70)
|
||||
return m_xbslot->read_04xx(space, offset - 0x10); // access second POKEY
|
||||
else
|
||||
@ -217,7 +217,7 @@ WRITE8_MEMBER(a78_xm_device::write_04xx)
|
||||
if (BIT(m_reg, 4) && offset >= 0x50 && offset < 0x60)
|
||||
m_pokey->write(space, offset & 0x0f, data);
|
||||
else if (m_ym_enabled && offset >= 0x60 && offset <= 0x61)
|
||||
m_ym->write(space, offset & 1, data);
|
||||
m_ym->write(offset & 1, data);
|
||||
else if (BIT(m_reg, 4) && offset >= 0x60 && offset < 0x70)
|
||||
m_xbslot->write_04xx(space, offset - 0x10, data); // access second POKEY
|
||||
else if (offset >= 0x70 && offset < 0x80)
|
||||
|
@ -219,7 +219,7 @@ uint8_t c64_sfx_sound_expander_cartridge_device::c64_cd_r(address_space &space,
|
||||
|
||||
if (BIT(offset, 5))
|
||||
{
|
||||
data = m_opl->read(space, BIT(offset, 4));
|
||||
data = m_opl->read(BIT(offset, 4));
|
||||
}
|
||||
}
|
||||
|
||||
@ -235,7 +235,7 @@ void c64_sfx_sound_expander_cartridge_device::c64_cd_w(address_space &space, off
|
||||
{
|
||||
if (!io2 && sphi2)
|
||||
{
|
||||
m_opl->write(space, BIT(offset, 4), data);
|
||||
m_opl->write(BIT(offset, 4), data);
|
||||
}
|
||||
|
||||
m_exp->cd_w(space, get_offset(offset, 0), data, sphi2, ba, roml, romh, io1, io2);
|
||||
|
@ -141,7 +141,7 @@ void pc9801_118_device::device_reset()
|
||||
READ8_MEMBER(pc9801_118_device::opn3_r)
|
||||
{
|
||||
if(((offset & 5) == 0) || m_ext_reg)
|
||||
return m_opn3->read(space, offset >> 1);
|
||||
return m_opn3->read(offset >> 1);
|
||||
else // odd
|
||||
{
|
||||
//printf("PC9801-118: Read to undefined port [%02x]\n",offset+0x188);
|
||||
@ -153,7 +153,7 @@ READ8_MEMBER(pc9801_118_device::opn3_r)
|
||||
WRITE8_MEMBER(pc9801_118_device::opn3_w)
|
||||
{
|
||||
if(((offset & 5) == 0) || m_ext_reg)
|
||||
m_opn3->write(space, offset >> 1,data);
|
||||
m_opn3->write(offset >> 1,data);
|
||||
//else // odd
|
||||
// printf("PC9801-118: Write to undefined port [%02x] %02x\n",offset+0x188,data);
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ READ8_MEMBER(pc9801_26_device::opn_r)
|
||||
{
|
||||
if((offset & 1) == 0)
|
||||
{
|
||||
return offset & 4 ? 0xff : m_opn->read(space, offset >> 1);
|
||||
return offset & 4 ? 0xff : m_opn->read(offset >> 1);
|
||||
}
|
||||
else // odd
|
||||
{
|
||||
@ -159,7 +159,7 @@ READ8_MEMBER(pc9801_26_device::opn_r)
|
||||
WRITE8_MEMBER(pc9801_26_device::opn_w)
|
||||
{
|
||||
if((offset & 5) == 0)
|
||||
m_opn->write(space, offset >> 1, data);
|
||||
m_opn->write(offset >> 1, data);
|
||||
else // odd
|
||||
printf("PC9801-26: Write to undefined port [%02x] %02x\n",offset+0x188,data);
|
||||
}
|
||||
|
@ -197,7 +197,7 @@ void pc9801_86_device::device_reset()
|
||||
READ8_MEMBER(pc9801_86_device::opna_r)
|
||||
{
|
||||
if((offset & 1) == 0)
|
||||
return m_opna->read(space, offset >> 1);
|
||||
return m_opna->read(offset >> 1);
|
||||
else // odd
|
||||
{
|
||||
logerror("PC9801-86: Read to undefined port [%02x]\n",offset+0x188);
|
||||
@ -208,7 +208,7 @@ READ8_MEMBER(pc9801_86_device::opna_r)
|
||||
WRITE8_MEMBER(pc9801_86_device::opna_w)
|
||||
{
|
||||
if((offset & 1) == 0)
|
||||
m_opna->write(space, offset >> 1,data);
|
||||
m_opna->write(offset >> 1,data);
|
||||
else // odd
|
||||
logerror("PC9801-86: Write to undefined port [%02x] %02x\n",offset+0x188,data);
|
||||
}
|
||||
@ -419,7 +419,7 @@ void pc9801_speakboard_device::device_reset()
|
||||
READ8_MEMBER(pc9801_speakboard_device::opna_slave_r)
|
||||
{
|
||||
if((offset & 1) == 0)
|
||||
return m_opna_slave->read(space, offset >> 1);
|
||||
return m_opna_slave->read(offset >> 1);
|
||||
else // odd
|
||||
{
|
||||
logerror("PC9801-SPB: Read to undefined port [%02x]\n",offset+0x588);
|
||||
@ -430,7 +430,7 @@ READ8_MEMBER(pc9801_speakboard_device::opna_slave_r)
|
||||
WRITE8_MEMBER(pc9801_speakboard_device::opna_slave_w)
|
||||
{
|
||||
if((offset & 1) == 0)
|
||||
m_opna_slave->write(space, offset >> 1,data);
|
||||
m_opna_slave->write(offset >> 1,data);
|
||||
else // odd
|
||||
logerror("PC9801-SPB: Write to undefined port [%02x] %02x\n",offset+0x588,data);
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ READ8_MEMBER( isa8_adlib_device::ym3812_16_r )
|
||||
uint8_t retVal = 0xff;
|
||||
switch(offset)
|
||||
{
|
||||
case 0 : retVal = m_ym3812->status_port_r( space, offset ); break;
|
||||
case 0 : retVal = m_ym3812->status_port_r(); break;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
@ -29,8 +29,8 @@ WRITE8_MEMBER( isa8_adlib_device::ym3812_16_w )
|
||||
{
|
||||
switch(offset)
|
||||
{
|
||||
case 0 : m_ym3812->control_port_w( space, offset, data ); break;
|
||||
case 1 : m_ym3812->write_port_w( space, offset, data ); break;
|
||||
case 0 : m_ym3812->control_port_w(data); break;
|
||||
case 1 : m_ym3812->write_port_w(data); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -711,9 +711,9 @@ void sb16_lle_device::device_start()
|
||||
m_isa->install_device(0x022c, 0x022d, read8_delegate(FUNC(sb16_lle_device::dsp_wbuf_status_r), this), write8_delegate(FUNC(sb16_lle_device::host_cmd_w), this) );
|
||||
m_isa->install_device(0x022e, 0x022f, read8_delegate(FUNC(sb16_lle_device::dsp_rbuf_status_r), this), write8_delegate(FUNC(sb16_lle_device::invalid_w), this) );
|
||||
m_isa->install_device(0x0330, 0x0331, read8_delegate(FUNC(sb16_lle_device::mpu401_r), this), write8_delegate(FUNC(sb16_lle_device::mpu401_w), this));
|
||||
m_isa->install_device(0x0388, 0x0389, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262));
|
||||
m_isa->install_device(0x0220, 0x0223, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262));
|
||||
m_isa->install_device(0x0228, 0x0229, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262));
|
||||
m_isa->install_device(0x0388, 0x0389, read8sm_delegate(FUNC(ymf262_device::read), ymf262), write8sm_delegate(FUNC(ymf262_device::write), ymf262));
|
||||
m_isa->install_device(0x0220, 0x0223, read8sm_delegate(FUNC(ymf262_device::read), ymf262), write8sm_delegate(FUNC(ymf262_device::write), ymf262));
|
||||
m_isa->install_device(0x0228, 0x0229, read8sm_delegate(FUNC(ymf262_device::read), ymf262), write8sm_delegate(FUNC(ymf262_device::write), ymf262));
|
||||
m_isa->set_dma_channel(1, this, false);
|
||||
m_isa->set_dma_channel(5, this, false);
|
||||
m_timer = timer_alloc();
|
||||
|
@ -82,7 +82,7 @@ READ8_MEMBER( sb8_device::ym3812_16_r )
|
||||
uint8_t retVal = 0xff;
|
||||
switch(offset)
|
||||
{
|
||||
case 0 : retVal = m_ym3812->status_port_r( space, offset ); break;
|
||||
case 0 : retVal = m_ym3812->status_port_r(); break;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
@ -91,8 +91,8 @@ WRITE8_MEMBER( sb8_device::ym3812_16_w )
|
||||
{
|
||||
switch(offset)
|
||||
{
|
||||
case 0 : m_ym3812->control_port_w( space, offset, data ); break;
|
||||
case 1 : m_ym3812->write_port_w( space, offset, data ); break;
|
||||
case 0 : m_ym3812->control_port_w(data); break;
|
||||
case 1 : m_ym3812->write_port_w(data); break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1261,9 +1261,9 @@ void sb8_device::device_start()
|
||||
{
|
||||
ymf262_device *ymf262 = subdevice<ymf262_device>("ymf262");
|
||||
|
||||
m_isa->install_device(0x0388, 0x038b, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262));
|
||||
m_isa->install_device(0x0220, 0x0223, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262));
|
||||
m_isa->install_device(0x0228, 0x0229, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262));
|
||||
m_isa->install_device(0x0388, 0x038b, read8sm_delegate(FUNC(ymf262_device::read), ymf262), write8sm_delegate(FUNC(ymf262_device::write), ymf262));
|
||||
m_isa->install_device(0x0220, 0x0223, read8sm_delegate(FUNC(ymf262_device::read), ymf262), write8sm_delegate(FUNC(ymf262_device::write), ymf262));
|
||||
m_isa->install_device(0x0228, 0x0229, read8sm_delegate(FUNC(ymf262_device::read), ymf262), write8sm_delegate(FUNC(ymf262_device::write), ymf262));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1304,9 +1304,9 @@ void sb16_device::device_start()
|
||||
m_isa->install_device(0x022e, 0x022f, read8_delegate(FUNC(sb_device::dsp_rbuf_status_r), this), write8_delegate(FUNC(sb_device::dsp_rbuf_status_w), this) );
|
||||
m_isa->install_device(0x0224, 0x0225, read8_delegate(FUNC(sb16_device::mixer_r), this), write8_delegate(FUNC(sb16_device::mixer_w), this));
|
||||
m_isa->install_device(0x0330, 0x0331, read8_delegate(FUNC(sb16_device::mpu401_r), this), write8_delegate(FUNC(sb16_device::mpu401_w), this));
|
||||
m_isa->install_device(0x0388, 0x038b, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262));
|
||||
m_isa->install_device(0x0220, 0x0223, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262));
|
||||
m_isa->install_device(0x0228, 0x0229, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262));
|
||||
m_isa->install_device(0x0388, 0x038b, read8sm_delegate(FUNC(ymf262_device::read), ymf262), write8sm_delegate(FUNC(ymf262_device::write), ymf262));
|
||||
m_isa->install_device(0x0220, 0x0223, read8sm_delegate(FUNC(ymf262_device::read), ymf262), write8sm_delegate(FUNC(ymf262_device::write), ymf262));
|
||||
m_isa->install_device(0x0228, 0x0229, read8sm_delegate(FUNC(ymf262_device::read), ymf262), write8sm_delegate(FUNC(ymf262_device::write), ymf262));
|
||||
|
||||
save_item(NAME(m_mixer.data));
|
||||
save_item(NAME(m_mixer.status));
|
||||
|
@ -216,8 +216,8 @@ void stereo_fx_device::device_start()
|
||||
m_isa->install_device(0x022a, 0x022b, read8_delegate(FUNC(stereo_fx_device::dsp_data_r), this), write8_delegate(FUNC(stereo_fx_device::invalid_w), this) );
|
||||
m_isa->install_device(0x022c, 0x022d, read8_delegate(FUNC(stereo_fx_device::dsp_wbuf_status_r), this), write8_delegate(FUNC(stereo_fx_device::dsp_cmd_w), this) );
|
||||
m_isa->install_device(0x022e, 0x022f, read8_delegate(FUNC(stereo_fx_device::dsp_rbuf_status_r), this), write8_delegate(FUNC(stereo_fx_device::invalid_w), this) );
|
||||
m_isa->install_device(0x0388, 0x0389, read8_delegate(FUNC(ym3812_device::read), ym3812), write8_delegate(FUNC(ym3812_device::write), ym3812));
|
||||
m_isa->install_device(0x0228, 0x0229, read8_delegate(FUNC(ym3812_device::read), ym3812), write8_delegate(FUNC(ym3812_device::write), ym3812));
|
||||
m_isa->install_device(0x0388, 0x0389, read8sm_delegate(FUNC(ym3812_device::read), ym3812), write8sm_delegate(FUNC(ym3812_device::write), ym3812));
|
||||
m_isa->install_device(0x0228, 0x0229, read8sm_delegate(FUNC(ym3812_device::read), ym3812), write8sm_delegate(FUNC(ym3812_device::write), ym3812));
|
||||
m_timer = timer_alloc();
|
||||
m_timer->adjust(attotime::from_hz(2000000), 0, attotime::from_hz(2000000));
|
||||
m_isa->set_dma_channel(1, this, false);
|
||||
|
@ -141,7 +141,7 @@ WRITE8_MEMBER(msx_cart_fmpac_device::write_cart)
|
||||
case 0x7ff5:
|
||||
if (m_opll_active)
|
||||
{
|
||||
m_ym2413->write(space, offset & 1, data);
|
||||
m_ym2413->write(offset & 1, data);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -163,6 +163,6 @@ WRITE8_MEMBER(msx_cart_fmpac_device::write_ym2413)
|
||||
{
|
||||
if (m_opll_active)
|
||||
{
|
||||
m_ym2413->write(space, offset & 1, data);
|
||||
m_ym2413->write(offset & 1, data);
|
||||
}
|
||||
}
|
||||
|
@ -92,28 +92,28 @@ WRITE_LINE_MEMBER(msx_cart_moonsound_device::irq_w)
|
||||
WRITE8_MEMBER(msx_cart_moonsound_device::write_ymf278b_fm)
|
||||
{
|
||||
LOG("moonsound: write 0x%02x, data 0x%02x\n", 0xc4 + offset, data);
|
||||
m_ymf278b->write(space, offset, data);
|
||||
m_ymf278b->write(offset, data);
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(msx_cart_moonsound_device::read_ymf278b_fm)
|
||||
{
|
||||
LOG("moonsound: read 0x%02x\n", 0xc4 + offset);
|
||||
return m_ymf278b->read(space, offset);
|
||||
return m_ymf278b->read(offset);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(msx_cart_moonsound_device::write_ymf278b_pcm)
|
||||
{
|
||||
LOG("moonsound: write 0x%02x, data 0x%02x\n", 0x7e + offset, data);
|
||||
m_ymf278b->write(space, 4 + offset, data);
|
||||
m_ymf278b->write(4 + offset, data);
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER(msx_cart_moonsound_device::read_ymf278b_pcm)
|
||||
{
|
||||
LOG("moonsound: read 0x%02x\n", 0x7e + offset);
|
||||
return m_ymf278b->read(space, 4 + offset);
|
||||
return m_ymf278b->read(4 + offset);
|
||||
}
|
||||
|
||||
|
||||
|
@ -97,8 +97,8 @@ void msx_cart_msx_audio_hxmu900_device::device_start()
|
||||
{
|
||||
// Install IO read/write handlers
|
||||
address_space &space = machine().device<cpu_device>("maincpu")->space(AS_IO);
|
||||
space.install_write_handler(0xc0, 0xc1, write8_delegate(FUNC(y8950_device::write), m_y8950.target()));
|
||||
space.install_read_handler(0xc0, 0xc1, read8_delegate(FUNC(y8950_device::read), m_y8950.target()));
|
||||
space.install_write_handler(0xc0, 0xc1, write8sm_delegate(FUNC(y8950_device::write), m_y8950.target()));
|
||||
space.install_read_handler(0xc0, 0xc1, read8sm_delegate(FUNC(y8950_device::read), m_y8950.target()));
|
||||
}
|
||||
|
||||
|
||||
@ -202,8 +202,8 @@ void msx_cart_msx_audio_nms1205_device::device_start()
|
||||
{
|
||||
// Install IO read/write handlers
|
||||
address_space &space = machine().device<cpu_device>("maincpu")->space(AS_IO);
|
||||
space.install_write_handler(0xc0, 0xc1, write8_delegate(FUNC(y8950_device::write), m_y8950.target()));
|
||||
space.install_read_handler(0xc0, 0xc1, read8_delegate(FUNC(y8950_device::read), m_y8950.target()));
|
||||
space.install_write_handler(0xc0, 0xc1, write8sm_delegate(FUNC(y8950_device::write), m_y8950.target()));
|
||||
space.install_read_handler(0xc0, 0xc1, read8sm_delegate(FUNC(y8950_device::read), m_y8950.target()));
|
||||
space.install_write_handler(0x00, 0x01, write8_delegate(FUNC(acia6850_device::write), m_acia6850.target()));
|
||||
space.install_read_handler(0x04, 0x05, read8_delegate(FUNC(acia6850_device::read), m_acia6850.target()));
|
||||
}
|
||||
@ -344,14 +344,14 @@ WRITE8_MEMBER(msx_cart_msx_audio_fsca1_device::write_y8950)
|
||||
{
|
||||
if (m_7fff & 0x02)
|
||||
{
|
||||
m_y8950->write(space, offset, data);
|
||||
m_y8950->write(offset, data);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_7fff & 0x01)
|
||||
{
|
||||
m_y8950->write(space, offset, data);
|
||||
m_y8950->write(offset, data);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -361,11 +361,11 @@ READ8_MEMBER(msx_cart_msx_audio_fsca1_device::read_y8950)
|
||||
{
|
||||
if (offset & 2)
|
||||
{
|
||||
return (m_7fff & 0x02) ? m_y8950->read(space, offset) : 0xff;
|
||||
return (m_7fff & 0x02) ? m_y8950->read(offset) : 0xff;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (m_7fff & 0x01) ? m_y8950->read(space, offset) : 0xff;
|
||||
return (m_7fff & 0x01) ? m_y8950->read(offset) : 0xff;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -146,7 +146,7 @@ READ8_MEMBER(msx_cart_sfg_device::read_cart)
|
||||
{
|
||||
case 0x3ff0: // YM-2151 status read
|
||||
case 0x3ff1: // YM-2151 status read mirror?
|
||||
return m_ym2151->status_r(space, 0);
|
||||
return m_ym2151->status_r();
|
||||
|
||||
case 0x3ff2: // YM-2148 keyboard column read
|
||||
case 0x3ff3: // YM-2148 --
|
||||
@ -172,11 +172,11 @@ WRITE8_MEMBER(msx_cart_sfg_device::write_cart)
|
||||
switch (offset & 0x3fff)
|
||||
{
|
||||
case 0x3ff0: // YM-2151 register
|
||||
m_ym2151->register_w(space, 0, data);
|
||||
m_ym2151->register_w(data);
|
||||
break;
|
||||
|
||||
case 0x3ff1: // YM-2151 data
|
||||
m_ym2151->data_w(space, 0, data);
|
||||
m_ym2151->data_w(data);
|
||||
break;
|
||||
|
||||
case 0x3ff2: // YM-2148 write keyboard row
|
||||
|
@ -45,5 +45,5 @@ READ8_MEMBER(msx_slot_music_device::read)
|
||||
|
||||
WRITE8_MEMBER(msx_slot_music_device::write_ym2413)
|
||||
{
|
||||
m_ym2413->write(space, offset & 1, data);
|
||||
m_ym2413->write(offset & 1, data);
|
||||
}
|
||||
|
@ -682,11 +682,11 @@ WRITE8_MEMBER(nes_konami_vrc7_device::write_h)
|
||||
|
||||
case 0x1010:
|
||||
case 0x1018:
|
||||
m_ym2413->register_port_w(space, 0, data);
|
||||
m_ym2413->register_port_w(data);
|
||||
break;
|
||||
case 0x1030:
|
||||
case 0x1038:
|
||||
m_ym2413->data_port_w(space, 0, data);
|
||||
m_ym2413->data_port_w(data);
|
||||
break;
|
||||
|
||||
case 0x2000:
|
||||
|
@ -122,10 +122,10 @@ WRITE8_MEMBER(sega_fm_unit_device::peripheral_w)
|
||||
switch (offset)
|
||||
{
|
||||
case 0: // register port
|
||||
m_ym->write(space, 0, data & 0x3f);
|
||||
m_ym->write(0, data & 0x3f);
|
||||
break;
|
||||
case 1: // data port
|
||||
m_ym->write(space, 1, data);
|
||||
m_ym->write(1, data);
|
||||
break;
|
||||
case 2: // control port
|
||||
case 3: // mirror
|
||||
|
@ -130,34 +130,34 @@ void ym2203_device::device_reset()
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER( ym2203_device::read )
|
||||
u8 ym2203_device::read(offs_t offset)
|
||||
{
|
||||
return ym2203_read(m_chip, offset & 1);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( ym2203_device::write )
|
||||
void ym2203_device::write(offs_t offset, u8 data)
|
||||
{
|
||||
ym2203_write(m_chip, offset & 1, data);
|
||||
}
|
||||
|
||||
READ8_MEMBER( ym2203_device::status_port_r )
|
||||
u8 ym2203_device::status_port_r()
|
||||
{
|
||||
return read(space, 0);
|
||||
return read(0);
|
||||
}
|
||||
|
||||
READ8_MEMBER( ym2203_device::read_port_r )
|
||||
u8 ym2203_device::read_port_r()
|
||||
{
|
||||
return read(space, 1);
|
||||
return read(1);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( ym2203_device::control_port_w )
|
||||
void ym2203_device::control_port_w(u8 data)
|
||||
{
|
||||
write(space, 0, data);
|
||||
write(0, data);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( ym2203_device::write_port_w )
|
||||
void ym2203_device::write_port_w(u8 data)
|
||||
{
|
||||
write(space, 1, data);
|
||||
write(1, data);
|
||||
}
|
||||
|
||||
DEFINE_DEVICE_TYPE(YM2203, ym2203_device, "ym2203", "YM2203 OPN")
|
||||
|
@ -20,13 +20,13 @@ public:
|
||||
template <class Object> devcb_base &set_irq_handler(Object &&cb) { return m_irq_handler.set_callback(std::forward<Object>(cb)); }
|
||||
auto irq_handler() { return m_irq_handler.bind(); }
|
||||
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
u8 read(offs_t offset);
|
||||
void write(offs_t offset, u8 data);
|
||||
|
||||
DECLARE_READ8_MEMBER( status_port_r );
|
||||
DECLARE_READ8_MEMBER( read_port_r );
|
||||
DECLARE_WRITE8_MEMBER( control_port_w );
|
||||
DECLARE_WRITE8_MEMBER( write_port_w );
|
||||
u8 status_port_r();
|
||||
u8 read_port_r();
|
||||
void control_port_w(u8 data);
|
||||
void write_port_w(u8 data);
|
||||
|
||||
// update request from fm.cpp
|
||||
static void update_request(device_t *param) { downcast<ym2203_device *>(param)->update_request(); }
|
||||
|
@ -141,12 +141,12 @@ void ym2608_device::rom_bank_updated()
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER( ym2608_device::read )
|
||||
u8 ym2608_device::read(offs_t offset)
|
||||
{
|
||||
return ym2608_read(m_chip, offset & 3);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( ym2608_device::write )
|
||||
void ym2608_device::write(offs_t offset, u8 data)
|
||||
{
|
||||
ym2608_write(m_chip, offset & 3, data);
|
||||
}
|
||||
|
@ -21,8 +21,8 @@ public:
|
||||
template <class Object> devcb_base &set_irq_handler(Object &&cb) { return m_irq_handler.set_callback(std::forward<Object>(cb)); }
|
||||
auto irq_handler() { return m_irq_handler.bind(); }
|
||||
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
u8 read(offs_t offset);
|
||||
void write(offs_t offset, u8 data);
|
||||
|
||||
// update request from fm.cpp
|
||||
static void update_request(device_t *param) { downcast<ym2608_device *>(param)->update_request(); }
|
||||
|
@ -164,12 +164,12 @@ device_memory_interface::space_config_vector ym2610_device::memory_space_config(
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER( ym2610_device::read )
|
||||
u8 ym2610_device::read(offs_t offset)
|
||||
{
|
||||
return ym2610_read(m_chip, offset & 3);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( ym2610_device::write )
|
||||
void ym2610_device::write(offs_t offset, u8 data)
|
||||
{
|
||||
ym2610_write(m_chip, offset & 3, data);
|
||||
}
|
||||
|
@ -23,8 +23,8 @@ public:
|
||||
|
||||
virtual space_config_vector memory_space_config() const override;
|
||||
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
u8 read(offs_t offset);
|
||||
void write(offs_t offset, u8 data);
|
||||
|
||||
// update request from fm.cpp
|
||||
static void update_request(device_t *param) { downcast<ym2610_device *>(param)->update_request(); }
|
||||
|
@ -129,12 +129,12 @@ void ym2612_device::device_reset()
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER( ym2612_device::read )
|
||||
u8 ym2612_device::read(offs_t offset)
|
||||
{
|
||||
return ym2612_read(m_chip, offset & 3);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( ym2612_device::write )
|
||||
void ym2612_device::write(offs_t offset, u8 data)
|
||||
{
|
||||
ym2612_write(m_chip, offset & 3, data);
|
||||
}
|
||||
|
@ -15,8 +15,8 @@ public:
|
||||
template <class Object> devcb_base &set_irq_handler(Object &&cb) { return m_irq_handler.set_callback(std::forward<Object>(cb)); }
|
||||
auto irq_handler() { return m_irq_handler.bind(); }
|
||||
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
u8 read(offs_t offset);
|
||||
void write(offs_t offset, u8 data);
|
||||
|
||||
// update request from fm.cpp
|
||||
static void update_request(device_t *param) { downcast<ym2612_device *>(param)->update_request(); }
|
||||
|
@ -121,12 +121,12 @@ void ymf262_device::device_clock_changed()
|
||||
m_stream->set_sample_rate(rate);
|
||||
}
|
||||
|
||||
READ8_MEMBER( ymf262_device::read )
|
||||
u8 ymf262_device::read(offs_t offset)
|
||||
{
|
||||
return ymf262_read(m_chip, offset & 3);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( ymf262_device::write )
|
||||
void ymf262_device::write(offs_t offset, u8 data)
|
||||
{
|
||||
ymf262_write(m_chip, offset & 3, data);
|
||||
}
|
||||
|
@ -13,8 +13,8 @@ public:
|
||||
// configuration helpers
|
||||
auto irq_handler() { return m_irq_handler.bind(); }
|
||||
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
u8 read(offs_t offset);
|
||||
void write(offs_t offset, u8 data);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
|
@ -130,20 +130,20 @@ void ym3526_device::device_reset()
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER( ym3526_device::read )
|
||||
u8 ym3526_device::read(offs_t offset)
|
||||
{
|
||||
return ym3526_read(m_chip, offset & 1);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( ym3526_device::write )
|
||||
void ym3526_device::write(offs_t offset, u8 data)
|
||||
{
|
||||
ym3526_write(m_chip, offset & 1, data);
|
||||
}
|
||||
|
||||
READ8_MEMBER( ym3526_device::status_port_r ) { return read(space, 0); }
|
||||
READ8_MEMBER( ym3526_device::read_port_r ) { return read(space, 1); }
|
||||
WRITE8_MEMBER( ym3526_device::control_port_w ) { write(space, 0, data); }
|
||||
WRITE8_MEMBER( ym3526_device::write_port_w ) { write(space, 1, data); }
|
||||
u8 ym3526_device::status_port_r() { return read(0); }
|
||||
u8 ym3526_device::read_port_r() { return read(1); }
|
||||
void ym3526_device::control_port_w(u8 data) { write(0, data); }
|
||||
void ym3526_device::write_port_w(u8 data) { write(1, data); }
|
||||
|
||||
|
||||
DEFINE_DEVICE_TYPE(YM3526, ym3526_device, "ym3526", "YM3526 OPL")
|
||||
|
@ -15,13 +15,13 @@ public:
|
||||
template <class Object> devcb_base &set_irq_handler(Object &&cb) { return m_irq_handler.set_callback(std::forward<Object>(cb)); }
|
||||
auto irq_handler() { return m_irq_handler.bind(); }
|
||||
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
u8 read(offs_t offset);
|
||||
void write(offs_t offset, u8 data);
|
||||
|
||||
DECLARE_READ8_MEMBER( status_port_r );
|
||||
DECLARE_READ8_MEMBER( read_port_r );
|
||||
DECLARE_WRITE8_MEMBER( control_port_w );
|
||||
DECLARE_WRITE8_MEMBER( write_port_w );
|
||||
u8 status_port_r();
|
||||
u8 read_port_r();
|
||||
void control_port_w(u8 data);
|
||||
void write_port_w(u8 data);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
|
@ -131,20 +131,20 @@ void ym3812_device::device_reset()
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER( ym3812_device::read )
|
||||
u8 ym3812_device::read(offs_t offset)
|
||||
{
|
||||
return ym3812_read(m_chip, offset & 1);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( ym3812_device::write )
|
||||
void ym3812_device::write(offs_t offset, u8 data)
|
||||
{
|
||||
ym3812_write(m_chip, offset & 1, data);
|
||||
}
|
||||
|
||||
READ8_MEMBER( ym3812_device::status_port_r ) { return read(space, 0); }
|
||||
READ8_MEMBER( ym3812_device::read_port_r ) { return read(space, 1); }
|
||||
WRITE8_MEMBER( ym3812_device::control_port_w ) { write(space, 0, data); }
|
||||
WRITE8_MEMBER( ym3812_device::write_port_w ) { write(space, 1, data); }
|
||||
u8 ym3812_device::status_port_r() { return read(0); }
|
||||
u8 ym3812_device::read_port_r() { return read(1); }
|
||||
void ym3812_device::control_port_w(u8 data) { write(0, data); }
|
||||
void ym3812_device::write_port_w(u8 data) { write(1, data); }
|
||||
|
||||
|
||||
DEFINE_DEVICE_TYPE(YM3812, ym3812_device, "ym3812", "YM3812 OPL2")
|
||||
|
@ -13,13 +13,13 @@ public:
|
||||
template <class Object> devcb_base &set_irq_handler(Object &&cb) { return m_irq_handler.set_callback(std::forward<Object>(cb)); }
|
||||
auto irq_handler() { return m_irq_handler.bind(); }
|
||||
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
u8 read(offs_t offset);
|
||||
void write(offs_t offset, u8 data);
|
||||
|
||||
DECLARE_READ8_MEMBER( status_port_r );
|
||||
DECLARE_READ8_MEMBER( read_port_r );
|
||||
DECLARE_WRITE8_MEMBER( control_port_w );
|
||||
DECLARE_WRITE8_MEMBER( write_port_w );
|
||||
u8 status_port_r();
|
||||
u8 read_port_r();
|
||||
void control_port_w(u8 data);
|
||||
void write_port_w(u8 data);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
|
@ -138,20 +138,20 @@ void y8950_device::rom_bank_updated()
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER( y8950_device::read )
|
||||
u8 y8950_device::read(offs_t offset)
|
||||
{
|
||||
return y8950_read(m_chip, offset & 1);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( y8950_device::write )
|
||||
void y8950_device::write(offs_t offset, u8 data)
|
||||
{
|
||||
y8950_write(m_chip, offset & 1, data);
|
||||
}
|
||||
|
||||
READ8_MEMBER( y8950_device::status_port_r ) { return read(space, 0); }
|
||||
READ8_MEMBER( y8950_device::read_port_r ) { return read(space, 1); }
|
||||
WRITE8_MEMBER( y8950_device::control_port_w ) { write(space, 0, data); }
|
||||
WRITE8_MEMBER( y8950_device::write_port_w ) { write(space, 1, data); }
|
||||
u8 y8950_device::status_port_r() { return read(0); }
|
||||
u8 y8950_device::read_port_r() { return read(1); }
|
||||
void y8950_device::control_port_w(u8 data) { write(0, data); }
|
||||
void y8950_device::write_port_w(u8 data) { write(1, data); }
|
||||
|
||||
|
||||
DEFINE_DEVICE_TYPE(Y8950, y8950_device, "y8950", "Y8950 MSX-Audio")
|
||||
|
@ -20,13 +20,13 @@ public:
|
||||
auto io_read() { return m_io_read_handler.bind(); }
|
||||
auto io_write() { return m_io_write_handler.bind(); }
|
||||
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
u8 read(offs_t offset);
|
||||
void write(offs_t offset, u8 data);
|
||||
|
||||
DECLARE_READ8_MEMBER( status_port_r );
|
||||
DECLARE_READ8_MEMBER( read_port_r );
|
||||
DECLARE_WRITE8_MEMBER( control_port_w );
|
||||
DECLARE_WRITE8_MEMBER( write_port_w );
|
||||
u8 status_port_r();
|
||||
u8 read_port_r();
|
||||
void control_port_w(u8 data);
|
||||
void write_port_w(u8 data);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
|
@ -1676,7 +1676,7 @@ ym2151_device::ym2151_device(const machine_config &mconfig, const char *tag, dev
|
||||
// read - read from the device
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER( ym2151_device::read )
|
||||
u8 ym2151_device::read(offs_t offset)
|
||||
{
|
||||
if (offset & 1)
|
||||
{
|
||||
@ -1692,7 +1692,7 @@ READ8_MEMBER( ym2151_device::read )
|
||||
// write - write from the device
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER( ym2151_device::write )
|
||||
void ym2151_device::write(offs_t offset, u8 data)
|
||||
{
|
||||
if (offset & 1)
|
||||
{
|
||||
@ -1707,19 +1707,19 @@ WRITE8_MEMBER( ym2151_device::write )
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER( ym2151_device::status_r )
|
||||
u8 ym2151_device::status_r()
|
||||
{
|
||||
return read(space, 1);
|
||||
return read(1);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( ym2151_device::register_w )
|
||||
void ym2151_device::register_w(u8 data)
|
||||
{
|
||||
write(space, 0, data);
|
||||
write(0, data);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( ym2151_device::data_w )
|
||||
void ym2151_device::data_w(u8 data)
|
||||
{
|
||||
write(space, 1, data);
|
||||
write(1, data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -55,12 +55,12 @@ public:
|
||||
auto port_write_handler() { return m_portwritehandler.bind(); }
|
||||
|
||||
// read/write
|
||||
DECLARE_READ8_MEMBER(read);
|
||||
DECLARE_WRITE8_MEMBER(write);
|
||||
u8 read(offs_t offset);
|
||||
void write(offs_t offset, u8 data);
|
||||
|
||||
DECLARE_READ8_MEMBER(status_r);
|
||||
DECLARE_WRITE8_MEMBER(register_w);
|
||||
DECLARE_WRITE8_MEMBER(data_w);
|
||||
u8 status_r();
|
||||
void register_w(u8 data);
|
||||
void data_w(u8 data);
|
||||
|
||||
DECLARE_WRITE_LINE_MEMBER(reset_w);
|
||||
|
||||
|
@ -1664,20 +1664,20 @@ void ym2413_device::device_reset()
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER( ym2413_device::write )
|
||||
void ym2413_device::write(offs_t offset, u8 data)
|
||||
{
|
||||
if (offset)
|
||||
data_port_w(space, offset, data);
|
||||
data_port_w(data);
|
||||
else
|
||||
register_port_w(space, offset, data);
|
||||
register_port_w(data);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( ym2413_device::register_port_w )
|
||||
void ym2413_device::register_port_w(u8 data)
|
||||
{
|
||||
address = data;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( ym2413_device::data_port_w )
|
||||
void ym2413_device::data_port_w(u8 data)
|
||||
{
|
||||
m_stream->update();
|
||||
write_reg(address, data);
|
||||
|
@ -11,10 +11,10 @@ class ym2413_device : public device_t, public device_sound_interface
|
||||
public:
|
||||
ym2413_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
|
||||
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
void write(offs_t offset, u8 data);
|
||||
|
||||
DECLARE_WRITE8_MEMBER( register_port_w );
|
||||
DECLARE_WRITE8_MEMBER( data_port_w );
|
||||
void register_port_w(u8 data);
|
||||
void data_port_w(u8 data);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
|
@ -1457,7 +1457,7 @@ void ymf271_device::ymf271_write_timer(uint8_t address, uint8_t data)
|
||||
}
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( ymf271_device::write )
|
||||
void ymf271_device::write(offs_t offset, u8 data)
|
||||
{
|
||||
m_stream->update();
|
||||
|
||||
@ -1503,7 +1503,7 @@ WRITE8_MEMBER( ymf271_device::write )
|
||||
}
|
||||
}
|
||||
|
||||
READ8_MEMBER( ymf271_device::read )
|
||||
u8 ymf271_device::read(offs_t offset)
|
||||
{
|
||||
switch (offset & 0xf)
|
||||
{
|
||||
|
@ -16,8 +16,8 @@ public:
|
||||
// configuration helpers
|
||||
auto irq_handler() { return m_irq_handler.bind(); }
|
||||
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
u8 read(offs_t offset);
|
||||
void write(offs_t offset, u8 data);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
|
@ -673,7 +673,7 @@ void ymf278b_device::timer_busy_start(int is_pcm)
|
||||
m_timer_busy->adjust(attotime::from_hz(m_clock / (is_pcm ? 88 : 56)));
|
||||
}
|
||||
|
||||
WRITE8_MEMBER( ymf278b_device::write )
|
||||
void ymf278b_device::write(offs_t offset, u8 data)
|
||||
{
|
||||
switch (offset)
|
||||
{
|
||||
@ -717,7 +717,7 @@ WRITE8_MEMBER( ymf278b_device::write )
|
||||
}
|
||||
|
||||
|
||||
READ8_MEMBER( ymf278b_device::read )
|
||||
u8 ymf278b_device::read(offs_t offset)
|
||||
{
|
||||
uint8_t ret = 0;
|
||||
|
||||
|
@ -16,8 +16,8 @@ public:
|
||||
// configuration helpers
|
||||
auto irq_handler() { return m_irq_handler.bind(); }
|
||||
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
u8 read(offs_t offset);
|
||||
void write(offs_t offset, u8 data);
|
||||
|
||||
protected:
|
||||
// device-level overrides
|
||||
|
@ -739,7 +739,7 @@ READ16_MEMBER( leland_80186_sound_device::peripheral_r )
|
||||
return m_pit[1]->read(offset & 3);
|
||||
}
|
||||
else if (m_type == TYPE_WSF)
|
||||
return m_ymsnd->read(space, offset);
|
||||
return m_ymsnd->read(offset);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
@ -784,7 +784,7 @@ WRITE16_MEMBER( leland_80186_sound_device::peripheral_w )
|
||||
m_pit[1]->write(offset & 3, data);
|
||||
}
|
||||
else if(m_type == TYPE_WSF)
|
||||
m_ymsnd->write(space, offset, data);
|
||||
m_ymsnd->write(offset, data);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
|
@ -68,7 +68,7 @@ READ8_MEMBER(amspdwy_state::amspdwy_wheel_1_r)
|
||||
|
||||
READ8_MEMBER(amspdwy_state::amspdwy_sound_r)
|
||||
{
|
||||
return (m_ym2151->status_r(space, 0) & ~0x30) | ioport("IN0")->read();
|
||||
return (m_ym2151->status_r() & ~0x30) | ioport("IN0")->read();
|
||||
}
|
||||
|
||||
void amspdwy_state::amspdwy_map(address_map &map)
|
||||
|
@ -222,7 +222,7 @@ WRITE8_MEMBER(bloodbro_state::weststry_opl_w)
|
||||
{
|
||||
// NMI cannot be accepted between address and data writes, or else registers get corrupted
|
||||
m_weststry_soundnmi_mask = BIT(offset, 0);
|
||||
m_ymsnd->write(space, offset, data);
|
||||
m_ymsnd->write(offset, data);
|
||||
weststry_soundnmi_update();
|
||||
}
|
||||
|
||||
|
@ -302,14 +302,14 @@ READ8_MEMBER(bml3_state::bml3_ym2203_r)
|
||||
{
|
||||
u8 dev_offs = ((m_psg_latch & 3) != 3);
|
||||
|
||||
return m_ym2203->read(space, dev_offs);
|
||||
return m_ym2203->read(dev_offs);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(bml3_state::bml3_ym2203_w)
|
||||
{
|
||||
u8 dev_offs = ((m_psg_latch & 3) != 3);
|
||||
|
||||
m_ym2203->write(space, dev_offs, data);
|
||||
m_ym2203->write(dev_offs, data);
|
||||
}
|
||||
|
||||
READ8_MEMBER( bml3_state::bml3_vram_attr_r)
|
||||
|
@ -197,7 +197,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(exterm_state::master_sound_nmi_callback)
|
||||
WRITE8_MEMBER(exterm_state::ym2151_data_latch_w)
|
||||
{
|
||||
/* bit 7 of the sound control selects which port */
|
||||
m_ym2151->write(space, m_sound_control >> 7, data);
|
||||
m_ym2151->write(m_sound_control >> 7, data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -883,21 +883,21 @@ void fm7_state::fm7_update_psg()
|
||||
break;
|
||||
case 0x01:
|
||||
// Data read
|
||||
m_psg_data = m_ym->read(space, 1);
|
||||
m_psg_data = m_ym->read(1);
|
||||
break;
|
||||
case 0x02:
|
||||
// Data write
|
||||
m_ym->write(space, 1,m_psg_data);
|
||||
m_ym->write(1,m_psg_data);
|
||||
logerror("YM: data write 0x%02x\n",m_psg_data);
|
||||
break;
|
||||
case 0x03:
|
||||
// Address latch
|
||||
m_ym->write(space, 0,m_psg_data);
|
||||
m_ym->write(0,m_psg_data);
|
||||
logerror("YM: address latch 0x%02x\n",m_psg_data);
|
||||
break;
|
||||
case 0x04:
|
||||
// Status register
|
||||
m_psg_data = m_ym->read(space, 0);
|
||||
m_psg_data = m_ym->read(0);
|
||||
break;
|
||||
case 0x09:
|
||||
// Joystick port read
|
||||
|
@ -353,10 +353,10 @@ WRITE8_MEMBER(homedata_state::reikaids_upd7807_portc_w)
|
||||
machine().bookkeeping().coin_counter_w(0, ~data & 0x80);
|
||||
|
||||
if (BIT(m_upd7807_portc, 5) && !BIT(data, 5)) /* write clock 1->0 */
|
||||
m_ymsnd->write(space, BIT(data, 3), m_upd7807_porta);
|
||||
m_ymsnd->write(BIT(data, 3), m_upd7807_porta);
|
||||
|
||||
if (BIT(m_upd7807_portc, 4) && !BIT(data, 4)) /* read clock 1->0 */
|
||||
m_upd7807_porta = m_ymsnd->read(space, BIT(data, 3));
|
||||
m_upd7807_porta = m_ymsnd->read(BIT(data, 3));
|
||||
|
||||
m_upd7807_portc = data;
|
||||
}
|
||||
|
@ -422,7 +422,7 @@ void mtech_state::set_genz80_as_md()
|
||||
|
||||
prg.install_ram(0x0000, 0x1fff, m_genz80.z80_prgram.get());
|
||||
|
||||
prg.install_readwrite_handler(0x4000, 0x4003, read8_delegate(FUNC(ym2612_device::read), (ym2612_device *)m_ymsnd), write8_delegate(FUNC(ym2612_device::write), (ym2612_device *)m_ymsnd));
|
||||
prg.install_readwrite_handler(0x4000, 0x4003, read8sm_delegate(FUNC(ym2612_device::read), (ym2612_device *)m_ymsnd), write8sm_delegate(FUNC(ym2612_device::write), (ym2612_device *)m_ymsnd));
|
||||
prg.install_write_handler (0x6000, 0x6000, write8_delegate(FUNC(mtech_state::megadriv_z80_z80_bank_w),this));
|
||||
prg.install_write_handler (0x6001, 0x6001, write8_delegate(FUNC(mtech_state::megadriv_z80_z80_bank_w),this));
|
||||
prg.install_read_handler (0x6100, 0x7eff, read8_delegate(FUNC(mtech_state::megadriv_z80_unmapped_read),this));
|
||||
|
@ -367,7 +367,7 @@ WRITE8_MEMBER(metro_state::upd7810_portb_w)
|
||||
{
|
||||
if (!BIT(data, 2))
|
||||
{
|
||||
downcast<ym2413_device *>(m_ymsnd.target())->write(space, BIT(data, 1), m_porta);
|
||||
downcast<ym2413_device *>(m_ymsnd.target())->write(BIT(data, 1), m_porta);
|
||||
}
|
||||
m_portb = data;
|
||||
return;
|
||||
@ -409,13 +409,13 @@ WRITE8_MEMBER(metro_state::daitorid_portb_w)
|
||||
if (!BIT(data, 2))
|
||||
{
|
||||
/* write */
|
||||
downcast<ym2151_device *>(m_ymsnd.target())->write(space, BIT(data, 1), m_porta);
|
||||
downcast<ym2151_device *>(m_ymsnd.target())->write(BIT(data, 1), m_porta);
|
||||
}
|
||||
|
||||
if (!BIT(data, 3))
|
||||
{
|
||||
/* read */
|
||||
m_porta = downcast<ym2151_device *>(m_ymsnd.target())->read(space, BIT(data, 1));
|
||||
m_porta = downcast<ym2151_device *>(m_ymsnd.target())->read(BIT(data, 1));
|
||||
}
|
||||
|
||||
m_portb = data;
|
||||
|
@ -65,7 +65,7 @@ PS4 J8635 PS4 J8541 PS4 J8648
|
||||
|
||||
READ8_MEMBER(mexico86_state::kiki_ym2203_r)
|
||||
{
|
||||
u8 result = m_ymsnd->read(space, offset);
|
||||
u8 result = m_ymsnd->read(offset);
|
||||
|
||||
if (offset == 0)
|
||||
result &= 0x7f;
|
||||
|
@ -1476,23 +1476,23 @@ WRITE8_MEMBER(pc8801_state::pc8801_rtc_w)
|
||||
READ8_MEMBER(pc8801_state::pc8801_sound_board_r)
|
||||
{
|
||||
if(m_has_opna)
|
||||
return m_opna->read(space, offset);
|
||||
return m_opna->read(offset);
|
||||
|
||||
return (offset & 2) ? 0xff : m_opn->read(space, offset);
|
||||
return (offset & 2) ? 0xff : m_opn->read(offset);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(pc8801_state::pc8801_sound_board_w)
|
||||
{
|
||||
if(m_has_opna)
|
||||
m_opna->write(space, offset,data);
|
||||
m_opna->write(offset,data);
|
||||
else if((offset & 2) == 0)
|
||||
m_opn->write(space, offset, data);
|
||||
m_opn->write(offset, data);
|
||||
}
|
||||
|
||||
READ8_MEMBER(pc8801_state::pc8801_opna_r)
|
||||
{
|
||||
if(m_has_opna && (offset & 2) == 0)
|
||||
return m_opna->read(space, (offset & 1) | ((offset & 4) >> 1));
|
||||
return m_opna->read((offset & 1) | ((offset & 4) >> 1));
|
||||
|
||||
return 0xff;
|
||||
}
|
||||
@ -1500,7 +1500,7 @@ READ8_MEMBER(pc8801_state::pc8801_opna_r)
|
||||
WRITE8_MEMBER(pc8801_state::pc8801_opna_w)
|
||||
{
|
||||
if(m_has_opna && (offset & 2) == 0)
|
||||
m_opna->write(space, (offset & 1) | ((offset & 4) >> 1),data);
|
||||
m_opna->write((offset & 1) | ((offset & 4) >> 1),data);
|
||||
else if(m_has_opna && offset == 2)
|
||||
{
|
||||
m_sound_irq_mask = ((data & 0x80) == 0);
|
||||
|
@ -214,7 +214,7 @@ READ8_MEMBER(rbmk_state::mcu_io_r)
|
||||
{
|
||||
if(m_mux_data & 8)
|
||||
{
|
||||
return m_ymsnd->read(space, offset & 1);
|
||||
return m_ymsnd->read(offset & 1);
|
||||
}
|
||||
else if(m_mux_data & 4)
|
||||
{
|
||||
@ -230,7 +230,7 @@ READ8_MEMBER(rbmk_state::mcu_io_r)
|
||||
|
||||
WRITE8_MEMBER(rbmk_state::mcu_io_w)
|
||||
{
|
||||
if(m_mux_data & 8) { m_ymsnd->write(space, offset & 1, data); }
|
||||
if(m_mux_data & 8) { m_ymsnd->write(offset & 1, data); }
|
||||
else if(m_mux_data & 4)
|
||||
{
|
||||
//printf("%02x %02x W\n",offset,data);
|
||||
|
@ -1126,7 +1126,7 @@ WRITE16_MEMBER( segas16b_state::standard_io_w )
|
||||
|
||||
WRITE16_MEMBER( segas16b_state::atomicp_sound_w )
|
||||
{
|
||||
m_ym2413->write(space, offset, data >> 8);
|
||||
m_ym2413->write(offset, data >> 8);
|
||||
}
|
||||
|
||||
|
||||
|
@ -321,7 +321,7 @@ READ8_MEMBER(taitol_1cpu_state::extport_select_and_ym2203_r)
|
||||
{
|
||||
for (auto &mux : m_mux)
|
||||
mux->select_w((offset >> 1) & 1);
|
||||
return m_ymsnd->read(space, offset & 1);
|
||||
return m_ymsnd->read(offset & 1);
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(taitol_state::mcu_control_w)
|
||||
|
@ -57,7 +57,7 @@ void vis_audio_device::device_start()
|
||||
set_isa_device();
|
||||
m_isa->set_dma_channel(7, this, false);
|
||||
m_isa->install_device(0x0220, 0x022f, read8_delegate(FUNC(vis_audio_device::pcm_r), this), write8_delegate(FUNC(vis_audio_device::pcm_w), this));
|
||||
m_isa->install_device(0x0388, 0x038b, read8_delegate(FUNC(ymf262_device::read), subdevice<ymf262_device>("ymf262")), write8_delegate(FUNC(ymf262_device::write), subdevice<ymf262_device>("ymf262")));
|
||||
m_isa->install_device(0x0388, 0x038b, read8sm_delegate(FUNC(ymf262_device::read), subdevice<ymf262_device>("ymf262")), write8sm_delegate(FUNC(ymf262_device::write), subdevice<ymf262_device>("ymf262")));
|
||||
m_pcm = timer_alloc();
|
||||
m_pcm->adjust(attotime::never);
|
||||
}
|
||||
|
@ -1547,7 +1547,7 @@ WRITE8_MEMBER(x1_state::io_write_byte)
|
||||
|
||||
READ8_MEMBER(x1_state::ym_r)
|
||||
{
|
||||
uint8_t result = m_ym->read(space, offset);
|
||||
uint8_t result = m_ym->read(offset);
|
||||
if (!BIT(offset, 0))
|
||||
result = (result & 0x7f) | (m_sound_sw->read() & 0x80);
|
||||
return result;
|
||||
|
@ -50,7 +50,7 @@ READ8_MEMBER(md_base_state::megadriv_68k_YM2612_read)
|
||||
//osd_printf_debug("megadriv_68k_YM2612_read %02x %04x\n",offset,mem_mask);
|
||||
if ((m_genz80.z80_has_bus == 0) && (m_genz80.z80_is_reset == 0))
|
||||
{
|
||||
return m_ymsnd->read(space, offset);
|
||||
return m_ymsnd->read(offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -68,7 +68,7 @@ WRITE8_MEMBER(md_base_state::megadriv_68k_YM2612_write)
|
||||
//osd_printf_debug("megadriv_68k_YM2612_write %02x %04x %04x\n",offset,data,mem_mask);
|
||||
if ((m_genz80.z80_has_bus == 0) && (m_genz80.z80_is_reset == 0))
|
||||
{
|
||||
m_ymsnd->write(space, offset, data);
|
||||
m_ymsnd->write(offset, data);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2115,12 +2115,12 @@ READ8_MEMBER(mpu4_state::bwb_characteriser_r)
|
||||
|
||||
WRITE8_MEMBER(mpu4_state::mpu4_ym2413_w)
|
||||
{
|
||||
if (m_ym2413) m_ym2413->write(space,offset,data);
|
||||
if (m_ym2413) m_ym2413->write(offset,data);
|
||||
}
|
||||
|
||||
READ8_MEMBER(mpu4_state::mpu4_ym2413_r)
|
||||
{
|
||||
// if (m_ym2413) return m_ym2413->read(space,offset);
|
||||
// if (m_ym2413) return m_ym2413->read(offset);
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
|
@ -515,14 +515,14 @@ READ8_MEMBER(sms_state::smsj_audio_control_r)
|
||||
|
||||
WRITE8_MEMBER(sms_state::smsj_ym2413_register_port_w)
|
||||
{
|
||||
m_ym->write(space, 0, data & 0x3f);
|
||||
m_ym->write(0, data & 0x3f);
|
||||
}
|
||||
|
||||
|
||||
WRITE8_MEMBER(sms_state::smsj_ym2413_data_port_w)
|
||||
{
|
||||
//logerror("data_port_w %x %x\n", offset, data);
|
||||
m_ym->write(space, 1, data);
|
||||
m_ym->write(1, data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -307,7 +307,7 @@ WRITE16_MEMBER(tatsumi_state::tatsumi_v30_68000_w)
|
||||
// self-test in Tatsumi games. Needs fixed, but hack it here for now.
|
||||
READ8_MEMBER(tatsumi_state::tatsumi_hack_ym2151_r)
|
||||
{
|
||||
int r=m_ym2151->status_r(space,0);
|
||||
int r=m_ym2151->status_r();
|
||||
|
||||
if (m_audiocpu->pc()==0x2aca || m_audiocpu->pc()==0x29fe
|
||||
|| m_audiocpu->pc()==0xf9721
|
||||
|
Loading…
Reference in New Issue
Block a user