Small RDP accuracy improvement
This commit is contained in:
@@ -105,6 +105,16 @@ void RSP::WriteStatus(const u32 value) {
|
||||
mi.InterruptLower(MI::Interrupt::SP);
|
||||
if (write.setIntr && !write.clearIntr)
|
||||
mi.InterruptRaise(MI::Interrupt::SP);
|
||||
|
||||
#define CLEAR_SET(val, clear, set) \
|
||||
do { \
|
||||
if ((clear) && !(set)) \
|
||||
(val) = 0; \
|
||||
if ((set) && !(clear)) \
|
||||
(val) = 1; \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
CLEAR_SET(spStatus.singleStep, write.clearSstep, write.setSstep);
|
||||
CLEAR_SET(spStatus.interruptOnBreak, write.clearIntrOnBreak, write.setIntrOnBreak);
|
||||
CLEAR_SET(spStatus.signal0, write.clearSignal0, write.setSignal0);
|
||||
@@ -115,6 +125,7 @@ void RSP::WriteStatus(const u32 value) {
|
||||
CLEAR_SET(spStatus.signal5, write.clearSignal5, write.setSignal5);
|
||||
CLEAR_SET(spStatus.signal6, write.clearSignal6, write.setSignal6);
|
||||
CLEAR_SET(spStatus.signal7, write.clearSignal7, write.setSignal7);
|
||||
#undef CLEAR_SET
|
||||
}
|
||||
|
||||
template <>
|
||||
|
||||
Reference in New Issue
Block a user