add speed command

This commit is contained in:
Nico 2022-01-21 10:48:44 +00:00
parent fd5afe422a
commit 717428c7b4
2 changed files with 7 additions and 4 deletions

View File

@ -114,13 +114,16 @@ RTN
&run &run
,&chan STR ,&chan STR
SWP ( get command ) SWP ( get command )
DUP #01 EQU ,&vol JCN ( set instrument ) DUP #01 EQU ,&vol JCN ( set volume )
DUP #02 EQU ,&instr JCN ( set instrument ) DUP #02 EQU ,&instr JCN ( set instrument )
DUP #07 EQU ,&speed JCN ( set speed )
POP2 RTN POP2 RTN
&vol POP ,&chan LDR #10 MUL .Audio0/volume ADD DEO &vol POP ,&chan LDR #10 MUL .Audio0/volume ADD DEO
RTN RTN
&instr POP ,&chan LDR ;k-load-instrument JSR2 &instr POP ,&chan LDR ;k-load-instrument JSR2
RTN RTN
&speed POP #0f AND ( only include low byte ) DUP DEBUG .kalama/speed STZ #00 .kalama/tick STZ
RTN
( loads instrument with number into specified audio channel, 0-indexed ) ( loads instrument with number into specified audio channel, 0-indexed )
@k-load-instrument ( number channel -- ) @k-load-instrument ( number channel -- )

View File

@ -104,13 +104,13 @@ ff 01 88
54 02 00 54 02 00
52 00 00 52 00 00
54 00 00 54 00 00
4f 00 00 4f 07 04
4b 00 00 4b 00 00
4f 00 00 4f 00 00
48 00 00 48 00 00
ff 00 00 ff 02 01
( pattern 01 ) ( pattern 01 )
54 02 01 54 07 0f
56 00 00 56 00 00
57 00 00 57 00 00
56 00 00 56 00 00