Fixed a bug where audio channel 3 was playing silently instead of being muted.

This commit is contained in:
Lior Halphon 2016-04-16 14:08:30 +03:00
parent ddc9605271
commit 7dc575d01e
2 changed files with 3 additions and 1 deletions

View File

@ -361,6 +361,9 @@ void apu_write(GB_gameboy_t *gb, unsigned char reg, unsigned char value)
break; break;
case GB_IO_NR32: case GB_IO_NR32:
gb->apu.wave_shift = ((value >> 5) + 3) & 3; gb->apu.wave_shift = ((value >> 5) + 3) & 3;
if (gb->apu.wave_shift == 3) {
gb->apu.wave_shift = 4;
}
break; break;
case GB_IO_NR43: case GB_IO_NR43:
{ {

View File

@ -57,7 +57,6 @@ enum {
GB_IO_NR31 = 0x1b, // Channel 3 Sound Length GB_IO_NR31 = 0x1b, // Channel 3 Sound Length
GB_IO_NR32 = 0x1c, // Channel 3 Select output level (R/W) GB_IO_NR32 = 0x1c, // Channel 3 Select output level (R/W)
GB_IO_NR33 = 0x1d, // Channel 3 Frequency's lower data (W) GB_IO_NR33 = 0x1d, // Channel 3 Frequency's lower data (W)
GB_IO_NR34 = 0x1e, // Channel 3 Frequency's higher data (R/W) GB_IO_NR34 = 0x1e, // Channel 3 Frequency's higher data (R/W)
/* Missing */ /* Missing */