diff options
| author | SND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-11-05 01:30:41 +0000 |
|---|---|---|
| committer | SND\shalma_cp <SND\shalma_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-11-05 01:30:41 +0000 |
| commit | 80b1d885d1e4ff338cadf0e5c210ad87d7b9fdac (patch) | |
| tree | 6c399c1c34b1682d2f951ce7b60e2cf81d6aae15 /libpcsxcore | |
| parent | 047ebc15acd10e6e64b2bcb1105861956e6c3c3e (diff) | |
| download | pcsxr-80b1d885d1e4ff338cadf0e5c210ad87d7b9fdac.tar.gz | |
Threads of Fate - psxinterpreter.c
- divide by zero handling
- fixes Rue's quest house bug
- only works with interpreter
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@59193 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore')
| -rw-r--r-- | libpcsxcore/psxinterpreter.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libpcsxcore/psxinterpreter.c b/libpcsxcore/psxinterpreter.c index e4e02248..633a307b 100644 --- a/libpcsxcore/psxinterpreter.c +++ b/libpcsxcore/psxinterpreter.c @@ -468,6 +468,10 @@ void psxDIV() { _i32(_rLo_) = _i32(_rRs_) / _i32(_rRt_); _i32(_rHi_) = _i32(_rRs_) % _i32(_rRt_); } + else {
+ _i32(_rLo_) = 0xffffffff;
+ _i32(_rHi_) = _i32(_rRs_);
+ }
} void psxDIVU() { @@ -475,6 +479,10 @@ void psxDIVU() { _rLo_ = _rRs_ / _rRt_; _rHi_ = _rRs_ % _rRt_; } + else {
+ _rLo_ = 0xffffffff;
+ _rHi_ = _rRs_;
+ }
} void psxMULT() { |
