Try to fix initializer
This commit is contained in:
parent
618ff1d393
commit
21e2b9f568
1
extern/Nuked-OPN2
vendored
Submodule
1
extern/Nuked-OPN2
vendored
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit b0e9de0f816943ad3820ddfefa0fff276d659250
|
|
@ -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, *this, *this,
|
||||||
*this, *this, *this, *this, *this, *this, *this}
|
*this, *this, *this, *this, *this, *this, *this}
|
||||||
, m_adc(0)
|
, 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:
|
private:
|
||||||
std::array<voice_t, 25> m_voice; // 25 voices
|
std::array<voice_t, 25> m_voice; // 25 voices
|
||||||
u16 m_adc = 0; // ADC register
|
u16 m_adc = 0; // ADC register
|
||||||
std::array<s32, 16> m_out = {0}; // 16 channel outputs
|
std::array<s32, 16> m_out = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; // 16 channel outputs
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -106,7 +106,7 @@ class es5505_core : public es550x_shared_core
|
||||||
, m_rvol(0)
|
, m_rvol(0)
|
||||||
, m_ch(output_t())
|
, m_ch(output_t())
|
||||||
, m_mute(false)
|
, 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
|
u8 m_rvol = 0; // Right volume
|
||||||
output_t m_ch; // channel output
|
output_t m_ch; // channel output
|
||||||
bool m_mute = false; // mute flag (for debug purpose)
|
bool m_mute = false; // mute flag (for debug purpose)
|
||||||
std::array<s32, 2> m_output; // output preview (for debug purpose)
|
std::array<s32, 2> m_output = {0, 0}; // output preview (for debug purpose)
|
||||||
};
|
};
|
||||||
|
|
||||||
class sermode_t : public vgsound_emu_core
|
class sermode_t : public vgsound_emu_core
|
||||||
|
|
|
@ -147,7 +147,7 @@ class es5506_core : public es550x_shared_core
|
||||||
, m_filtcount(0)
|
, m_filtcount(0)
|
||||||
, m_ch(output_t())
|
, m_ch(output_t())
|
||||||
, m_mute(false)
|
, 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
|
u8 m_filtcount = 0; // Internal counter for slow mode
|
||||||
output_t m_ch; // channel output
|
output_t m_ch; // channel output
|
||||||
bool m_mute = false; // mute flag (for debug purpose)
|
bool m_mute = false; // mute flag (for debug purpose)
|
||||||
std::array<s32, 2> m_output; // output preview (for debug purpose)
|
std::array<s32, 2> m_output = {0, 0}; // output preview (for debug purpose)
|
||||||
};
|
};
|
||||||
|
|
||||||
// 5 bit mode
|
// 5 bit mode
|
||||||
|
|
|
@ -367,7 +367,7 @@ class es550x_shared_core : public vgsound_emu_core
|
||||||
// 21 integer, 11 fraction for ES5506
|
// 21 integer, 11 fraction for ES5506
|
||||||
u32 m_accum = 0;
|
u32 m_accum = 0;
|
||||||
// Samples
|
// Samples
|
||||||
std::array<s32, 2> m_sample = {0};
|
std::array<s32, 2> m_sample = {0, 0};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Filter
|
// Filter
|
||||||
|
|
|
@ -87,7 +87,7 @@ class k007232_core : public vgsound_emu_core
|
||||||
: vgsound_emu_core("k007232")
|
: vgsound_emu_core("k007232")
|
||||||
, m_voice{*this, *this}
|
, m_voice{*this, *this}
|
||||||
, m_intf(intf)
|
, 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
|
k007232_intf &m_intf; // common memory interface
|
||||||
|
|
||||||
std::array<u8, 16> m_reg = {0}; // register pool
|
std::array<u8, 16> m_reg = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; // register pool
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -57,7 +57,7 @@ class k053260_core : public vgsound_emu_core
|
||||||
, m_bitpos(4)
|
, m_bitpos(4)
|
||||||
, m_data(0)
|
, m_data(0)
|
||||||
, m_adpcm_buf(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_bitpos = 4; // bit position for ADPCM decoding
|
||||||
u8 m_data = 0; // current data
|
u8 m_data = 0; // current data
|
||||||
s8 m_adpcm_buf = 0; // ADPCM buffer
|
s8 m_adpcm_buf = 0; // ADPCM buffer
|
||||||
std::array<s32, 2> m_out = {0}; // current output
|
std::array<s32, 2> m_out = {0, 0}; // current output
|
||||||
};
|
};
|
||||||
|
|
||||||
class ctrl_t
|
class ctrl_t
|
||||||
|
@ -156,8 +156,8 @@ class k053260_core : public vgsound_emu_core
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ym3012_t()
|
ym3012_t()
|
||||||
: m_in{0}
|
: m_in{0, 0}
|
||||||
, m_out{0}
|
, m_out{0, 0}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,8 +174,8 @@ class k053260_core : public vgsound_emu_core
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::array<s32, 2> m_in = {0};
|
std::array<s32, 2> m_in = {0, 0};
|
||||||
std::array<s32, 2> m_out = {0};
|
std::array<s32, 2> m_out = {0, 0};
|
||||||
};
|
};
|
||||||
|
|
||||||
class dac_t
|
class dac_t
|
||||||
|
@ -212,13 +212,16 @@ class k053260_core : public vgsound_emu_core
|
||||||
: vgsound_emu_core("k053260")
|
: vgsound_emu_core("k053260")
|
||||||
, m_voice{*this, *this, *this, *this}
|
, m_voice{*this, *this, *this, *this}
|
||||||
, m_intf(intf)
|
, m_intf(intf)
|
||||||
, m_host2snd{0}
|
, m_host2snd{0, 0}
|
||||||
, m_snd2host{0}
|
, m_snd2host{0, 0}
|
||||||
, m_ctrl(ctrl_t())
|
, m_ctrl(ctrl_t())
|
||||||
, m_ym3012(ym3012_t())
|
, m_ym3012(ym3012_t())
|
||||||
, m_dac(dac_t())
|
, m_dac(dac_t())
|
||||||
, m_reg{0}
|
, m_reg{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
, m_out{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<voice_t, 4> m_voice;
|
std::array<voice_t, 4> m_voice;
|
||||||
k053260_intf &m_intf; // common memory interface
|
k053260_intf &m_intf; // common memory interface
|
||||||
|
|
||||||
std::array<u8, 2> m_host2snd = {0};
|
std::array<u8, 2> m_host2snd = {0, 0};
|
||||||
std::array<u8, 2> m_snd2host = {0};
|
std::array<u8, 2> m_snd2host = {0, 0};
|
||||||
|
|
||||||
ctrl_t m_ctrl; // chip control
|
ctrl_t m_ctrl; // chip control
|
||||||
|
|
||||||
ym3012_t m_ym3012; // YM3012 output
|
ym3012_t m_ym3012; // YM3012 output
|
||||||
dac_t m_dac; // YM3012 interface
|
dac_t m_dac; // YM3012 interface
|
||||||
|
|
||||||
std::array<u8, 64> m_reg = {0}; // register pool
|
std::array<u8, 64> m_reg = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
std::array<s32, 2> m_out = {0}; // stereo output
|
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<s32, 2> m_out = {0, 0}; // stereo output
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -58,14 +58,14 @@ class n163_core : public vgsound_emu_core
|
||||||
n163_core()
|
n163_core()
|
||||||
: vgsound_emu_core("namco_163")
|
: vgsound_emu_core("namco_163")
|
||||||
, m_disable(false)
|
, m_disable(false)
|
||||||
, m_ram{0}
|
|
||||||
, m_voice_cycle(0x78)
|
, m_voice_cycle(0x78)
|
||||||
, m_addr_latch(addr_latch_t())
|
, m_addr_latch(addr_latch_t())
|
||||||
, m_out(0)
|
, m_out(0)
|
||||||
, m_voice_out{0}
|
, m_voice_out{0, 0, 0, 0, 0, 0, 0, 0}
|
||||||
, m_multiplex(true)
|
, m_multiplex(true)
|
||||||
, m_acc(0)
|
, m_acc(0)
|
||||||
{
|
{
|
||||||
|
m_ram.fill(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// accessors, getters, setters
|
// accessors, getters, setters
|
||||||
|
@ -97,12 +97,12 @@ class n163_core : public vgsound_emu_core
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_disable = false;
|
bool m_disable = false;
|
||||||
std::array<u8, 0x80> m_ram = {0}; // internal 128 byte RAM
|
std::array<u8, 0x80> m_ram ; // internal 128 byte RAM
|
||||||
u8 m_voice_cycle = 0x78; // Voice cycle for processing
|
u8 m_voice_cycle = 0x78; // Voice cycle for processing
|
||||||
addr_latch_t m_addr_latch; // address latch
|
addr_latch_t m_addr_latch; // address latch
|
||||||
s16 m_out = 0; // output
|
s16 m_out = 0; // output
|
||||||
|
|
||||||
std::array<s16, 8> m_voice_out = {0}; // per-voice output, for preview only
|
std::array<s16, 8> m_voice_out = {0, 0, 0, 0, 0, 0, 0, 0}; // per-voice output, for preview only
|
||||||
// demultiplex related
|
// demultiplex related
|
||||||
bool m_multiplex = true; // multiplex flag, but less noisy = inaccurate!
|
bool m_multiplex = true; // multiplex flag, but less noisy = inaccurate!
|
||||||
s16 m_acc = 0; // accumulated output
|
s16 m_acc = 0; // accumulated output
|
||||||
|
|
|
@ -29,7 +29,10 @@ class scc_core : public vgsound_emu_core
|
||||||
voice_t(scc_core &host)
|
voice_t(scc_core &host)
|
||||||
: vgsound_emu_core("scc_voice")
|
: vgsound_emu_core("scc_voice")
|
||||||
, m_host(host)
|
, 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_enable(false)
|
||||||
, m_pitch(0)
|
, m_pitch(0)
|
||||||
, m_volume(0)
|
, m_volume(0)
|
||||||
|
@ -69,7 +72,10 @@ class scc_core : public vgsound_emu_core
|
||||||
private:
|
private:
|
||||||
// registers
|
// registers
|
||||||
scc_core &m_host;
|
scc_core &m_host;
|
||||||
std::array<s8, 32> m_wave = {0}; // internal waveform
|
std::array<s8, 32> 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
|
bool m_enable = false; // output enable flag
|
||||||
u16 m_pitch : 12; // pitch
|
u16 m_pitch : 12; // pitch
|
||||||
u16 m_volume : 4; // volume
|
u16 m_volume : 4; // volume
|
||||||
|
@ -138,8 +144,8 @@ class scc_core : public vgsound_emu_core
|
||||||
, m_voice{*this, *this, *this, *this, *this}
|
, m_voice{*this, *this, *this, *this, *this}
|
||||||
, m_test(test_t())
|
, m_test(test_t())
|
||||||
, m_out(0)
|
, m_out(0)
|
||||||
, m_reg{0}
|
|
||||||
{
|
{
|
||||||
|
m_reg.fill(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// destructor
|
// destructor
|
||||||
|
@ -173,7 +179,7 @@ class scc_core : public vgsound_emu_core
|
||||||
test_t m_test; // test register
|
test_t m_test; // test register
|
||||||
s32 m_out = 0; // output to DA0...10
|
s32 m_out = 0; // output to DA0...10
|
||||||
|
|
||||||
std::array<u8, 256> m_reg = {0}; // register pool
|
std::array<u8, 256> m_reg; // register pool
|
||||||
};
|
};
|
||||||
|
|
||||||
// SCC core
|
// SCC core
|
||||||
|
|
|
@ -64,9 +64,9 @@ class template_core : public vgsound_emu_core
|
||||||
// anywhere, and it works as initializer.
|
// anywhere, and it works as initializer.
|
||||||
, m_voice{*this}
|
, m_voice{*this}
|
||||||
, m_intf(intf)
|
, m_intf(intf)
|
||||||
, m_array{0}
|
|
||||||
, m_vector{0}
|
|
||||||
{
|
{
|
||||||
|
m_array.fill(0);
|
||||||
|
m_vector.resize(1,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// accessors, getters, setters
|
// accessors, getters, setters
|
||||||
|
@ -83,9 +83,8 @@ class template_core : public vgsound_emu_core
|
||||||
|
|
||||||
std::array<voice_t, 1 /*number of voices*/> m_voice; // voice classes
|
std::array<voice_t, 1 /*number of voices*/> m_voice; // voice classes
|
||||||
vgsound_emu_mem_intf &m_intf; // common memory interface
|
vgsound_emu_mem_intf &m_intf; // common memory interface
|
||||||
std::array<u8 /*type*/, 8 /*size of array*/> m_array = {
|
std::array<u8 /*type*/, 8 /*size of array*/> m_array; // std::array for static size array
|
||||||
0}; // std::array for static size array
|
std::vector<u8 /*type*/> m_vector; // std::vector for variable size array
|
||||||
std::vector<u8 /*type*/> m_vector = {0}; // std::vector for variable size array
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -87,8 +87,8 @@ class x1_010_core : public vgsound_emu_core
|
||||||
, m_acc(0)
|
, m_acc(0)
|
||||||
, m_env_acc(0)
|
, m_env_acc(0)
|
||||||
, m_data(0)
|
, m_data(0)
|
||||||
, m_vol_out{0}
|
, m_vol_out{0, 0}
|
||||||
, m_out{0}
|
, m_out{0, 0}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,10 +117,10 @@ class x1_010_core : public vgsound_emu_core
|
||||||
u32 m_acc = 0;
|
u32 m_acc = 0;
|
||||||
u32 m_env_acc = 0;
|
u32 m_env_acc = 0;
|
||||||
s8 m_data = 0;
|
s8 m_data = 0;
|
||||||
std::array<u8, 2> m_vol_out = {0};
|
std::array<u8, 2> m_vol_out = {0, 0};
|
||||||
|
|
||||||
// for preview only
|
// for preview only
|
||||||
std::array<s32, 2> m_out = {0};
|
std::array<s32, 2> m_out = {0, 0};
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -144,10 +144,10 @@ class x1_010_core : public vgsound_emu_core
|
||||||
*this,
|
*this,
|
||||||
*this}
|
*this}
|
||||||
, m_intf(intf)
|
, m_intf(intf)
|
||||||
, m_envelope{0}
|
, m_out{0, 0}
|
||||||
, m_wave{0}
|
|
||||||
, m_out{0}
|
|
||||||
{
|
{
|
||||||
|
m_envelope.fill(0);
|
||||||
|
m_wave.fill(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// register accessor
|
// register accessor
|
||||||
|
@ -172,11 +172,11 @@ class x1_010_core : public vgsound_emu_core
|
||||||
vgsound_emu_mem_intf &m_intf;
|
vgsound_emu_mem_intf &m_intf;
|
||||||
|
|
||||||
// RAM
|
// RAM
|
||||||
std::array<u8, 0x1000> m_envelope = {0};
|
std::array<u8, 0x1000> m_envelope;
|
||||||
std::array<u8, 0x1000> m_wave = {0};
|
std::array<u8, 0x1000> m_wave;
|
||||||
|
|
||||||
// output data
|
// output data
|
||||||
std::array<s32, 2> m_out = {0};
|
std::array<s32, 2> m_out = {0, 0};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue