summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author angelosa <salese_corp_ltd@email.it>2018-05-07 23:12:44 +0200
committer angelosa <salese_corp_ltd@email.it>2018-05-07 23:13:46 +0200
commit765d625ac78ea14cec1e1a84c56567d980924869 (patch)
tree5c6dcf65023726ce88cd9661dcac4cfa8a78ae93 /src
parentbbe05acb03fa873eecd86449f86aec8021cc4883 (diff)
deadang.cpp: fix sound for popnrun (same config as Air Raid) (nw)
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/deadang.cpp44
-rw-r--r--src/mame/includes/deadang.h6
2 files changed, 44 insertions, 6 deletions
diff --git a/src/mame/drivers/deadang.cpp b/src/mame/drivers/deadang.cpp
index f403a33f79b..dc0b567d9a4 100644
--- a/src/mame/drivers/deadang.cpp
+++ b/src/mame/drivers/deadang.cpp
@@ -133,12 +133,32 @@ void deadang_state::sound_map(address_map &map)
map(0x8000, 0xffff).bankr("seibu_bank1");
}
+// Air Raid sound config with extra ROM bank
+void popnrun_state::popnrun_sound_map(address_map &map)
+{
+ map(0x0000, 0x1fff).r("sei80bu", FUNC(sei80bu_device::data_r));
+ map(0x2000, 0x27ff).ram();
+ map(0x4000, 0x4000).w(m_seibu_sound, FUNC(seibu_sound_device::pending_w));
+ map(0x4001, 0x4001).w(m_seibu_sound, FUNC(seibu_sound_device::irq_clear_w));
+ map(0x4002, 0x4002).w(m_seibu_sound, FUNC(seibu_sound_device::rst10_ack_w));
+ map(0x4003, 0x4003).w(m_seibu_sound, FUNC(seibu_sound_device::rst18_ack_w));
+ map(0x4007, 0x4007).w(m_seibu_sound, FUNC(seibu_sound_device::bank_w));
+ map(0x4008, 0x4009).rw(m_seibu_sound, FUNC(seibu_sound_device::ym_r), FUNC(seibu_sound_device::ym_w));
+ map(0x4010, 0x4011).r(m_seibu_sound, FUNC(seibu_sound_device::soundlatch_r));
+ map(0x4012, 0x4012).r(m_seibu_sound, FUNC(seibu_sound_device::main_data_pending_r));
+ map(0x4013, 0x4013).portr("COIN");
+ map(0x4018, 0x4019).w(m_seibu_sound, FUNC(seibu_sound_device::main_data_w));
+ map(0x401b, 0x401b).w(m_seibu_sound, FUNC(seibu_sound_device::coin_w));
+ map(0x8000, 0xffff).bankr("seibu_bank1");
+}
+
void deadang_state::sound_decrypted_opcodes_map(address_map &map)
{
map(0x0000, 0x1fff).r("sei80bu", FUNC(sei80bu_device::opcode_r));
map(0x8000, 0xffff).bankr("seibu_bank1");
}
+
/* Input Ports */
static INPUT_PORTS_START( deadang )
@@ -373,10 +393,30 @@ MACHINE_CONFIG_START(popnrun_state::popnrun)
MCFG_DEVICE_MODIFY("sub")
MCFG_DEVICE_PROGRAM_MAP(popnrun_sub_map)
+ MCFG_DEVICE_MODIFY("audiocpu")
+ MCFG_DEVICE_PROGRAM_MAP(popnrun_sound_map)
+ MCFG_DEVICE_OPCODES_MAP(sound_decrypted_opcodes_map)
+
MCFG_SCREEN_MODIFY("screen")
MCFG_SCREEN_UPDATE_DRIVER(popnrun_state, popnrun_screen_update)
MCFG_GFXDECODE_MODIFY("gfxdecode", popnrun)
+
+ MCFG_DEVICE_REMOVE("ym1")
+ MCFG_DEVICE_REMOVE("ym2")
+ MCFG_DEVICE_REMOVE("adpcm1")
+ MCFG_DEVICE_REMOVE("adpcm2")
+
+ MCFG_DEVICE_MODIFY("seibu_sound")
+ MCFG_SEIBU_SOUND_CPU("audiocpu")
+ MCFG_SEIBU_SOUND_ROMBANK("seibu_bank1")
+ MCFG_SEIBU_SOUND_YM_READ_CB(READ8("ymsnd", ym2151_device, read))
+ MCFG_SEIBU_SOUND_YM_WRITE_CB(WRITE8("ymsnd", ym2151_device, write))
+
+ MCFG_DEVICE_ADD("ymsnd", YM2151, XTAL(14'318'181)/4)
+ MCFG_YM2151_IRQ_HANDLER(WRITELINE("seibu_sound", seibu_sound_device, fm_irqhandler))
+ MCFG_SOUND_ROUTE(0, "mono", 0.50)
+ MCFG_SOUND_ROUTE(1, "mono", 0.50)
MACHINE_CONFIG_END
@@ -457,10 +497,6 @@ ROM_START( popnruna )
ROM_REGION16_BE( 0x10000, "gfx7", ROMREGION_ERASE00 ) /* background map data */
ROM_LOAD( "gfx7.bin", 0x0000, 0x10000, NO_DUMP )
- ROM_REGION( 0x10000, "adpcm1", ROMREGION_ERASE00 )
-
- ROM_REGION( 0x10000, "adpcm2", ROMREGION_ERASE00 )
-
ROM_REGION( 0x0100, "prom", ROMREGION_ERASE00 )
ROM_LOAD( "popnrun-63s281-9b.bin", 0x000000, 0x000100, CRC(208d17ca) SHA1(a77d56337bcac8d9a7bc3411239dfb3045e069ec) )
ROM_END
diff --git a/src/mame/includes/deadang.h b/src/mame/includes/deadang.h
index d1fdd50dbf3..597cd24c538 100644
--- a/src/mame/includes/deadang.h
+++ b/src/mame/includes/deadang.h
@@ -3,6 +3,7 @@
#include "audio/seibu.h"
#include "machine/timer.h"
+#include "sound/ym2151.h"
class deadang_state : public driver_device
{
@@ -24,8 +25,8 @@ public:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_subcpu;
required_device<seibu_sound_device> m_seibu_sound;
- required_device<seibu_adpcm_device> m_adpcm1;
- required_device<seibu_adpcm_device> m_adpcm2;
+ optional_device<seibu_adpcm_device> m_adpcm1;
+ optional_device<seibu_adpcm_device> m_adpcm2;
required_device<gfxdecode_device> m_gfxdecode;
required_device<palette_device> m_palette;
@@ -82,6 +83,7 @@ public:
DECLARE_WRITE16_MEMBER(popnrun_text_w);
void popnrun_main_map(address_map &map);
void popnrun_sub_map(address_map &map);
+ void popnrun_sound_map(address_map &map);
void popnrun(machine_config &config);
uint32_t popnrun_screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);