diff options
author | 2019-08-06 17:00:59 -0400 | |
---|---|---|
committer | 2019-08-06 17:02:37 -0400 | |
commit | e7e165b44aa57dd43ad7d5aa945a931699033f6e (patch) | |
tree | e37cfba4cc9dc68c776e2fddd83e7b239c115832 /src/devices/sound/okim6376.h | |
parent | c750b8efd5b340f81ff30375ce566dc47569df12 (diff) |
trocana: Add preliminary MSM6650 device and some test inputs
okim6376: Use device_rom_interface; convert logging calls to logmacro.h (nw)
Diffstat (limited to 'src/devices/sound/okim6376.h')
-rw-r--r-- | src/devices/sound/okim6376.h | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/src/devices/sound/okim6376.h b/src/devices/sound/okim6376.h index 91cb3acf7e6..361a9d2ccb0 100644 --- a/src/devices/sound/okim6376.h +++ b/src/devices/sound/okim6376.h @@ -7,8 +7,7 @@ /* an interface for the OKIM6376 and similar chips (CPU interface only) */ -class okim6376_device : public device_t, - public device_sound_interface +class okim6376_device : public device_t, public device_sound_interface, public device_rom_interface { public: okim6376_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); @@ -22,6 +21,8 @@ public: DECLARE_READ_LINE_MEMBER( nar_r ); protected: + okim6376_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int addrbits); + // device-level overrides virtual void device_start() override; virtual void device_reset() override; @@ -31,7 +32,11 @@ protected: // sound stream update overrides virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override; -private: + // device_rom_interface overrides + virtual void rom_bank_updated() override; + + virtual offs_t get_start_position(int channel); + /* struct describing a single playing ADPCM voice */ struct ADPCMVoice { @@ -50,8 +55,6 @@ private: }; // internal state - required_region_ptr<uint8_t> m_region_base; /* pointer to the base of the region */ - static constexpr unsigned OKIM6376_VOICES = 2; struct ADPCMVoice m_voice[OKIM6376_VOICES]; int32_t m_command[OKIM6376_VOICES]; @@ -75,6 +78,21 @@ private: void adpcm_state_save_register(struct ADPCMVoice *voice, int index); }; +class okim6650_device : public okim6376_device +{ +public: + okim6650_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + + DECLARE_WRITE_LINE_MEMBER( cmd_w ); + +protected: + // device-level overrides + virtual void device_clock_changed() override; + + virtual offs_t get_start_position(int channel) override; +}; + DECLARE_DEVICE_TYPE(OKIM6376, okim6376_device) +DECLARE_DEVICE_TYPE(OKIM6650, okim6650_device) #endif // MAME_SOUND_OKIM6376_H |