per-channel oscilloscope, part 7
YM2610 and YM2610B only TIA is left
This commit is contained in:
parent
415e490025
commit
47f83c0472
12 changed files with 115 additions and 1 deletions
|
|
@ -401,6 +401,14 @@ double DivPlatformYM2610B::NOTE_ADPCMB(int note) {
|
|||
void DivPlatformYM2610B::acquire(short* bufL, short* bufR, size_t start, size_t len) {
|
||||
static int os[2];
|
||||
|
||||
ymfm::ym2612::fm_engine* fme=fm->debug_fm_engine();
|
||||
ymfm::ssg_engine* ssge=fm->debug_ssg_engine();
|
||||
ymfm::adpcm_a_engine* aae=fm->debug_adpcm_a_engine();
|
||||
ymfm::adpcm_b_engine* abe=fm->debug_adpcm_b_engine();
|
||||
|
||||
ymfm::ssg_engine::output_data ssgOut;
|
||||
ymfm::ymfm_output<2> adpcmOut;
|
||||
|
||||
for (size_t h=start; h<start+len; h++) {
|
||||
os[0]=0; os[1]=0;
|
||||
if (!writes.empty()) {
|
||||
|
|
@ -426,6 +434,25 @@ void DivPlatformYM2610B::acquire(short* bufL, short* bufR, size_t start, size_t
|
|||
|
||||
bufL[h]=os[0];
|
||||
bufR[h]=os[1];
|
||||
|
||||
for (int i=0; i<6; i++) {
|
||||
oscBuf[i]->data[oscBuf[i]->needle++]=(fme->debug_channel(i)->debug_output(0)+fme->debug_channel(i)->debug_output(1));
|
||||
}
|
||||
|
||||
ssge->get_last_out(ssgOut);
|
||||
for (int i=6; i<9; i++) {
|
||||
oscBuf[i]->data[oscBuf[i]->needle++]=ssgOut.data[i-6];
|
||||
}
|
||||
|
||||
for (int i=9; i<15; i++) {
|
||||
adpcmOut.clear();
|
||||
aae->debug_channel(i-9)->output(adpcmOut);
|
||||
oscBuf[i]->data[oscBuf[i]->needle++]=adpcmOut.data[0]+adpcmOut.data[1];
|
||||
}
|
||||
|
||||
adpcmOut.clear();
|
||||
abe->output(adpcmOut,1);
|
||||
oscBuf[15]->data[oscBuf[15]->needle++]=adpcmOut.data[0]+adpcmOut.data[1];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1121,6 +1148,10 @@ void* DivPlatformYM2610B::getChanState(int ch) {
|
|||
return &chan[ch];
|
||||
}
|
||||
|
||||
DivDispatchOscBuffer* DivPlatformYM2610B::getOscBuffer(int ch) {
|
||||
return oscBuf[ch];
|
||||
}
|
||||
|
||||
unsigned char* DivPlatformYM2610B::getRegisterPool() {
|
||||
return regPool;
|
||||
}
|
||||
|
|
@ -1216,9 +1247,13 @@ int DivPlatformYM2610B::init(DivEngine* p, int channels, int sugRate, unsigned i
|
|||
skipRegisterWrites=false;
|
||||
for (int i=0; i<16; i++) {
|
||||
isMuted[i]=false;
|
||||
oscBuf[i]=new DivDispatchOscBuffer;
|
||||
}
|
||||
chipClock=8000000;
|
||||
rate=chipClock/16;
|
||||
for (int i=0; i<16; i++) {
|
||||
oscBuf[i]->rate=rate;
|
||||
}
|
||||
iface.parent=parent;
|
||||
iface.sampleBank=0;
|
||||
fm=new ymfm::ym2610b(iface);
|
||||
|
|
@ -1231,6 +1266,9 @@ int DivPlatformYM2610B::init(DivEngine* p, int channels, int sugRate, unsigned i
|
|||
}
|
||||
|
||||
void DivPlatformYM2610B::quit() {
|
||||
for (int i=0; i<16; i++) {
|
||||
delete oscBuf[i];
|
||||
}
|
||||
ay->quit();
|
||||
delete ay;
|
||||
delete fm;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue