Genesis: fix bus overload when using ymfm core

This commit is contained in:
tildearrow 2022-02-05 04:31:20 -05:00
parent 396e918c7a
commit cb430fc169

View file

@ -116,18 +116,12 @@ void DivPlatformGenesis::acquire_ymfm(short* bufL, short* bufR, size_t start, si
}
os[0]=0; os[1]=0;
if (!writes.empty() && !fm_ymfm->read_status()) {
if (!writes.empty()) {
QueuedWrite& w=writes.front();
if (w.addrOrVal) {
fm_ymfm->write(0x1+((w.addr>>8)<<1),w.val);
//printf("write: %x = %.2x\n",w.addr,w.val);
lastBusy=0;
writes.pop();
} else {
//printf("busycounter: %d\n",lastBusy);
fm_ymfm->write(0x0+((w.addr>>8)<<1),w.addr);
w.addrOrVal=true;
}
fm_ymfm->write(0x0+((w.addr>>8)<<1),w.addr);
fm_ymfm->write(0x1+((w.addr>>8)<<1),w.val);
writes.pop();
lastBusy=1;
}
if (ladder) {