summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/2610intf.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/2610intf.h')
-rw-r--r--src/devices/sound/2610intf.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/devices/sound/2610intf.h b/src/devices/sound/2610intf.h
index 583091a666b..b82cbf73b22 100644
--- a/src/devices/sound/2610intf.h
+++ b/src/devices/sound/2610intf.h
@@ -14,7 +14,8 @@ struct ssg_callbacks;
#define MCFG_YM2610_IRQ_HANDLER(cb) \
downcast<ym2610_device &>(*device).set_irq_handler((DEVCB_##cb));
-class ym2610_device : public ay8910_device
+class ym2610_device : public ay8910_device,
+ public device_memory_interface
{
public:
ym2610_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
@@ -23,15 +24,14 @@ public:
template <class Object> devcb_base &set_irq_handler(Object &&cb) { return m_irq_handler.set_callback(std::forward<Object>(cb)); }
auto irq_handler() { return m_irq_handler.bind(); }
+ virtual space_config_vector memory_space_config() const override;
+
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
// update request from fm.cpp
static void update_request(device_t *param) { downcast<ym2610_device *>(param)->update_request(); }
- static char const *const YM2610_TAG;
- static char const *const YM2610_DELTAT_TAG;
-
protected:
ym2610_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
@@ -53,14 +53,20 @@ private:
void timer_handler(int c, int count, int clock);
void update_request() { m_stream->update(); }
+ static uint8_t static_adpcm_a_read_byte(device_t *param, offs_t offset) { return downcast<ym2610_device *>(param)->space(0).read_byte(offset); }
+ static uint8_t static_adpcm_b_read_byte(device_t *param, offs_t offset) { return downcast<ym2610_device *>(param)->space(1).read_byte(offset); }
+
static void static_irq_handler(device_t *param, int irq) { downcast<ym2610_device *>(param)->irq_handler(irq); }
static void static_timer_handler(device_t *param, int c, int count, int clock) { downcast<ym2610_device *>(param)->timer_handler(c, count, clock); }
// internal state
+ const address_space_config m_adpcm_a_config;
+ const address_space_config m_adpcm_b_config;
sound_stream * m_stream;
emu_timer * m_timer[2];
devcb_write_line m_irq_handler;
- required_memory_region m_region;
+ optional_memory_region m_adpcm_a_region;
+ optional_memory_region m_adpcm_b_region;
static const ssg_callbacks psgintf;
};