Slight improvements to debugger, still wonky
This commit is contained in:
@@ -91,6 +91,7 @@ void Core::StepRSP(int cpuCycles) {
|
||||
void Core::Run(float volumeL, float volumeR) {
|
||||
MMIO &mmio = mem->mmio;
|
||||
|
||||
bool broken = false;
|
||||
for (int field = 0; field < mmio.vi.numFields; field++) {
|
||||
u32 frameCycles = 0;
|
||||
for (int i = 0; i < mmio.vi.numHalflines; i++) {
|
||||
@@ -102,16 +103,25 @@ void Core::Run(float volumeL, float volumeR) {
|
||||
|
||||
while(cycles < mem->mmio.vi.cyclesPerHalfline) {
|
||||
u32 taken = StepCPU();
|
||||
StepRSP(taken);
|
||||
|
||||
cycles += taken;
|
||||
|
||||
if((broken = breakpoints.contains(regs.nextPC)))
|
||||
break;
|
||||
|
||||
StepRSP(taken);
|
||||
frameCycles += taken;
|
||||
Scheduler::GetInstance().Tick(taken);
|
||||
}
|
||||
|
||||
if(broken)
|
||||
break;
|
||||
|
||||
cycles -= mmio.vi.cyclesPerHalfline;
|
||||
}
|
||||
|
||||
if(broken)
|
||||
break;
|
||||
|
||||
if ((mmio.vi.current & 0x3FE) == mmio.vi.intr) {
|
||||
mmio.mi.InterruptRaise(MI::Interrupt::VI);
|
||||
}
|
||||
@@ -119,5 +129,8 @@ void Core::Run(float volumeL, float volumeR) {
|
||||
mmio.ai.Step(frameCycles, volumeL, volumeR);
|
||||
Scheduler::GetInstance().Tick(frameCycles);
|
||||
}
|
||||
|
||||
if(broken)
|
||||
pause = true;
|
||||
}
|
||||
} // namespace n64
|
||||
|
||||
@@ -38,7 +38,7 @@ struct Core {
|
||||
void Run(float volumeL, float volumeR);
|
||||
void TogglePause() { pause = !pause; }
|
||||
inline void ToggleBreakpoint(s64 addr) {
|
||||
if(breakpoints.contains(addr)){
|
||||
if(breakpoints.contains(addr)) {
|
||||
breakpoints.erase(addr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ void PIF::LoadEeprom(const SaveType saveType, const std::string &path) {
|
||||
|
||||
eeprom = mio::make_mmap_sink(eepromPath, 0, mio::map_entire_file, error);
|
||||
if (error) {
|
||||
panic("Could not open {}", eepromPath);
|
||||
panic("Could not open {}. Reason {}", eepromPath, error.message());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user