mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-03 09:47:26 +00:00
OPN: fix 30xx
This commit is contained in:
parent
89298b18ed
commit
0d18b4828d
3 changed files with 6 additions and 6 deletions
|
@ -77,7 +77,7 @@ class DivPlatformFMBase: public DivDispatch {
|
|||
|
||||
struct QueuedWrite {
|
||||
unsigned int addr;
|
||||
unsigned char val;
|
||||
unsigned short val;
|
||||
bool addrOrVal;
|
||||
QueuedWrite(): addr(0), val(0), addrOrVal(false) {}
|
||||
QueuedWrite(unsigned int a, unsigned char v): addr(a), val(v), addrOrVal(false) {}
|
||||
|
@ -97,7 +97,7 @@ class DivPlatformFMBase: public DivDispatch {
|
|||
pendingWrites[a]=v;
|
||||
}
|
||||
}
|
||||
inline void immWrite(unsigned int a, unsigned char v) {
|
||||
inline void immWrite(unsigned int a, unsigned short v) {
|
||||
if (!skipRegisterWrites) {
|
||||
writes.push_back(QueuedWrite(a,v));
|
||||
if (dumpWrites) {
|
||||
|
|
|
@ -188,7 +188,7 @@ void DivPlatformYM2203::acquire_combo(short** buf, size_t len) {
|
|||
QueuedWrite& w=writes.front();
|
||||
|
||||
if (w.addr==0xfffffffe) {
|
||||
delay=w.val;
|
||||
delay=w.val*24;
|
||||
writes.pop_front();
|
||||
} else if (w.addr<=0x1c || w.addr==0x2d || w.addr==0x2e || w.addr==0x2f) {
|
||||
// ymfm write
|
||||
|
@ -271,7 +271,7 @@ void DivPlatformYM2203::acquire_ymfm(short** buf, size_t len) {
|
|||
if (--delay<1) {
|
||||
QueuedWrite& w=writes.front();
|
||||
if (w.addr==0xfffffffe) {
|
||||
delay=w.val*6;
|
||||
delay=w.val*3;
|
||||
} else {
|
||||
fm->write(0x0,w.addr);
|
||||
fm->write(0x1,w.val);
|
||||
|
@ -668,7 +668,7 @@ void DivPlatformYM2203::tick(bool sysTick) {
|
|||
|
||||
// hard reset handling
|
||||
if (mustHardReset) {
|
||||
immWrite(0xfffffffe,hardResetCycles-hardResetElapsed);
|
||||
immWrite(0xfffffffe,(hardResetCycles-hardResetElapsed)*3);
|
||||
for (int i=0; i<3; i++) {
|
||||
if (i==2 && extMode) continue;
|
||||
if ((chan[i].keyOn || chan[i].opMaskChanged) && chan[i].hardReset) {
|
||||
|
|
|
@ -595,7 +595,7 @@ void DivPlatformYM2203Ext::tick(bool sysTick) {
|
|||
|
||||
// hard reset handling
|
||||
if (mustHardReset) {
|
||||
immWrite(0xfffffffe,hardResetCycles-hardResetElapsed);
|
||||
immWrite(0xfffffffe,(hardResetCycles-hardResetElapsed)*3);
|
||||
for (int i=0; i<4; i++) {
|
||||
if (opChan[i].keyOn && opChan[i].hardReset) {
|
||||
// restore SL/RR
|
||||
|
|
Loading…
Reference in a new issue