mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
DSPLLE: attempt to fix extended ops please review this patch carefully.
thinks to note - All ext commands should call zeroWriteBackLog() (before changing any reg) - increase/decrease ar functions now only return a value not actually change anything git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4018 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -97,7 +97,7 @@ void addarn(const UDSPInstruction& opc)
|
||||
u8 dreg = opc.hex & 0x3;
|
||||
u8 sreg = (opc.hex >> 2) & 0x3;
|
||||
|
||||
dsp_increase_addr_reg(dreg, (s16)g_dsp.r[DSP_REG_IX0 + sreg]);
|
||||
g_dsp.r[dreg] = dsp_increase_addr_reg(dreg, (s16)g_dsp.r[DSP_REG_IX0 + sreg]);
|
||||
|
||||
// It is critical for the Zelda ucode that this one wraps correctly.
|
||||
}
|
||||
@ -107,6 +107,7 @@ void addarn(const UDSPInstruction& opc)
|
||||
// No operation, but can be extended with extended opcode.
|
||||
void nx(const UDSPInstruction& opc)
|
||||
{
|
||||
zeroWriteBackLog();
|
||||
// This opcode is supposed to do nothing - it's used if you want to use
|
||||
// an opcode extension but not do anything. At least according to duddie.
|
||||
}
|
||||
@ -117,7 +118,7 @@ void nx(const UDSPInstruction& opc)
|
||||
// Decrement address register $arD.
|
||||
void dar(const UDSPInstruction& opc)
|
||||
{
|
||||
dsp_decrement_addr_reg(opc.hex & 0x3);
|
||||
g_dsp.r[opc.hex & 0x3] = dsp_decrement_addr_reg(opc.hex & 0x3);
|
||||
}
|
||||
|
||||
// IAR $arD ?
|
||||
@ -125,7 +126,7 @@ void dar(const UDSPInstruction& opc)
|
||||
// Increment address register $arD.
|
||||
void iar(const UDSPInstruction& opc)
|
||||
{
|
||||
dsp_increment_addr_reg(opc.hex & 0x3);
|
||||
g_dsp.r[opc.hex & 0x3] = dsp_increment_addr_reg(opc.hex & 0x3);
|
||||
}
|
||||
|
||||
// SBCLR #I
|
||||
@ -153,6 +154,7 @@ void sbset(const UDSPInstruction& opc)
|
||||
// but it's harder to know exactly what effect they have.
|
||||
void srbith(const UDSPInstruction& opc)
|
||||
{
|
||||
zeroWriteBackLog();
|
||||
switch ((opc.hex >> 8) & 0xf)
|
||||
{
|
||||
// M0/M2 change the multiplier mode (it can multiply by 2 for free).
|
||||
|
Reference in New Issue
Block a user