taito_en: Use MB8421 for communication RAM

This commit is contained in:
AJR 2017-06-12 00:13:20 -04:00
parent 5e187101d4
commit 607f89615d
10 changed files with 12 additions and 68 deletions

View File

@ -25,7 +25,6 @@ taito_en_device::taito_en_device(const machine_config &mconfig, const char *tag,
m_ensoniq(*this, "ensoniq"),
m_duart68681(*this, "duart68681"),
m_mb87078(*this, "mb87078"),
m_snd_shared_ram(*this, ":snd_shared"),
m_es5510_dol_latch(0),
m_es5510_dil_latch(0),
m_es5510_dadr_latch(0),
@ -80,30 +79,6 @@ void taito_en_device::device_reset()
*
*************************************/
READ8_MEMBER( taito_en_device::en_68000_share_r )
{
switch (offset & 3)
{
case 0: return (m_snd_shared_ram[offset/4]&0xff000000)>>24;
case 1: return (m_snd_shared_ram[offset/4]&0x00ff0000)>>16;
case 2: return (m_snd_shared_ram[offset/4]&0x0000ff00)>>8;
case 3: return (m_snd_shared_ram[offset/4]&0x000000ff)>>0;
}
return 0;
}
WRITE8_MEMBER( taito_en_device::en_68000_share_w )
{
switch (offset & 3)
{
case 0: m_snd_shared_ram[offset/4] = (m_snd_shared_ram[offset/4]&0x00ffffff)|(data<<24);
case 1: m_snd_shared_ram[offset/4] = (m_snd_shared_ram[offset/4]&0xff00ffff)|(data<<16);
case 2: m_snd_shared_ram[offset/4] = (m_snd_shared_ram[offset/4]&0xffff00ff)|(data<<8);
case 3: m_snd_shared_ram[offset/4] = (m_snd_shared_ram[offset/4]&0xffffff00)|(data<<0);
}
}
WRITE16_MEMBER( taito_en_device::en_es5505_bank_w )
{
uint32_t max_banks_this_game = (memregion(":ensoniq.0")->bytes()/0x200000)-1;
@ -221,7 +196,7 @@ WRITE16_MEMBER( taito_en_device::es5510_dsp_w )
static ADDRESS_MAP_START( en_sound_map, AS_PROGRAM, 16, taito_en_device )
AM_RANGE(0x000000, 0x00ffff) AM_RAM AM_MIRROR(0x30000) AM_SHARE("share1")
AM_RANGE(0x140000, 0x140fff) AM_READWRITE8(en_68000_share_r, en_68000_share_w, 0xff00)
AM_RANGE(0x140000, 0x140fff) AM_DEVREADWRITE8("dpram", mb8421_device, right_r, right_w, 0xff00)
AM_RANGE(0x200000, 0x20001f) AM_DEVREADWRITE("ensoniq", es5505_device, read, write)
AM_RANGE(0x260000, 0x2601ff) AM_READWRITE(es5510_dsp_r, es5510_dsp_w) //todo: hook up cpu/es5510
AM_RANGE(0x280000, 0x28001f) AM_DEVREADWRITE8("duart68681", mc68681_device, read, write, 0x00ff)
@ -305,6 +280,8 @@ MACHINE_CONFIG_MEMBER( taito_en_device::device_add_mconfig )
MCFG_DEVICE_ADD("mb87078", MB87078, 0)
MCFG_MB87078_GAIN_CHANGED_CB(WRITE8(taito_en_device, mb87078_gain_changed))
MCFG_DEVICE_ADD("dpram", MB8421, 0) // host accesses this from the other side
/* sound hardware */
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_SOUND_ADD("ensoniq", ES5505, XTAL_30_4761MHz / 2)

View File

@ -14,6 +14,7 @@
#include "sound/es5506.h"
#include "machine/mc68681.h"
#include "machine/mb87078.h"
#include "machine/mb8421.h"
class taito_en_device : public device_t
@ -21,8 +22,6 @@ class taito_en_device : public device_t
public:
taito_en_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8_MEMBER( en_68000_share_r );
DECLARE_WRITE8_MEMBER( en_68000_share_w );
DECLARE_WRITE16_MEMBER( en_es5505_bank_w );
DECLARE_WRITE8_MEMBER( en_volume_w );
@ -42,7 +41,6 @@ private:
required_device<es5505_device> m_ensoniq;
required_device<mc68681_device> m_duart68681;
required_device<mb87078_device> m_mb87078;
required_shared_ptr<uint32_t> m_snd_shared_ram;
//todo: hook up cpu/es5510
uint16_t m_es5510_dsp_ram[0x200];

View File

@ -141,7 +141,7 @@ static ADDRESS_MAP_START( galastrm_map, AS_PROGRAM, 32, galastrm_state )
AM_RANGE(0x400000, 0x400007) AM_DEVREADWRITE8("tc0510nio", tc0510nio_device, read, write, 0xffffffff)
AM_RANGE(0x40fff0, 0x40fff3) AM_WRITENOP
AM_RANGE(0x500000, 0x500007) AM_READWRITE(galastrm_adstick_ctrl_r, galastrm_adstick_ctrl_w)
AM_RANGE(0x600000, 0x6007ff) AM_RAM AM_SHARE("snd_shared") /* Sound shared ram */
AM_RANGE(0x600000, 0x6007ff) AM_DEVREADWRITE8("taito_en:dpram", mb8421_device, left_r, left_w, 0xffffffff) /* Sound shared ram */
AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0480scp", tc0480scp_device, long_r, long_w) /* tilemaps */
AM_RANGE(0x830000, 0x83002f) AM_DEVREADWRITE("tc0480scp", tc0480scp_device, ctrl_long_r, ctrl_long_w)
AM_RANGE(0x900000, 0x900003) AM_WRITE(galastrm_palette_w) /* TC0110PCR */

View File

@ -163,7 +163,7 @@ static ADDRESS_MAP_START( groundfx_map, AS_PROGRAM, 32, groundfx_state )
AM_RANGE(0x400000, 0x400003) AM_WRITE(motor_control_w) /* gun vibration */
AM_RANGE(0x500000, 0x500007) AM_DEVREADWRITE8("tc0510nio", tc0510nio_device, read, write, 0xffffffff)
AM_RANGE(0x600000, 0x600003) AM_READWRITE(adc_r, adc_w)
AM_RANGE(0x700000, 0x7007ff) AM_RAM AM_SHARE("snd_shared")
AM_RANGE(0x700000, 0x7007ff) AM_DEVREADWRITE8("taito_en:dpram", mb8421_device, left_r, left_w, 0xffffffff)
AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0480scp", tc0480scp_device, long_r, long_w) /* tilemaps */
AM_RANGE(0x830000, 0x83002f) AM_DEVREADWRITE("tc0480scp", tc0480scp_device, ctrl_long_r, ctrl_long_w) // debugging
AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, long_r, long_w) /* 6bpp tilemaps */

View File

@ -120,7 +120,7 @@ static ADDRESS_MAP_START( gunbustr_map, AS_PROGRAM, 32, gunbustr_state )
AM_RANGE(0x200000, 0x21ffff) AM_RAM AM_SHARE("ram") /* main CPUA ram */
AM_RANGE(0x300000, 0x301fff) AM_RAM AM_SHARE("spriteram") /* Sprite ram */
AM_RANGE(0x380000, 0x380003) AM_WRITE(motor_control_w) /* motor, lamps etc. */
AM_RANGE(0x390000, 0x3907ff) AM_RAM AM_SHARE("snd_shared") /* Sound shared ram */
AM_RANGE(0x390000, 0x3907ff) AM_DEVREADWRITE8("taito_en:dpram", mb8421_device, left_r, left_w, 0xffffffff) /* Sound shared ram */
AM_RANGE(0x400000, 0x400007) AM_DEVREADWRITE8("tc0510nio", tc0510nio_device, read, write, 0xffffffff)
AM_RANGE(0x500000, 0x500003) AM_READWRITE(gunbustr_gun_r, gunbustr_gun_w) /* gun coord read */
AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0480scp", tc0480scp_device, long_r, long_w)

View File

@ -139,7 +139,7 @@ static ADDRESS_MAP_START( superchs_map, AS_PROGRAM, 32, superchs_state )
AM_RANGE(0x200000, 0x20ffff) AM_RAM AM_SHARE("shared_ram")
AM_RANGE(0x240000, 0x240003) AM_WRITE(cpua_ctrl_w)
AM_RANGE(0x280000, 0x287fff) AM_RAM_DEVWRITE("palette", palette_device, write) AM_SHARE("palette")
AM_RANGE(0x2c0000, 0x2c07ff) AM_RAM AM_SHARE("snd_shared")
AM_RANGE(0x2c0000, 0x2c07ff) AM_DEVREADWRITE8("taito_en:dpram", mb8421_device, left_r, left_w, 0xffffffff)
AM_RANGE(0x300000, 0x300007) AM_DEVREADWRITE8("tc0510nio", tc0510nio_device, read, write, 0xffffffff)
AM_RANGE(0x340000, 0x340003) AM_READWRITE(superchs_stick_r, superchs_stick_w) /* stick int request */
ADDRESS_MAP_END

View File

@ -201,7 +201,7 @@ static ADDRESS_MAP_START( f3_map, AS_PROGRAM, 32, taito_f3_state )
AM_RANGE(0x630000, 0x63ffff) AM_READWRITE16(f3_pivot_r,f3_pivot_w,0xffffffff) //AM_SHARE("f3_pivot_ram")
AM_RANGE(0x660000, 0x66000f) AM_WRITE16(f3_control_0_w,0xffffffff)
AM_RANGE(0x660010, 0x66001f) AM_WRITE16(f3_control_1_w,0xffffffff)
AM_RANGE(0xc00000, 0xc007ff) AM_RAM AM_SHARE("snd_shared")
AM_RANGE(0xc00000, 0xc007ff) AM_DEVREADWRITE8("taito_en:dpram", mb8421_device, left_r, left_w, 0xffffffff)
AM_RANGE(0xc80000, 0xc80003) AM_WRITE(f3_sound_reset_0_w)
AM_RANGE(0xc80100, 0xc80103) AM_WRITE(f3_sound_reset_1_w)
ADDRESS_MAP_END

View File

@ -587,33 +587,6 @@ WRITE8_MEMBER(taitojc_state::mcu_comm_w)
}
}
READ32_MEMBER(taitojc_state::snd_share_r)
{
switch (offset & 3)
{
case 0: return (m_snd_shared_ram[(offset/4)] << 0) & 0xff000000;
case 1: return (m_snd_shared_ram[(offset/4)] << 8) & 0xff000000;
case 2: return (m_snd_shared_ram[(offset/4)] << 16) & 0xff000000;
case 3: return (m_snd_shared_ram[(offset/4)] << 24) & 0xff000000;
}
return 0;
}
WRITE32_MEMBER(taitojc_state::snd_share_w)
{
if (ACCESSING_BITS_24_31)
{
switch (offset & 3)
{
case 0: m_snd_shared_ram[(offset/4)] &= ~0xff000000; m_snd_shared_ram[(offset/4)] |= (data >> 0 & 0xff000000); break;
case 1: m_snd_shared_ram[(offset/4)] &= ~0x00ff0000; m_snd_shared_ram[(offset/4)] |= (data >> 8 & 0x00ff0000); break;
case 2: m_snd_shared_ram[(offset/4)] &= ~0x0000ff00; m_snd_shared_ram[(offset/4)] |= (data >> 16 & 0x0000ff00); break;
case 3: m_snd_shared_ram[(offset/4)] &= ~0x000000ff; m_snd_shared_ram[(offset/4)] |= (data >> 24 & 0x000000ff); break;
}
}
}
READ8_MEMBER(taitojc_state::jc_pcbid_r)
{
@ -658,7 +631,7 @@ static ADDRESS_MAP_START( taitojc_map, AS_PROGRAM, 32, taitojc_state )
AM_RANGE(0x06600000, 0x0660001f) AM_DEVREADWRITE8("tc0640fio", tc0640fio_device, read, write, 0xff000000)
AM_RANGE(0x0660004c, 0x0660004f) AM_WRITE_PORT("EEPROMOUT")
AM_RANGE(0x06800000, 0x06800003) AM_WRITE8(jc_irq_unk_w, 0x00ff0000)
AM_RANGE(0x06a00000, 0x06a01fff) AM_READWRITE(snd_share_r, snd_share_w) AM_SHARE("snd_shared")
AM_RANGE(0x06a00000, 0x06a01fff) AM_DEVREADWRITE8("taito_en:dpram", mb8421_device, left_r, left_w, 0xff000000)
AM_RANGE(0x06c00000, 0x06c0001f) AM_READWRITE8(jc_lan_r, jc_lan_w, 0x00ff0000)
AM_RANGE(0x08000000, 0x080fffff) AM_RAM AM_SHARE("main_ram")
AM_RANGE(0x10001ff8, 0x10001ffb) AM_READ16(dsp_to_main_7fe_r, 0xffff0000)

View File

@ -408,7 +408,7 @@ static ADDRESS_MAP_START( undrfire_map, AS_PROGRAM, 32, undrfire_state )
AM_RANGE(0x400000, 0x400003) AM_WRITE(motor_control_w) /* gun vibration */
AM_RANGE(0x500000, 0x500007) AM_DEVREADWRITE8("tc0510nio", tc0510nio_device, read, write, 0xffffffff)
AM_RANGE(0x600000, 0x600007) AM_READWRITE(unknown_hardware_r, unknown_int_req_w) /* int request for unknown hardware */
AM_RANGE(0x700000, 0x7007ff) AM_RAM AM_SHARE("snd_shared")
AM_RANGE(0x700000, 0x7007ff) AM_DEVREADWRITE8("taito_en:dpram", mb8421_device, left_r, left_w, 0xffffffff)
AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0480scp", tc0480scp_device, long_r, long_w) /* tilemaps */
AM_RANGE(0x830000, 0x83002f) AM_DEVREADWRITE("tc0480scp", tc0480scp_device, ctrl_long_r, ctrl_long_w)
AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, long_r, long_w) /* 6bpp tilemaps */
@ -427,7 +427,7 @@ static ADDRESS_MAP_START( cbombers_cpua_map, AS_PROGRAM, 32, undrfire_state )
AM_RANGE(0x400000, 0x400003) AM_WRITE(cbombers_cpua_ctrl_w)
AM_RANGE(0x500000, 0x500007) AM_DEVREADWRITE8("tc0510nio", tc0510nio_device, read, write, 0xffffffff)
AM_RANGE(0x600000, 0x600007) AM_READ(cbombers_adc_r) AM_WRITE8(cbombers_adc_w,0xffffffff)
AM_RANGE(0x700000, 0x7007ff) AM_RAM AM_SHARE("snd_shared")
AM_RANGE(0x700000, 0x7007ff) AM_DEVREADWRITE8("taito_en:dpram", mb8421_device, left_r, left_w, 0xffffffff)
AM_RANGE(0x800000, 0x80ffff) AM_DEVREADWRITE("tc0480scp", tc0480scp_device, long_r, long_w) /* tilemaps */
AM_RANGE(0x830000, 0x83002f) AM_DEVREADWRITE("tc0480scp", tc0480scp_device, ctrl_long_r, ctrl_long_w)
AM_RANGE(0x900000, 0x90ffff) AM_DEVREADWRITE("tc0100scn", tc0100scn_device, long_r, long_w) /* 6bpp tilemaps */

View File

@ -21,7 +21,6 @@ public:
m_gfx2(*this, "gfx2"),
m_vram(*this, "vram"),
m_objlist(*this, "objlist"),
m_snd_shared_ram(*this, "snd_shared"),
m_main_ram(*this, "main_ram"),
m_dsp_shared_ram(*this, "dsp_shared"),
m_palette_ram(*this, "palette_ram"),
@ -44,7 +43,6 @@ public:
required_shared_ptr<uint32_t> m_vram;
required_shared_ptr<uint32_t> m_objlist;
required_shared_ptr<uint32_t> m_snd_shared_ram;
required_shared_ptr<uint32_t> m_main_ram;
required_shared_ptr<uint16_t> m_dsp_shared_ram;
required_shared_ptr<uint32_t> m_palette_ram;
@ -84,8 +82,6 @@ public:
DECLARE_READ8_MEMBER(mcu_comm_r);
DECLARE_WRITE8_MEMBER(mcu_comm_w);
DECLARE_READ32_MEMBER(snd_share_r);
DECLARE_WRITE32_MEMBER(snd_share_w);
DECLARE_READ8_MEMBER(jc_pcbid_r);
DECLARE_READ8_MEMBER(jc_lan_r);
DECLARE_WRITE8_MEMBER(jc_lan_w);