File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -2362,7 +2362,16 @@ void X86DynaRecCPU::recSYSCALL() {
2362
2362
m_stopRecompile = true ;
2363
2363
}
2364
2364
2365
- void X86DynaRecCPU::recBREAK () {}
2365
+ void X86DynaRecCPU::recBREAK () {
2366
+ gen.MOV32ItoM ((uint32_t )&m_psxRegs.pc , (uint32_t )m_pc - 4 );
2367
+ gen.MOV32ItoR (PCSX::ix86::EBP, 0xffffffff );
2368
+ gen.MOV32ItoM ((uint32_t )&m_arg2, m_inDelaySlot ? 1 : 0 );
2369
+ gen.MOV32ItoM ((uint32_t )&m_arg1, 0x30 );
2370
+ gen.MOV32ItoM ((uint32_t )&m_functionPtr, 0 );
2371
+
2372
+ m_pcInEBP = true ;
2373
+ m_stopRecompile = true ;
2374
+ }
2366
2375
2367
2376
void X86DynaRecCPU::recMFHI () {
2368
2377
// Rd = Hi
Original file line number Diff line number Diff line change @@ -524,7 +524,13 @@ void InterpretedCPU::psxMTLO() { _rLo_ = _rRs_; } // Lo = Rs
524
524
* Format: OP *
525
525
*********************************************************/
526
526
void InterpretedCPU::psxBREAK () {
527
- // Break exception - psx rom doens't handles this
527
+ PCSX::g_emulator.m_psxCpu ->m_psxRegs .pc -= 4 ;
528
+ PCSX::g_emulator.m_psxCpu ->psxException (0x30 , m_inDelaySlot);
529
+ if (m_inDelaySlot) {
530
+ auto &delayedLoad = m_delayedLoadInfo[m_currentDelayedLoad];
531
+ if (!delayedLoad.pcActive ) abort ();
532
+ delayedLoad.pcActive = false ;
533
+ }
528
534
}
529
535
530
536
void InterpretedCPU::psxSYSCALL () {
You can’t perform that action at this time.
0 commit comments