summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2018-05-26 13:19:07 -0400
committer AJR <ajrhacker@users.noreply.github.com>2018-05-26 13:20:21 -0400
commitceac5a4a7167ac42da41643a9a1dee4bc3bfa1e7 (patch)
tree516c9378514e821e44eb6774af04afde0b196401
parent4ed4943c40a6ccafbe7de9d256f9413ae6cab6d9 (diff)
exidy440.cpp, vertigo.cpp: Improve encapsulation for audio device
-rw-r--r--src/mame/audio/exidy440.cpp83
-rw-r--r--src/mame/audio/exidy440.h25
-rw-r--r--src/mame/drivers/exidy440.cpp136
-rw-r--r--src/mame/drivers/vertigo.cpp58
-rw-r--r--src/mame/includes/exidy440.h5
-rw-r--r--src/mame/includes/vertigo.h4
-rw-r--r--src/mame/machine/vertigo.cpp7
-rw-r--r--src/mame/video/exidy440.cpp11
8 files changed, 158 insertions, 171 deletions
diff --git a/src/mame/audio/exidy440.cpp b/src/mame/audio/exidy440.cpp
index 491a9e567ce..ee59b122ac9 100644
--- a/src/mame/audio/exidy440.cpp
+++ b/src/mame/audio/exidy440.cpp
@@ -13,6 +13,8 @@
#include "audio/exidy440.h"
#include "includes/exidy440.h"
+#include "cpu/m6809/m6809.h"
+
#define SOUND_LOG 0
#define FADE_TO_ZERO 1
@@ -41,12 +43,35 @@ static const int channel_bits[4] =
};
+/*************************************
+ *
+ * Audio CPU memory map
+ *
+ *************************************/
+
+void exidy440_sound_device::exidy440_audio_map(address_map &map)
+{
+ map(0x0000, 0x7fff).noprw();
+ map(0x8000, 0x801f).mirror(0x03e0).rw(this, FUNC(exidy440_sound_device::m6844_r), FUNC(exidy440_sound_device::m6844_w));
+ map(0x8400, 0x840f).mirror(0x03f0).rw(this, FUNC(exidy440_sound_device::sound_volume_r), FUNC(exidy440_sound_device::sound_volume_w));
+ map(0x8800, 0x8800).mirror(0x03ff).r(this, FUNC(exidy440_sound_device::sound_command_r)).nopw();
+ map(0x8c00, 0x93ff).noprw();
+ map(0x9400, 0x9403).mirror(0x03fc).nopr().w(this, FUNC(exidy440_sound_device::sound_banks_w));
+ map(0x9800, 0x9800).mirror(0x03ff).nopr().w(this, FUNC(exidy440_sound_device::sound_interrupt_clear_w));
+ map(0x9c00, 0x9fff).noprw();
+ map(0xa000, 0xbfff).ram();
+ map(0xc000, 0xdfff).noprw();
+ map(0xe000, 0xffff).rom().region("audiocpu", 0);
+}
+
+
DEFINE_DEVICE_TYPE(EXIDY440, exidy440_sound_device, "exidy440_sound", "Exidy 440 CVSD")
exidy440_sound_device::exidy440_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, EXIDY440, tag, owner, clock),
device_sound_interface(mconfig, *this),
- m_audiocpu(*this, "^audiocpu"),
+ m_audiocpu(*this, "audiocpu"),
+ m_samples(*this, "samples"),
m_sound_command(0),
m_sound_command_ack(0),
m_mixer_buffer_left(nullptr),
@@ -70,6 +95,27 @@ exidy440_sound_device::exidy440_sound_device(const machine_config &mconfig, cons
}
//-------------------------------------------------
+// device_add_mconfig - add device configuration
+//-------------------------------------------------
+
+MACHINE_CONFIG_START(exidy440_sound_device::device_add_mconfig)
+ MCFG_DEVICE_ADD("audiocpu", MC6809, EXIDY440_AUDIO_CLOCK)
+ MCFG_DEVICE_PROGRAM_MAP(exidy440_audio_map)
+
+// MCFG_DEVICE_ADD("cvsd1", MC3418, EXIDY440_MC3418_CLOCK)
+// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
+
+// MCFG_DEVICE_ADD("cvsd2", MC3418, EXIDY440_MC3418_CLOCK)
+// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+
+// MCFG_DEVICE_ADD("cvsd3", MC3417, EXIDY440_MC3417_CLOCK)
+// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
+
+// MCFG_DEVICE_ADD("cvsd4", MC3417, EXIDY440_MC3417_CLOCK)
+// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
+MACHINE_CONFIG_END
+
+//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
@@ -106,7 +152,7 @@ void exidy440_sound_device::device_start()
m_stream = machine().sound().stream_alloc(*this, 0, 2, clock());
/* allocate the sample cache */
- length = machine().root_device().memregion("cvsd")->bytes() * 16 + MAX_CACHE_ENTRIES * sizeof(sound_cache_entry);
+ length = m_samples.bytes() * 16 + MAX_CACHE_ENTRIES * sizeof(sound_cache_entry);
m_sound_cache = (sound_cache_entry *)auto_alloc_array_clear(machine(), uint8_t, length);
/* determine the hard end of the cache and reset */
@@ -208,10 +254,10 @@ void exidy440_sound_device::mix_to_16(int length, stream_sample_t *dest_left, st
*
*************************************/
-READ8_MEMBER( exidy440_sound_device::sound_command_r )
+READ8_MEMBER(exidy440_sound_device::sound_command_r)
{
/* clear the FIRQ that got us here and acknowledge the read to the main CPU */
- m_audiocpu->set_input_line(1, CLEAR_LINE);
+ m_audiocpu->set_input_line(M6809_FIRQ_LINE, CLEAR_LINE);
m_sound_command_ack = 1;
return m_sound_command;
@@ -222,7 +268,7 @@ void exidy440_sound_device::exidy440_sound_command(uint8_t param)
{
m_sound_command = param;
m_sound_command_ack = 0;
- m_audiocpu->set_input_line(INPUT_LINE_IRQ1, ASSERT_LINE);
+ m_audiocpu->set_input_line(M6809_FIRQ_LINE, ASSERT_LINE);
}
@@ -239,12 +285,12 @@ uint8_t exidy440_sound_device::exidy440_sound_command_ack()
*
*************************************/
-READ8_MEMBER( exidy440_sound_device::sound_volume_r )
+READ8_MEMBER(exidy440_sound_device::sound_volume_r)
{
return m_sound_volume[offset];
}
-WRITE8_MEMBER( exidy440_sound_device::sound_volume_w )
+WRITE8_MEMBER(exidy440_sound_device::sound_volume_w)
{
if (SOUND_LOG && m_debuglog)
fprintf(m_debuglog, "Volume %02X=%02X\n", offset, data);
@@ -264,9 +310,20 @@ WRITE8_MEMBER( exidy440_sound_device::sound_volume_w )
*
*************************************/
-WRITE8_MEMBER( exidy440_sound_device::sound_interrupt_clear_w )
+WRITE_LINE_MEMBER(exidy440_sound_device::sound_interrupt_w)
+{
+ if (state)
+ m_audiocpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE);
+}
+
+WRITE8_MEMBER(exidy440_sound_device::sound_interrupt_clear_w)
+{
+ m_audiocpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
+}
+
+WRITE_LINE_MEMBER(exidy440_sound_device::sound_reset_w)
{
- m_audiocpu->set_input_line(0, CLEAR_LINE);
+ m_audiocpu->set_input_line(INPUT_LINE_RESET, state);
}
@@ -306,7 +363,7 @@ void exidy440_sound_device::m6844_finished(m6844_channel_data *channel)
*
*************************************/
-READ8_MEMBER( exidy440_sound_device::m6844_r )
+READ8_MEMBER(exidy440_sound_device::m6844_r)
{
m6844_channel_data *m6844_channel = m_m6844_channel;
int result = 0;
@@ -391,7 +448,7 @@ READ8_MEMBER( exidy440_sound_device::m6844_r )
}
-WRITE8_MEMBER( exidy440_sound_device::m6844_w )
+WRITE8_MEMBER(exidy440_sound_device::m6844_w)
{
m6844_channel_data *m6844_channel = m_m6844_channel;
int i;
@@ -543,7 +600,7 @@ int16_t *exidy440_sound_device::find_or_add_to_sound_cache(int address, int leng
if (current->address == address && current->length == length && current->bits == bits && current->frequency == frequency)
return current->data;
- return add_to_sound_cache(&machine().root_device().memregion("cvsd")->base()[address], address, length, bits, frequency);
+ return add_to_sound_cache(&m_samples[address], address, length, bits, frequency);
}
@@ -776,7 +833,7 @@ void exidy440_sound_device::decode_and_filter_cvsd(uint8_t *input, int bytes, in
}
-WRITE8_MEMBER( exidy440_sound_device::sound_banks_w )
+WRITE8_MEMBER(exidy440_sound_device::sound_banks_w)
{
m_sound_banks[offset] = data;
}
diff --git a/src/mame/audio/exidy440.h b/src/mame/audio/exidy440.h
index 45831b282eb..b7ce86da71e 100644
--- a/src/mame/audio/exidy440.h
+++ b/src/mame/audio/exidy440.h
@@ -5,24 +5,32 @@
#pragma once
+#define EXIDY440_AUDIO_CLOCK (XTAL(12'979'200) / 4)
+#define EXIDY440_MC3418_CLOCK (EXIDY440_AUDIO_CLOCK / 4 / 16)
+#define EXIDY440_MC3417_CLOCK (EXIDY440_AUDIO_CLOCK / 4 / 32)
+
+
class exidy440_sound_device : public device_t, public device_sound_interface
{
public:
exidy440_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~exidy440_sound_device() {}
- DECLARE_READ8_MEMBER( sound_command_r );
- DECLARE_READ8_MEMBER( sound_volume_r );
- DECLARE_WRITE8_MEMBER( sound_volume_w );
- DECLARE_WRITE8_MEMBER( sound_interrupt_clear_w );
- DECLARE_READ8_MEMBER( m6844_r );
- DECLARE_WRITE8_MEMBER( m6844_w );
- DECLARE_WRITE8_MEMBER( sound_banks_w );
+ DECLARE_READ8_MEMBER(sound_command_r);
+ DECLARE_READ8_MEMBER(sound_volume_r);
+ DECLARE_WRITE8_MEMBER(sound_volume_w);
+ DECLARE_WRITE_LINE_MEMBER(sound_interrupt_w);
+ DECLARE_WRITE8_MEMBER(sound_interrupt_clear_w);
+ DECLARE_WRITE_LINE_MEMBER(sound_reset_w);
+ DECLARE_READ8_MEMBER(m6844_r);
+ DECLARE_WRITE8_MEMBER(m6844_w);
+ DECLARE_WRITE8_MEMBER(sound_banks_w);
void exidy440_sound_command(uint8_t param);
uint8_t exidy440_sound_command_ack();
protected:
// device-level overrides
+ virtual void device_add_mconfig(machine_config &config) override;
virtual void device_start() override;
virtual void device_stop() override;
@@ -30,6 +38,8 @@ protected:
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
private:
+ void exidy440_audio_map(address_map &map);
+
/* channel_data structure holds info about each 6844 DMA channel */
struct m6844_channel_data
{
@@ -63,6 +73,7 @@ private:
};
required_device<cpu_device> m_audiocpu;
+ required_region_ptr<uint8_t> m_samples;
// internal state
uint8_t m_sound_command;
diff --git a/src/mame/drivers/exidy440.cpp b/src/mame/drivers/exidy440.cpp
index da43a7076ca..c064e1235f4 100644
--- a/src/mame/drivers/exidy440.cpp
+++ b/src/mame/drivers/exidy440.cpp
@@ -244,9 +244,6 @@ Who Dunit 1988 6809
/* constants */
#define MAIN_CPU_CLOCK (EXIDY440_MASTER_CLOCK / 8)
-#define EXIDY440_AUDIO_CLOCK (XTAL(12'979'200) / 4)
-#define EXIDY440_MC3418_CLOCK (EXIDY440_AUDIO_CLOCK / 4 / 16)
-#define EXIDY440_MC3417_CLOCK (EXIDY440_AUDIO_CLOCK / 4 / 32)
@@ -451,7 +448,7 @@ void exidy440_state::machine_start()
/* the EEROM lives in the uppermost 8k of the top bank */
uint8_t *rom = memregion("maincpu")->base();
- machine().device<nvram_device>("nvram")->set_base(&rom[0x10000 + 15 * 0x4000 + 0x2000], 0x2000);
+ subdevice<nvram_device>("nvram")->set_base(&rom[0x10000 + 15 * 0x4000 + 0x2000], 0x2000);
}
void exidy440_state::machine_reset()
@@ -492,28 +489,6 @@ void exidy440_state::exidy440_map(address_map &map)
}
-/*************************************
- *
- * Audio CPU memory handlers
- *
- *************************************/
-
-void exidy440_state::exidy440_audio_map(address_map &map)
-{
- map(0x0000, 0x7fff).noprw();
- map(0x8000, 0x801f).mirror(0x03e0).rw(m_custom, FUNC(exidy440_sound_device::m6844_r), FUNC(exidy440_sound_device::m6844_w));
- map(0x8400, 0x840f).mirror(0x03f0).rw(m_custom, FUNC(exidy440_sound_device::sound_volume_r), FUNC(exidy440_sound_device::sound_volume_w));
- map(0x8800, 0x8800).mirror(0x03ff).r(m_custom, FUNC(exidy440_sound_device::sound_command_r)).nopw();
- map(0x8c00, 0x93ff).noprw();
- map(0x9400, 0x9403).mirror(0x03fc).nopr().w(m_custom, FUNC(exidy440_sound_device::sound_banks_w));
- map(0x9800, 0x9800).mirror(0x03ff).nopr().w(m_custom, FUNC(exidy440_sound_device::sound_interrupt_clear_w));
- map(0x9c00, 0x9fff).noprw();
- map(0xa000, 0xbfff).ram();
- map(0xc000, 0xdfff).noprw();
- map(0xe000, 0xffff).rom();
-}
-
-
/*************************************
*
@@ -1026,7 +1001,6 @@ MACHINE_CONFIG_START(exidy440_state::exidy440)
/* basic machine hardware */
MCFG_DEVICE_ADD("maincpu", MC6809E, MAIN_CPU_CLOCK)
MCFG_DEVICE_PROGRAM_MAP(exidy440_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", exidy440_state, exidy440_vblank_interrupt)
MCFG_NVRAM_ADD_0FILL("nvram")
@@ -1034,28 +1008,12 @@ MACHINE_CONFIG_START(exidy440_state::exidy440)
exidy440_video(config);
/* audio hardware */
- MCFG_DEVICE_ADD("audiocpu", MC6809, EXIDY440_AUDIO_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(exidy440_audio_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", driver_device, irq0_line_assert)
-
SPEAKER(config, "lspeaker").front_left();
SPEAKER(config, "rspeaker").front_right();
- MCFG_DEVICE_ADD("custom", EXIDY440, EXIDY440_MC3418_CLOCK)
+ MCFG_DEVICE_ADD("440audio", EXIDY440, EXIDY440_MC3418_CLOCK)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-
-// MCFG_DEVICE_ADD("cvsd1", MC3418, EXIDY440_MC3418_CLOCK)
-// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
-
-// MCFG_DEVICE_ADD("cvsd2", MC3418, EXIDY440_MC3418_CLOCK)
-// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
-
-// MCFG_DEVICE_ADD("cvsd3", MC3417, EXIDY440_MC3417_CLOCK)
-// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
-
-// MCFG_DEVICE_ADD("cvsd4", MC3417, EXIDY440_MC3417_CLOCK)
-// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
MACHINE_CONFIG_END
@@ -1110,10 +1068,10 @@ ROM_START( crossbow )
ROM_LOAD( "xbl-1.3b", 0x42000, 0x2000, CRC(4a03c2c9) SHA1(dd60cd629f60d15dd0596bde44fea4b4f1d65ae2) )
ROM_LOAD( "xbl-1.4b", 0x44000, 0x2000, CRC(7e21c624) SHA1(9e0c1297413f9d440106f6cef25f48fad60e4c85) )
- ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "xba-11.1h", 0x0e000, 0x2000, CRC(1b61d0c1) SHA1(de1028a3295dc0413756d4751ca577a03431583e) )
+ ROM_REGION( 0x02000, "440audio:audiocpu", 0 )
+ ROM_LOAD( "xba-11.1h", 0x00000, 0x2000, CRC(1b61d0c1) SHA1(de1028a3295dc0413756d4751ca577a03431583e) )
- ROM_REGION( 0x20000, "cvsd", 0 )
+ ROM_REGION( 0x20000, "440audio:samples", 0 )
ROM_LOAD( "xba-1.2k", 0x00000, 0x2000, CRC(b6e57685) SHA1(ee690cb966af126bfb0bafa804e0ad5490cab1db) )
ROM_LOAD( "xba-1.2l", 0x02000, 0x2000, CRC(2c24cb35) SHA1(4ea16998f477d6429a92ca05ef74daa21315e695) )
ROM_LOAD( "xba-1.2m", 0x04000, 0x2000, CRC(f3a4f2be) SHA1(f0ab8a0a6fbb2911d99c961a65035835e54924de) )
@@ -1179,10 +1137,10 @@ ROM_START( cheyenne )
ROM_LOAD( "cyl-1.8b", 0x4a000, 0x2000, CRC(c0653d3e) SHA1(489e61d1e0a18fca47b906d80b88c47fdb927d36) )
ROM_LOAD( "cyl-1.10b", 0x4c000, 0x2000, CRC(7fc67d19) SHA1(48307d50066c02376522e8fee0298c16f758b61d) )
- ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "cya-1.1h", 0x0e000, 0x2000, CRC(5aed3d8c) SHA1(d04ddd09df471cd2a8dd87c47c7b55eca5d7ac15) )
+ ROM_REGION( 0x02000, "440audio:audiocpu", 0 )
+ ROM_LOAD( "cya-1.1h", 0x00000, 0x2000, CRC(5aed3d8c) SHA1(d04ddd09df471cd2a8dd87c47c7b55eca5d7ac15) )
- ROM_REGION( 0x20000, "cvsd", 0 )
+ ROM_REGION( 0x20000, "440audio:samples", 0 )
ROM_LOAD( "cya-1.2k", 0x00000, 0x2000, CRC(dc2b716d) SHA1(ae588954431f8c4ecc7075f4964c3b8cc7ae0569) )
ROM_LOAD( "cya-1.2l", 0x02000, 0x2000, CRC(091ad047) SHA1(edab4472f39a1f19614737c6c5722677f4afd68c) )
ROM_LOAD( "cya-1.2m", 0x04000, 0x2000, CRC(59085362) SHA1(d4d7182ccdec17a29c556810b1d24aa6726f3826) )
@@ -1240,10 +1198,10 @@ ROM_START( combat )
ROM_LOAD( "8b", 0x4a000, 0x2000, CRC(ae977f4c) SHA1(a4cc9cae10482f03879b64c2b40fc8999b8a2b71) )
ROM_LOAD( "10b", 0x4c000, 0x2000, CRC(502da003) SHA1(f4c579b2f997208f71b24590794275d87b06e25c) )
- ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "1h", 0x0e000, 0x2000, CRC(8f3dd350) SHA1(9e329c2f502f63fcdbebeb40bf732e4a07a463c1) )
+ ROM_REGION( 0x02000, "440audio:audiocpu", 0 )
+ ROM_LOAD( "1h", 0x00000, 0x2000, CRC(8f3dd350) SHA1(9e329c2f502f63fcdbebeb40bf732e4a07a463c1) )
- ROM_REGION( 0x20000, "cvsd", 0 )
+ ROM_REGION( 0x20000, "440audio:samples", 0 )
ROM_LOAD( "2k", 0x00000, 0x2000, CRC(1c9df8b5) SHA1(12e82f585aee01f1e2ea7396a6b013c894f7b98d) )
ROM_LOAD( "2l", 0x02000, 0x2000, CRC(6b733306) SHA1(a41cc2e646392d71642abe2ab8d72f2d56214c02) )
ROM_LOAD( "2m", 0x04000, 0x2000, CRC(dc074733) SHA1(29a036d4057b813f584373493cb5b69b711840ae) )
@@ -1301,10 +1259,10 @@ ROM_START( catch22 )
ROM_LOAD( "8b", 0x4a000, 0x2000, CRC(ae977f4c) SHA1(a4cc9cae10482f03879b64c2b40fc8999b8a2b71) )
ROM_LOAD( "10b", 0x4c000, 0x2000, CRC(502da003) SHA1(f4c579b2f997208f71b24590794275d87b06e25c) )
- ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "1h", 0x0e000, 0x2000, CRC(8f3dd350) SHA1(9e329c2f502f63fcdbebeb40bf732e4a07a463c1) )
+ ROM_REGION( 0x02000, "440audio:audiocpu", 0 )
+ ROM_LOAD( "1h", 0x00000, 0x2000, CRC(8f3dd350) SHA1(9e329c2f502f63fcdbebeb40bf732e4a07a463c1) )
- ROM_REGION( 0x20000, "cvsd", 0 )
+ ROM_REGION( 0x20000, "440audio:samples", 0 )
ROM_LOAD( "2k", 0x00000, 0x2000, CRC(1c9df8b5) SHA1(12e82f585aee01f1e2ea7396a6b013c894f7b98d) )
ROM_LOAD( "2l", 0x02000, 0x2000, CRC(6b733306) SHA1(a41cc2e646392d71642abe2ab8d72f2d56214c02) )
ROM_LOAD( "2m", 0x04000, 0x2000, CRC(dc074733) SHA1(29a036d4057b813f584373493cb5b69b711840ae) )
@@ -1358,10 +1316,10 @@ ROM_START( cracksht )
ROM_LOAD( "csl2.8b", 0x4a000, 0x2000, CRC(af1c8cb8) SHA1(d753539a2afa4f6b0a79b9c7364d9814eb5ec3c0) )
ROM_LOAD( "csl2.10b", 0x4c000, 0x2000, CRC(8a0d6ad0) SHA1(024a8cebb56404c9efae0594e0b1d4a341ba9893) )
- ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "csa3.1h", 0x0e000, 0x2000, CRC(5ba8b4ac) SHA1(04d9d4bb7a5994c5ffe97ca22a43e7a1cbdef559) )
+ ROM_REGION( 0x02000, "440audio:audiocpu", 0 )
+ ROM_LOAD( "csa3.1h", 0x00000, 0x2000, CRC(5ba8b4ac) SHA1(04d9d4bb7a5994c5ffe97ca22a43e7a1cbdef559) )
- ROM_REGION( 0x20000, "cvsd", 0 )
+ ROM_REGION( 0x20000, "440audio:samples", 0 )
ROM_LOAD( "csa3.2k", 0x00000, 0x2000, CRC(067a4f71) SHA1(301b44bcb0c7145dbc2dfbaf5c7d9cc5aa0e2118) )
ROM_LOAD( "csa3.2l", 0x02000, 0x2000, CRC(5716c59e) SHA1(8adb601ba04bbc27295afe993cdc0576a39c7a71) )
ROM_LOAD( "csa3.2m", 0x04000, 0x2000, CRC(b3ff659b) SHA1(295b5153ad41d92ee53b53ed454b2487aea7f355) )
@@ -1409,10 +1367,10 @@ ROM_START( claypign )
ROM_LOAD( "claypige.7b", 0x48000, 0x2000, CRC(6140b026) SHA1(16949d1bcaec3c0c398df50a731da3bb44fa8e5b) )
ROM_LOAD( "claypige.8b", 0x4a000, 0x2000, CRC(d0f9d170) SHA1(db4285a280a7d539aab91280c57db9c460468a69) )
- ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "claypige.h1", 0x0e000, 0x2000, CRC(9eedc68d) SHA1(966542a10e19f7afe065614bdb7dd8a9ad9d3c3d) )
+ ROM_REGION( 0x02000, "440audio:audiocpu", 0 )
+ ROM_LOAD( "claypige.h1", 0x00000, 0x2000, CRC(9eedc68d) SHA1(966542a10e19f7afe065614bdb7dd8a9ad9d3c3d) )
- ROM_REGION( 0x20000, "cvsd", 0 )
+ ROM_REGION( 0x20000, "440audio:samples", 0 )
ROM_LOAD( "claypige.k2", 0x00000, 0x2000, CRC(0dd93c6c) SHA1(630397dbc54923a713bef1d99b08df8d2668b8ea) )
ROM_LOAD( "claypige.l2", 0x02000, 0x2000, CRC(e1d67c42) SHA1(8021432493cd9d5096b534505d469bb88a20e31f) )
ROM_LOAD( "claypige.m2", 0x04000, 0x2000, CRC(b56d8bd5) SHA1(45ac65a0f066791bb50535705d502957bfffbd53) )
@@ -1470,10 +1428,10 @@ ROM_START( chiller )
ROM_LOAD( "chl3.8b", 0x4a000, 0x2000, CRC(6172b12f) SHA1(f23e88103ed6b67eefade835cbdb1e3260d07d92) )
ROM_LOAD( "chl3.10b", 0x4c000, 0x2000, CRC(5d15342a) SHA1(74216b78a8f0bb44911b9cc74587b3edbacbbf01) )
- ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "cha3.1h", 0x0f000, 0x1000, CRC(b195cbba) SHA1(a74d14464ef0f07bfc83500483dd552f38fd55c8) )
+ ROM_REGION( 0x02000, "440audio:audiocpu", 0 )
+ ROM_LOAD( "cha3.1h", 0x01000, 0x1000, CRC(b195cbba) SHA1(a74d14464ef0f07bfc83500483dd552f38fd55c8) )
- ROM_REGION( 0x20000, "cvsd", 0 )
+ ROM_REGION( 0x20000, "440audio:samples", 0 )
ROM_LOAD( "cha3.2k", 0x00000, 0x2000, CRC(814a1c6e) SHA1(f7b22bc5a7d0b8fb9914b000520d68cc87c43957) )
ROM_LOAD( "cha3.2l", 0x02000, 0x2000, CRC(b326007f) SHA1(c636f28f18697673d0a9b47a1494ea4060ca012f) )
ROM_LOAD( "cha3.2m", 0x04000, 0x2000, CRC(11075e8c) SHA1(f87cb92126ddb3899fc95b3a20a1c7109fc2a60d) )
@@ -1543,10 +1501,10 @@ ROM_START( topsecex )
ROM_LOAD( "tsl1.b8", 0x4a000, 0x2000, CRC(cc770802) SHA1(3830a7cb22e30e7af5a693fac3dad0f306a88c2b) )
ROM_LOAD( "tsl1.b10", 0x4c000, 0x2000, CRC(079d0a1d) SHA1(91ee751e27b963b98774181f5037e3e88b4877df) )
- ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "tsa1.1h", 0x0e000, 0x2000, CRC(35a1dd40) SHA1(2a18b166f9ad2b6afc9e8448287228cd81d34f94) )
+ ROM_REGION( 0x02000, "440audio:audiocpu", 0 )
+ ROM_LOAD( "tsa1.1h", 0x00000, 0x2000, CRC(35a1dd40) SHA1(2a18b166f9ad2b6afc9e8448287228cd81d34f94) )
- ROM_REGION( 0x20000, "cvsd", 0 )
+ ROM_REGION( 0x20000, "440audio:samples", 0 )
ROM_LOAD( "tsa1.2k", 0x00000, 0x2000, CRC(c0b7c8f9) SHA1(1d54da254d2524f3df49df6ad6961770852a663e) )
ROM_LOAD( "tsa1.2l", 0x02000, 0x2000, CRC(d46f2f23) SHA1(6d3f9cf9f9d05faea86323a7752eea9467d6edc5) )
ROM_LOAD( "tsa1.2m", 0x04000, 0x2000, CRC(04722ee4) SHA1(ab5d730330b98365fc02c38eb8545e5e1de4e93f) )
@@ -1606,10 +1564,10 @@ ROM_START( hitnmiss )
ROM_LOAD( "hml3.b8", 0x4a000, 0x2000, CRC(e0a5a6aa) SHA1(b012a1e23fd0acf9972714ed8aea0cedbb079a31) )
ROM_LOAD( "hml3.b10", 0x4c000, 0x2000, CRC(de65dfdc) SHA1(c1105ff41596ee5f4c79143552eab87fcbe93d1e) )
- ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "hma3.1h", 0x0e000, 0x2000, CRC(f718da36) SHA1(6c878725e679e0c553494c621bee059fe8b67ae8) )
+ ROM_REGION( 0x02000, "440audio:audiocpu", 0 )
+ ROM_LOAD( "hma3.1h", 0x00000, 0x2000, CRC(f718da36) SHA1(6c878725e679e0c553494c621bee059fe8b67ae8) )
- ROM_REGION( 0x20000, "cvsd", 0 )
+ ROM_REGION( 0x20000, "440audio:samples", 0 )
ROM_LOAD( "hm2.2k", 0x00000, 0x2000, CRC(d3583b62) SHA1(99be3a858ab6b1c950ef684202adec4f5e60a361) )
ROM_LOAD( "hm2.2l", 0x02000, 0x2000, CRC(c059d51e) SHA1(ddf437cdff6168e76c6a65078e0a2e2862805ca7) )
ROM_LOAD( "hma.2m", 0x04000, 0x2000, CRC(09bb8495) SHA1(ea817cbbd89aa18d81f6025a856965d466efadff) )
@@ -1667,10 +1625,10 @@ ROM_START( hitnmiss2 )
ROM_LOAD( "hml2.b8", 0x4a000, 0x2000, CRC(9c2db94a) SHA1(aa90181c0cc3e130f872ff5beb2be340e7851e1a) )
ROM_LOAD( "hml2.b10", 0x4c000, 0x2000, CRC(f01bd7d4) SHA1(169139c89582852b6141fd37e75486753674c557) )
- ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "hma2.1h", 0x0e000, 0x2000, CRC(9be48f45) SHA1(360138e3996828509b4bd1b3efccd61f05d215f0) )
+ ROM_REGION( 0x02000, "440audio:audiocpu", 0 )
+ ROM_LOAD( "hma2.1h", 0x00000, 0x2000, CRC(9be48f45) SHA1(360138e3996828509b4bd1b3efccd61f05d215f0) )
- ROM_REGION( 0x20000, "cvsd", 0 )
+ ROM_REGION( 0x20000, "440audio:samples", 0 )
ROM_LOAD( "hm2.2k", 0x00000, 0x2000, CRC(d3583b62) SHA1(99be3a858ab6b1c950ef684202adec4f5e60a361) )
ROM_LOAD( "hm2.2l", 0x02000, 0x2000, CRC(c059d51e) SHA1(ddf437cdff6168e76c6a65078e0a2e2862805ca7) )
ROM_LOAD( "hma.2m", 0x04000, 0x2000, CRC(09bb8495) SHA1(ea817cbbd89aa18d81f6025a856965d466efadff) )
@@ -1736,10 +1694,10 @@ ROM_START( whodunit ) /* Version 9 */
ROM_LOAD( "wdl-9_8-b.8b", 0x4a000, 0x2000, CRC(33792758) SHA1(408da288288f54f7446b083b14dc74d43ef4ab9f) )
ROM_LOAD( "wdl-9_10-b.10b", 0x4c000, 0x2000, CRC(c5ab5805) SHA1(fd7c47e50eb4005b81309a73afae2e04a823d00b) )
- ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "wda-9_h-1.h1", 0x0e000, 0x2000, CRC(dc4b36f0) SHA1(1ddd47dbd7f3e360aae830b67a13dd6a1d7a6497) ) // This ROM is a 2764 eprom
+ ROM_REGION( 0x02000, "440audio:audiocpu", 0 )
+ ROM_LOAD( "wda-9_h-1.h1", 0x00000, 0x2000, CRC(dc4b36f0) SHA1(1ddd47dbd7f3e360aae830b67a13dd6a1d7a6497) ) // This ROM is a 2764 eprom
- ROM_REGION( 0x20000, "cvsd", 0 )
+ ROM_REGION( 0x20000, "440audio:samples", 0 )
ROM_LOAD( "wda-9_2-k.2k", 0x00000, 0x2000, CRC(d4951375) SHA1(88616a7cb587748b366ece6126185a85e7375659) ) // all these ROMs are 2764 eproms
ROM_LOAD( "wda-9_2-l.2l", 0x02000, 0x2000, CRC(be8dcf07) SHA1(9a6e9b256da07be50feb81b27e53d86b3f016f4e) )
ROM_LOAD( "wda-9_2-m.2m", 0x04000, 0x2000, CRC(fb389e2d) SHA1(8ee1be233429d6b7cbb56a13586e2db49dffaca1) )
@@ -1808,10 +1766,10 @@ ROM_START( whodunit8 ) /* Version 8 */
ROM_LOAD( "wdl8.8b", 0x4a000, 0x2000, CRC(33792758) SHA1(408da288288f54f7446b083b14dc74d43ef4ab9f) )
ROM_LOAD( "wdl6.10b", 0x4c000, 0x2000, CRC(2f48cfdb) SHA1(b546da26b7bdc52c454ff32e4503ef5e45e4b360) )
- ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "wda8.h1", 0x0e000, 0x2000, CRC(0090e5a7) SHA1(c97e4c83d507d1375320aa9cae07b9fa1ee442c8) )
+ ROM_REGION( 0x02000, "440audio:audiocpu", 0 )
+ ROM_LOAD( "wda8.h1", 0x00000, 0x2000, CRC(0090e5a7) SHA1(c97e4c83d507d1375320aa9cae07b9fa1ee442c8) )
- ROM_REGION( 0x20000, "cvsd", 0 )
+ ROM_REGION( 0x20000, "440audio:samples", 0 )
ROM_LOAD( "wda6.k2", 0x00000, 0x2000, CRC(d4951375) SHA1(88616a7cb587748b366ece6126185a85e7375659) )
ROM_LOAD( "wda6.l2", 0x02000, 0x2000, CRC(be8dcf07) SHA1(9a6e9b256da07be50feb81b27e53d86b3f016f4e) )
ROM_LOAD( "wda6.m2", 0x04000, 0x2000, CRC(fb389e2d) SHA1(8ee1be233429d6b7cbb56a13586e2db49dffaca1) )
@@ -1874,10 +1832,10 @@ ROM_START( showdown )
ROM_LOAD( "sld-5_8-b.8b", 0x4a000, 0x2000, CRC(024fe6ee) SHA1(4287091e65c58aec75c54e320c534d41def951f9) )
ROM_LOAD( "sld-5_10-b.10b", 0x4c000, 0x2000, CRC(0b318dfe) SHA1(feb65530ea3aea6b0786875dc48d96e07d579636) )
- ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "sda-5_h-1.h1", 0x0e000, 0x2000, CRC(6a10ff47) SHA1(ee57de74ab9a5cfe5726212a9b905e91e6461225) )
+ ROM_REGION( 0x02000, "440audio:audiocpu", 0 )
+ ROM_LOAD( "sda-5_h-1.h1", 0x00000, 0x2000, CRC(6a10ff47) SHA1(ee57de74ab9a5cfe5726212a9b905e91e6461225) )
- ROM_REGION( 0x20000, "cvsd", 0 )
+ ROM_REGION( 0x20000, "440audio:samples", 0 )
ROM_LOAD( "sda-5_k-2.k2", 0x00000, 0x2000, CRC(67a86f7f) SHA1(a4f70aab90acd2502e8f3f39efdafcd71b1a22b4) )
ROM_LOAD( "sda-5_l-2.l2", 0x02000, 0x2000, CRC(0bb8874b) SHA1(8b643dbd5412a713b3e2831dd1ba2b7d1f613ac2) )
ROM_LOAD( "sda-5_m-2.m2", 0x04000, 0x2000, CRC(8b77eac8) SHA1(d70038cd6655e71c6488c555ecb1d1a424d00d49) )
@@ -1937,10 +1895,10 @@ ROM_START( yukon )
ROM_LOAD( "yul-1.7b", 0x48000, 0x2000, CRC(30a62d8f) SHA1(8b2cefd5c7393ec238d2d7b53320c08cce43c93b) )
ROM_LOAD( "yul-1.8b", 0x4a000, 0x2000, CRC(fa85b58e) SHA1(11c18bff9f473281bcf6677ffffd499496af7b9d) )
- ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "yua-1.1h", 0x0e000, 0x2000, CRC(f0df665a) SHA1(1fac03007563f569fdf57d5b16a0501e9a4dff01) )
+ ROM_REGION( 0x02000, "440audio:audiocpu", 0 )
+ ROM_LOAD( "yua-1.1h", 0x00000, 0x2000, CRC(f0df665a) SHA1(1fac03007563f569fdf57d5b16a0501e9a4dff01) )
- ROM_REGION( 0x20000, "cvsd", 0 )
+ ROM_REGION( 0x20000, "440audio:samples", 0 )
ROM_LOAD( "yua-1.2k", 0x00000, 0x2000, CRC(67a86f7f) SHA1(a4f70aab90acd2502e8f3f39efdafcd71b1a22b4) )
ROM_LOAD( "yua-1.2l", 0x02000, 0x2000, CRC(0bb8874b) SHA1(8b643dbd5412a713b3e2831dd1ba2b7d1f613ac2) )
ROM_LOAD( "yua-1.2m", 0x04000, 0x2000, CRC(8b77eac8) SHA1(d70038cd6655e71c6488c555ecb1d1a424d00d49) )
@@ -2000,10 +1958,10 @@ ROM_START( yukon1 )
ROM_LOAD( "yul-1.7b", 0x48000, 0x2000, CRC(30a62d8f) SHA1(8b2cefd5c7393ec238d2d7b53320c08cce43c93b) )
ROM_LOAD( "yul-1.8b", 0x4a000, 0x2000, CRC(fa85b58e) SHA1(11c18bff9f473281bcf6677ffffd499496af7b9d) )
- ROM_REGION( 0x10000, "audiocpu", 0 )
- ROM_LOAD( "yua-1.1h", 0x0e000, 0x2000, CRC(f0df665a) SHA1(1fac03007563f569fdf57d5b16a0501e9a4dff01) )
+ ROM_REGION( 0x02000, "440audio:audiocpu", 0 )
+ ROM_LOAD( "yua-1.1h", 0x00000, 0x2000, CRC(f0df665a) SHA1(1fac03007563f569fdf57d5b16a0501e9a4dff01) )
- ROM_REGION( 0x20000, "cvsd", 0 )
+ ROM_REGION( 0x20000, "440audio:samples", 0 )
ROM_LOAD( "yua-1.2k", 0x00000, 0x2000, CRC(67a86f7f) SHA1(a4f70aab90acd2502e8f3f39efdafcd71b1a22b4) )
ROM_LOAD( "yua-1.2l", 0x02000, 0x2000, CRC(0bb8874b) SHA1(8b643dbd5412a713b3e2831dd1ba2b7d1f613ac2) )
ROM_LOAD( "yua-1.2m", 0x04000, 0x2000, CRC(8b77eac8) SHA1(d70038cd6655e71c6488c555ecb1d1a424d00d49) )
diff --git a/src/mame/drivers/vertigo.cpp b/src/mame/drivers/vertigo.cpp
index 10ff3ce80da..ed97be3ae51 100644
--- a/src/mame/drivers/vertigo.cpp
+++ b/src/mame/drivers/vertigo.cpp
@@ -19,15 +19,11 @@
#include "cpu/m6805/m68705.h"
#include "cpu/m6805/m6805.h"
-#include "cpu/m6809/m6809.h"
#include "cpu/m68000/m68000.h"
#include "machine/pit8253.h"
#include "machine/nvram.h"
#include "screen.h"
-#define EXIDY440_AUDIO_CLOCK (XTAL(12'979'200) / 4)
-#define EXIDY440_MC3418_CLOCK (EXIDY440_AUDIO_CLOCK / 4 / 16)
-
/*************************************
*
@@ -53,21 +49,6 @@ void vertigo_state::vertigo_map(address_map &map)
map(0x800000, 0x81ffff).rom();
}
-void vertigo_state::exidy440_audio_map(address_map &map)
-{
- map(0x0000, 0x7fff).noprw();
- map(0x8000, 0x801f).mirror(0x03e0).rw(m_custom, FUNC(exidy440_sound_device::m6844_r), FUNC(exidy440_sound_device::m6844_w));
- map(0x8400, 0x840f).mirror(0x03f0).rw(m_custom, FUNC(exidy440_sound_device::sound_volume_r), FUNC(exidy440_sound_device::sound_volume_w));
- map(0x8800, 0x8800).mirror(0x03ff).r(m_custom, FUNC(exidy440_sound_device::sound_command_r)).nopw();
- map(0x8c00, 0x93ff).noprw();
- map(0x9400, 0x9403).mirror(0x03fc).nopr().w(m_custom, FUNC(exidy440_sound_device::sound_banks_w));
- map(0x9800, 0x9800).mirror(0x03ff).nopr().w(m_custom, FUNC(exidy440_sound_device::sound_interrupt_clear_w));
- map(0x9c00, 0x9fff).noprw();
- map(0xa000, 0xbfff).ram();
- map(0xc000, 0xdfff).noprw();
- map(0xe000, 0xffff).rom();
-}
-
/*************************************
*
@@ -139,7 +120,12 @@ MACHINE_CONFIG_START(vertigo_state::vertigo)
MCFG_ADC0808_IN2_CB(IOPORT("PADDLE"))
// IN3-IN7 tied to Vss
- exidy440_audio(config);
+ SPEAKER(config, "lspeaker").front_left();
+ SPEAKER(config, "rspeaker").front_right();
+
+ MCFG_DEVICE_ADD("440audio", EXIDY440, EXIDY440_MC3418_CLOCK)
+ MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
+ MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
MCFG_DEVICE_ADD("pit", PIT8254, 0)
MCFG_PIT8253_CLK0(24_MHz_XTAL / 100)
@@ -165,32 +151,6 @@ MACHINE_CONFIG_START(vertigo_state::vertigo)
MCFG_SCREEN_UPDATE_DEVICE("vector", vector_device, screen_update)
MACHINE_CONFIG_END
-MACHINE_CONFIG_START(vertigo_state::exidy440_audio)
-
- MCFG_DEVICE_ADD("audiocpu", MC6809, EXIDY440_AUDIO_CLOCK)
- MCFG_DEVICE_PROGRAM_MAP(exidy440_audio_map)
- MCFG_DEVICE_VBLANK_INT_DRIVER("screen", driver_device, irq0_line_assert)
-
- SPEAKER(config, "lspeaker").front_left();
- SPEAKER(config, "rspeaker").front_right();
-
- MCFG_DEVICE_ADD("custom", EXIDY440, EXIDY440_MC3418_CLOCK)
- MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
- MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
-
-// MCFG_DEVICE_ADD("cvsd1", MC3418, EXIDY440_MC3418_CLOCK)
-// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
-
-// MCFG_DEVICE_ADD("cvsd2", MC3418, EXIDY440_MC3418_CLOCK)
-// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
-
-// MCFG_DEVICE_ADD("cvsd3", MC3417, EXIDY440_MC3417_CLOCK)
-// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
-
-// MCFG_DEVICE_ADD("cvsd4", MC3417, EXIDY440_MC3417_CLOCK)
-// MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
-MACHINE_CONFIG_END
-
/*************************************
*
@@ -238,10 +198,10 @@ ROM_START( topgunnr )
ROMX_LOAD( "vuc.03", 7, 0x200, CRC(23c1f136) SHA1(0eb959aa8fb6028dd97bdaa28981cec16652bf2d), ROM_NIBBLE | ROM_SHIFT_NIBBLE_LO | ROM_SKIP(7))
ROMX_LOAD( "vuc.04", 7, 0x200, CRC(a5389228) SHA1(922d49c949e31413bbbff118c04965b649864a67), ROM_NIBBLE | ROM_SHIFT_NIBBLE_HI | ROM_SKIP(7))
- ROM_REGION( 0x010000, "audiocpu", 0 )
- ROM_LOAD( "vga1_7.g7", 0x0e000, 0x2000, CRC(db109b19) SHA1(c3fbb28cb4679c021bc48f844097add39a2208a5) )
+ ROM_REGION( 0x02000, "440audio:audiocpu", 0 )
+ ROM_LOAD( "vga1_7.g7", 0x00000, 0x2000, CRC(db109b19) SHA1(c3fbb28cb4679c021bc48f844097add39a2208a5) )
- ROM_REGION( 0x20000, "cvsd", 0 )
+ ROM_REGION( 0x20000, "440audio:samples", 0 )
ROM_LOAD( "vga1_7.l6", 0x00000, 0x2000, CRC(20cbf97a) SHA1(13e138b08ba3328db6a2fba95a369422455d1c5c) )
ROM_LOAD( "vga1_7.m6", 0x02000, 0x2000, CRC(76197050) SHA1(d26701ba83a34384348fa34e3de78cc69dc5362e) )
ROM_LOAD( "vga1_7.n6", 0x04000, 0x2000, CRC(b93d7cbb) SHA1(1a4d05e03765b66ff20b963c5a0b5f7c3d5a360c) )
diff --git a/src/mame/includes/exidy440.h b/src/mame/includes/exidy440.h
index 37adcb4b7ca..168a6a59ce3 100644
--- a/src/mame/includes/exidy440.h
+++ b/src/mame/includes/exidy440.h
@@ -25,7 +25,7 @@ public:
m_spriteram(*this, "spriteram"),
m_scanline(*this, "scanline"),
m_maincpu(*this, "maincpu"),
- m_custom(*this, "custom"),
+ m_custom(*this, "440audio"),
m_screen(*this, "screen"),
m_palette(*this, "palette")
{ }
@@ -61,7 +61,7 @@ protected:
void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int scroll_offset, int check_collision);
void update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int scroll_offset, int check_collision);
uint32_t screen_update_exidy440(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
- INTERRUPT_GEN_MEMBER(exidy440_vblank_interrupt);
+ DECLARE_WRITE_LINE_MEMBER(vblank_interrupt_w);
TIMER_CALLBACK_MEMBER(delayed_sound_command_w);
TIMER_CALLBACK_MEMBER(beam_firq_callback);
TIMER_CALLBACK_MEMBER(collide_firq_callback);
@@ -73,7 +73,6 @@ protected:
virtual void video_start() override;
void exidy440_video(machine_config &config);
void exidy440_map(address_map &map);
- void exidy440_audio_map(address_map &map);
required_shared_ptr<uint8_t> m_imageram;
required_shared_ptr<uint8_t> m_spriteram;
diff --git a/src/mame/includes/vertigo.h b/src/mame/includes/vertigo.h
index d9e60ba8065..f515234bb5f 100644
--- a/src/mame/includes/vertigo.h
+++ b/src/mame/includes/vertigo.h
@@ -30,8 +30,7 @@ public:
vertigo_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu"),
- m_audiocpu(*this, "audiocpu"),
- m_custom(*this, "custom"),
+ m_custom(*this, "440audio"),
m_ttl74148(*this, "74148"),
m_vector(*this, "vector"),
m_adc(*this, "adc"),
@@ -132,7 +131,6 @@ private:
void update_irq_encoder(int line, int state);
required_device<cpu_device> m_maincpu;
- required_device<cpu_device> m_audiocpu;
required_device<exidy440_sound_device> m_custom;
required_device<ttl74148_device> m_ttl74148;
required_device<vector_device> m_vector;
diff --git a/src/mame/machine/vertigo.cpp b/src/mame/machine/vertigo.cpp
index ca6d77eebe5..4f4a7b56ec2 100644
--- a/src/mame/machine/vertigo.cpp
+++ b/src/mame/machine/vertigo.cpp
@@ -48,8 +48,7 @@ WRITE_LINE_MEMBER(vertigo_state::v_irq4_w)
WRITE_LINE_MEMBER(vertigo_state::v_irq3_w)
{
- if (state)
- m_audiocpu->set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
+ m_custom->sound_interrupt_w(state);
update_irq_encoder(INPUT_LINE_IRQ3, state);
}
@@ -101,9 +100,9 @@ WRITE16_MEMBER(vertigo_state::vertigo_wsot_w)
{
/* Reset sound cpu */
if ((data & 2) == 0)
- m_audiocpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
+ m_custom->sound_reset_w(ASSERT_LINE);
else
- m_audiocpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE);
+ m_custom->sound_reset_w(CLEAR_LINE);
}
diff --git a/src/mame/video/exidy440.cpp b/src/mame/video/exidy440.cpp
index 710cb8f0f9d..df28b2b340d 100644
--- a/src/mame/video/exidy440.cpp
+++ b/src/mame/video/exidy440.cpp
@@ -230,11 +230,14 @@ void exidy440_state::exidy440_update_firq()
}
-INTERRUPT_GEN_MEMBER(exidy440_state::exidy440_vblank_interrupt)
+WRITE_LINE_MEMBER(exidy440_state::vblank_interrupt_w)
{
/* set the FIRQ line on a VBLANK */
- m_firq_vblank = 1;
- exidy440_update_firq();
+ if (state)
+ {
+ m_firq_vblank = 1;
+ exidy440_update_firq();
+ }
}
@@ -465,6 +468,8 @@ MACHINE_CONFIG_START(exidy440_state::exidy440_video)
MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, HBEND, HBSTART, VTOTAL, VBEND, VBSTART)
MCFG_SCREEN_UPDATE_DRIVER(exidy440_state, screen_update_exidy440)
MCFG_SCREEN_PALETTE("palette")
+ MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, exidy440_state, vblank_interrupt_w))
+ MCFG_DEVCB_CHAIN_OUTPUT(WRITELINE("440audio", exidy440_sound_device, sound_interrupt_w))
MACHINE_CONFIG_END