all repos — mgba @ 3bedc8ec91008a27798683147e33be927ab6497e

mGBA Game Boy Advance Emulator

GB Audio: Fix initial sweep state
Vicki Pfau vi@endrift.com
Mon, 10 Aug 2020 18:07:39 -0700
commit

3bedc8ec91008a27798683147e33be927ab6497e

parent

a1e43c91a1aa67509ddb59b127375aa2edbbe385

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

jump to
M CHANGESCHANGES

@@ -9,6 +9,7 @@ Emulation fixes:

- ARM: Fix ALU reading PC after shifting - ARM: Fix STR storing PC after address calculation - GB: Partially fix timing for skipped BIOS + - GB Audio: Fix initial sweep state - GB MBC: Fix MBC1 mode changing behavior - GB Video: Fix state after skipping BIOS (fixes mgba.io/i/1715 and mgba.io/i/1716) - GBA: Fix timing advancing too quickly in rare cases
M src/gb/audio.csrc/gb/audio.c

@@ -117,7 +117,7 @@ }

if (audio->style == GB_AUDIO_GBA) { mTimingSchedule(audio->timing, &audio->frameEvent, 0); } - audio->ch1 = (struct GBAudioSquareChannel) { .envelope = { .dead = 2 } }; + audio->ch1 = (struct GBAudioSquareChannel) { .sweep = { .time = 8 }, .envelope = { .dead = 2 } }; audio->ch2 = (struct GBAudioSquareChannel) { .envelope = { .dead = 2 } }; audio->ch3 = (struct GBAudioWaveChannel) { .bank = 0 }; audio->ch4 = (struct GBAudioNoiseChannel) { .nSamples = 0 };