From eff16f5a8153cc503b9c4e63bce21662a457bd6c Mon Sep 17 00:00:00 2001 From: nukeykt Date: Tue, 10 Oct 2017 23:51:58 +0900 Subject: [PATCH] [Core/Sound] Nuked OPN2: Minor PCM mode tweak. --- core/sound/ym3438.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/sound/ym3438.c b/core/sound/ym3438.c index 4e0687a..1db7391 100644 --- a/core/sound/ym3438.c +++ b/core/sound/ym3438.c @@ -436,7 +436,7 @@ void OPN2_DoRegWrite(ym3438_t *chip) break; case 0x2a: /* DAC data */ chip->dacdata &= 0x01; - chip->dacdata |= chip->write_data << 1; + chip->dacdata |= (chip->write_data ^ 0x80) << 1; break; case 0x2b: /* DAC enable */ chip->dacen = chip->write_data >> 7; @@ -984,7 +984,7 @@ void OPN2_ChOutput(ym3438_t *chip) /* Ch 6 */ if (((cycles >> 2) == 1 && chip->dacen) || test_dac) { - out = (Bit16s)chip->dacdata ^ 0x100; + out = (Bit16s)chip->dacdata; out <<= 7; out >>= 7; }