mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-15 17:25:06 +00:00
parent
94dae570e0
commit
0895789539
2 changed files with 22 additions and 2 deletions
|
@ -249,7 +249,15 @@ void DivPlatformGenesis::acquire_nuked(short* bufL, short* bufR, size_t start, s
|
||||||
|
|
||||||
OPN2_Clock(&fm,o); os[0]+=o[0]; os[1]+=o[1];
|
OPN2_Clock(&fm,o); os[0]+=o[0]; os[1]+=o[1];
|
||||||
//OPN2_Write(&fm,0,0);
|
//OPN2_Write(&fm,0,0);
|
||||||
oscBuf[i]->data[oscBuf[i]->needle++]=fm.ch_out[i]<<7;
|
if (i==5) {
|
||||||
|
if (fm.dacen) {
|
||||||
|
oscBuf[i]->data[oscBuf[i]->needle++]=fm.dacdata<<7;
|
||||||
|
} else {
|
||||||
|
oscBuf[i]->data[oscBuf[i]->needle++]=fm.ch_out[i]<<7;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
oscBuf[i]->data[oscBuf[i]->needle++]=fm.ch_out[i]<<7;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
os[0]=(os[0]<<5);
|
os[0]=(os[0]<<5);
|
||||||
|
@ -293,7 +301,15 @@ void DivPlatformGenesis::acquire_ymfm(short* bufL, short* bufR, size_t start, si
|
||||||
//OPN2_Write(&fm,0,0);
|
//OPN2_Write(&fm,0,0);
|
||||||
|
|
||||||
for (int i=0; i<6; i++) {
|
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))<<6;
|
if (i==5) {
|
||||||
|
if (fm_ymfm->debug_dac_enable()) {
|
||||||
|
oscBuf[i]->data[oscBuf[i]->needle++]=fm_ymfm->debug_dac_data()<<7;
|
||||||
|
} else {
|
||||||
|
oscBuf[i]->data[oscBuf[i]->needle++]=(fme->debug_channel(i)->debug_output(0)+fme->debug_channel(i)->debug_output(1))<<6;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
oscBuf[i]->data[oscBuf[i]->needle++]=(fme->debug_channel(i)->debug_output(0)+fme->debug_channel(i)->debug_output(1))<<6;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (os[0]<-32768) os[0]=-32768;
|
if (os[0]<-32768) os[0]=-32768;
|
||||||
|
|
|
@ -778,6 +778,10 @@ public:
|
||||||
// get the engine
|
// get the engine
|
||||||
fm_engine* debug_engine() { return &m_fm; }
|
fm_engine* debug_engine() { return &m_fm; }
|
||||||
|
|
||||||
|
// get DAC state
|
||||||
|
uint16_t debug_dac_data() { return m_dac_data; }
|
||||||
|
uint8_t debug_dac_enable() { return m_dac_enable; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// simulate the DAC discontinuity
|
// simulate the DAC discontinuity
|
||||||
constexpr int32_t dac_discontinuity(int32_t value) const { return (value < 0) ? (value - 2) : (value + 3); }
|
constexpr int32_t dac_discontinuity(int32_t value) const { return (value < 0) ? (value - 2) : (value + 3); }
|
||||||
|
|
Loading…
Reference in a new issue