DSPLLE: Add a comment describing my latest unverified theory: that 'l and the other opcode extensions might be meant to sign extend the loaded value in some cases.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4811 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
9012d4f4b8
commit
573a7f4d6e
|
@ -140,6 +140,21 @@ inline void dsp_op_write_reg(int reg, u16 val)
|
|||
g_dsp.r[reg] = (u16)(s16)(s8)(u8)val;
|
||||
break;
|
||||
|
||||
case DSP_REG_ACM0:
|
||||
case DSP_REG_ACM1:
|
||||
g_dsp.r[reg] = val;
|
||||
// Enabling the below sign extension code breaks things.
|
||||
// There's probably some condition that enable it, maybe one of
|
||||
// the status flags like M2.
|
||||
// Or maybe it only happens when this call is a result of 'l and similar extended opcodes.
|
||||
|
||||
// Sign extend the loaded register. ACM0
|
||||
// g_dsp.r[reg - DSP_REG_ACM0 + DSP_REG_ACH0] = ((s16)val < 0 ? 0xFFFF : 0);
|
||||
// g_dsp.r[reg - DSP_REG_ACM0 + DSP_REG_ACL0] = 0; // ?
|
||||
break;
|
||||
|
||||
// There might also be something similar for AX.L but I'm not at all sure about that.
|
||||
|
||||
// Stack registers.
|
||||
case DSP_REG_ST0:
|
||||
case DSP_REG_ST1:
|
||||
|
|
Loading…
Reference in New Issue