refactoring and cleanup
This commit is contained in:
parent
c09e1d65a3
commit
28a3088128
25
tracker.tal
25
tracker.tal
|
@ -65,11 +65,11 @@
|
||||||
|
|
||||||
;module ;k-init-module/run JSR2
|
;module ;k-init-module/run JSR2
|
||||||
|
|
||||||
;screen-vector .Screen/vector DEO2
|
;redraw JSR2
|
||||||
|
|
||||||
BRK
|
BRK
|
||||||
|
|
||||||
@screen-vector ( -> )
|
@redraw ( -> )
|
||||||
#0000 .Screen/x DEO2
|
#0000 .Screen/x DEO2
|
||||||
#0008 .Screen/y DEO2
|
#0008 .Screen/y DEO2
|
||||||
;draw-song JSR2
|
;draw-song JSR2
|
||||||
|
@ -78,13 +78,18 @@ BRK
|
||||||
#00 ;draw-pattern JSR2
|
#00 ;draw-pattern JSR2
|
||||||
BRK
|
BRK
|
||||||
|
|
||||||
|
@get-selected-song-line-address ( -- addr* )
|
||||||
|
.tracker/selected-pattern LDZ #00 SWP #0004 MUL2
|
||||||
|
.kalama/module LDZ2 #0005 ADD2 ADD2
|
||||||
|
RTN
|
||||||
|
|
||||||
@draw-song
|
@draw-song
|
||||||
.Screen/x DEI2 ,&pos STR2
|
.Screen/x DEI2 ,&pos STR2
|
||||||
#0005 .kalama/module LDZ2 ADD2 DUP2 DUP2 ,&start-addr STR2 ( first song line )
|
#0005 .kalama/module LDZ2 ADD2 DUP2 ( first song line )
|
||||||
#0003 .kalama/module LDZ2 ADD2 LDA2 ( song length ) ADD2 STH2 ( stash end address )
|
#0003 .kalama/module LDZ2 ADD2 LDA2 ( song length ) ADD2 STH2 ( stash end address )
|
||||||
&loop ( start-addr* )
|
&loop ( start-addr* )
|
||||||
DUP2
|
DUP2
|
||||||
DUP2 .tracker/selected-pattern LDZ #00 SWP #0004 MUL2 ,&start-addr LDR2 ADD2 EQU2 ( if selected address is this one, use color 08. If not, use 01 ) ,&if JCN
|
DUP2 ;get-selected-song-line-address JSR2 EQU2 ( if selected address is this one, use color 08. If not, use 01 ) ,&if JCN
|
||||||
,&else JMP
|
,&else JMP
|
||||||
&if
|
&if
|
||||||
#08 ,&end JMP
|
#08 ,&end JMP
|
||||||
|
@ -113,7 +118,6 @@ RTN
|
||||||
RTN
|
RTN
|
||||||
&color $1
|
&color $1
|
||||||
|
|
||||||
|
|
||||||
@draw-pattern ( p )
|
@draw-pattern ( p )
|
||||||
.Screen/x DEI2 ,&x STR2
|
.Screen/x DEI2 ,&x STR2
|
||||||
;k-get-pattern JSR2
|
;k-get-pattern JSR2
|
||||||
|
@ -205,15 +209,6 @@ RTN
|
||||||
|
|
||||||
RTN
|
RTN
|
||||||
|
|
||||||
@print-str ( string* -- )
|
|
||||||
|
|
||||||
#0001 --
|
|
||||||
&while
|
|
||||||
INC2 LDAk DUP #18 DEO ,&while JCN
|
|
||||||
POP2
|
|
||||||
|
|
||||||
RTN
|
|
||||||
|
|
||||||
~engine.tal
|
~engine.tal
|
||||||
|
|
||||||
@font ( bbcmicro )
|
@font ( bbcmicro )
|
||||||
|
@ -267,4 +262,4 @@ RTN
|
||||||
316b 4600 0000 0000 ffff ffff ffff ffff
|
316b 4600 0000 0000 ffff ffff ffff ffff
|
||||||
|
|
||||||
@module
|
@module
|
||||||
~testmodule.tal
|
~testmodule.tal
|
||||||
|
|
Reference in New Issue