mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 15:31:17 +01:00
DSPLLE small sign fix
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4023 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
99b4b04705
commit
92d4c55e14
@ -58,10 +58,10 @@ inline u16 ToMask(u16 a)
|
||||
return a | (a >> 1);
|
||||
}
|
||||
|
||||
inline u16 dsp_increment_addr_reg(int reg, int value = -1)
|
||||
inline s16 dsp_increment_addr_reg(int reg, s32 value = -1)
|
||||
{
|
||||
u16 tmb = ToMask(g_dsp.r[DSP_REG_WR0 + reg]);
|
||||
u16 tmp;
|
||||
s16 tmp;
|
||||
if (value == -1)
|
||||
tmp = g_dsp.r[reg];
|
||||
else
|
||||
@ -76,9 +76,9 @@ inline u16 dsp_increment_addr_reg(int reg, int value = -1)
|
||||
}
|
||||
|
||||
// See http://code.google.com/p/dolphin-emu/source/detail?r=3125
|
||||
inline u16 dsp_decrement_addr_reg(int reg, int value = -1)
|
||||
inline s16 dsp_decrement_addr_reg(int reg, s32 value = -1)
|
||||
{
|
||||
u16 tmp;
|
||||
s16 tmp;
|
||||
if (value == -1)
|
||||
tmp = g_dsp.r[reg];
|
||||
else
|
||||
@ -93,9 +93,9 @@ inline u16 dsp_decrement_addr_reg(int reg, int value = -1)
|
||||
return tmp;
|
||||
}
|
||||
|
||||
inline u16 dsp_increase_addr_reg(int reg, s16 value)
|
||||
inline s16 dsp_increase_addr_reg(int reg, s16 value)
|
||||
{
|
||||
u16 tmp = - 1;
|
||||
s16 tmp = - 1;
|
||||
|
||||
// TODO: DO RIGHT!
|
||||
if (value > 0) {
|
||||
@ -106,7 +106,8 @@ inline u16 dsp_increase_addr_reg(int reg, s16 value)
|
||||
for (int i = 0; i < (int)(-value); i++) {
|
||||
tmp = dsp_decrement_addr_reg(reg, tmp);
|
||||
}
|
||||
}
|
||||
} else
|
||||
tmp = g_dsp.r[reg];
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user