dsplle - cleaning
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5636 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
79b20494be
commit
dacd557f57
|
@ -23,8 +23,6 @@
|
|||
|
||||
====================================================================*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "Thread.h"
|
||||
#include "MemoryUtil.h"
|
||||
|
||||
|
|
|
@ -157,6 +157,8 @@ bool CheckCondition(u8 _Condition)
|
|||
{
|
||||
switch (_Condition & 0xf)
|
||||
{
|
||||
case 0xf: // Always true.
|
||||
return true;
|
||||
case 0x0: // GE - Greater Equal
|
||||
return !isLess();
|
||||
case 0x1: // L - Less
|
||||
|
@ -187,8 +189,6 @@ bool CheckCondition(u8 _Condition)
|
|||
return isLogicZero();
|
||||
case 0xe: // 0 - Overflow
|
||||
return isOverflow();
|
||||
case 0xf: // Empty - always true.
|
||||
return true;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
|
||||
====================================================================*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "DSPTables.h"
|
||||
#include "DSPHost.h"
|
||||
#include "DSPCore.h"
|
||||
|
|
|
@ -23,8 +23,6 @@
|
|||
|
||||
====================================================================*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "DSPInterpreter.h"
|
||||
#include "DSPMemoryMap.h"
|
||||
#include "DSPHWInterface.h"
|
||||
|
@ -36,8 +34,10 @@ u16 dsp_imem_read(u16 addr)
|
|||
{
|
||||
case 0: // 0xxx IRAM
|
||||
return g_dsp.iram[addr & DSP_IRAM_MASK];
|
||||
|
||||
case 8: // 8xxx IROM - contains code to receive code for IRAM, and a bunch of mixing loops.
|
||||
return g_dsp.irom[addr & DSP_IROM_MASK];
|
||||
|
||||
default: // Unmapped/non-existing memory
|
||||
ERROR_LOG(DSPLLE, "%04x DSP ERROR: Executing from invalid (%04x) memory", g_dsp.pc, addr);
|
||||
return 0;
|
||||
|
@ -72,10 +72,6 @@ void dsp_dmem_write(u16 addr, u16 val)
|
|||
g_dsp.dram[addr & DSP_DRAM_MASK] = val;
|
||||
break;
|
||||
|
||||
case 0x1: // 1xxx COEF
|
||||
ERROR_LOG(DSPLLE, "Illegal write to COEF (pc = %02x)", g_dsp.pc);
|
||||
break;
|
||||
|
||||
case 0xf: // Fxxx HW regs
|
||||
gdsp_ifx_write(addr, val);
|
||||
break;
|
||||
|
|
|
@ -106,7 +106,7 @@ extern const DSPOPCTemplate opcodes_ext[];
|
|||
extern const int opcodes_ext_size;
|
||||
extern const DSPOPCTemplate cw;
|
||||
|
||||
#define WRITEBACKLOGSIZE 7
|
||||
#define WRITEBACKLOGSIZE 5
|
||||
|
||||
extern const DSPOPCTemplate *opTable[OPTABLE_SIZE];
|
||||
extern const DSPOPCTemplate *extOpTable[EXT_OPTABLE_SIZE];
|
||||
|
|
|
@ -33,11 +33,11 @@ inline s64 dsp_get_multiply_prod(u16 a, u16 b, u8 sign)
|
|||
s64 prod;
|
||||
|
||||
if ((sign == 1) && (g_dsp.r[DSP_REG_SR] & SR_MUL_UNSIGNED)) //unsigned
|
||||
prod = (u64)a * (u64)b;
|
||||
prod = a * b;
|
||||
else if ((sign == 2) && (g_dsp.r[DSP_REG_SR] & SR_MUL_UNSIGNED)) //mixed
|
||||
prod = (u64)a * (s64)(s16)b;
|
||||
prod = a * (s16)b;
|
||||
else
|
||||
prod = (s64)(s16)a * (s64)(s16)b; //signed
|
||||
prod = (s16)a * (s16)b; //signed
|
||||
|
||||
// Conditionally multiply by 2.
|
||||
if ((g_dsp.r[DSP_REG_SR] & SR_MUL_MODIFY) == 0)
|
||||
|
@ -60,7 +60,7 @@ inline s64 dsp_multiply_add(u16 a, u16 b, u8 sign = 0)
|
|||
|
||||
inline s64 dsp_multiply_sub(u16 a, u16 b, u8 sign = 0)
|
||||
{
|
||||
s64 prod = dsp_get_long_prod() - dsp_get_multiply_prod(a, b, sign);
|
||||
s64 prod = dsp_get_long_prod() - dsp_get_multiply_prod(a, b, sign);
|
||||
return prod;
|
||||
}
|
||||
|
||||
|
@ -71,9 +71,9 @@ inline s64 dsp_multiply_mulx(u8 axh0, u8 axh1, u16 val1, u16 val2)
|
|||
if ((axh0==0) && (axh1==0))
|
||||
result = dsp_multiply(val1, val2, 1); // unsigned support ON if both ax?.l regs are used
|
||||
else if ((axh0==0) && (axh1==1))
|
||||
result = dsp_multiply(val1, val2, 2); // mixed support ON (u64)axl.0 * (s64)(s16)axh.1
|
||||
result = dsp_multiply(val1, val2, 2); // mixed support ON (u16)axl.0 * (s16)axh.1
|
||||
else if ((axh0==1) && (axh1==0))
|
||||
result = dsp_multiply(val2, val1, 2); // mixed support ON (u64)axl.1 * (s64)(s16)axh.0
|
||||
result = dsp_multiply(val2, val1, 2); // mixed support ON (u16)axl.1 * (s16)axh.0
|
||||
else
|
||||
result = dsp_multiply(val1, val2, 0); // unsigned support OFF if both ax?.h regs are used
|
||||
|
||||
|
|
|
@ -66,7 +66,10 @@ void DSPHost_InterruptRequest()
|
|||
u32 DSPHost_CodeLoaded(const u8 *ptr, int size)
|
||||
{
|
||||
u32 crc = GenerateCRC(ptr, size);
|
||||
|
||||
#if defined(_DEBUG) || defined(DEBUGFAST)
|
||||
DumpDSPCode(ptr, size, crc);
|
||||
#endif
|
||||
|
||||
// HLE plugin uses this crc method
|
||||
u32 ector_crc = HashEctor(ptr, size);
|
||||
|
|
Loading…
Reference in New Issue