mirror of
https://github.com/ran-j/PS2Recomp.git
synced 2026-09-28 01:15:04 -04:00
feat: added decodePMFHL function
This commit is contained in:
@@ -1595,7 +1595,7 @@ namespace ps2recomp
|
||||
return fmt::format("// Calls VU0 microprogram at address {} - not implemented in recompiled code",
|
||||
inst.immediate);
|
||||
|
||||
case VU0_VRGET: // TODO - Check if this is correct
|
||||
case VU0_VRGET:
|
||||
return fmt::format("ctx->vu0_vf[{}] = ctx->vu0_r; // Get VU0 R register",
|
||||
inst.rd);
|
||||
|
||||
|
||||
@@ -531,22 +531,26 @@ namespace ps2recomp
|
||||
|
||||
void R5900Decoder::decodePMFHL(Instruction &inst) const
|
||||
{
|
||||
// PMFHL has different variations based on the sa field
|
||||
uint32_t saField = inst.sa;
|
||||
|
||||
switch (saField)
|
||||
{
|
||||
case PMFHL_LW:
|
||||
case PMFHL_UW:
|
||||
case PMFHL_SLW:
|
||||
case PMFHL_LH:
|
||||
case PMFHL_SH:
|
||||
// Set the appropriate flag for the PMFHL variation
|
||||
inst.pmfhlVariation = saField;
|
||||
inst.pmfhlVariation = PMFHL_LW;
|
||||
break;
|
||||
case PMFHL_UW:
|
||||
inst.pmfhlVariation = PMFHL_UW;
|
||||
break;
|
||||
case PMFHL_SLW:
|
||||
inst.pmfhlVariation = PMFHL_SLW;
|
||||
break;
|
||||
case PMFHL_LH:
|
||||
inst.pmfhlVariation = PMFHL_LH;
|
||||
break;
|
||||
case PMFHL_SH:
|
||||
inst.pmfhlVariation = PMFHL_SH;
|
||||
break;
|
||||
|
||||
default:
|
||||
// Unknown PMFHL variation
|
||||
inst.pmfhlVariation = 0xFF;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user