add pattern pointer and actual pattern table lookup

This commit is contained in:
Nico 2021-05-18 21:22:19 +01:00
parent 5868e040f4
commit b32ea0fb81
1 changed files with 4 additions and 2 deletions

View File

@ -86,7 +86,7 @@ BRK
RTN
@update-pattern-addr ( -- )
;pattern-table LDA2 .Playback/pattern-addr STZ2
.Playback/pattern-index LDZ #02 MUL #00 SWP ;pattern-table ADD2 LDA2 .Playback/pattern-addr STZ2
RTN
@handle-cursor ( controller -- ) ( handles moving the cursor around )
@ -369,6 +369,8 @@ BRK
@pattern-table :pattern $fe ( the pattern table is a list of pattern addresses in memory )
@pattern-pointer :pattern/end ( the pattern pointer is a pointer to where in memory the next pattern will be put. )
( pattern format - each note has 3 bytes. Pitch, instrument, volume. patterns are 0x10 long.
an ff in the note column of the pattern will kill the existing note without starting a new one (this is the tracker "box" note) )
@ -388,5 +390,5 @@ BRK
54 00 66
ff 00 66
56 00 ff
57 00 66
57 00 66 &end
]