diff --git a/src/emu/bus/a2bus/a2dx1.c b/src/emu/bus/a2bus/a2dx1.c index 68f1ef87158..cb4b191e8c0 100644 --- a/src/emu/bus/a2bus/a2dx1.c +++ b/src/emu/bus/a2bus/a2dx1.c @@ -70,10 +70,14 @@ void a2bus_dx1_device::device_start() { // set_a2bus_device makes m_slot valid set_a2bus_device(); + + save_item(NAME(m_volume)); + save_item(NAME(m_lastdac)); } void a2bus_dx1_device::device_reset() { + m_volume = m_lastdac = 0; } UINT8 a2bus_dx1_device::read_c0nx(address_space &space, UINT8 offset) @@ -98,10 +102,13 @@ void a2bus_dx1_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data switch (offset) { case 5: // volume + m_volume = data; + m_dac->write_unsigned16(data*m_lastdac); break; case 6: - m_dac->write_unsigned8(data); + m_lastdac = data; + m_dac->write_unsigned16(data*m_volume); break; } } diff --git a/src/emu/bus/a2bus/a2dx1.h b/src/emu/bus/a2bus/a2dx1.h index 970a1b56810..99b9d98193a 100644 --- a/src/emu/bus/a2bus/a2dx1.h +++ b/src/emu/bus/a2bus/a2dx1.h @@ -41,6 +41,9 @@ protected: virtual UINT8 read_c0nx(address_space &space, UINT8 offset); virtual void write_c0nx(address_space &space, UINT8 offset, UINT8 data); virtual bool take_c800(); + +private: + UINT8 m_volume, m_lastdac; }; // device type definition