snes9x/apu/bapu/dsp/sdsp.hpp

35 lines
520 B
C++
Raw Normal View History

2011-06-12 08:25:22 +02:00
#include "SPC_DSP.h"
2011-06-27 22:41:17 +02:00
#include <stdio.h>
2011-06-12 08:25:22 +02:00
class DSP : public Processor {
public:
inline uint8 read(uint8 addr) {
2011-06-27 22:41:17 +02:00
synchronize ();
return spc_dsp.read(addr);
}
2011-06-12 08:25:22 +02:00
2011-06-27 22:41:17 +02:00
inline void synchronize (void) {
if (clock) {
spc_dsp.run (clock);
clock = 0;
}
}
inline void write(uint8 addr, uint8 data) {
2011-06-27 22:41:17 +02:00
synchronize ();
spc_dsp.write(addr, data);
}
2011-06-12 08:25:22 +02:00
2011-06-24 13:42:04 +02:00
void save_state(uint8 **);
void load_state(uint8 **);
2011-06-12 08:25:22 +02:00
void power();
void reset();
DSP();
SPC_DSP spc_dsp;
};
extern DSP dsp;