diff options
Diffstat (limited to 'src/emu/sound/ics2115.h')
-rw-r--r-- | src/emu/sound/ics2115.h | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/src/emu/sound/ics2115.h b/src/emu/sound/ics2115.h index a1c177708cb..e53947cbfb2 100644 --- a/src/emu/sound/ics2115.h +++ b/src/emu/sound/ics2115.h @@ -42,49 +42,49 @@ struct ics2115_voice { } vol; union { - struct { - UINT8 ulaw : 1; - UINT8 stop : 1; //stops wave + vol envelope - UINT8 eightbit : 1; - UINT8 loop : 1; - UINT8 loop_bidir : 1; - UINT8 irq : 1; - UINT8 invert : 1; - UINT8 irq_pending: 1; - //IRQ on variable? - }; - UINT8 value; - } osc_conf; - - union { - struct { - UINT8 done : 1; //indicates ramp has stopped - UINT8 stop : 1; //stops the ramp - UINT8 rollover : 1; //rollover (TODO) - UINT8 loop : 1; - UINT8 loop_bidir : 1; - UINT8 irq : 1; //enable IRQ generation - UINT8 invert : 1; //invert direction - UINT8 irq_pending: 1; //(read only) IRQ pending - //noenvelope == (done | disable) - }; - UINT8 value; - } vol_ctrl; - - //Possibly redundant state. => improvements of wavetable logic - //may lead to its elimination. - union { - struct { - UINT8 on : 1; - UINT8 ramp : 7; // 100 0000 = 0x40 maximum - }; - UINT8 value; - } state; - - bool playing(); - int update_volume_envelope(); - int update_oscillator(); - void update_ramp(); + struct { + UINT8 ulaw : 1; + UINT8 stop : 1; //stops wave + vol envelope + UINT8 eightbit : 1; + UINT8 loop : 1; + UINT8 loop_bidir : 1; + UINT8 irq : 1; + UINT8 invert : 1; + UINT8 irq_pending: 1; + //IRQ on variable? + }; + UINT8 value; + } osc_conf; + + union { + struct { + UINT8 done : 1; //indicates ramp has stopped + UINT8 stop : 1; //stops the ramp + UINT8 rollover : 1; //rollover (TODO) + UINT8 loop : 1; + UINT8 loop_bidir : 1; + UINT8 irq : 1; //enable IRQ generation + UINT8 invert : 1; //invert direction + UINT8 irq_pending: 1; //(read only) IRQ pending + //noenvelope == (done | disable) + }; + UINT8 value; + } vol_ctrl; + + //Possibly redundant state. => improvements of wavetable logic + //may lead to its elimination. + union { + struct { + UINT8 on : 1; + UINT8 ramp : 7; // 100 0000 = 0x40 maximum + }; + UINT8 value; + } state; + + bool playing(); + int update_volume_envelope(); + int update_oscillator(); + void update_ramp(); }; // ======================> ics2115_device @@ -99,10 +99,10 @@ public: static void static_set_irqf(device_t &device, void (*irqf)(device_t *device, int state)); static DECLARE_READ8_DEVICE_HANDLER(read); - static DECLARE_WRITE8_DEVICE_HANDLER(write); + static DECLARE_WRITE8_DEVICE_HANDLER(write); //UINT8 read(offs_t offset); //void write(offs_t offset, UINT8 data); - static TIMER_CALLBACK(timer_cb_0); + static TIMER_CALLBACK(timer_cb_0); static TIMER_CALLBACK(timer_cb_1); sound_stream *m_stream; @@ -124,13 +124,13 @@ protected: UINT8 *m_rom; INT16 m_ulaw[256]; UINT16 m_volume[4096]; - static const int volume_bits = 15; + static const int volume_bits = 15; ics2115_voice m_voice[32]; struct { UINT8 scale, preset; emu_timer *timer; - UINT64 period; /* in nsec */ + UINT64 period; /* in nsec */ } m_timer[2]; UINT8 m_active_osc; @@ -139,15 +139,15 @@ protected: UINT8 m_irq_enabled, m_irq_pending; bool m_irq_on; - //Unknown variable, seems to be effected by 0x12. Further investigation - //Required. - UINT8 m_vmode; + //Unknown variable, seems to be effected by 0x12. Further investigation + //Required. + UINT8 m_vmode; //internal register helper functions UINT16 reg_read(); void reg_write(UINT8 data, bool msb); void recalc_timer(int timer); - void keyon(); + void keyon(); void recalc_irq(); //stream helper functions |