From: Tobias Girstmair Date: Sun, 1 Mar 2020 20:31:13 +0000 (+0100) Subject: fix melody for voices 3 and 4 X-Git-Tag: attiny9~1 X-Git-Url: https://git.gir.st/Chiptunes.git/commitdiff_plain/26799babfc57e999f575a4b07f20d93f778600a0?hp=26799babfc57e999f575a4b07f20d93f778600a0 fix melody for voices 3 and 4 15 months later, I took another look at why the music was off for channels 3 and 4 and pretty fast noticed that it affects only the voices using the mod3 subroutine. Executing mod3 with simavr[1] showed that the compare-branch step is broken. Switching BRPL for the correct BRCS fixed the problem. [1]: in the hackiest way imaginable: gdb> layout regs gdb> set $r24 = 0x15 # test value for Mh gdb> set $r23 = 0x16 # test value for Ml gdb> set $pc = 0x1a # start of mod3 routine gdb> ni # repeatedly ---