From 1d8ec4bb5e0932f2d95d956e1ed1d1664fd4415e Mon Sep 17 00:00:00 2001 From: zeromus Date: Thu, 4 Aug 2011 01:31:34 +0000 Subject: [PATCH] r3396 is alleged to have broken reverse of arcadia. it is alleged to have fixed fifa 2010. r3396 contains a change to thumb ASR which is plainly wrong. after that time several other cpu fixes were made, and the ASR changes are not necessary to fix fifa 2010 anymore. so I am reverting that part, and reverse of arcadia should be retested. --- desmume/src/thumb_instructions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desmume/src/thumb_instructions.cpp b/desmume/src/thumb_instructions.cpp index 1d6e12568..1efa5e741 100644 --- a/desmume/src/thumb_instructions.cpp +++ b/desmume/src/thumb_instructions.cpp @@ -163,7 +163,7 @@ TEMPLATE static u32 FASTCALL OP_LSR_REG(const u32 i) TEMPLATE static u32 FASTCALL OP_ASR_0(const u32 i) { cpu->CPSR.bits.C = BIT31(cpu->R[REG_NUM(i, 3)]); - cpu->R[REG_NUM(i, 0)] = cpu->CPSR.bits.C * 0xFFFFFFFF; + cpu->R[REG_NUM(i, 0)] = BIT31(cpu->R[REG_NUM(i, 3)])*0xFFFFFFFF; cpu->CPSR.bits.N = BIT31(cpu->R[REG_NUM(i, 0)]); cpu->CPSR.bits.Z = cpu->R[REG_NUM(i, 0)] == 0; @@ -201,7 +201,7 @@ TEMPLATE static u32 FASTCALL OP_ASR_REG(const u32 i) } cpu->CPSR.bits.C = BIT31(cpu->R[REG_NUM(i, 0)]); - cpu->R[REG_NUM(i, 0)] = cpu->CPSR.bits.C * 0xFFFFFFFF; + cpu->R[REG_NUM(i, 0)] = BIT31(cpu->R[REG_NUM(i, 0)])*0xFFFFFFFF; cpu->CPSR.bits.N = BIT31(cpu->R[REG_NUM(i, 0)]); cpu->CPSR.bits.Z = cpu->R[REG_NUM(i, 0)] == 0;