Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unregistered HLE function access on PPU LLVM, Fix PPU breakpoints #5850

Merged
merged 3 commits into from Apr 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion rpcs3/Emu/Cell/PPUFunction.cpp
Expand Up @@ -2524,7 +2524,7 @@ std::vector<ppu_function_t>& ppu_function_manager::access()
{
LOG_ERROR(PPU, "Unregistered function called (LR=0x%x)", ppu.lr);
ppu.gpr[3] = 0;
ppu.cia += 4;
ppu.cia = (u32)ppu.lr & ~3;
return false;
},
[](ppu_thread& ppu) -> bool
Expand Down
4 changes: 2 additions & 2 deletions rpcs3/Emu/Cell/PPUThread.cpp
Expand Up @@ -252,7 +252,7 @@ static bool ppu_check_toc(ppu_thread& ppu, ppu_opcode_t op)
}

// Fallback to the interpreter function
if (reinterpret_cast<decltype(&ppu_interpreter::UNK)>(std::uintptr_t{ppu_cache(ppu.cia)})(ppu, op))
if (reinterpret_cast<decltype(&ppu_interpreter::UNK)>(std::uintptr_t{(u32)ppu_cache(ppu.cia)})(ppu, op))
{
ppu.cia += 4;
}
Expand Down Expand Up @@ -336,7 +336,7 @@ static bool ppu_break(ppu_thread& ppu, ppu_opcode_t op)
}

// Fallback to the interpreter function
if (reinterpret_cast<decltype(&ppu_interpreter::UNK)>(std::uintptr_t{ppu_cache(ppu.cia)})(ppu, op))
if (reinterpret_cast<decltype(&ppu_interpreter::UNK)>(std::uintptr_t{(u32)ppu_cache(ppu.cia)})(ppu, op))
{
ppu.cia += 4;
}
Expand Down