@@ -98,11 +98,13 @@ class InterpretedCPU final : public PCSX::R3000Acpu {
9898 virtual void Shutdown () override ;
9999 virtual void SetPGXPMode (uint32_t pgxpMode) override ;
100100 virtual bool isDynarec () override { return false ; }
101-
102101 void maybeCancelDelayedLoad (uint32_t index) {
103102 unsigned other = m_currentDelayedLoad ^ 1 ;
104103 if (m_delayedLoadInfo[other].index == index) m_delayedLoadInfo[other].active = false ;
105104 }
105+ // For the GUI dynarec disassembly widget
106+ virtual const uint8_t *getBufferPtr () final { return nullptr ; }
107+ virtual const size_t getBufferSize () final { return 0 ; }
106108
107109 void psxTestSWInts ();
108110
@@ -787,7 +789,7 @@ void InterpretedCPU::psxRFE(uint32_t code) {
787789 * Format: OP rs, rt, offset *
788790 *********************************************************/
789791#define RepBranchi32 (op ) \
790- if ((int32_t )_rRs_ op (int32_t )_rRt_) doBranch(_BranchTarget_, false );
792+ if ((int32_t )_rRs_ op (int32_t ) _rRt_) doBranch(_BranchTarget_, false );
791793
792794void InterpretedCPU::psxBEQ (uint32_t code) { RepBranchi32 (==) } // Branch if Rs == Rt
793795void InterpretedCPU::psxBNE (uint32_t code) { RepBranchi32 (!=) } // Branch if Rs != Rt
@@ -1188,15 +1190,18 @@ const InterpretedCPU::intFunc_t InterpretedCPU::s_psxSPC[64] = {
11881190 &InterpretedCPU::psxNULL, &InterpretedCPU::psxNULL, &InterpretedCPU::psxNULL, &InterpretedCPU::psxNULL, // 3c
11891191};
11901192
1193+ // The REGIMM instruction is actually valid for every single value that the rt field might have
1194+ // If the lowest bit of the rt field is 1 then the instruction is a BGEZ, otherwise it's a BLTZ.
1195+ // If ((_Rt_ >> 4) & 0xF) == 0x8 then the instruction should link the return address to $ra, otherwise not.
11911196const InterpretedCPU::intFunc_t InterpretedCPU::s_psxREG[32 ] = {
1192- &InterpretedCPU::psxBLTZ, &InterpretedCPU::psxBGEZ, &InterpretedCPU::psxNULL , &InterpretedCPU::psxNULL, // 00
1193- &InterpretedCPU::psxNULL , &InterpretedCPU::psxNULL , &InterpretedCPU::psxNULL , &InterpretedCPU::psxNULL, // 04
1194- &InterpretedCPU::psxNULL , &InterpretedCPU::psxNULL , &InterpretedCPU::psxNULL , &InterpretedCPU::psxNULL, // 08
1195- &InterpretedCPU::psxNULL , &InterpretedCPU::psxNULL , &InterpretedCPU::psxNULL , &InterpretedCPU::psxNULL, // 0c
1196- &InterpretedCPU::psxBLTZAL, &InterpretedCPU::psxBGEZAL, &InterpretedCPU::psxNULL , &InterpretedCPU::psxNULL, // 10
1197- &InterpretedCPU::psxNULL , &InterpretedCPU::psxNULL , &InterpretedCPU::psxNULL , &InterpretedCPU::psxNULL, // 14
1198- &InterpretedCPU::psxNULL , &InterpretedCPU::psxNULL , &InterpretedCPU::psxNULL , &InterpretedCPU::psxNULL, // 18
1199- &InterpretedCPU::psxNULL , &InterpretedCPU::psxNULL , &InterpretedCPU::psxNULL , &InterpretedCPU::psxNULL, // 1c
1197+ &InterpretedCPU::psxBLTZ, &InterpretedCPU::psxBGEZ, &InterpretedCPU::psxBLTZ , &InterpretedCPU::psxBGEZ, // 00
1198+ &InterpretedCPU::psxBLTZ , &InterpretedCPU::psxBGEZ , &InterpretedCPU::psxBLTZ , &InterpretedCPU::psxBGEZ, // 04
1199+ &InterpretedCPU::psxBLTZ , &InterpretedCPU::psxBGEZ , &InterpretedCPU::psxBLTZ , &InterpretedCPU::psxBGEZ, // 08
1200+ &InterpretedCPU::psxBLTZ , &InterpretedCPU::psxBGEZ , &InterpretedCPU::psxBLTZ , &InterpretedCPU::psxBGEZ, // 0c
1201+ &InterpretedCPU::psxBLTZAL, &InterpretedCPU::psxBGEZAL, &InterpretedCPU::psxBLTZ , &InterpretedCPU::psxBGEZ, // 10
1202+ &InterpretedCPU::psxBLTZ , &InterpretedCPU::psxBGEZ , &InterpretedCPU::psxBLTZ , &InterpretedCPU::psxBGEZ, // 14
1203+ &InterpretedCPU::psxBLTZ , &InterpretedCPU::psxBGEZ , &InterpretedCPU::psxBLTZ , &InterpretedCPU::psxBGEZ, // 18
1204+ &InterpretedCPU::psxBLTZ , &InterpretedCPU::psxBGEZ , &InterpretedCPU::psxBLTZ , &InterpretedCPU::psxBGEZ // 1c
12001205};
12011206
12021207const InterpretedCPU::intFunc_t InterpretedCPU::s_psxCP0[32 ] = {
0 commit comments