changeset 517:bc24e4d605e9

switched tile and pallette assembly.
author Robert McIntyre <rlm@mit.edu>
date Fri, 22 Jun 2012 21:25:47 -0500
parents 7eac27143ab9
children bb4434c5a8f3
files clojure/com/aurellem/run/image.clj
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/run/image.clj	Fri Jun 22 21:24:44 2012 -0500
     1.2 +++ b/clojure/com/aurellem/run/image.clj	Fri Jun 22 21:25:47 2012 -0500
     1.3 @@ -608,24 +608,24 @@
     1.4              character-data-address
     1.5              (flatten
     1.6               (map gb-tile->bytes (:tiles gb-image))))
     1.7 -           (select-LCD-bank 1)]
     1.8 +           (select-LCD-bank 0)]
     1.9          B (flatten B)
    1.10  
    1.11          
    1.12 -        C [;; [X] specifiy pallets for each character
    1.13 +        C [;; [X] write image to the screen in terms of tiles
    1.14             (write-image
    1.15              (+ base-address (+ (count A) (count B)))
    1.16              BG-1-address
    1.17 -            (map second (:data gb-image)))
    1.18 -           (select-LCD-bank 0)]
    1.19 +            (map first (:data gb-image)))
    1.20 +           (select-LCD-bank 1)]
    1.21  
    1.22          C (flatten C)
    1.23  
    1.24 -        D [;; [X] write image to the screen in terms of tiles
    1.25 +        D [;; [X] specifiy pallets for each character
    1.26             (write-image
    1.27              (+ base-address (+ (count A) (count B) (count C)))
    1.28              BG-1-address
    1.29 -            (map first (:data gb-image)))
    1.30 +            (map second (:data gb-image)))
    1.31             
    1.32  
    1.33             ;; [X] reactivate the LCD display