summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/qsound.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/qsound.h')
-rw-r--r--src/devices/sound/qsound.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/devices/sound/qsound.h b/src/devices/sound/qsound.h
index 836f9a64eb5..b39260ad76a 100644
--- a/src/devices/sound/qsound.h
+++ b/src/devices/sound/qsound.h
@@ -28,7 +28,9 @@
// ======================> qsound_device
-class qsound_device : public device_t, public device_sound_interface
+class qsound_device : public device_t,
+ public device_sound_interface,
+ public device_rom_interface
{
public:
qsound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
@@ -44,6 +46,9 @@ protected:
// sound stream update overrides
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
+
+ // device_rom_interface overrides
+ virtual void rom_bank_updated() override;
private:
struct qsound_channel
@@ -63,13 +68,12 @@ private:
} m_channel[16];
required_device<dsp16_device> m_cpu;
- required_region_ptr<int8_t> m_sample_rom;
int m_pan_table[33]; // pan volume table
uint16_t m_data; // register latch data
sound_stream *m_stream; // audio stream
- inline int8_t read_sample(uint32_t offset) { return m_sample_rom[offset & m_sample_rom.mask()]; }
+ inline int8_t read_sample(uint32_t offset) { return (int8_t)read_byte(offset); }
void write_data(uint8_t address, uint16_t data);
};