diff --git a/desmume/src/arm_instructions.cpp b/desmume/src/arm_instructions.cpp index 91e0bccbe..06718caab 100644 --- a/desmume/src/arm_instructions.cpp +++ b/desmume/src/arm_instructions.cpp @@ -1185,8 +1185,8 @@ TEMPLATE static u32 FASTCALL OP_ADC_IMM_VAL() }\ cpu->CPSR.bits.N = BIT31(cpu->R[REG_POS(i,12)]);\ cpu->CPSR.bits.Z = (cpu->R[REG_POS(i,12)]==0);\ - cpu->CPSR.bits.C = UNSIGNED_OVERFLOW(shift_op, cpu->CPSR.bits.C, tmp) | UNSIGNED_OVERFLOW(v, tmp, cpu->R[REG_POS(i,12)]);\ - cpu->CPSR.bits.V = SIGNED_OVERFLOW(shift_op, cpu->CPSR.bits.C, tmp) | SIGNED_OVERFLOW(v, tmp, cpu->R[REG_POS(i,12)]);\ + cpu->CPSR.bits.C = UNSIGNED_OVERFLOW(shift_op, (u32) cpu->CPSR.bits.C, tmp) | UNSIGNED_OVERFLOW(v, tmp, cpu->R[REG_POS(i,12)]);\ + cpu->CPSR.bits.V = SIGNED_OVERFLOW(shift_op, (u32) cpu->CPSR.bits.C, tmp) | SIGNED_OVERFLOW(v, tmp, cpu->R[REG_POS(i,12)]);\ return a; \ } diff --git a/desmume/src/cli/main.cpp b/desmume/src/cli/main.cpp index 388d4151f..a0dc0f491 100644 --- a/desmume/src/cli/main.cpp +++ b/desmume/src/cli/main.cpp @@ -776,7 +776,7 @@ int main(int argc, char ** argv) { } update_keypad(keypad); /* Update keypad */ - last_cycle = NDS_exec((560190 << 1) - last_cycle, FALSE); + last_cycle = NDS_exec((560190 << 1) - last_cycle); SPU_Emulate_user(); SPU_Emulate_core(); diff --git a/desmume/src/gtk-glade/desmume.cpp b/desmume/src/gtk-glade/desmume.cpp index 4707c79af..11bd506c6 100755 --- a/desmume/src/gtk-glade/desmume.cpp +++ b/desmume/src/gtk-glade/desmume.cpp @@ -116,7 +116,7 @@ void desmume_cycle() /* Update keypad value */ update_keypad(keypad); - desmume_last_cycle = NDS_exec((560190 << 1) - desmume_last_cycle, FALSE); + desmume_last_cycle = NDS_exec((560190 << 1) - desmume_last_cycle); SPU_Emulate_user(); SPU_Emulate_core(); } diff --git a/desmume/src/gtk/desmume.cpp b/desmume/src/gtk/desmume.cpp index 8c1f06d02..fed4da65b 100644 --- a/desmume/src/gtk/desmume.cpp +++ b/desmume/src/gtk/desmume.cpp @@ -88,7 +88,7 @@ void desmume_cycle( void) /* Update keypad value */ update_keypad(keypad); - desmume_last_cycle = NDS_exec((560190 << 1) - desmume_last_cycle, FALSE); + desmume_last_cycle = NDS_exec((560190 << 1) - desmume_last_cycle); SPU_Emulate_user(); SPU_Emulate_core(); } diff --git a/desmume/src/thumb_instructions.cpp b/desmume/src/thumb_instructions.cpp index be50b9eb1..1158d107f 100644 --- a/desmume/src/thumb_instructions.cpp +++ b/desmume/src/thumb_instructions.cpp @@ -355,8 +355,8 @@ TEMPLATE static u32 FASTCALL OP_ADC_REG() cpu->CPSR.bits.N = BIT31(res); cpu->CPSR.bits.Z = res == 0; - cpu->CPSR.bits.C = UNSIGNED_OVERFLOW(b, cpu->CPSR.bits.C, tmp) | UNSIGNED_OVERFLOW(tmp, a, res); - cpu->CPSR.bits.V = SIGNED_OVERFLOW(b, cpu->CPSR.bits.C, tmp) | SIGNED_OVERFLOW(tmp, a, res); + cpu->CPSR.bits.C = UNSIGNED_OVERFLOW(b, (u32) cpu->CPSR.bits.C, tmp) | UNSIGNED_OVERFLOW(tmp, a, res); + cpu->CPSR.bits.V = SIGNED_OVERFLOW(b, (u32) cpu->CPSR.bits.C, tmp) | SIGNED_OVERFLOW(tmp, a, res); return 3; } @@ -964,4 +964,4 @@ TEMPLATE static u32 FASTCALL OP_BL_THUMB() #define NOM_THUMB_TAB thumb_instructions_set_1 #define TABDECL(x) x<1> -#include "thumb_tabdef.inc" \ No newline at end of file +#include "thumb_tabdef.inc"