Replace begin .. end with ( .. )

This commit is contained in:
Fabien Freling 2016-02-29 23:58:29 +01:00
parent 033f63ec42
commit 77f7c7bef3
3 changed files with 25 additions and 31 deletions

View file

@ -13,10 +13,10 @@ open Printf
@see http://imrannazar.com/GameBoy-Emulation-in-JavaScript:-Memory *)
(** Common addresses *)
let gDIV = 0xFF04 (** divider register *)
let gDIV = 0xFF04 (** divider register *)
let gTIMA = 0xFF05 (** timer counter *)
let gTMA = 0xFF06 (** timer modulo *)
let gTAC = 0xFF07 (** timer control *)
let gTMA = 0xFF06 (** timer modulo *)
let gTAC = 0xFF07 (** timer control *)
type map = {
rom_bank_00 : bytes; (* cartridge, 16KB *)
@ -99,11 +99,11 @@ let update_timers mem cycles =
if should_inc_div then ignore (inc mem.map gDIV);
let should_inc_tima = Timer.update mem.tima cycles in
if should_inc_tima then begin
if should_inc_tima then (
let overflow = inc mem.map gTIMA in
if overflow then begin
if overflow then (
let tma = get mem.map gTMA in
set mem.map gTIMA tma
(* TODO: INT 50 - Timer interupt *)
end
end
)
)