Fixed ARM9 hardware division when the denom is zero (see http://nocash.emubase.de/gbatek.htm#dsmaths)

This commit is contained in:
luigi__ 2008-12-13 20:30:31 +00:00
parent bb3be34cb9
commit 51e8d353da
1 changed files with 4 additions and 4 deletions

View File

@ -2530,8 +2530,8 @@ void FASTCALL _MMU_write32(u32 adr, u32 val)
}
if(den==0)
{
res = 0;
mod = 0;
res = ((num < 0) ? 1 : -1);
mod = num;
cnt |= 0x4000;
cnt &= 0x7FFF;
}
@ -2583,8 +2583,8 @@ void FASTCALL _MMU_write32(u32 adr, u32 val)
}
if(den==0)
{
res = 0;
mod = 0;
res = ((num < 0) ? 1 : -1);
mod = num;
cnt |= 0x4000;
cnt &= 0x7FFF;
}