Lines 403-410
Link Here
|
403 |
*********************************************************/ |
403 |
*********************************************************/ |
404 |
void psxDIV() { |
404 |
void psxDIV() { |
405 |
if (_i32(_rRt_) != 0) { |
405 |
if (_i32(_rRt_) != 0) { |
406 |
_i32(_rLo_) = _i32(_rRs_) / _i32(_rRt_); |
406 |
_rLo_ = _i32(_rRs_) / _i32(_rRt_); |
407 |
_i32(_rHi_) = _i32(_rRs_) % _i32(_rRt_); |
407 |
_rHi_ = _i32(_rRs_) % _i32(_rRt_); |
408 |
} |
408 |
} |
409 |
} |
409 |
} |
410 |
|
410 |
|
Lines 448-454
Link Here
|
448 |
* Format: OP rd, rt, sa * |
448 |
* Format: OP rd, rt, sa * |
449 |
*********************************************************/ |
449 |
*********************************************************/ |
450 |
void psxSLL() { if (!_Rd_) return; _u32(_rRd_) = _u32(_rRt_) << _Sa_; } // Rd = Rt << sa |
450 |
void psxSLL() { if (!_Rd_) return; _u32(_rRd_) = _u32(_rRt_) << _Sa_; } // Rd = Rt << sa |
451 |
void psxSRA() { if (!_Rd_) return; _i32(_rRd_) = _i32(_rRt_) >> _Sa_; } // Rd = Rt >> sa (arithmetic) |
451 |
void psxSRA() { if (!_Rd_) return; _rRd_ = _i32(_i32(_rRt_) >> _Sa_); } // Rd = Rt >> sa (arithmetic) |
452 |
void psxSRL() { if (!_Rd_) return; _u32(_rRd_) = _u32(_rRt_) >> _Sa_; } // Rd = Rt >> sa (logical) |
452 |
void psxSRL() { if (!_Rd_) return; _u32(_rRd_) = _u32(_rRt_) >> _Sa_; } // Rd = Rt >> sa (logical) |
453 |
|
453 |
|
454 |
/********************************************************* |
454 |
/********************************************************* |
Lines 456-462
Link Here
|
456 |
* Format: OP rd, rt, rs * |
456 |
* Format: OP rd, rt, rs * |
457 |
*********************************************************/ |
457 |
*********************************************************/ |
458 |
void psxSLLV() { if (!_Rd_) return; _u32(_rRd_) = _u32(_rRt_) << _u32(_rRs_); } // Rd = Rt << rs |
458 |
void psxSLLV() { if (!_Rd_) return; _u32(_rRd_) = _u32(_rRt_) << _u32(_rRs_); } // Rd = Rt << rs |
459 |
void psxSRAV() { if (!_Rd_) return; _i32(_rRd_) = _i32(_rRt_) >> _u32(_rRs_); } // Rd = Rt >> rs (arithmetic) |
459 |
void psxSRAV() { if (!_Rd_) return; _rRd_ = _i32(_i32(_rRt_) >> _u32(_rRs_)); } // Rd = Rt >> rs (arithmetic) |
460 |
void psxSRLV() { if (!_Rd_) return; _u32(_rRd_) = _u32(_rRt_) >> _u32(_rRs_); } // Rd = Rt >> rs (logical) |
460 |
void psxSRLV() { if (!_Rd_) return; _u32(_rRd_) = _u32(_rRt_) >> _u32(_rRs_); } // Rd = Rt >> rs (logical) |
461 |
|
461 |
|
462 |
/********************************************************* |
462 |
/********************************************************* |
Lines 534-540
Link Here
|
534 |
|
534 |
|
535 |
void psxLB() { |
535 |
void psxLB() { |
536 |
if (_Rt_) { |
536 |
if (_Rt_) { |
537 |
_i32(_rRt_) = (char)psxMemRead8(_oB_); |
537 |
_rRt_ = _i32 ((char)psxMemRead8(_oB_)); |
538 |
} else { |
538 |
} else { |
539 |
psxMemRead8(_oB_); |
539 |
psxMemRead8(_oB_); |
540 |
} |
540 |
} |
Lines 550-556
Link Here
|
550 |
|
550 |
|
551 |
void psxLH() { |
551 |
void psxLH() { |
552 |
if (_Rt_) { |
552 |
if (_Rt_) { |
553 |
_i32(_rRt_) = (short)psxMemRead16(_oB_); |
553 |
_rRt_ = _i32((short)psxMemRead16(_oB_)); |
554 |
} else { |
554 |
} else { |
555 |
psxMemRead16(_oB_); |
555 |
psxMemRead16(_oB_); |
556 |
} |
556 |
} |
Lines 665-672
Link Here
|
665 |
* Moves between GPR and COPx * |
665 |
* Moves between GPR and COPx * |
666 |
* Format: OP rt, fs * |
666 |
* Format: OP rt, fs * |
667 |
*********************************************************/ |
667 |
*********************************************************/ |
668 |
void psxMFC0() { if (!_Rt_) return; _i32(_rRt_) = (int)_rFs_; } |
668 |
void psxMFC0() { if (!_Rt_) return; _rRt_ = _i32((int)_rFs_); } |
669 |
void psxCFC0() { if (!_Rt_) return; _i32(_rRt_) = (int)_rFs_; } |
669 |
void psxCFC0() { if (!_Rt_) return; _rRt_ = _i32((int)_rFs_); } |
670 |
|
670 |
|
671 |
void psxTestSWInts() { |
671 |
void psxTestSWInts() { |
672 |
// the next code is untested, if u know please |
672 |
// the next code is untested, if u know please |