initial version

This commit is contained in:
~d6 2023-05-06 00:30:02 -04:00
parent 0ec666c9e2
commit 64efba7383
1 changed files with 67 additions and 0 deletions

67
type-a.tal Normal file
View File

@ -0,0 +1,67 @@
|0000
@counter $1
@position $2
|0100
( set up treble )
#0300 #38 DEO2 ( adsr )
#0002 #3a DEO2 ( len )
;square #3c DEO2 ( addr )
#ff #3e DEO ( volume )
( set up bass )
#0600 #48 DEO2 ( adsr )
#0002 #4a DEO2 ( len )
;square #4c DEO2 ( addr )
#ff #4e DEO ( volume )
( set up callback )
;on-screen #20 DEO2
BRK
@play ( dev^ track* -> )
.position LDZ2 ADD2 LDA
DUP ?&sound POP !&rest &sound SWP DEO JMP2r
&rest POP JMP2r
@on-screen
.counter LDZ ?&skip
#3f ;treble play
#4f ;bass play
.position LDZ2k INC2 #00c0 DIV2k MUL2 SUB2 ROT STZ2
&skip .counter LDZk INC #0b DIVk MUL SUB SWP STZ
BRK
@square ff 00
@treble
[ 40 00 3b 3c ] [ 3e 00 3c 3b ] [ 39 00 39 3c ] [ 40 00 3e 3c ]
[ 3b 00 00 3c ] [ 3e 00 40 00 ] [ 3c 00 39 00 ] [ 39 00 00 00 ]
[ 00 3e 00 41 ] [ 45 00 43 41 ] [ 40 00 00 3c ] [ 40 00 3e 3c ]
[ 3b 00 3b 3c ] [ 3e 00 40 00 ] [ 3c 00 39 00 ] [ 39 00 00 00 ]
[ 40 00 3b 3c ] [ 3e 00 3c 3b ] [ 39 00 39 3c ] [ 40 00 3e 3c ]
[ 3b 00 00 3c ] [ 3e 00 40 00 ] [ 3c 00 39 00 ] [ 39 00 00 00 ]
[ 00 3e 00 41 ] [ 45 00 43 41 ] [ 40 00 00 3c ] [ 40 00 3e 3c ]
[ 3b 00 3b 3c ] [ 3e 00 40 00 ] [ 3c 00 39 00 ] [ 39 00 00 00 ]
[ 40 00 00 00 ] [ 3c 00 00 00 ] [ 3e 00 00 00 ] [ 3b 00 00 00 ]
[ 3c 00 00 00 ] [ 39 00 00 00 ] [ 38 00 00 00 ] [ 3b 00 00 00 ]
[ 40 00 00 00 ] [ 3c 00 00 00 ] [ 3e 00 00 00 ] [ 3b 00 00 00 ]
[ 3c 00 00 00 ] [ 39 00 00 00 ] [ 38 00 00 00 ] [ 3b 00 00 00 ]
@bass
[ 28 00 00 00 ] [ 28 00 00 00 ] [ 2d 00 00 00 ] [ 2d 00 00 00 ]
[ 2c 00 00 00 ] [ 28 00 00 00 ] [ 2d 00 00 00 ] [ 00 00 00 00 ]
[ 26 00 00 00 ] [ 26 00 00 00 ] [ 24 00 00 00 ] [ 24 00 00 00 ]
[ 28 00 00 00 ] [ 28 00 00 00 ] [ 2d 00 00 00 ] [ 00 00 00 00 ]
[ 28 00 00 00 ] [ 28 00 00 00 ] [ 2d 00 00 00 ] [ 2d 00 00 00 ]
[ 2c 00 00 00 ] [ 28 00 00 00 ] [ 2d 00 00 00 ] [ 00 00 00 00 ]
[ 26 00 00 00 ] [ 26 00 00 00 ] [ 24 00 00 00 ] [ 24 00 00 00 ]
[ 28 00 00 00 ] [ 28 00 00 00 ] [ 2d 00 00 00 ] [ 00 00 00 00 ]
[ 2d 00 00 00 ] [ 2d 00 00 00 ] [ 2c 00 00 00 ] [ 2c 00 00 00 ]
[ 2d 00 00 00 ] [ 2d 00 00 00 ] [ 2c 00 00 00 ] [ 00 00 00 00 ]
[ 2d 00 00 00 ] [ 2d 00 00 00 ] [ 2c 00 00 00 ] [ 2c 00 00 00 ]
[ 2d 00 00 00 ] [ 2d 00 00 00 ] [ 2c 00 00 00 ] [ 00 00 00 00 ]