From 2280d2a48e74ef714a2fe28bd14f8ff06c568caf Mon Sep 17 00:00:00 2001 From: d_m Date: Fri, 2 Aug 2024 01:05:33 -0400 Subject: [PATCH] basic music is working --- kodiak.tal | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/kodiak.tal b/kodiak.tal index 67946a7..96d0f0a 100644 --- a/kodiak.tal +++ b/kodiak.tal @@ -85,7 +85,8 @@ ;square .Audio0/addr DEO2 ( ; square wave ) #77 .Audio0/vol DEO ( ; about 50% volume ) -( #00 .Audio0/pitch DEO ( start ) ) + ( once testing is over should this default to off? ) + start-audio reset BRK @@ -433,13 +434,14 @@ #00 .audio STZ #00 .Audio0/pitch DEO JMP2r @start-audio ( -> ) - #01 .audio STZ #0000 .audio/pos STZ2 !play-audio + #0000 .audio/pos #01 .audio STZ STZ2 !play-audio @play-audio ( -> ) .audio/pos LDZ2 ( pos* ) ;music OVR2 ADD2 LDA ( pos* pitch^ ) .Audio0/pitch DEO ( pos* ) - INC2 #0007 AND2 ( ) + ( TODO: compute this dynamically using `;music/end ;music INC2 SUB2` ) + INC2 #003f AND2 ( ) .audio/pos STZ2 JMP2r ( ) @on-audio ( -> brk ) @@ -915,4 +917,8 @@ ( 6c 6d 6e 6f 70 71 72 73 74 75 76 77 ) ( 78 79 7a 7b 7c 7d 7e 7f ) -@music 18 18 1a 1b 1f 24 1a 1b +@music + 18 18 1a 1b 1f 24 1a 1b 18 18 1a 1b 1f 24 1a 1b + 18 18 1a 1b 1f 24 1a 1b 18 18 1a 1b 1f 24 1a 1b + 20 20 22 24 2b 2c 22 24 20 20 22 24 2b 2c 22 24 + 1f 1f 20 22 29 2b 20 22 1f 1f 20 22 29 2b 20 22