X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fpsxinterpreter.c;h=33616e553f2f08c12f97d280d8b1059da2f9364d;hp=f1712050bb2068982f7bf70172032d847738528b;hb=fc8145b709406b946c1d5527ff89ed419596fd17;hpb=abbc1ca1f763c1f4aa46b60f3ea7dfb4bed3fb6f diff --git a/libpcsxcore/psxinterpreter.c b/libpcsxcore/psxinterpreter.c index f1712050..33616e55 100644 --- a/libpcsxcore/psxinterpreter.c +++ b/libpcsxcore/psxinterpreter.c @@ -25,6 +25,7 @@ #include "r3000a.h" #include "gte.h" #include "psxhle.h" +#include "debug.h" static int branch = 0; static int branch2 = 0; @@ -504,6 +505,10 @@ void psxDIV() { _i32(_rLo_) = _i32(_rRs_) / _i32(_rRt_); _i32(_rHi_) = _i32(_rRs_) % _i32(_rRt_); } + else { + _i32(_rLo_) = _i32(_rRs_) >= 0 ? 0xffffffff : 1; + _i32(_rHi_) = _i32(_rRs_); + } } void psxDIVU() { @@ -511,6 +516,10 @@ void psxDIVU() { _rLo_ = _rRs_ / _rRt_; _rHi_ = _rRs_ % _rRt_; } + else { + _i32(_rLo_) = 0xffffffff; + _i32(_rHi_) = _i32(_rRs_); + } } void psxMULT() {