summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/sn76496.h
diff options
context:
space:
mode:
author Michael Zapf <Michael.Zapf@mizapf.de>2019-12-10 23:47:13 +0100
committer Michael Zapf <Michael.Zapf@mizapf.de>2019-12-10 23:49:05 +0100
commited2f586df867ea2e999107c018c681d23fb2d3a4 (patch)
treef0f4607d0d0d3b32ef0e9a795912176f944d26bb /src/devices/sound/sn76496.h
parentf7762a550209208a7aaecc5090ccaf5360d8a835 (diff)
Using an emu_timer to control the READY line.
Diffstat (limited to 'src/devices/sound/sn76496.h')
-rw-r--r--src/devices/sound/sn76496.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/devices/sound/sn76496.h b/src/devices/sound/sn76496.h
index cd7b4a6c509..07fb3a47932 100644
--- a/src/devices/sound/sn76496.h
+++ b/src/devices/sound/sn76496.h
@@ -23,7 +23,6 @@ class sn76496_base_device : public device_t, public device_sound_interface
{
public:
auto ready_cb() { return m_ready_handler.bind(); }
-
void stereo_w(u8 data);
void write(u8 data);
DECLARE_READ_LINE_MEMBER( ready_r ) { return m_ready_state ? 1 : 0; }
@@ -51,10 +50,9 @@ protected:
private:
inline bool in_noise_mode();
void register_for_save_states();
- void countdown_cycles();
+ void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
bool m_ready_state;
-
devcb_write_line m_ready_handler;
sound_stream* m_sound;
@@ -78,7 +76,8 @@ private:
int32_t m_period[4]; // Length of 1/2 of waveform
int32_t m_count[4]; // Position within the waveform
int32_t m_output[4]; // 1-bit output of each channel, pre-volume
- int32_t m_cycles_to_ready; // number of cycles until the READY line goes active
+
+ emu_timer *m_ready_timer;
};
// SN76496: Whitenoise verified, phase verified, periodic verified (by Michael Zapf)