Compare commits

...

2 Commits

2 changed files with 37 additions and 15 deletions

View File

@ -40,18 +40,18 @@ ff 00 00
54 05 0f
ff 00 00
( pattern 02 )
3c 02 01
00 00 00
3f 01 01
3c 01 01
00 02 00
3c 03 00
3f 03 01
00 04 00
3f 05 00
3c 05 00
00 06 00
3c 07 00
3f 07 00
00 00 00
3f 05 01
00 05 00
3c 00 00
00 00 00
3f 04 01
00 04 04
3c 00 00
00 00 00
3c 00 00

View File

@ -1,5 +1,5 @@
( a blank file )
( TODO fix ugly stack effects )
%+ { ADD } %- { SUB } %* { MUL } %/ { DIV }
%< { LTH } %> { GTH } %= { EQU } %! { NEQ }
%++ { ADD2 } %-- { SUB2 } %** { MUL2 } %// { DIV2 }
@ -64,7 +64,7 @@
#0f25 .System/b DEO2
;module ;k-init-module/run JSR2
;on-input .Controller/vector DEO2
;redraw JSR2
BRK
@ -79,12 +79,34 @@ BRK
BRK
( draws all currently selected patterns )
@draw-patterns ( addr* )
.Screen/x DEI2 ,&pos STR2
DUP2 ADD2 LDA ;draw-pattern JSR2
@on-input ( -> )
.Controller/button DEI
DUP #10 AND ,&up JCN
#20 AND ,&down JCN
BRK
&up
.tracker/selected-pattern LDZ #01 SUB .tracker/selected-pattern STZ
,&end JMP
&down
.tracker/selected-pattern LDZ #01 ADD .tracker/selected-pattern STZ
,&end JMP
&end
;redraw JSR2
BRK
&pos $2
@draw-patterns ( addr* )
DUP2
LDA ;draw-pattern JSR2
#0008 .Screen/y DEO2
.Screen/x DEI2 #0040 ADD2 .Screen/x DEO2
DUP2 #0001 ADD2 LDA ;draw-pattern JSR2
#0008 .Screen/y DEO2
.Screen/x DEI2 #0040 ADD2 .Screen/x DEO2
DUP2 #0002 ADD2 LDA ;draw-pattern JSR2
#0008 .Screen/y DEO2
.Screen/x DEI2 #0040 ADD2 .Screen/x DEO2
#0003 ADD2 LDA ;draw-pattern JSR2
RTN
@get-selected-song-line-address ( -- addr* )
.tracker/selected-pattern LDZ #00 SWP #0004 MUL2