all repos — mgba @ 4f75c1441cce5ceb737cfd97a2de4b0906607423

mGBA Game Boy Advance Emulator

GB Serialize: Fix audio channel 2 and 3 loading
Vicki Pfau vi@endrift.com
Mon, 10 Aug 2020 22:06:43 -0700
commit

4f75c1441cce5ceb737cfd97a2de4b0906607423

parent

f66c17533b92e748fc09815741b458d26e4745a4

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/gb/io.csrc/gb/io.c

@@ -710,14 +710,14 @@ gb->audio.ch1.control.frequency |= GBAudioRegisterControlGetFrequency(gb->memory.io[REG_NR14] << 8);

gb->audio.ch1.control.stop = GBAudioRegisterControlGetStop(gb->memory.io[REG_NR14] << 8); GBIOWrite(gb, REG_NR21, gb->memory.io[REG_NR21]); GBIOWrite(gb, REG_NR22, gb->memory.io[REG_NR22]); - GBIOWrite(gb, REG_NR22, gb->memory.io[REG_NR23]); + GBIOWrite(gb, REG_NR23, gb->memory.io[REG_NR23]); gb->audio.ch2.control.frequency &= 0xFF; gb->audio.ch2.control.frequency |= GBAudioRegisterControlGetFrequency(gb->memory.io[REG_NR24] << 8); gb->audio.ch2.control.stop = GBAudioRegisterControlGetStop(gb->memory.io[REG_NR24] << 8); GBIOWrite(gb, REG_NR30, gb->memory.io[REG_NR30]); GBIOWrite(gb, REG_NR31, gb->memory.io[REG_NR31]); GBIOWrite(gb, REG_NR32, gb->memory.io[REG_NR32]); - GBIOWrite(gb, REG_NR32, gb->memory.io[REG_NR33]); + GBIOWrite(gb, REG_NR33, gb->memory.io[REG_NR33]); gb->audio.ch3.rate &= 0xFF; gb->audio.ch3.rate |= GBAudioRegisterControlGetRate(gb->memory.io[REG_NR34] << 8); gb->audio.ch3.stop = GBAudioRegisterControlGetStop(gb->memory.io[REG_NR34] << 8);