DSPLLE - 'L ext opcode fix
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5095 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
3bb9ab68ae
commit
f7bf29a528
|
@ -121,8 +121,20 @@ void l(const UDSPInstruction& opc)
|
|||
u8 sreg = opc.hex & 0x3;
|
||||
u8 dreg = ((opc.hex >> 3) & 0x7) + DSP_REG_AXL0;
|
||||
|
||||
writeToBackLog(0, dreg, dsp_dmem_read(g_dsp.r[sreg]));
|
||||
writeToBackLog(1, sreg, dsp_increment_addr_reg(sreg));
|
||||
// 40bit sign extension if target is acm.D (important for zelda type ucodes)
|
||||
if ((dreg >= DSP_REG_ACM0) && (g_dsp.r[DSP_REG_SR] & SR_40_MODE_BIT))
|
||||
{
|
||||
u16 val = dsp_dmem_read(g_dsp.r[sreg]);
|
||||
writeToBackLog(0, dreg - DSP_REG_ACM0 + DSP_REG_ACH0, (val & 0x8000) ? 0xFFFF : 0x0000);
|
||||
writeToBackLog(1, dreg, val);
|
||||
writeToBackLog(2, dreg - DSP_REG_ACM0 + DSP_REG_ACL0, 0);
|
||||
writeToBackLog(3, sreg, dsp_increment_addr_reg(sreg));
|
||||
}
|
||||
else
|
||||
{
|
||||
writeToBackLog(0, dreg, dsp_dmem_read(g_dsp.r[sreg]));
|
||||
writeToBackLog(1, sreg, dsp_increment_addr_reg(sreg));
|
||||
}
|
||||
}
|
||||
|
||||
// LN axD.l, @$S
|
||||
|
|
Loading…
Reference in New Issue