diff options
author | 2016-10-22 13:13:17 +0200 | |
---|---|---|
committer | 2016-10-22 13:13:17 +0200 | |
commit | ddb290d5f615019c33c42b8d94e5a5254cabcf33 (patch) | |
tree | a70f688b0df3acd19da7b1151e5902e3c6af3fa5 /src/devices/sound/ym2151.h | |
parent | 333bff8de64dfaeb98134000412796b4fdef970b (diff) |
NOTICE (TYPE NAME CONSOLIDATION)
Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8
also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
Diffstat (limited to 'src/devices/sound/ym2151.h')
-rw-r--r-- | src/devices/sound/ym2151.h | 168 |
1 files changed, 84 insertions, 84 deletions
diff --git a/src/devices/sound/ym2151.h b/src/devices/sound/ym2151.h index a3e46774485..960a906d2d0 100644 --- a/src/devices/sound/ym2151.h +++ b/src/devices/sound/ym2151.h @@ -61,7 +61,7 @@ class ym2151_device : public device_t, { public: // construction/destruction - ym2151_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); + ym2151_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // static configuration helpers template<class _Object> static devcb_base &set_irq_handler(device_t &device, _Object object) { return downcast<ym2151_device &>(device).m_irqhandler.set_callback(object); } @@ -111,69 +111,69 @@ private: int tl_tab[TL_TAB_LEN]; unsigned int sin_tab[SIN_LEN]; - UINT32 d1l_tab[16]; + uint32_t d1l_tab[16]; - static const UINT8 eg_inc[19*RATE_STEPS]; - static const UINT8 eg_rate_select[32+64+32]; - static const UINT8 eg_rate_shift[32+64+32]; - static const UINT32 dt2_tab[4]; - static const UINT8 dt1_tab[4*32]; - static const UINT16 phaseinc_rom[768]; - static const UINT8 lfo_noise_waveform[256]; + static const uint8_t eg_inc[19*RATE_STEPS]; + static const uint8_t eg_rate_select[32+64+32]; + static const uint8_t eg_rate_shift[32+64+32]; + static const uint32_t dt2_tab[4]; + static const uint8_t dt1_tab[4*32]; + static const uint16_t phaseinc_rom[768]; + static const uint8_t lfo_noise_waveform[256]; /* struct describing a single operator */ struct YM2151Operator { - UINT32 phase; /* accumulated operator phase */ - UINT32 freq; /* operator frequency count */ - INT32 dt1; /* current DT1 (detune 1 phase inc/decrement) value */ - UINT32 mul; /* frequency count multiply */ - UINT32 dt1_i; /* DT1 index * 32 */ - UINT32 dt2; /* current DT2 (detune 2) value */ + uint32_t phase; /* accumulated operator phase */ + uint32_t freq; /* operator frequency count */ + int32_t dt1; /* current DT1 (detune 1 phase inc/decrement) value */ + uint32_t mul; /* frequency count multiply */ + uint32_t dt1_i; /* DT1 index * 32 */ + uint32_t dt2; /* current DT2 (detune 2) value */ signed int *connect; /* operator output 'direction' */ /* only M1 (operator 0) is filled with this data: */ signed int *mem_connect; /* where to put the delayed sample (MEM) */ - INT32 mem_value; /* delayed sample (MEM) value */ + int32_t mem_value; /* delayed sample (MEM) value */ /* channel specific data; note: each operator number 0 contains channel specific data */ - UINT32 fb_shift; /* feedback shift value for operators 0 in each channel */ - INT32 fb_out_curr; /* operator feedback value (used only by operators 0) */ - INT32 fb_out_prev; /* previous feedback value (used only by operators 0) */ - UINT32 kc; /* channel KC (copied to all operators) */ - UINT32 kc_i; /* just for speedup */ - UINT32 pms; /* channel PMS */ - UINT32 ams; /* channel AMS */ + uint32_t fb_shift; /* feedback shift value for operators 0 in each channel */ + int32_t fb_out_curr; /* operator feedback value (used only by operators 0) */ + int32_t fb_out_prev; /* previous feedback value (used only by operators 0) */ + uint32_t kc; /* channel KC (copied to all operators) */ + uint32_t kc_i; /* just for speedup */ + uint32_t pms; /* channel PMS */ + uint32_t ams; /* channel AMS */ /* end of channel specific data */ - UINT32 AMmask; /* LFO Amplitude Modulation enable mask */ - UINT32 state; /* Envelope state: 4-attack(AR) 3-decay(D1R) 2-sustain(D2R) 1-release(RR) 0-off */ - UINT8 eg_sh_ar; /* (attack state) */ - UINT8 eg_sel_ar; /* (attack state) */ - UINT32 tl; /* Total attenuation Level */ - INT32 volume; /* current envelope attenuation level */ - UINT8 eg_sh_d1r; /* (decay state) */ - UINT8 eg_sel_d1r; /* (decay state) */ - UINT32 d1l; /* envelope switches to sustain state after reaching this level */ - UINT8 eg_sh_d2r; /* (sustain state) */ - UINT8 eg_sel_d2r; /* (sustain state) */ - UINT8 eg_sh_rr; /* (release state) */ - UINT8 eg_sel_rr; /* (release state) */ - - UINT32 key; /* 0=last key was KEY OFF, 1=last key was KEY ON */ - - UINT32 ks; /* key scale */ - UINT32 ar; /* attack rate */ - UINT32 d1r; /* decay rate */ - UINT32 d2r; /* sustain rate */ - UINT32 rr; /* release rate */ - - UINT32 reserved0; /**/ - UINT32 reserved1; /**/ - - void key_on(UINT32 key_set, UINT32 eg_cnt); - void key_off(UINT32 key_set); + uint32_t AMmask; /* LFO Amplitude Modulation enable mask */ + uint32_t state; /* Envelope state: 4-attack(AR) 3-decay(D1R) 2-sustain(D2R) 1-release(RR) 0-off */ + uint8_t eg_sh_ar; /* (attack state) */ + uint8_t eg_sel_ar; /* (attack state) */ + uint32_t tl; /* Total attenuation Level */ + int32_t volume; /* current envelope attenuation level */ + uint8_t eg_sh_d1r; /* (decay state) */ + uint8_t eg_sel_d1r; /* (decay state) */ + uint32_t d1l; /* envelope switches to sustain state after reaching this level */ + uint8_t eg_sh_d2r; /* (sustain state) */ + uint8_t eg_sel_d2r; /* (sustain state) */ + uint8_t eg_sh_rr; /* (release state) */ + uint8_t eg_sel_rr; /* (release state) */ + + uint32_t key; /* 0=last key was KEY OFF, 1=last key was KEY ON */ + + uint32_t ks; /* key scale */ + uint32_t ar; /* attack rate */ + uint32_t d1r; /* decay rate */ + uint32_t d2r; /* sustain rate */ + uint32_t rr; /* release rate */ + + uint32_t reserved0; /**/ + uint32_t reserved1; /**/ + + void key_on(uint32_t key_set, uint32_t eg_cnt); + void key_off(uint32_t key_set); }; signed int chanout[8]; @@ -182,38 +182,38 @@ private: YM2151Operator oper[32]; /* the 32 operators */ - UINT32 pan[16]; /* channels output masks (0xffffffff = enable) */ + uint32_t pan[16]; /* channels output masks (0xffffffff = enable) */ - UINT32 eg_cnt; /* global envelope generator counter */ - UINT32 eg_timer; /* global envelope generator counter works at frequency = chipclock/64/3 */ - UINT32 eg_timer_add; /* step of eg_timer */ - UINT32 eg_timer_overflow; /* envelope generator timer overlfows every 3 samples (on real chip) */ + uint32_t eg_cnt; /* global envelope generator counter */ + uint32_t eg_timer; /* global envelope generator counter works at frequency = chipclock/64/3 */ + uint32_t eg_timer_add; /* step of eg_timer */ + uint32_t eg_timer_overflow; /* envelope generator timer overlfows every 3 samples (on real chip) */ - UINT32 lfo_phase; /* accumulated LFO phase (0 to 255) */ - UINT32 lfo_timer; /* LFO timer */ - UINT32 lfo_timer_add; /* step of lfo_timer */ - UINT32 lfo_overflow; /* LFO generates new output when lfo_timer reaches this value */ - UINT32 lfo_counter; /* LFO phase increment counter */ - UINT32 lfo_counter_add; /* step of lfo_counter */ - UINT8 lfo_wsel; /* LFO waveform (0-saw, 1-square, 2-triangle, 3-random noise) */ - UINT8 amd; /* LFO Amplitude Modulation Depth */ - INT8 pmd; /* LFO Phase Modulation Depth */ - UINT32 lfa; /* LFO current AM output */ - INT32 lfp; /* LFO current PM output */ + uint32_t lfo_phase; /* accumulated LFO phase (0 to 255) */ + uint32_t lfo_timer; /* LFO timer */ + uint32_t lfo_timer_add; /* step of lfo_timer */ + uint32_t lfo_overflow; /* LFO generates new output when lfo_timer reaches this value */ + uint32_t lfo_counter; /* LFO phase increment counter */ + uint32_t lfo_counter_add; /* step of lfo_counter */ + uint8_t lfo_wsel; /* LFO waveform (0-saw, 1-square, 2-triangle, 3-random noise) */ + uint8_t amd; /* LFO Amplitude Modulation Depth */ + int8_t pmd; /* LFO Phase Modulation Depth */ + uint32_t lfa; /* LFO current AM output */ + int32_t lfp; /* LFO current PM output */ - UINT8 test; /* TEST register */ - UINT8 ct; /* output control pins (bit1-CT2, bit0-CT1) */ + uint8_t test; /* TEST register */ + uint8_t ct; /* output control pins (bit1-CT2, bit0-CT1) */ - UINT32 noise; /* noise enable/period register (bit 7 - noise enable, bits 4-0 - noise period */ - UINT32 noise_rng; /* 17 bit noise shift register */ - UINT32 noise_p; /* current noise 'phase'*/ - UINT32 noise_f; /* current noise period */ + uint32_t noise; /* noise enable/period register (bit 7 - noise enable, bits 4-0 - noise period */ + uint32_t noise_rng; /* 17 bit noise shift register */ + uint32_t noise_p; /* current noise 'phase'*/ + uint32_t noise_f; /* current noise period */ - UINT32 csm_req; /* CSM KEY ON / KEY OFF sequence request */ + uint32_t csm_req; /* CSM KEY ON / KEY OFF sequence request */ - UINT32 irq_enable; /* IRQ enable for timer B (bit 3) and timer A (bit 2); bit 7 - CSM mode (keyon to all slots, everytime timer A overflows) */ - UINT32 status; /* chip status (BUSY, IRQ Flags) */ - UINT8 connect[8]; /* channels connections */ + uint32_t irq_enable; /* IRQ enable for timer B (bit 3) and timer A (bit 2); bit 7 - CSM mode (keyon to all slots, everytime timer A overflows) */ + uint32_t status; /* chip status (BUSY, IRQ Flags) */ + uint8_t connect[8]; /* channels connections */ emu_timer *timer_A, *timer_A_irq_off; emu_timer *timer_B, *timer_B_irq_off; @@ -222,10 +222,10 @@ private: attotime timer_B_time[256]; /* timer B times for MAME */ int irqlinestate; - UINT32 timer_A_index; /* timer A index */ - UINT32 timer_B_index; /* timer B index */ - UINT32 timer_A_index_old; /* timer A previous index */ - UINT32 timer_B_index_old; /* timer B previous index */ + uint32_t timer_A_index; /* timer A index */ + uint32_t timer_B_index; /* timer B index */ + uint32_t timer_A_index_old; /* timer A previous index */ + uint32_t timer_B_index_old; /* timer B previous index */ /* Frequency-deltas to get the closest frequency possible. * There are 11 octaves because of DT2 (max 950 cents over base frequency) @@ -243,18 +243,18 @@ private: * 9 note code + DT2 + LFO PM * 10 note code + DT2 + LFO PM */ - UINT32 freq[11*768]; /* 11 octaves, 768 'cents' per octave */ + uint32_t freq[11*768]; /* 11 octaves, 768 'cents' per octave */ /* Frequency deltas for DT1. These deltas alter operator frequency * after it has been taken from frequency-deltas table. */ - INT32 dt1_freq[8*32]; /* 8 DT1 levels, 32 KC values */ + int32_t dt1_freq[8*32]; /* 8 DT1 levels, 32 KC values */ - UINT32 noise_tab[32]; /* 17bit Noise Generator periods */ + uint32_t noise_tab[32]; /* 17bit Noise Generator periods */ // internal state sound_stream * m_stream; - UINT8 m_lastreg; + uint8_t m_lastreg; devcb_write_line m_irqhandler; devcb_write8 m_portwritehandler; |