summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/upd934g.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/upd934g.h')
-rw-r--r--src/devices/sound/upd934g.h28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/devices/sound/upd934g.h b/src/devices/sound/upd934g.h
index d2ecf716d98..40f081aa9c1 100644
--- a/src/devices/sound/upd934g.h
+++ b/src/devices/sound/upd934g.h
@@ -13,12 +13,13 @@
#pragma once
+#include "dirom.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
-class upd934g_device : public device_t, public device_sound_interface
+class upd934g_device : public device_t, public device_sound_interface, public device_rom_interface<16>
{
public:
static constexpr feature_type imperfect_features() { return feature::SOUND; }
@@ -26,34 +27,31 @@ public:
// construction/destruction
upd934g_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- // configuration
- auto data_callback() { return m_data_cb.bind(); }
-
- DECLARE_WRITE8_MEMBER(write);
+ void write(offs_t offset, u8 data);
protected:
// device-level overrides
- virtual void device_start() override;
- virtual void device_reset() override;
+ virtual void device_start() override ATTR_COLD;
+ virtual void device_reset() override ATTR_COLD;
- virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
+ virtual void sound_stream_update(sound_stream &stream) override;
private:
- devcb_read8 m_data_cb;
sound_stream *m_stream;
- uint16_t m_addr[16];
+ u16 m_addr[16];
+ u8 m_valid[16];
struct
{
- uint16_t pos;
- int playing;
- int volume;
+ u16 pos;
+ s8 playing;
+ u8 effect;
}
m_channel[4];
- int m_sample;
- bool m_ready;
+ u8 m_sample;
+ u8 m_ready;
};
// device type definition