Mercurial > vba-clojure
diff clojure/com/aurellem/run/adv_choreo.clj @ 575:15876b1a0906
glyph display works partially, but does not write all glyphs.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 01 Sep 2012 04:15:32 -0500 |
parents | be6f46094ad0 |
children | 376f282bcbf1 |
line wrap: on
line diff
1.1 --- a/clojure/com/aurellem/run/adv_choreo.clj Sat Sep 01 04:05:51 2012 -0500 1.2 +++ b/clojure/com/aurellem/run/adv_choreo.clj Sat Sep 01 04:15:32 2012 -0500 1.3 @@ -43,8 +43,8 @@ 1.4 (display-image-kernel 1.5 base-address 1.6 1.7 - ;;pinkie-pie-mark 1.8 - test-image-color 1.9 + pinkie-pie-mark 1.10 + ;;test-image-color 1.11 1.12 ) 1.13 1.14 @@ -75,8 +75,8 @@ 1.15 (concat 1.16 image-program ;; image program falls through to music program 1.17 1.18 - (infinite-loop) 1.19 - ;;music-program 1.20 + ;;(infinite-loop) 1.21 + music-program 1.22 1.23 ))) 1.24 1.25 @@ -179,8 +179,7 @@ 1.26 1.27 (let [init* 1.28 (flatten 1.29 - [0xF1 ;; pop A, now A is equal to key input 1.30 - ;; BC is current number of glyphs rendered. 1.31 + [;; BC is current number of glyphs rendered. 1.32 ;; each glyph is two characters, and the screen can hold up 1.33 ;; to 360 characters. Thus, if the current glyphs is a 1.34 ;; multiple of 180, the screen must be refreshed. 1.35 @@ -272,12 +271,21 @@ 1.36 0xC1 0xD1 ;; pop C B E D 1.37 ] 1.38 1.39 - 1.40 - 1.41 - 1.42 render-glyph 1.43 (flatten 1.44 [set-HL-from-row-and-column 1.45 + 0xF1 ;; pop A, now A is equal to key input 1.46 + 0xF5 ;; save A 1.47 + 1.48 + 0xE6 0xF0 ;; clear second nybble 1.49 + 0xCB 0x37 ;; swap nybbles 1.50 + 0x22 ;; store A in video as a character (pun) 1.51 + 1.52 + 0xF1 ;; restore A 1.53 + 0xE6 0x0F ;; select second nybble 1.54 + 0x22 ;; store second nybble as glyph 1.55 + 1.56 + increment-row-column 1.57 increment-row-column 1.58 ;; Render each nybble of A as a character 1.59 ;; there are two characters to a glyph.