Something is wrong with entry points...

This commit is contained in:
Nekotekina 2014-11-03 14:35:50 +03:00
parent df72f5e37c
commit 43382a0ac6
3 changed files with 24 additions and 6 deletions

View file

@ -383,10 +383,24 @@ void Emulator::Load()
}
break;
default:
thread.SetEntry(l.GetEntry());
case MACHINE_ARM:
{
u32 entry = l.GetEntry();
auto code = vm::psv::ptr<const u32>::make(entry & ~3);
// evil way to find entry point in .sceModuleInfo.rodata
while (code[0] != 0xffffffffu)
{
entry = code[0] + 0x81000000;
code++;
}
thread.SetEntry(entry & ~1);
thread.Run();
break;
break;
}
}
m_status = Ready;