mirror of https://github.com/snes9xgit/snes9x.git
Remove parts of DSP wrapper we don't need.
This commit is contained in:
parent
08f5601c5f
commit
7c468e51c0
|
@ -7,14 +7,6 @@ DSP dsp;
|
||||||
|
|
||||||
#include "SPC_DSP.cpp"
|
#include "SPC_DSP.cpp"
|
||||||
|
|
||||||
uint8 DSP::read(uint8 addr) {
|
|
||||||
return spc_dsp.read(addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
void DSP::write(uint8 addr, uint8 data) {
|
|
||||||
spc_dsp.write(addr, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
void DSP::power() {
|
void DSP::power() {
|
||||||
spc_dsp.init(smp.apuram);
|
spc_dsp.init(smp.apuram);
|
||||||
spc_dsp.reset();
|
spc_dsp.reset();
|
||||||
|
@ -24,17 +16,7 @@ void DSP::reset() {
|
||||||
spc_dsp.soft_reset();
|
spc_dsp.soft_reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSP::channel_enable(unsigned channel, bool enable) {
|
|
||||||
channel_enabled[channel & 7] = enable;
|
|
||||||
unsigned mask = 0;
|
|
||||||
for(unsigned i = 0; i < 8; i++) {
|
|
||||||
if(channel_enabled[i] == false) mask |= 1 << i;
|
|
||||||
}
|
|
||||||
spc_dsp.mute_voices(mask);
|
|
||||||
}
|
|
||||||
|
|
||||||
DSP::DSP() {
|
DSP::DSP() {
|
||||||
for(unsigned i = 0; i < 8; i++) channel_enabled[i] = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,23 +2,20 @@
|
||||||
|
|
||||||
class DSP : public Processor {
|
class DSP : public Processor {
|
||||||
public:
|
public:
|
||||||
enum { Threaded = false };
|
inline uint8 read(uint8 addr) {
|
||||||
alwaysinline void synchronize_smp();
|
return spc_dsp.read(addr);
|
||||||
|
}
|
||||||
|
|
||||||
uint8 read(uint8 addr);
|
inline void write(uint8 addr, uint8 data) {
|
||||||
void write(uint8 addr, uint8 data);
|
spc_dsp.write(addr, data);
|
||||||
|
}
|
||||||
|
|
||||||
void power();
|
void power();
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
void channel_enable(unsigned channel, bool enable);
|
|
||||||
|
|
||||||
DSP();
|
DSP();
|
||||||
|
|
||||||
SPC_DSP spc_dsp;
|
SPC_DSP spc_dsp;
|
||||||
|
|
||||||
private:
|
|
||||||
bool channel_enabled[8];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern DSP dsp;
|
extern DSP dsp;
|
||||||
|
|
Loading…
Reference in New Issue