diff --git a/src/gb/audio.c b/src/gb/audio.c index c3f24a50a..9c39fb812 100644 --- a/src/gb/audio.c +++ b/src/gb/audio.c @@ -376,7 +376,7 @@ void GBAudioWriteNR52(struct GBAudio* audio, uint8_t value) { GBAudioWriteNR32(audio, 0); GBAudioWriteNR33(audio, 0); GBAudioWriteNR34(audio, 0); - GBAudioWriteNR41(audio, 0); + // Don't write to NR41 GBAudioWriteNR42(audio, 0); GBAudioWriteNR43(audio, 0); GBAudioWriteNR44(audio, 0); @@ -397,7 +397,6 @@ void GBAudioWriteNR52(struct GBAudio* audio, uint8_t value) { audio->p->memory.io[REG_NR32] = 0; audio->p->memory.io[REG_NR33] = 0; audio->p->memory.io[REG_NR34] = 0; - audio->p->memory.io[REG_NR41] = 0; audio->p->memory.io[REG_NR42] = 0; audio->p->memory.io[REG_NR43] = 0; audio->p->memory.io[REG_NR44] = 0; diff --git a/src/gb/io.c b/src/gb/io.c index add47e8d5..463d2795e 100644 --- a/src/gb/io.c +++ b/src/gb/io.c @@ -184,11 +184,8 @@ void GBIOWrite(struct GB* gb, unsigned address, uint8_t value) { } break; case REG_NR41: - if (gb->audio.enable) { - GBAudioWriteNR41(&gb->audio, value); - } else { - value = 0; - } + // NR41 is exempt, for some reason + GBAudioWriteNR41(&gb->audio, value); break; case REG_NR42: if (gb->audio.enable) {