trunk/src/emu/bus/a2bus/a2dx1.c
| r31150 | r31151 | |
| 70 | 70 | { |
| 71 | 71 | // set_a2bus_device makes m_slot valid |
| 72 | 72 | set_a2bus_device(); |
| 73 | |
| 74 | save_item(NAME(m_volume)); |
| 75 | save_item(NAME(m_lastdac)); |
| 73 | 76 | } |
| 74 | 77 | |
| 75 | 78 | void a2bus_dx1_device::device_reset() |
| 76 | 79 | { |
| 80 | m_volume = m_lastdac = 0; |
| 77 | 81 | } |
| 78 | 82 | |
| 79 | 83 | UINT8 a2bus_dx1_device::read_c0nx(address_space &space, UINT8 offset) |
| r31150 | r31151 | |
| 98 | 102 | switch (offset) |
| 99 | 103 | { |
| 100 | 104 | case 5: // volume |
| 105 | m_volume = data; |
| 106 | m_dac->write_unsigned16(data*m_lastdac); |
| 101 | 107 | break; |
| 102 | 108 | |
| 103 | 109 | case 6: |
| 104 | | m_dac->write_unsigned8(data); |
| 110 | m_lastdac = data; |
| 111 | m_dac->write_unsigned16(data*m_volume); |
| 105 | 112 | break; |
| 106 | 113 | } |
| 107 | 114 | } |