Add graphics window
This commit is contained in:
parent
54def17c26
commit
fb5eeed6ba
2 changed files with 18 additions and 14 deletions
11
src/oboy.ml
11
src/oboy.ml
|
@ -1,8 +1,8 @@
|
|||
open Printf
|
||||
|
||||
let rec run (cpu: Cpu.t) (mem: Memory.map) =
|
||||
let rec run (cpu: Cpu.t) (mem: Memory.map) (screen: Screen.t) =
|
||||
Cpu.run cpu mem;
|
||||
run cpu mem
|
||||
run cpu mem screen
|
||||
|
||||
(** Power up sequence
|
||||
http://bgb.bircd.org/pandocs.htm#powerupsequence *)
|
||||
|
@ -16,7 +16,12 @@ let power_up cartridge =
|
|||
|
||||
let cpu = Cpu.init_cpu in
|
||||
let mem = Memory.init cartridge in
|
||||
run cpu mem
|
||||
let screen = Screen.init in
|
||||
|
||||
Graphics.open_graph "";
|
||||
Graphics.resize_window Screen.width Screen.height;
|
||||
|
||||
run cpu mem screen
|
||||
|
||||
|
||||
let () =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue