summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/c6280.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/c6280.h')
-rw-r--r--src/devices/sound/c6280.h41
1 files changed, 22 insertions, 19 deletions
diff --git a/src/devices/sound/c6280.h b/src/devices/sound/c6280.h
index 0cfdc34799b..07c17447d62 100644
--- a/src/devices/sound/c6280.h
+++ b/src/devices/sound/c6280.h
@@ -10,41 +10,44 @@ class c6280_device : public device_t, public device_sound_interface
public:
static constexpr feature_type imperfect_features() { return feature::SOUND; } // Incorrect / Not verified noise / LFO output
- c6280_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
+ c6280_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
// write only
- DECLARE_WRITE8_MEMBER( c6280_w );
+ void c6280_w(offs_t offset, uint8_t data);
protected:
// device-level overrides
- virtual void device_start() override;
+ virtual void device_start() override ATTR_COLD;
+ virtual void device_reset() override ATTR_COLD;
virtual void device_clock_changed() override;
// sound stream update overrides
- 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:
struct channel {
- uint16_t m_frequency;
- uint8_t m_control;
- uint8_t m_balance;
- uint8_t m_waveform[32];
- uint8_t m_index;
- int16_t m_dda;
- uint8_t m_noise_control;
- int32_t m_noise_counter;
- uint32_t m_counter;
- int32_t m_tick;
+ u16 frequency;
+ u8 control;
+ u8 balance;
+ u8 waveform[32];
+ u8 index;
+ s16 dda;
+ u8 noise_control;
+ s32 noise_counter;
+ u32 noise_frequency;
+ u32 noise_seed;
+ s32 tick;
};
// internal state
sound_stream *m_stream;
- uint8_t m_select;
- uint8_t m_balance;
- uint8_t m_lfo_frequency;
- uint8_t m_lfo_control;
+ u8 m_select;
+ u8 m_enabled;
+ u8 m_balance;
+ u8 m_lfo_frequency;
+ u8 m_lfo_control;
channel m_channel[8];
- int16_t m_volume_table[32];
+ s16 m_volume_table[32];
};
DECLARE_DEVICE_TYPE(C6280, c6280_device)