diff options
Diffstat (limited to 'src/devices/bus/isa/p1_sound.cpp')
-rw-r--r-- | src/devices/bus/isa/p1_sound.cpp | 49 |
1 files changed, 21 insertions, 28 deletions
diff --git a/src/devices/bus/isa/p1_sound.cpp b/src/devices/bus/isa/p1_sound.cpp index b8e37a57368..11fe4c53c43 100644 --- a/src/devices/bus/isa/p1_sound.cpp +++ b/src/devices/bus/isa/p1_sound.cpp @@ -6,15 +6,11 @@ Memory-mapped, uses IRQ3 and IRQ7, no DMA. - Copyright MESS Team. - Visit http://mamedev.org for licensing and usage restrictions. - **********************************************************************/ #include "emu.h" #include "p1_sound.h" -#include "sound/volt_reg.h" #include "speaker.h" @@ -67,9 +63,6 @@ void p1_sound_device::device_add_mconfig(machine_config &config) SPEAKER(config, "speaker").front_center(); FILTER_RC(config, m_filter).add_route(ALL_OUTPUTS, "speaker", 1.0); DAC_8BIT_R2R(config, m_dac, 0).add_route(ALL_OUTPUTS, "filter", 0.5); // unknown DAC - voltage_regulator_device &vref(VOLTAGE_REGULATOR(config, "vref")); - vref.add_route(0, "dac", 1.0, DAC_VREF_POS_INPUT); - vref.add_route(0, "dac", -1.0, DAC_VREF_NEG_INPUT); } @@ -93,49 +86,49 @@ p1_sound_device::p1_sound_device(const machine_config &mconfig, const char *tag, { } -READ8_MEMBER(p1_sound_device::d14_r) +uint8_t p1_sound_device::d14_r(offs_t offset) { return m_d14->read(offset >> 1); } -WRITE8_MEMBER(p1_sound_device::d14_w) +void p1_sound_device::d14_w(offs_t offset, uint8_t data) { m_d14->write(offset >> 1, data); } -READ8_MEMBER(p1_sound_device::d16_r) +uint8_t p1_sound_device::d16_r(offs_t offset) { return m_d16->read(offset >> 1); } -WRITE8_MEMBER(p1_sound_device::d16_w) +void p1_sound_device::d16_w(offs_t offset, uint8_t data) { m_d16->write(offset >> 1, data); } -READ8_MEMBER(p1_sound_device::d17_r) +uint8_t p1_sound_device::d17_r(offs_t offset) { return m_d17->read(offset >> 1); } -WRITE8_MEMBER(p1_sound_device::d17_w) +void p1_sound_device::d17_w(offs_t offset, uint8_t data) { m_d17->write(offset >> 1, data); } -READ8_MEMBER(p1_sound_device::adc_r) +uint8_t p1_sound_device::adc_r(offs_t offset) { return 0; } -WRITE8_MEMBER(p1_sound_device::dac_w) +void p1_sound_device::dac_w(offs_t offset, uint8_t data) { // logerror("DAC write: %02x <- %02x\n", offset>>1, data); m_dac_data[offset >> 1] = data; m_isa->irq7_w(CLEAR_LINE); } -WRITE_LINE_MEMBER(p1_sound_device::sampler_sync) +void p1_sound_device::sampler_sync(int state) { if (state) { @@ -161,28 +154,28 @@ void p1_sound_device::device_start() // EFC00 -- ADC output m_isa->install_memory(0xea000, 0xea01f, - read8_delegate(FUNC(p1_sound_device::adc_r), this), // XXX not really - write8_delegate(FUNC(p1_sound_device::dac_w), this)); + read8sm_delegate(*this, FUNC(p1_sound_device::adc_r)), // XXX not really + write8sm_delegate(*this, FUNC(p1_sound_device::dac_w))); m_isa->install_memory(0xee000, 0xee000, - read8smo_delegate(FUNC(i8251_device::data_r), m_midi.target()), - write8smo_delegate(FUNC(i8251_device::data_w), m_midi.target())); + read8smo_delegate(*m_midi, FUNC(i8251_device::data_r)), + write8smo_delegate(*m_midi, FUNC(i8251_device::data_w))); m_isa->install_memory(0xee002, 0xee002, - read8smo_delegate(FUNC(i8251_device::status_r), m_midi.target()), - write8smo_delegate(FUNC(i8251_device::control_w), m_midi.target())); + read8smo_delegate(*m_midi, FUNC(i8251_device::status_r)), + write8smo_delegate(*m_midi, FUNC(i8251_device::control_w))); // sync generator m_isa->install_memory(0xef000, 0xef007, - read8_delegate(FUNC(p1_sound_device::d14_r), this), - write8_delegate(FUNC(p1_sound_device::d14_w), this)); + read8sm_delegate(*this, FUNC(p1_sound_device::d14_r)), + write8sm_delegate(*this, FUNC(p1_sound_device::d14_w))); // 6 music channels m_isa->install_memory(0xef400, 0xef407, - read8_delegate(FUNC(p1_sound_device::d16_r), this), - write8_delegate(FUNC(p1_sound_device::d16_w), this)); + read8sm_delegate(*this, FUNC(p1_sound_device::d16_r)), + write8sm_delegate(*this, FUNC(p1_sound_device::d16_w))); m_isa->install_memory(0xef800, 0xef807, - read8_delegate(FUNC(p1_sound_device::d17_r), this), - write8_delegate(FUNC(p1_sound_device::d17_w), this)); + read8sm_delegate(*this, FUNC(p1_sound_device::d17_r)), + write8sm_delegate(*this, FUNC(p1_sound_device::d17_w))); } |