Add graphics window.

This commit is contained in:
Fabien Freling 2015-04-19 19:18:03 +02:00
parent 644a1356a8
commit c464ca697a
2 changed files with 4 additions and 1 deletions

2
_tags
View file

@ -1 +1 @@
true: package(unix), warn(A-40-42)
true: package(unix), package(graphics), warn(A-40-42)

View file

@ -1,6 +1,7 @@
open Printf
let rec run (cpu: Cpu.t) (mem: Memory.map) =
let command = read_line () in
Cpu.run cpu mem;
run cpu mem
@ -16,6 +17,8 @@ let power_up cartridge =
let cpu = Cpu.init_cpu in
let mem = Memory.init cartridge in
Graphics.open_graph "";
Graphics.resize_window 256 256;
run cpu mem