From ec65b18fd271a4f36c5c33caebd2f1d5dfe9b991 Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Sun, 1 Aug 2021 21:23:31 +0100 Subject: [PATCH] Make the str consistent with the ldr --- agb/src/sound/mixer/mixer.s | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agb/src/sound/mixer/mixer.s b/agb/src/sound/mixer/mixer.s index 8acc9f75..4784fc15 100644 --- a/agb/src/sound/mixer/mixer.s +++ b/agb/src/sound/mixer/mixer.s @@ -40,7 +40,7 @@ agb_rs__mixer_add: ldrh r4, [r6, r12]! @ load the current buffer value (r12 being the offset) but pre-increment r6 by r12 mla r7, r10, r3, r4 @ r7 = r10 * r3 + r9 = current sound value * left amount + previous buffer value - strh r7, [r6], r8 @ *r6 = r7, r6 += r8 where r8 = 352 = offset for the right hand side + strh r7, [r6, r8] @ *r6 = r7, r6 += r8 where r8 = 352 = offset for the right hand side ldrh r7, [r6] @ same for the right hand side, r6 now points to the right hand side location mla r4, r10, r9, r7