per-channel oscilloscope, part 3
K00/C64/NES fixed FDS, Game Boy and Sound Unit
This commit is contained in:
parent
312a037816
commit
1c3dcae05e
11 changed files with 72 additions and 11 deletions
|
|
@ -87,6 +87,10 @@ void DivPlatformGB::acquire(short* bufL, short* bufR, size_t start, size_t len)
|
|||
GB_advance_cycles(gb,16);
|
||||
bufL[i]=gb->apu_output.final_sample.left;
|
||||
bufR[i]=gb->apu_output.final_sample.right;
|
||||
|
||||
for (int i=0; i<4; i++) {
|
||||
oscBuf[i]->data[oscBuf[i]->needle++]=(gb->apu_output.current_sample[i].left+gb->apu_output.current_sample[i].right)<<6;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -429,6 +433,10 @@ void* DivPlatformGB::getChanState(int ch) {
|
|||
return &chan[ch];
|
||||
}
|
||||
|
||||
DivDispatchOscBuffer* DivPlatformGB::getOscBuffer(int ch) {
|
||||
return oscBuf[ch];
|
||||
}
|
||||
|
||||
unsigned char* DivPlatformGB::getRegisterPool() {
|
||||
return regPool;
|
||||
}
|
||||
|
|
@ -495,20 +503,25 @@ void DivPlatformGB::poke(std::vector<DivRegWrite>& wlist) {
|
|||
}
|
||||
|
||||
int DivPlatformGB::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
|
||||
chipClock=4194304;
|
||||
rate=chipClock/16;
|
||||
for (int i=0; i<4; i++) {
|
||||
isMuted[i]=false;
|
||||
oscBuf[i]=new DivDispatchOscBuffer;
|
||||
oscBuf[i]->rate=rate;
|
||||
}
|
||||
parent=p;
|
||||
dumpWrites=false;
|
||||
skipRegisterWrites=false;
|
||||
chipClock=4194304;
|
||||
rate=chipClock/16;
|
||||
gb=new GB_gameboy_t;
|
||||
reset();
|
||||
return 4;
|
||||
}
|
||||
|
||||
void DivPlatformGB::quit() {
|
||||
for (int i=0; i<4; i++) {
|
||||
delete oscBuf[i];
|
||||
}
|
||||
delete gb;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue