diff options
Diffstat (limited to 'src/mame/audio/rax.cpp')
-rw-r--r-- | src/mame/audio/rax.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/mame/audio/rax.cpp b/src/mame/audio/rax.cpp index c20f19befc1..d294628464d 100644 --- a/src/mame/audio/rax.cpp +++ b/src/mame/audio/rax.cpp @@ -490,16 +490,17 @@ acclaim_rax_device::acclaim_rax_device(const machine_config &mconfig, const char // device_add_mconfig - add device configuration //------------------------------------------------- -MACHINE_CONFIG_START(acclaim_rax_device::device_add_mconfig) - MCFG_DEVICE_ADD("adsp", ADSP2181, XTAL(16'670'000)) - MCFG_ADSP21XX_SPORT_TX_CB(WRITE32(*this, acclaim_rax_device, adsp_sound_tx_callback)) /* callback for serial transmit */ - MCFG_ADSP21XX_DMOVLAY_CB(WRITE32(*this, acclaim_rax_device, dmovlay_callback)) // callback for adsp 2181 dmovlay instruction - MCFG_DEVICE_PROGRAM_MAP(adsp_program_map) - MCFG_DEVICE_DATA_MAP(adsp_data_map) - MCFG_DEVICE_IO_MAP(adsp_io_map) +void acclaim_rax_device::device_add_mconfig(machine_config &config) +{ + ADSP2181(config, m_cpu, XTAL(16'670'000)); + m_cpu->sport_tx().set(FUNC(acclaim_rax_device::adsp_sound_tx_callback)); /* callback for serial transmit */ + m_cpu->dmovlay().set(FUNC(acclaim_rax_device::dmovlay_callback)); /* callback for adsp 2181 dmovlay instruction */ + m_cpu->set_addrmap(AS_PROGRAM, &acclaim_rax_device::adsp_program_map); + m_cpu->set_addrmap(AS_DATA, &acclaim_rax_device::adsp_data_map); + m_cpu->set_addrmap(AS_IO, &acclaim_rax_device::adsp_io_map); - MCFG_TIMER_DEVICE_ADD("adsp_reg_timer0", DEVICE_SELF, acclaim_rax_device, adsp_irq0) - MCFG_TIMER_DEVICE_ADD("adsp_dma_timer", DEVICE_SELF, acclaim_rax_device, dma_timer_callback) + TIMER(config, "adsp_reg_timer0").configure_generic(FUNC(acclaim_rax_device::adsp_irq0)); + TIMER(config, "adsp_dma_timer").configure_generic(FUNC(acclaim_rax_device::dma_timer_callback)); GENERIC_LATCH_16(config, m_data_in); GENERIC_LATCH_16(config, m_data_out); @@ -507,10 +508,7 @@ MACHINE_CONFIG_START(acclaim_rax_device::device_add_mconfig) SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); - MCFG_DEVICE_ADD("dacl", DMADAC) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0) - - MCFG_DEVICE_ADD("dacr", DMADAC) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0) -MACHINE_CONFIG_END + DMADAC(config, "dacl").add_route(ALL_OUTPUTS, "lspeaker", 1.0); + DMADAC(config, "dacr").add_route(ALL_OUTPUTS, "rspeaker", 1.0); +} |