dac.cpp - buzzfix hack + unhackfix d_armedf.cpp

This commit is contained in:
dinkc64 2014-11-01 19:47:04 +00:00
parent b6cf999e4a
commit da19924c50
2 changed files with 24 additions and 21 deletions

View File

@ -559,11 +559,11 @@ void __fastcall armedf_write_port(UINT16 port, UINT8 data)
return;
case 0x02:
if (data!=0x7f && data!=0x77 && data!=0x80) DACSignedWrite(0, data);
DACSignedWrite(0, data);
return;
case 0x03:
if (data!=0x7f && data!=0x77 && data!=0x80) DACSignedWrite(1, data);
DACSignedWrite(1, data);
return;
}
}

View File

@ -55,15 +55,15 @@ static void UpdateStream(INT32 chip, INT32 length)
if (rOut && lOut) {
while (length--) {
// *lbuf++ = *lbuf + lOut;
// *rbuf++ = *rbuf + rOut;
*lbuf++ = BURN_SND_CLIP(*lbuf + lOut);
*rbuf++ = BURN_SND_CLIP(*rbuf + rOut);
}
} else if (lOut) {
while (length--) *lbuf++ = BURN_SND_CLIP(*lbuf + lOut);
while (length--)
*lbuf++ = BURN_SND_CLIP(*lbuf + lOut);
} else if (rOut) {
while (length--) *rbuf++ = BURN_SND_CLIP(*rbuf + rOut);
while (length--)
*rbuf++ = BURN_SND_CLIP(*rbuf + rOut);
}
}
@ -133,6 +133,9 @@ void DACSignedWrite(INT32 Chip, UINT8 Data)
if (Chip > NumChips) bprintf(PRINT_ERROR, _T("DACSignedWrite called with invalid chip number %x\n"), Chip);
#endif
if (Data == 0x77 || Data == 0x7f || Data == 0x80)
return; // HACK: buzzing fix (armed formation, terra cresta, Soldier Girl Amazon, & possibly others.)
struct dac_info *ptr;
ptr = &dac_table[Chip];