fix notes bank selection
authorTobias Girstmair <tobi@isticktoit.net>
Tue, 27 Apr 2021 19:27:26 +0000 (21:27 +0200)
committerTobias Girstmair <tobi@isticktoit.net>
Tue, 27 Apr 2021 19:27:26 +0000 (21:27 +0200)
we want the 2nd "bank" when i2&3 != 0, so when f.z is not set. hence, we
want to skip adding 8 to the index when f.z is set. yep, it's confusing.

bsv.asm

diff --git a/bsv.asm b/bsv.asm
index 1a60072696b73832ac48c37bb7fd46ae1a35da9c..b6fed82e0571957a45fda3601c365a5d2d330198 100644 (file)
--- a/bsv.asm
+++ b/bsv.asm
@@ -115,11 +115,11 @@ mod3:
 g:
        CLEAR   mul2            ; this is notes_ix_hi (and should be 0)
        AND     a, #0x7
-       MOV     notes_ix, a
+       MOV     notes_ix, a     ; assumes notes are the first thing in SRAM
        ; test i2 & 3:
        MOV     a, i2
        AND     a, #3
-       T0SN    f, z
+       T1SN    f, z
        SET1    notes_ix, #3
        IDXM    a, notes_ix
 
Imprint / Impressum