diff --git a/extern/Nuked-OPN2 b/extern/Nuked-OPN2 new file mode 160000 index 000000000..b0e9de0f8 --- /dev/null +++ b/extern/Nuked-OPN2 @@ -0,0 +1 @@ +Subproject commit b0e9de0f816943ad3820ddfefa0fff276d659250 diff --git a/extern/vgsound_emu-modified/vgsound_emu/src/es550x/es5504.hpp b/extern/vgsound_emu-modified/vgsound_emu/src/es550x/es5504.hpp index d37ef36da..54baa528d 100644 --- a/extern/vgsound_emu-modified/vgsound_emu/src/es550x/es5504.hpp +++ b/extern/vgsound_emu-modified/vgsound_emu/src/es550x/es5504.hpp @@ -60,7 +60,7 @@ class es5504_core : public es550x_shared_core *this, *this, *this, *this, *this, *this, *this, *this, *this, *this, *this, *this, *this, *this, *this, *this} , m_adc(0) - , m_out{0} + , m_out{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} { } @@ -111,7 +111,7 @@ class es5504_core : public es550x_shared_core private: std::array m_voice; // 25 voices u16 m_adc = 0; // ADC register - std::array m_out = {0}; // 16 channel outputs + std::array m_out = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; // 16 channel outputs }; #endif diff --git a/extern/vgsound_emu-modified/vgsound_emu/src/es550x/es5505.hpp b/extern/vgsound_emu-modified/vgsound_emu/src/es550x/es5505.hpp index cfd6f88c4..b537258f1 100644 --- a/extern/vgsound_emu-modified/vgsound_emu/src/es550x/es5505.hpp +++ b/extern/vgsound_emu-modified/vgsound_emu/src/es550x/es5505.hpp @@ -106,7 +106,7 @@ class es5505_core : public es550x_shared_core , m_rvol(0) , m_ch(output_t()) , m_mute(false) - , m_output{0} + , m_output{0, 0} { } @@ -143,7 +143,7 @@ class es5505_core : public es550x_shared_core u8 m_rvol = 0; // Right volume output_t m_ch; // channel output bool m_mute = false; // mute flag (for debug purpose) - std::array m_output; // output preview (for debug purpose) + std::array m_output = {0, 0}; // output preview (for debug purpose) }; class sermode_t : public vgsound_emu_core diff --git a/extern/vgsound_emu-modified/vgsound_emu/src/es550x/es5506.hpp b/extern/vgsound_emu-modified/vgsound_emu/src/es550x/es5506.hpp index f5b54d4f1..074519c8c 100644 --- a/extern/vgsound_emu-modified/vgsound_emu/src/es550x/es5506.hpp +++ b/extern/vgsound_emu-modified/vgsound_emu/src/es550x/es5506.hpp @@ -147,7 +147,7 @@ class es5506_core : public es550x_shared_core , m_filtcount(0) , m_ch(output_t()) , m_mute(false) - , m_output{0} + , m_output{0, 0} { } @@ -211,7 +211,7 @@ class es5506_core : public es550x_shared_core u8 m_filtcount = 0; // Internal counter for slow mode output_t m_ch; // channel output bool m_mute = false; // mute flag (for debug purpose) - std::array m_output; // output preview (for debug purpose) + std::array m_output = {0, 0}; // output preview (for debug purpose) }; // 5 bit mode diff --git a/extern/vgsound_emu-modified/vgsound_emu/src/es550x/es550x.hpp b/extern/vgsound_emu-modified/vgsound_emu/src/es550x/es550x.hpp index 7660bd192..3df59a120 100644 --- a/extern/vgsound_emu-modified/vgsound_emu/src/es550x/es550x.hpp +++ b/extern/vgsound_emu-modified/vgsound_emu/src/es550x/es550x.hpp @@ -367,7 +367,7 @@ class es550x_shared_core : public vgsound_emu_core // 21 integer, 11 fraction for ES5506 u32 m_accum = 0; // Samples - std::array m_sample = {0}; + std::array m_sample = {0, 0}; }; // Filter diff --git a/extern/vgsound_emu-modified/vgsound_emu/src/k007232/k007232.hpp b/extern/vgsound_emu-modified/vgsound_emu/src/k007232/k007232.hpp index ef3af56dd..ae39d269f 100644 --- a/extern/vgsound_emu-modified/vgsound_emu/src/k007232/k007232.hpp +++ b/extern/vgsound_emu-modified/vgsound_emu/src/k007232/k007232.hpp @@ -87,7 +87,7 @@ class k007232_core : public vgsound_emu_core : vgsound_emu_core("k007232") , m_voice{*this, *this} , m_intf(intf) - , m_reg{0} + , m_reg{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} { } @@ -111,7 +111,7 @@ class k007232_core : public vgsound_emu_core k007232_intf &m_intf; // common memory interface - std::array m_reg = {0}; // register pool + std::array m_reg = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; // register pool }; #endif diff --git a/extern/vgsound_emu-modified/vgsound_emu/src/k053260/k053260.hpp b/extern/vgsound_emu-modified/vgsound_emu/src/k053260/k053260.hpp index a616708ba..10fd50165 100644 --- a/extern/vgsound_emu-modified/vgsound_emu/src/k053260/k053260.hpp +++ b/extern/vgsound_emu-modified/vgsound_emu/src/k053260/k053260.hpp @@ -57,7 +57,7 @@ class k053260_core : public vgsound_emu_core , m_bitpos(4) , m_data(0) , m_adpcm_buf(0) - , m_out{0} + , m_out{0, 0} { } @@ -112,7 +112,7 @@ class k053260_core : public vgsound_emu_core u8 m_bitpos = 4; // bit position for ADPCM decoding u8 m_data = 0; // current data s8 m_adpcm_buf = 0; // ADPCM buffer - std::array m_out = {0}; // current output + std::array m_out = {0, 0}; // current output }; class ctrl_t @@ -156,8 +156,8 @@ class k053260_core : public vgsound_emu_core { public: ym3012_t() - : m_in{0} - , m_out{0} + : m_in{0, 0} + , m_out{0, 0} { } @@ -174,8 +174,8 @@ class k053260_core : public vgsound_emu_core } private: - std::array m_in = {0}; - std::array m_out = {0}; + std::array m_in = {0, 0}; + std::array m_out = {0, 0}; }; class dac_t @@ -212,13 +212,16 @@ class k053260_core : public vgsound_emu_core : vgsound_emu_core("k053260") , m_voice{*this, *this, *this, *this} , m_intf(intf) - , m_host2snd{0} - , m_snd2host{0} + , m_host2snd{0, 0} + , m_snd2host{0, 0} , m_ctrl(ctrl_t()) , m_ym3012(ym3012_t()) , m_dac(dac_t()) - , m_reg{0} - , m_out{0} + , m_reg{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} + , m_out{0, 0} { } @@ -249,16 +252,19 @@ class k053260_core : public vgsound_emu_core std::array m_voice; k053260_intf &m_intf; // common memory interface - std::array m_host2snd = {0}; - std::array m_snd2host = {0}; + std::array m_host2snd = {0, 0}; + std::array m_snd2host = {0, 0}; ctrl_t m_ctrl; // chip control ym3012_t m_ym3012; // YM3012 output dac_t m_dac; // YM3012 interface - std::array m_reg = {0}; // register pool - std::array m_out = {0}; // stereo output + std::array m_reg = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; // register pool + std::array m_out = {0, 0}; // stereo output }; #endif diff --git a/extern/vgsound_emu-modified/vgsound_emu/src/n163/n163.hpp b/extern/vgsound_emu-modified/vgsound_emu/src/n163/n163.hpp index bbf2720ac..258bac43b 100644 --- a/extern/vgsound_emu-modified/vgsound_emu/src/n163/n163.hpp +++ b/extern/vgsound_emu-modified/vgsound_emu/src/n163/n163.hpp @@ -58,14 +58,14 @@ class n163_core : public vgsound_emu_core n163_core() : vgsound_emu_core("namco_163") , m_disable(false) - , m_ram{0} , m_voice_cycle(0x78) , m_addr_latch(addr_latch_t()) , m_out(0) - , m_voice_out{0} + , m_voice_out{0, 0, 0, 0, 0, 0, 0, 0} , m_multiplex(true) , m_acc(0) { + m_ram.fill(0); } // accessors, getters, setters @@ -97,12 +97,12 @@ class n163_core : public vgsound_emu_core private: bool m_disable = false; - std::array m_ram = {0}; // internal 128 byte RAM + std::array m_ram ; // internal 128 byte RAM u8 m_voice_cycle = 0x78; // Voice cycle for processing addr_latch_t m_addr_latch; // address latch s16 m_out = 0; // output - std::array m_voice_out = {0}; // per-voice output, for preview only + std::array m_voice_out = {0, 0, 0, 0, 0, 0, 0, 0}; // per-voice output, for preview only // demultiplex related bool m_multiplex = true; // multiplex flag, but less noisy = inaccurate! s16 m_acc = 0; // accumulated output diff --git a/extern/vgsound_emu-modified/vgsound_emu/src/scc/scc.hpp b/extern/vgsound_emu-modified/vgsound_emu/src/scc/scc.hpp index 12322d84f..9f82d7978 100644 --- a/extern/vgsound_emu-modified/vgsound_emu/src/scc/scc.hpp +++ b/extern/vgsound_emu-modified/vgsound_emu/src/scc/scc.hpp @@ -29,7 +29,10 @@ class scc_core : public vgsound_emu_core voice_t(scc_core &host) : vgsound_emu_core("scc_voice") , m_host(host) - , m_wave{0} + , m_wave{0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0} , m_enable(false) , m_pitch(0) , m_volume(0) @@ -69,7 +72,10 @@ class scc_core : public vgsound_emu_core private: // registers scc_core &m_host; - std::array m_wave = {0}; // internal waveform + std::array m_wave = {0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0}; // internal waveform bool m_enable = false; // output enable flag u16 m_pitch : 12; // pitch u16 m_volume : 4; // volume @@ -138,8 +144,8 @@ class scc_core : public vgsound_emu_core , m_voice{*this, *this, *this, *this, *this} , m_test(test_t()) , m_out(0) - , m_reg{0} { + m_reg.fill(0); } // destructor @@ -173,7 +179,7 @@ class scc_core : public vgsound_emu_core test_t m_test; // test register s32 m_out = 0; // output to DA0...10 - std::array m_reg = {0}; // register pool + std::array m_reg; // register pool }; // SCC core diff --git a/extern/vgsound_emu-modified/vgsound_emu/src/template/template.hpp b/extern/vgsound_emu-modified/vgsound_emu/src/template/template.hpp index ffc6f9321..97a16f652 100644 --- a/extern/vgsound_emu-modified/vgsound_emu/src/template/template.hpp +++ b/extern/vgsound_emu-modified/vgsound_emu/src/template/template.hpp @@ -64,9 +64,9 @@ class template_core : public vgsound_emu_core // anywhere, and it works as initializer. , m_voice{*this} , m_intf(intf) - , m_array{0} - , m_vector{0} { + m_array.fill(0); + m_vector.resize(1,0); } // accessors, getters, setters @@ -83,9 +83,8 @@ class template_core : public vgsound_emu_core std::array m_voice; // voice classes vgsound_emu_mem_intf &m_intf; // common memory interface - std::array m_array = { - 0}; // std::array for static size array - std::vector m_vector = {0}; // std::vector for variable size array + std::array m_array; // std::array for static size array + std::vector m_vector; // std::vector for variable size array }; #endif diff --git a/extern/vgsound_emu-modified/vgsound_emu/src/x1_010/x1_010.hpp b/extern/vgsound_emu-modified/vgsound_emu/src/x1_010/x1_010.hpp index 37a1895bd..0456a9fab 100644 --- a/extern/vgsound_emu-modified/vgsound_emu/src/x1_010/x1_010.hpp +++ b/extern/vgsound_emu-modified/vgsound_emu/src/x1_010/x1_010.hpp @@ -87,8 +87,8 @@ class x1_010_core : public vgsound_emu_core , m_acc(0) , m_env_acc(0) , m_data(0) - , m_vol_out{0} - , m_out{0} + , m_vol_out{0, 0} + , m_out{0, 0} { } @@ -117,10 +117,10 @@ class x1_010_core : public vgsound_emu_core u32 m_acc = 0; u32 m_env_acc = 0; s8 m_data = 0; - std::array m_vol_out = {0}; + std::array m_vol_out = {0, 0}; // for preview only - std::array m_out = {0}; + std::array m_out = {0, 0}; }; public: @@ -144,10 +144,10 @@ class x1_010_core : public vgsound_emu_core *this, *this} , m_intf(intf) - , m_envelope{0} - , m_wave{0} - , m_out{0} + , m_out{0, 0} { + m_envelope.fill(0); + m_wave.fill(0); } // register accessor @@ -172,11 +172,11 @@ class x1_010_core : public vgsound_emu_core vgsound_emu_mem_intf &m_intf; // RAM - std::array m_envelope = {0}; - std::array m_wave = {0}; + std::array m_envelope; + std::array m_wave; // output data - std::array m_out = {0}; + std::array m_out = {0, 0}; }; #endif