From 64efba73830fae162402b2d3d094183b640dd45b Mon Sep 17 00:00:00 2001 From: d6 Date: Sat, 6 May 2023 00:30:02 -0400 Subject: [PATCH] initial version --- type-a.tal | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 type-a.tal diff --git a/type-a.tal b/type-a.tal new file mode 100644 index 0000000..cd455a2 --- /dev/null +++ b/type-a.tal @@ -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 ]