rlm@521
|
1 (ns com.aurellem.run.choreo
|
rlm@521
|
2 (:use (com.aurellem.gb saves gb-driver util constants
|
rlm@521
|
3 items vbm characters money
|
rlm@521
|
4 rlm-assembly))
|
rlm@521
|
5 (:use (com.aurellem.run util music title save-corruption
|
rlm@537
|
6 bootstrap-0 bootstrap-1 image
|
rlm@537
|
7 ram-display))
|
rlm@521
|
8 (:require clojure.string)
|
rlm@521
|
9 (:import [com.aurellem.gb.gb_driver SaveState])
|
rlm@521
|
10 (:import java.io.File))
|
rlm@521
|
11
|
rlm@521
|
12
|
rlm@535
|
13
|
rlm@535
|
14 ;; take over game
|
rlm@535
|
15 ;; [X] silence noise
|
rlm@535
|
16 ;; [ ] construct writing/playing kernel
|
rlm@535
|
17 ;; [ ] play pony song while writing picture-program
|
rlm@535
|
18 ;; [ ] run picture program to display pinkie pie mark
|
rlm@535
|
19
|
rlm@535
|
20
|
rlm@535
|
21
|
rlm@535
|
22 (defn-memo silence-noise
|
rlm@535
|
23 ([] (silence-noise (launch-main-bootstrap-program)))
|
rlm@535
|
24 ([script]
|
rlm@535
|
25 (->> script
|
rlm@535
|
26 (write-RAM 0xFF1A [0 0 0]))))
|
rlm@535
|
27
|
rlm@535
|
28
|
rlm@535
|
29 (defn-memo write-pony-music-data
|
rlm@537
|
30 ([] (write-pony-music-data (launch-main-bootstrap-program)))
|
rlm@535
|
31 ([script]
|
rlm@536
|
32 (let [bytes (midi-bytes pony-csv)]
|
rlm@536
|
33 (->> script
|
rlm@537
|
34 (do-nothing 10)
|
rlm@536
|
35 (write-RAM (:address (:voice-1 bytes))
|
rlm@536
|
36 (:data (:voice-1 bytes)))
|
rlm@535
|
37
|
rlm@537
|
38 (do-nothing 100)
|
rlm@536
|
39 (write-RAM (:address (:voice-2 bytes))
|
rlm@536
|
40 (:data (:voice-2 bytes)))
|
rlm@535
|
41
|
rlm@537
|
42 (do-nothing 100)
|
rlm@536
|
43 (write-RAM (:address (:noise bytes))
|
rlm@536
|
44 (:data (:noise bytes)))
|
rlm@535
|
45
|
rlm@537
|
46 (do-nothing 100)
|
rlm@536
|
47 (write-RAM (:address (:kernel bytes))
|
rlm@536
|
48 (:data (:kernel bytes)))
|
rlm@538
|
49
|
rlm@536
|
50 (transfer-control (:address (:kernel bytes)))))))
|
rlm@536
|
51
|
rlm@536
|
52
|
rlm@536
|
53
|