| 1 | #cxx . . $ `<file>/mednafen/pce_fast/psg.h`/ifndef _PCEFast_PSG_H |
| 2 | #define _PCEFast_PSG_Hcxx . . $ `mednafen/pce_fast/psg.h:2:9`! |
| 3 | |
| 4 | #include "../include/blip/Blip_Buffer.h"cxx . . $ `<file>/mednafen/include/blip/Blip_Buffer.h`/ |
| 5 | |
| 6 | class PCEFast_PSGcxx . . $ PCEFast_PSG#; |
| 7 | |
| 8 | struct psg_channelcxx . . $ psg_channel# |
| 9 | { |
| 10 | uint8cxx . . $ uint8# waveformcxx . . $ psg_channel#waveform.[32]; /* Waveform data */ |
| 11 | uint8cxx . . $ uint8# waveform_indexcxx . . $ psg_channel#waveform_index.; /* Waveform data index */ |
| 12 | uint8cxx . . $ uint8# ddacxx . . $ psg_channel#dda.; |
| 13 | uint8cxx . . $ uint8# controlcxx . . $ psg_channel#control.; /* Channel enable, DDA, volume */ |
| 14 | uint8cxx . . $ uint8# noisectrlcxx . . $ psg_channel#noisectrl.; /* Noise enable/ctrl (channels 4,5 only) */ |
| 15 | |
| 16 | int32cxx . . $ int32# vlcxx . . $ psg_channel#vl.[2]; //vll, vlr; |
| 17 | |
| 18 | int32cxx . . $ int32# countercxx . . $ psg_channel#counter.; |
| 19 | |
| 20 | void (PCEFast_PSGcxx . . $ PCEFast_PSG#::*UpdateOutputcxx . . $ psg_channel#UpdateOutput.)(const int32cxx . . $ int32# timestamp, psg_channelcxx . . $ psg_channel# *ch); |
| 21 | |
| 22 | uint32cxx . . $ uint32# freq_cachecxx . . $ psg_channel#freq_cache.; |
| 23 | uint32cxx . . $ uint32# noise_freq_cachecxx . . $ psg_channel#noise_freq_cache.; // Channel 4,5 only |
| 24 | int32cxx . . $ int32# noisecountcxx . . $ psg_channel#noisecount.; |
| 25 | uint32cxx . . $ uint32# lfsrcxx . . $ psg_channel#lfsr.; |
| 26 | |
| 27 | int32cxx . . $ int32# samp_accumcxx . . $ psg_channel#samp_accum.; // The result of adding up all the samples in the waveform buffer(part of an optimization for high-frequency playback). |
| 28 | int32cxx . . $ int32# blip_prev_sampcxx . . $ psg_channel#blip_prev_samp.[2]; |
| 29 | int32cxx . . $ int32# lasttscxx . . $ psg_channel#lastts.; |
| 30 | |
| 31 | uint16cxx . . $ uint16# frequencycxx . . $ psg_channel#frequency.; /* Channel frequency */ |
| 32 | uint8cxx . . $ uint8# balancecxx . . $ psg_channel#balance.; /* Channel balance */ |
| 33 | }; |
| 34 | |
| 35 | class PCEFast_PSGcxx . . $ PCEFast_PSG# |
| 36 | { |
| 37 | public: |
| 38 | |
| 39 | PCEFast_PSGcxx . . $ PCEFast_PSG#PCEFast_PSG(ad7d7afb16d524bd).(Blip_Buffercxx . . $ Blip_Buffer# *bb_l, Blip_Buffercxx . . $ Blip_Buffer# *bb_r) MDFN_COLDcxx . . $ `mednafen/mednafen-types.h:116:9`!; |
| 40 | ~cxx . . $ PCEFast_PSG#`~PCEFast_PSG`(ced63f7c635d850d).PCEFast_PSGcxx . . $ PCEFast_PSG#() MDFN_COLDcxx . . $ `mednafen/mednafen-types.h:116:9`!; |
| 41 | |
| 42 | int StateActioncxx . . $ PCEFast_PSG#StateAction(a45b884b8cf568d5).(StateMemcxx . . $ StateMem# *sm, int load, int data_only) MDFN_COLDcxx . . $ `mednafen/mednafen-types.h:116:9`!; |
| 43 | |
| 44 | void Powercxx . . $ PCEFast_PSG#Power(d4f767463ce0a6b3).(const int32cxx . . $ int32# timestamp) MDFN_COLDcxx . . $ `mednafen/mednafen-types.h:116:9`!; |
| 45 | void Writecxx . . $ PCEFast_PSG#Write(109a18db49cfadc0).(int32cxx . . $ int32# timestamp, uint8cxx . . $ uint8# A, uint8cxx . . $ uint8# V); |
| 46 | |
| 47 | void SetVolumecxx . . $ PCEFast_PSG#SetVolume(ba8836b59fb42830).(double new_volume) MDFN_COLDcxx . . $ `mednafen/mednafen-types.h:116:9`!; |
| 48 | |
| 49 | void EndFramecxx . . $ PCEFast_PSG#EndFrame(d4f767463ce0a6b3).(int32cxx . . $ int32# timestamp); |
| 50 | |
| 51 | private: |
| 52 | |
| 53 | void Updatecxx . . $ PCEFast_PSG#Update(d4f767463ce0a6b3).(int32cxx . . $ int32# timestamp); |
| 54 | |
| 55 | void UpdateSubLFOcxx . . $ PCEFast_PSG#UpdateSubLFO(d4f767463ce0a6b3).(int32cxx . . $ int32# timestamp); |
| 56 | void UpdateSubNonLFOcxx . . $ PCEFast_PSG#UpdateSubNonLFO(d4f767463ce0a6b3).(int32cxx . . $ int32# timestamp); |
| 57 | |
| 58 | void RecalcUOFunccxx . . $ PCEFast_PSG#RecalcUOFunc(d4f767463ce0a6b3).(int chnum); |
| 59 | void UpdateOutput_Offcxx . . $ PCEFast_PSG#UpdateOutput_Off(e385037a997bc971).(const int32cxx . . $ int32# timestamp, psg_channelcxx . . $ psg_channel# *ch); |
| 60 | void UpdateOutput_Accumcxx . . $ PCEFast_PSG#UpdateOutput_Accum(e385037a997bc971).(const int32cxx . . $ int32# timestamp, psg_channelcxx . . $ psg_channel# *ch); |
| 61 | void UpdateOutput_Normcxx . . $ PCEFast_PSG#UpdateOutput_Norm(e385037a997bc971).(const int32cxx . . $ int32# timestamp, psg_channelcxx . . $ psg_channel# *ch); |
| 62 | void UpdateOutput_Noisecxx . . $ PCEFast_PSG#UpdateOutput_Noise(e385037a997bc971).(const int32cxx . . $ int32# timestamp, psg_channelcxx . . $ psg_channel# *ch); |
| 63 | |
| 64 | int32cxx . . $ int32# GetVLcxx . . $ PCEFast_PSG#GetVL(9b79fb6aee4c0440).(const int chnum, const int lr); |
| 65 | |
| 66 | void RecalcFreqCachecxx . . $ PCEFast_PSG#RecalcFreqCache(d4f767463ce0a6b3).(int chnum); |
| 67 | void RecalcNoiseFreqCachecxx . . $ PCEFast_PSG#RecalcNoiseFreqCache(d4f767463ce0a6b3).(int chnum); |
| 68 | template<bool LFO_On> |
| 69 | void RunChannelcxx . . $ PCEFast_PSG#RunChannel(3e454b8ccf442868).(int chc, int32cxx . . $ int32# timestamp); |
| 70 | double OutputVolumecxx . . $ PCEFast_PSG#OutputVolume.; |
| 71 | |
| 72 | uint8cxx . . $ uint8# selectcxx . . $ PCEFast_PSG#select.; /* Selected channel (0-5) */ |
| 73 | uint8cxx . . $ uint8# globalbalancecxx . . $ PCEFast_PSG#globalbalance.; /* Global sound balance */ |
| 74 | uint8cxx . . $ uint8# lfofreqcxx . . $ PCEFast_PSG#lfofreq.; /* LFO frequency */ |
| 75 | uint8cxx . . $ uint8# lfoctrlcxx . . $ PCEFast_PSG#lfoctrl.; /* LFO control */ |
| 76 | |
| 77 | int32cxx . . $ int32# vol_update_countercxx . . $ PCEFast_PSG#vol_update_counter.; |
| 78 | int32cxx . . $ int32# vol_update_whichcxx . . $ PCEFast_PSG#vol_update_which.; |
| 79 | int32cxx . . $ int32# vol_update_vllatchcxx . . $ PCEFast_PSG#vol_update_vllatch.; |
| 80 | bool vol_pendingcxx . . $ PCEFast_PSG#vol_pending.; |
| 81 | |
| 82 | psg_channelcxx . . $ psg_channel# channelcxx . . $ PCEFast_PSG#channel.[6]; |
| 83 | |
| 84 | int32cxx . . $ int32# lasttscxx . . $ PCEFast_PSG#lastts.; |
| 85 | |
| 86 | Blip_Buffercxx . . $ Blip_Buffer# *sbufcxx . . $ PCEFast_PSG#sbuf.[2]; |
| 87 | Blip_Synthcxx . . $ Blip_Synth#<blip_good_qualitycxx . . $ blip_good_quality., 8192> Synthcxx . . $ PCEFast_PSG#Synth.; |
| 88 | |
| 89 | int32cxx . . $ int32# dbtable_volonlycxx . . $ PCEFast_PSG#dbtable_volonly.[32]; |
| 90 | |
| 91 | int32cxx . . $ int32# dbtablecxx . . $ PCEFast_PSG#dbtable.[32][32]; |
| 92 | }; |
| 93 | |
| 94 | #endif |