Skip to content
Permalink
Browse files

system: do not set SP when loading .exe when 0

  • Loading branch information
JaCzekanski committed Sep 22, 2019
1 parent ea1fb0e commit 7d70944e4eb3beb09030da325d84020396e692ce
Showing with 7 additions and 3 deletions.
  1. +2 −1 src/platform/windows/gui/debug/gpu.cpp
  2. +5 −2 src/system.cpp
@@ -269,7 +269,8 @@ void GPU::logWindow(System *sys) {
// TODO: Render texture
}

vramAreas.push_back({textureInfo, ImVec2(texX, texY), ImVec2(textureWidth, h)});
vramAreas.push_back(
{textureInfo, ImVec2(texPageX + texX / (16 / textureBits), texPageY + texY), ImVec2(textureWidth, h)});

if (clutColors != 0) {
vramAreas.push_back({"CLUT", ImVec2(clutX, clutY), ImVec2(clutColors, 1)});
@@ -426,8 +426,11 @@ bool System::loadExeFile(const std::vector<uint8_t>& _exe) {

cpu->setPC(exe.pc0);
cpu->reg[28] = exe.gp0;
cpu->reg[29] = exe.s_addr + exe.s_size;
cpu->reg[30] = exe.s_addr + exe.s_size;

if (exe.s_addr != 0) {
cpu->reg[29] = exe.s_addr + exe.s_size;
cpu->reg[30] = exe.s_addr + exe.s_size;
}

cpu->inBranchDelay = false;

0 comments on commit 7d70944

Please sign in to comment.
You can’t perform that action at this time.