From 0912a30bb9eeec464028a45bdf264f4834f15b54 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Tue, 27 Mar 2018 21:04:55 +0300 Subject: [PATCH] Fixed a regression in dmg_sound-2 --- Core/apu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/apu.c b/Core/apu.c index cfc0d11..4d3d952 100755 --- a/Core/apu.c +++ b/Core/apu.c @@ -553,7 +553,7 @@ void GB_apu_write(GB_gameboy_t *gb, uint8_t reg, uint8_t value) unsigned index = reg == GB_IO_NR21? GB_SQUARE_2: GB_SQUARE_1; gb->apu.square_channels[index].pulse_length = (0x40 - (value & 0x3f)); if (!gb->apu.global_enable) { - gb->io_registers[reg] &= 0x3f; + value &= 0x3f; } break; }