diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2016-11-24 23:03:15 -0500 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2016-11-24 23:08:28 -0500 |
commit | 152615df5cd9e99c490431edaf366b2b73f2e84e (patch) | |
tree | a06a557f798ffbd2d97ccda4d180d6d6a3d5da68 /src/mame/drivers/deadang.cpp | |
parent | b78109fea686979c5fe1d8d5f5d9243713e155ef (diff) |
Seibu sound device cleanup (nw)
- Eliminate SEIBU_SOUND_SYSTEM configuration macros hiding details of device construction
- Start using devcb for generic YM hookups
- Use device finder to connect seibu_sound_device to audiocpu
- kothello has only one YM2203 and one ADPCM, not two of each
Future changes planned
- Separate SEI0100BU and SIE150 types; Cabal and Dead Angle should each be using two of the former
- Separate SEI80BU device to handle Z80 decryption (Mustache Boy uses this for its main CPU)
Diffstat (limited to 'src/mame/drivers/deadang.cpp')
-rw-r--r-- | src/mame/drivers/deadang.cpp | 49 |
1 files changed, 44 insertions, 5 deletions
diff --git a/src/mame/drivers/deadang.cpp b/src/mame/drivers/deadang.cpp index 0f996db2c44..cbcfe4d6277 100644 --- a/src/mame/drivers/deadang.cpp +++ b/src/mame/drivers/deadang.cpp @@ -88,6 +88,28 @@ static ADDRESS_MAP_START( sub_map, AS_PROGRAM, 16, deadang_state ) AM_RANGE(0xe0000, 0xfffff) AM_ROM ADDRESS_MAP_END +static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, deadang_state ) + AM_RANGE(0x0000, 0x1fff) AM_ROM + AM_RANGE(0x2000, 0x27ff) AM_RAM + AM_RANGE(0x4000, 0x4000) AM_DEVWRITE("seibu_sound", seibu_sound_device, pending_w) + AM_RANGE(0x4001, 0x4001) AM_DEVWRITE("seibu_sound", seibu_sound_device, irq_clear_w) + AM_RANGE(0x4002, 0x4002) AM_DEVWRITE("seibu_sound", seibu_sound_device, rst10_ack_w) + AM_RANGE(0x4003, 0x4003) AM_DEVWRITE("seibu_sound", seibu_sound_device, rst18_ack_w) + AM_RANGE(0x4005, 0x4006) AM_DEVWRITE("adpcm1", seibu_adpcm_device, adr_w) + AM_RANGE(0x4007, 0x4007) AM_DEVWRITE("seibu_sound", seibu_sound_device, bank_w) + AM_RANGE(0x4008, 0x4009) AM_DEVREADWRITE("seibu_sound", seibu_sound_device, ym_r, ym_w) + AM_RANGE(0x4010, 0x4011) AM_DEVREAD("seibu_sound", seibu_sound_device, soundlatch_r) + AM_RANGE(0x4012, 0x4012) AM_DEVREAD("seibu_sound", seibu_sound_device, main_data_pending_r) + AM_RANGE(0x4013, 0x4013) AM_READ_PORT("COIN") + AM_RANGE(0x4018, 0x4019) AM_DEVWRITE("seibu_sound", seibu_sound_device, main_data_w) + AM_RANGE(0x401a, 0x401a) AM_DEVWRITE("adpcm1", seibu_adpcm_device, ctl_w) + AM_RANGE(0x401b, 0x401b) AM_DEVWRITE("seibu_sound", seibu_sound_device, coin_w) + AM_RANGE(0x6005, 0x6006) AM_DEVWRITE("adpcm2", seibu_adpcm_device, adr_w) + AM_RANGE(0x6008, 0x6009) AM_DEVREADWRITE("ym2", ym2203_device, read, write) + AM_RANGE(0x601a, 0x601a) AM_DEVWRITE("adpcm2", seibu_adpcm_device, ctl_w) + AM_RANGE(0x8000, 0xffff) AM_ROMBANK("seibu_bank1") +ADDRESS_MAP_END + /* Input Ports */ static INPUT_PORTS_START( deadang ) @@ -246,8 +268,9 @@ static MACHINE_CONFIG_START( deadang, deadang_state ) MCFG_CPU_PROGRAM_MAP(sub_map) MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer2", deadang_state, sub_scanline, "screen", 0, 1) - SEIBU3A_SOUND_SYSTEM_CPU(XTAL_14_31818MHz/4) - SEIBU_SOUND_SYSTEM_ENCRYPTED_LOW() + MCFG_CPU_ADD("audiocpu", Z80, XTAL_14_31818MHz/4) + MCFG_CPU_PROGRAM_MAP(sound_map) + MCFG_CPU_DECRYPTED_OPCODES_MAP(seibu_sound_decrypted_opcodes_map) MCFG_QUANTUM_TIME(attotime::from_hz(60)) // the game stops working with higher interleave rates.. @@ -266,10 +289,26 @@ static MACHINE_CONFIG_START( deadang, deadang_state ) MCFG_PALETTE_ADD("palette", 2048) MCFG_PALETTE_FORMAT(xxxxBBBBGGGGRRRR) - /* sound hardware */ - SEIBU_SOUND_SYSTEM_YM2203_INTERFACE(XTAL_14_31818MHz/4) - SEIBU_SOUND_SYSTEM_ADPCM_INTERFACE + MCFG_SPEAKER_STANDARD_MONO("mono") + + MCFG_DEVICE_ADD("seibu_sound", SEIBU_SOUND, 0) + MCFG_SEIBU_SOUND_CPU_ENCRYPTED_LOW("audiocpu") + MCFG_SEIBU_SOUND_YM_READ_CB(DEVREAD8("ym1", ym2203_device, read)) + MCFG_SEIBU_SOUND_YM_WRITE_CB(DEVWRITE8("ym1", ym2203_device, write)) + + MCFG_SOUND_ADD("ym1", YM2203, XTAL_14_31818MHz/4) + MCFG_YM2203_IRQ_HANDLER(DEVWRITELINE("seibu_sound", seibu_sound_device, fm_irqhandler)) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15) + + MCFG_SOUND_ADD("ym2", YM2203, XTAL_14_31818MHz/4) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.15) + + MCFG_SOUND_ADD("adpcm1", SEIBU_ADPCM, 8000) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) + + MCFG_SOUND_ADD("adpcm2", SEIBU_ADPCM, 8000) + MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40) MACHINE_CONFIG_END /* ROMs */ |