memory viewer: Implement SPU mode, fix address GOTO

This commit is contained in:
Eladash 2020-12-29 19:57:44 +02:00 committed by Ivan
parent 7fc26b1fab
commit c4c6dc19a5
3 changed files with 59 additions and 44 deletions

View file

@ -320,22 +320,7 @@ void debugger_frame::keyPressEvent(QKeyEvent* event)
case Qt::Key_M:
{
// Memory viewer
u32 addr = pc;
if (auto spu = static_cast<const spu_thread*>(cpu->id_type() == 2 ? cpu.get() : nullptr))
{
if (spu->get_type() != spu_type::threaded)
{
addr += RAW_SPU_BASE_ADDR + RAW_SPU_OFFSET * spu->index;
}
else
{
addr += SPU_FAKE_BASE_ADDR + SPU_LS_SIZE * (spu->id & 0xffffff);
}
}
auto mvp = new memory_viewer_panel(this, addr);
auto mvp = new memory_viewer_panel(this, pc, cpu);
mvp->show();
return;
}