DSPLLE + 2 small fixes, many GC AX games are almost perfect (sound wise, ex. Super Monkey Ball 1/2), if PC is fast enough (3GHz C2D+), Zelda type games too slow to be testable
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4340 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
0032d2746f
commit
d1f0294053
|
@ -40,6 +40,17 @@ namespace DSPInterpreter
|
|||
namespace Ext
|
||||
{
|
||||
|
||||
inline bool IsSameMemArea(u16 a, u16 b)
|
||||
{
|
||||
//LM:AX games have probs with this,... more tests needed
|
||||
#if 0
|
||||
if ((a>>12)==(b>>12)) //from http://code.google.com/p/dolphin-emu/wiki/DSP_todo (Luigi research)
|
||||
return true;
|
||||
else
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
// DR $arR
|
||||
// xxxx xxxx 0000 01rr
|
||||
// Decrement addressing register $arR.
|
||||
|
@ -290,11 +301,21 @@ void ld(const UDSPInstruction& opc)
|
|||
|
||||
if (sreg != 0x03) {
|
||||
writeToBackLog(0, (dreg << 1) + DSP_REG_AXL0, dsp_dmem_read(g_dsp.r[sreg]));
|
||||
writeToBackLog(1, (rreg << 1) + DSP_REG_AXL1, dsp_dmem_read(g_dsp.r[sreg]));
|
||||
|
||||
if (IsSameMemArea(g_dsp.r[sreg],g_dsp.r[0x3]))
|
||||
writeToBackLog(1, (rreg << 1) + DSP_REG_AXL1, dsp_dmem_read(g_dsp.r[sreg]));
|
||||
else
|
||||
writeToBackLog(1, (rreg << 1) + DSP_REG_AXL1, dsp_dmem_read(g_dsp.r[0x3]));
|
||||
|
||||
writeToBackLog(2, sreg, dsp_increment_addr_reg(sreg));
|
||||
} else {
|
||||
writeToBackLog(0, rreg + DSP_REG_AXL0, dsp_dmem_read(g_dsp.r[dreg]));
|
||||
writeToBackLog(1, rreg + DSP_REG_AXH0, dsp_dmem_read(g_dsp.r[dreg]));
|
||||
|
||||
if (IsSameMemArea(g_dsp.r[dreg],g_dsp.r[0x3]))
|
||||
writeToBackLog(1, rreg + DSP_REG_AXH0, dsp_dmem_read(g_dsp.r[dreg]));
|
||||
else
|
||||
writeToBackLog(1, rreg + DSP_REG_AXH0, dsp_dmem_read(g_dsp.r[0x3]));
|
||||
|
||||
writeToBackLog(2, dreg, dsp_increment_addr_reg(dreg));
|
||||
}
|
||||
|
||||
|
@ -312,11 +333,21 @@ void ldn(const UDSPInstruction& opc)
|
|||
|
||||
if (sreg != 0x03) {
|
||||
writeToBackLog(0, (dreg << 1) + DSP_REG_AXL0, dsp_dmem_read(g_dsp.r[sreg]));
|
||||
writeToBackLog(1, (rreg << 1) + DSP_REG_AXL1, dsp_dmem_read(g_dsp.r[sreg]));
|
||||
|
||||
if (IsSameMemArea(g_dsp.r[sreg],g_dsp.r[0x3]))
|
||||
writeToBackLog(1, (rreg << 1) + DSP_REG_AXL1, dsp_dmem_read(g_dsp.r[sreg]));
|
||||
else
|
||||
writeToBackLog(1, (rreg << 1) + DSP_REG_AXL1, dsp_dmem_read(g_dsp.r[0x3]));
|
||||
|
||||
writeToBackLog(2, sreg, dsp_increase_addr_reg(sreg, (s16)g_dsp.r[DSP_REG_IX0 + sreg]));
|
||||
} else {
|
||||
writeToBackLog(0, rreg + DSP_REG_AXL0, dsp_dmem_read(g_dsp.r[dreg]));
|
||||
writeToBackLog(1, rreg + DSP_REG_AXH0, dsp_dmem_read(g_dsp.r[dreg]));
|
||||
|
||||
if (IsSameMemArea(g_dsp.r[dreg],g_dsp.r[0x3]))
|
||||
writeToBackLog(1, rreg + DSP_REG_AXH0, dsp_dmem_read(g_dsp.r[dreg]));
|
||||
else
|
||||
writeToBackLog(1, rreg + DSP_REG_AXH0, dsp_dmem_read(g_dsp.r[0x3]));
|
||||
|
||||
writeToBackLog(2, dreg, dsp_increase_addr_reg(dreg, (s16)g_dsp.r[DSP_REG_IX0 + dreg]));
|
||||
}
|
||||
|
||||
|
@ -335,11 +366,21 @@ void ldm(const UDSPInstruction& opc)
|
|||
|
||||
if (sreg != 0x03) {
|
||||
writeToBackLog(0, (dreg << 1) + DSP_REG_AXL0, dsp_dmem_read(g_dsp.r[sreg]));
|
||||
writeToBackLog(1, (rreg << 1) + DSP_REG_AXL1, dsp_dmem_read(g_dsp.r[sreg]));
|
||||
|
||||
if (IsSameMemArea(g_dsp.r[sreg],g_dsp.r[0x3]))
|
||||
writeToBackLog(1, (rreg << 1) + DSP_REG_AXL1, dsp_dmem_read(g_dsp.r[sreg]));
|
||||
else
|
||||
writeToBackLog(1, (rreg << 1) + DSP_REG_AXL1, dsp_dmem_read(g_dsp.r[0x3]));
|
||||
|
||||
writeToBackLog(2, sreg, dsp_increment_addr_reg(sreg));
|
||||
} else {
|
||||
writeToBackLog(0, rreg + DSP_REG_AXL0, dsp_dmem_read(g_dsp.r[dreg]));
|
||||
writeToBackLog(1, rreg + DSP_REG_AXH0, dsp_dmem_read(g_dsp.r[dreg]));
|
||||
|
||||
if (IsSameMemArea(g_dsp.r[dreg],g_dsp.r[0x3]))
|
||||
writeToBackLog(1, rreg + DSP_REG_AXH0, dsp_dmem_read(g_dsp.r[dreg]));
|
||||
else
|
||||
writeToBackLog(1, rreg + DSP_REG_AXH0, dsp_dmem_read(g_dsp.r[0x3]));
|
||||
|
||||
writeToBackLog(2, dreg, dsp_increment_addr_reg(dreg));
|
||||
}
|
||||
|
||||
|
@ -358,11 +399,21 @@ void ldnm(const UDSPInstruction& opc)
|
|||
|
||||
if (sreg != 0x03) {
|
||||
writeToBackLog(0, (dreg << 1) + DSP_REG_AXL0, dsp_dmem_read(g_dsp.r[sreg]));
|
||||
writeToBackLog(1, (rreg << 1) + DSP_REG_AXL1, dsp_dmem_read(g_dsp.r[sreg]));
|
||||
|
||||
if (IsSameMemArea(g_dsp.r[sreg],g_dsp.r[0x3]))
|
||||
writeToBackLog(1, (rreg << 1) + DSP_REG_AXL1, dsp_dmem_read(g_dsp.r[sreg]));
|
||||
else
|
||||
writeToBackLog(1, (rreg << 1) + DSP_REG_AXL1, dsp_dmem_read(g_dsp.r[0x3]));
|
||||
|
||||
writeToBackLog(2, sreg, dsp_increase_addr_reg(sreg, (s16)g_dsp.r[DSP_REG_IX0 + sreg]));
|
||||
} else {
|
||||
writeToBackLog(0, rreg + DSP_REG_AXL0, dsp_dmem_read(g_dsp.r[dreg]));
|
||||
writeToBackLog(1, rreg + DSP_REG_AXH0, dsp_dmem_read(g_dsp.r[dreg]));
|
||||
|
||||
if (IsSameMemArea(g_dsp.r[dreg],g_dsp.r[0x3]))
|
||||
writeToBackLog(1, rreg + DSP_REG_AXH0, dsp_dmem_read(g_dsp.r[dreg]));
|
||||
else
|
||||
writeToBackLog(1, rreg + DSP_REG_AXH0, dsp_dmem_read(g_dsp.r[0x3]));
|
||||
|
||||
writeToBackLog(2, dreg, dsp_increase_addr_reg(dreg, (s16)g_dsp.r[DSP_REG_IX0 + dreg]));
|
||||
}
|
||||
|
||||
|
|
|
@ -32,9 +32,11 @@ inline s64 dsp_get_multiply_prod(u16 a, u16 b, bool sign)
|
|||
{
|
||||
s64 prod;
|
||||
|
||||
#if 0 //causing probs with all games atm
|
||||
if (sign && g_dsp.r[DSP_REG_SR] & SR_MUL_UNSIGNED)
|
||||
prod = (u64)a * (u64)b; // won't overflow 32-bits
|
||||
else
|
||||
#endif
|
||||
prod = (s32)(s16)a * (s32)(s16)b; // won't overflow 32-bits
|
||||
|
||||
// Conditionally multiply by 2.
|
||||
|
|
|
@ -95,6 +95,7 @@ void UpdateProjectionHack(int iPhackvalue)
|
|||
fhackvalue1 = 0.0075f;
|
||||
bPhackvalue2 = 0;
|
||||
bProjHack1 = 0;
|
||||
break;
|
||||
case PROJECTION_HACK_BATEN_KAITOS:
|
||||
bPhackvalue1 = 1;
|
||||
fhackvalue1 = 0.0026f;
|
||||
|
|
|
@ -201,7 +201,7 @@ void Enumerate()
|
|||
a.supports_resz = D3D_OK == D3D->CheckDeviceFormat(
|
||||
i, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8,
|
||||
D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_TEXTURE, FOURCC_RESZ);
|
||||
a.supports_resz = D3D_OK == D3D->CheckDeviceFormat(
|
||||
a.supports_null = D3D_OK == D3D->CheckDeviceFormat(
|
||||
i, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8,
|
||||
D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_TEXTURE, FOURCC_NULL);
|
||||
|
||||
|
|
Loading…
Reference in New Issue