From: Jorge Gorbe Moya Date: Fri, 12 Sep 2008 17:31:11 +0000 (+0200) Subject: Fixed bug in ADD SP, inm which truncated the result to 8 bits :P X-Git-Tag: v0.1~7 X-Git-Url: http://slack.codemaniacs.com/git/?a=commitdiff_plain;h=a86f8aa7cad844386ca771b733298cc6bbe51062;p=wenboi.git Fixed bug in ADD SP, inm which truncated the result to 8 bits :P --- diff --git a/gbcore.cc b/gbcore.cc index 4187d93..07467a1 100644 --- a/gbcore.cc +++ b/gbcore.cc @@ -821,7 +821,7 @@ GameBoy::run_status GameBoy::run_cycle() // FIXME: No se que hacer con el half carry, en 4 o en 11? int n = static_cast(memory.read(regs.PC++)); int res = regs.SP + n; - regs.SP = static_cast(res); + regs.SP = static_cast(res); reset_flag(ZERO_FLAG); reset_flag(ADD_SUB_FLAG); set_flag_if(res > 0xFFFF, CARRY_FLAG);