Skip to content

Commit

Permalink
- Cheat again to save some space.
Browse files Browse the repository at this point in the history
  • Loading branch information
Extrems committed Mar 21, 2021
1 parent fd893be commit 8c29144
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
9 changes: 0 additions & 9 deletions cube/patches/base/emulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -1000,15 +1000,6 @@ static bool ppc_step(ppc_context_t *context)
short d = opcode & 0xFFFF;
return ppc_load32(context->gpr[ra] + d, &context->gpr[rd]);
}
#ifdef CARD_EMULATOR
case 33:
{
int rd = (opcode >> 21) & 0x1F;
int ra = (opcode >> 16) & 0x1F;
short d = opcode & 0xFFFF;
return ppc_load32(context->gpr[ra] += d, &context->gpr[rd]);
}
#endif
case 36:
{
int rs = (opcode >> 21) & 0x1F;
Expand Down
9 changes: 9 additions & 0 deletions cube/swiss/source/patcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -5197,16 +5197,25 @@ int Patch_Hypervisor(u32 *data, u32 length, int dataType)
data[i + 3] = 0x3C800C00; // lis r4, 0x0C00
data[i + 31] = 0x3C600C00; // lis r3, 0x0C00
data[i + 110] = 0x3C600C00; // lis r3, 0x0C00
data[i + 113] = 0x80640010; // lwz r3, 0x0010 (r4)
data[i + 117] = 0x80640010; // lwz r3, 0x0010 (r4)
data[i + 121] = 0x80640010; // lwz r3, 0x0010 (r4)
break;
case 10:
data[i + 10] = 0x3C600C00; // lis r3, 0x0C00
data[i + 32] = 0x3C800C00; // lis r4, 0x0C00
data[i + 110] = 0x3C600C00; // lis r3, 0x0C00
data[i + 113] = 0x80640010; // lwz r3, 0x0010 (r4)
data[i + 117] = 0x80640010; // lwz r3, 0x0010 (r4)
data[i + 121] = 0x80640010; // lwz r3, 0x0010 (r4)
break;
case 11:
data[i + 10] = 0x3C600C00; // lis r3, 0x0C00
data[i + 32] = 0x3C800C00; // lis r4, 0x0C00
data[i + 115] = 0x3C600C00; // lis r3, 0x0C00
data[i + 118] = 0x80640010; // lwz r3, 0x0010 (r4)
data[i + 122] = 0x80640010; // lwz r3, 0x0010 (r4)
data[i + 126] = 0x80640010; // lwz r3, 0x0010 (r4)
break;
}
}
Expand Down

0 comments on commit 8c29144

Please sign in to comment.