projects
/
wenboi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4751f0c
)
Fixed bug in ADD SP, inm which truncated the result to 8 bits :P
author
Jorge Gorbe Moya
<jgorbe@dsic.upv.es>
Fri, 12 Sep 2008 17:31:11 +0000
(19:31 +0200)
committer
Jorge Gorbe Moya
<jgorbe@dsic.upv.es>
Fri, 12 Sep 2008 17:31:11 +0000
(19:31 +0200)
gbcore.cc
patch
|
blob
|
history
diff --git
a/gbcore.cc
b/gbcore.cc
index 4187d93e60b930fbf92c27361648c61d62dd82ca..07467a1e9e68114984661dbb42268ec6472ea5f4 100644
(file)
--- 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<s8>(memory.read(regs.PC++));
int res = regs.SP + n;
- regs.SP = static_cast<u
8
>(res);
+ regs.SP = static_cast<u
16
>(res);
reset_flag(ZERO_FLAG);
reset_flag(ADD_SUB_FLAG);
set_flag_if(res > 0xFFFF, CARRY_FLAG);