Mercurial > vba-clojure
comparison clojure/com/aurellem/run/image.clj @ 509:d2c40a12de28
problem turned out to be nothing.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Wed, 20 Jun 2012 22:08:56 -0500 |
parents | e6c02264dc9c |
children | b9814e3114e4 |
comparison
equal
deleted
inserted
replaced
508:e6c02264dc9c | 509:d2c40a12de28 |
---|---|
464 (write-data (+ base-address (count first-part)) | 464 (write-data (+ base-address (count first-part)) |
465 (+ target-address 255) | 465 (+ target-address 255) |
466 (drop 255 data))]))))) | 466 (drop 255 data))]))))) |
467 | 467 |
468 (defn test-write-data [] | 468 (defn test-write-data [] |
469 (let [test-data (repeat 3 0xD3) | 469 (let [test-data [0xDE 0xAD 0xBE 0xEF] |
470 base-address 0xA000 | 470 base-address 0xA000 |
471 target-address 0xA500 | 471 target-address 0xC000 |
472 | 472 |
473 test-kernel | 473 test-kernel |
474 (flatten | 474 (flatten |
475 [0xF3 ;; disable interrupts | 475 [0xF3 ;; disable interrupts |
476 (write-data (+ 1 base-address) | 476 (write-data (+ 1 base-address) |
477 target-address test-data) | 477 target-address test-data) |
478 (clear-music-registers) | |
478 (infinite-loop)])] | 479 (infinite-loop)])] |
479 ;; (assert | 480 (assert |
480 ;; (= test-data | 481 (= test-data |
481 (-> (mid-game) | 482 (-> (mid-game) |
482 tick tick tick | 483 tick tick tick |
483 (set-memory-range base-address test-kernel) | 484 (set-memory-range base-address test-kernel) |
484 (PC! base-address) | 485 (PC! base-address) |
485 | 486 |
486 ;;(run-moves (repeat 100 [])) | 487 (run-moves (repeat 100 [])) |
487 ;;(memory) | 488 (memory) |
488 ;;vec | 489 vec |
489 ;;(subvec target-address | 490 (subvec target-address |
490 ;; (+ target-address | 491 (+ target-address |
491 ;; (count test-data))) | 492 (count test-data)))))))) |
492 ;;println | |
493 ))) | |
494 | 493 |
495 | 494 |
496 | 495 |
497 | 496 |
498 | 497 |