diff clojure/com/aurellem/run/music.clj @ 436:3171cbe077f3

created basic frame system for multiple voices.
author Robert McIntyre <rlm@mit.edu>
date Wed, 25 Apr 2012 12:41:30 -0500
parents 3939ad680681
children 20a9d5faf47c
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/run/music.clj	Wed Apr 25 12:35:53 2012 -0500
     1.2 +++ b/clojure/com/aurellem/run/music.clj	Wed Apr 25 12:41:30 2012 -0500
     1.3 @@ -293,7 +293,7 @@
     1.4      ;; initialize frame 1 
     1.5      0x21
     1.6      0x00
     1.7 -    0xD0 ;; set HL to 0xD000 == music-start
     1.8 +    0xD0 ;; set HL to 0xD000 == music-start 1
     1.9      0x0E
    1.10      0x00 ;; 0->C
    1.11      0x06
    1.12 @@ -306,13 +306,22 @@
    1.13      0xE5 ;; push HL
    1.14  
    1.15      ;; initialize frame 2
    1.16 -    
    1.17 +    0x21
    1.18 +    0x00
    1.19 +    0xC0 ;; set HL to 0xC000 == music-start 2
    1.20 +
    1.21 +    0xF5 ;; push AF
    1.22 +    0xC5 ;; push CB
    1.23 +    0xE5 ;; push HL
    1.24 +
    1.25 +
    1.26      
    1.27      ;; init-2 (0->A,B,C), 0xC000 -> HL
    1.28  
    1.29      ;; push to stack
    1.30  
    1.31 -    ;; SP - 5
    1.32 +    0xE8 ;; SP + 8
    1.33 +    6
    1.34      ;; pop from stack
    1.35      (music-step music-1)
    1.36      ;; save to stack