view clojure/com/aurellem/run/choreo.clj @ 536:c2ee7222a3c4

investigating a problem with bad sound when writing RAM with bootstrapping program
author Robert McIntyre <rlm@mit.edu>
date Mon, 25 Jun 2012 14:23:16 -0500
parents 2de44c6184ee
children 04f61ade7879
line wrap: on
line source
1 (ns com.aurellem.run.choreo
2 (:use (com.aurellem.gb saves gb-driver util constants
3 items vbm characters money
4 rlm-assembly))
5 (:use (com.aurellem.run util music title save-corruption
6 bootstrap-0 bootstrap-1 image))
7 (:require clojure.string)
8 (:import [com.aurellem.gb.gb_driver SaveState])
9 (:import java.io.File))
13 ;; take over game
14 ;; [X] silence noise
15 ;; [ ] construct writing/playing kernel
16 ;; [ ] play pony song while writing picture-program
17 ;; [ ] run picture program to display pinkie pie mark
21 (defn-memo silence-noise
22 ([] (silence-noise (launch-main-bootstrap-program)))
23 ([script]
24 (->> script
25 (write-RAM 0xFF1A [0 0 0]))))
28 (defn-memo write-pony-music-data
29 ([] (write-pony-music-data (silence-noise)))
30 ([script]
31 (let [bytes (midi-bytes pony-csv)]
32 (->> script
33 (write-RAM (:address (:voice-1 bytes))
34 (:data (:voice-1 bytes)))
36 (write-RAM (:address (:voice-2 bytes))
37 (:data (:voice-2 bytes)))
39 (write-RAM (:address (:noise bytes))
40 (:data (:noise bytes)))
42 (write-RAM (:address (:kernel bytes))
43 (:data (:kernel bytes)))
45 (transfer-control (:address (:kernel bytes)))))))