YM2608-LLE, part 10

This commit is contained in:
tildearrow 2024-04-27 19:15:01 -05:00
parent 6129d2714a
commit ea9c483510

View file

@ -490,11 +490,14 @@ void DivPlatformYM2608::acquire_ymfm(short** buf, size_t len) {
}
}
// ac_fm_output
void DivPlatformYM2608::acquire_lle(short** buf, size_t len) {
for (size_t h=0; h<len; h++) {
bool have0=false;
bool have1=false;
unsigned char howLong=0;
unsigned char subCycle=0x100-12;
unsigned char subSubCycle=0;
while (true) {
bool canWeWrite=fm_lle.prescaler_latch[1]&1;
@ -558,6 +561,14 @@ void DivPlatformYM2608::acquire_lle(short** buf, size_t len) {
FMOPNA_Clock(&fm_lle,0);
FMOPNA_Clock(&fm_lle,1);
if (++subSubCycle>=6) {
subSubCycle=0;
if (subCycle<12) {
oscBuf[subCycle]->data[oscBuf[subCycle]->needle++]=fm_lle.ac_fm_output;
}
subCycle++;
}
if (canWeWrite) {
if (delay==1) {
// check busy status here