mirror of
https://github.com/holub/mame
synced 2025-07-01 00:09:18 +03:00
Added irq acks and second YM2203 sound chip to Euro League, which adds piano keys to sound [Angelo Salese]
This commit is contained in:
parent
cd86184747
commit
c96495c7af
@ -124,6 +124,17 @@ WRITE8_MEMBER(wc90b_state::adpcm_data_w)
|
||||
m_msm5205next = data;
|
||||
}
|
||||
|
||||
READ8_MEMBER(wc90b_state::master_irq_ack_r)
|
||||
{
|
||||
m_maincpu->set_input_line(0,CLEAR_LINE);
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
WRITE8_MEMBER(wc90b_state::slave_irq_ack_w)
|
||||
{
|
||||
m_subcpu->set_input_line(0,CLEAR_LINE);
|
||||
}
|
||||
|
||||
|
||||
static ADDRESS_MAP_START( wc90b_map1, AS_PROGRAM, 8, wc90b_state )
|
||||
AM_RANGE(0x0000, 0x7fff) AM_ROM
|
||||
@ -144,6 +155,7 @@ static ADDRESS_MAP_START( wc90b_map1, AS_PROGRAM, 8, wc90b_state )
|
||||
AM_RANGE(0xfd02, 0xfd02) AM_READ_PORT("P2")
|
||||
AM_RANGE(0xfd06, 0xfd06) AM_READ_PORT("DSW1")
|
||||
AM_RANGE(0xfd08, 0xfd08) AM_READ_PORT("DSW2")
|
||||
AM_RANGE(0xfd0c, 0xfd0c) AM_READ(master_irq_ack_r)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( wc90b_map2, AS_PROGRAM, 8, wc90b_state )
|
||||
@ -156,6 +168,7 @@ static ADDRESS_MAP_START( wc90b_map2, AS_PROGRAM, 8, wc90b_state )
|
||||
AM_RANGE(0xf000, 0xf7ff) AM_ROMBANK("subbank")
|
||||
AM_RANGE(0xf800, 0xfbff) AM_RAM AM_SHARE("share1")
|
||||
AM_RANGE(0xfc00, 0xfc00) AM_WRITE(bankswitch1_w)
|
||||
AM_RANGE(0xfd0c, 0xfd0c) AM_WRITE(slave_irq_ack_w)
|
||||
ADDRESS_MAP_END
|
||||
|
||||
static ADDRESS_MAP_START( sound_cpu, AS_PROGRAM, 8, wc90b_state )
|
||||
@ -163,7 +176,8 @@ static ADDRESS_MAP_START( sound_cpu, AS_PROGRAM, 8, wc90b_state )
|
||||
AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("audiobank")
|
||||
AM_RANGE(0xe000, 0xe000) AM_WRITE(adpcm_control_w)
|
||||
AM_RANGE(0xe400, 0xe400) AM_WRITE(adpcm_data_w)
|
||||
AM_RANGE(0xe800, 0xe801) AM_DEVREADWRITE("ymsnd", ym2203_device, read, write)
|
||||
AM_RANGE(0xe800, 0xe801) AM_DEVREADWRITE("ymsnd1", ym2203_device, read, write)
|
||||
AM_RANGE(0xec00, 0xec01) AM_DEVREADWRITE("ymsnd2", ym2203_device, read, write)
|
||||
AM_RANGE(0xf000, 0xf7ff) AM_RAM
|
||||
AM_RANGE(0xf800, 0xf800) AM_DEVREAD("soundlatch", generic_latch_8_device, read)
|
||||
ADDRESS_MAP_END
|
||||
@ -337,11 +351,11 @@ static MACHINE_CONFIG_START( wc90b, wc90b_state )
|
||||
/* basic machine hardware */
|
||||
MCFG_CPU_ADD("maincpu", Z80, MASTER_CLOCK)
|
||||
MCFG_CPU_PROGRAM_MAP(wc90b_map1)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", wc90b_state, irq0_line_hold)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", wc90b_state, irq0_line_assert)
|
||||
|
||||
MCFG_CPU_ADD("sub", Z80, MASTER_CLOCK)
|
||||
MCFG_CPU_PROGRAM_MAP(wc90b_map2)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", wc90b_state, irq0_line_hold)
|
||||
MCFG_CPU_VBLANK_INT_DRIVER("screen", wc90b_state, irq0_line_assert)
|
||||
|
||||
MCFG_CPU_ADD("audiocpu", Z80, SOUND_CLOCK)
|
||||
MCFG_CPU_PROGRAM_MAP(sound_cpu)
|
||||
@ -366,13 +380,16 @@ static MACHINE_CONFIG_START( wc90b, wc90b_state )
|
||||
|
||||
MCFG_GENERIC_LATCH_8_ADD("soundlatch")
|
||||
|
||||
MCFG_SOUND_ADD("ymsnd", YM2203, YM2203_CLOCK)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
|
||||
MCFG_SOUND_ADD("ymsnd1", YM2203, YM2203_CLOCK)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
|
||||
|
||||
MCFG_SOUND_ADD("ymsnd2", YM2203, YM2203_CLOCK)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
|
||||
|
||||
MCFG_SOUND_ADD("msm", MSM5205, MSM5205_CLOCK)
|
||||
MCFG_MSM5205_VCLK_CB(WRITELINE(wc90b_state, adpcm_int)) /* interrupt function */
|
||||
MCFG_MSM5205_PRESCALER_SELECTOR(MSM5205_S96_4B) /* 4KHz 4-bit */
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
|
||||
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.20)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
ROM_START( wc90b1 )
|
||||
|
@ -10,6 +10,7 @@ public:
|
||||
wc90b_state(const machine_config &mconfig, device_type type, const char *tag)
|
||||
: driver_device(mconfig, type, tag),
|
||||
m_maincpu(*this, "maincpu"),
|
||||
m_subcpu(*this, "sub"),
|
||||
m_audiocpu(*this, "audiocpu"),
|
||||
m_msm(*this, "msm"),
|
||||
m_gfxdecode(*this, "gfxdecode"),
|
||||
@ -26,6 +27,7 @@ public:
|
||||
m_spriteram(*this, "spriteram") { }
|
||||
|
||||
required_device<cpu_device> m_maincpu;
|
||||
required_device<cpu_device> m_subcpu;
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
required_device<msm5205_device> m_msm;
|
||||
required_device<gfxdecode_device> m_gfxdecode;
|
||||
@ -57,6 +59,8 @@ public:
|
||||
DECLARE_WRITE8_MEMBER(txvideoram_w);
|
||||
DECLARE_WRITE8_MEMBER(adpcm_control_w);
|
||||
DECLARE_WRITE_LINE_MEMBER(adpcm_int);
|
||||
DECLARE_READ8_MEMBER(master_irq_ack_r);
|
||||
DECLARE_WRITE8_MEMBER(slave_irq_ack_w);
|
||||
|
||||
TILE_GET_INFO_MEMBER(get_bg_tile_info);
|
||||
TILE_GET_INFO_MEMBER(get_fg_tile_info);
|
||||
|
Loading…
Reference in New Issue
Block a user