Fixes in sceNpTrophy and FSEL (PPU instr.)

This commit is contained in:
Alexandro Sánchez Bach 2014-03-06 13:27:58 +01:00
parent d6596ca453
commit 898fbf02b8
2 changed files with 14 additions and 3 deletions

View file

@ -3717,7 +3717,7 @@ private:
} }
void FSEL(u32 frd, u32 fra, u32 frc, u32 frb, bool rc) void FSEL(u32 frd, u32 fra, u32 frc, u32 frb, bool rc)
{ {
CPU.FPR[frd] = CPU.FPR[fra] < 0.0 ? CPU.FPR[frc] : CPU.FPR[frb]; CPU.FPR[frd] = CPU.FPR[fra] >= 0.0 ? CPU.FPR[frc] : CPU.FPR[frb];
if(rc) UNK("fsel.");//CPU.UpdateCR1(CPU.FPR[frd]); if(rc) UNK("fsel.");//CPU.UpdateCR1(CPU.FPR[frd]);
} }
void FMUL(u32 frd, u32 fra, u32 frc, bool rc) void FMUL(u32 frd, u32 fra, u32 frc, bool rc)

View file

@ -111,10 +111,16 @@ int sceNpTrophyRegisterContext(u32 context, u32 handle, u32 statusCb_addr, u32 a
return SCE_NP_TROPHY_ERROR_INVALID_ARGUMENT; return SCE_NP_TROPHY_ERROR_INVALID_ARGUMENT;
if (options & (~(u64)1)) if (options & (~(u64)1))
SCE_NP_TROPHY_ERROR_NOT_SUPPORTED; SCE_NP_TROPHY_ERROR_NOT_SUPPORTED;
if (context >= s_npTrophyInstance.contexts.size())
return SCE_NP_TROPHY_ERROR_UNKNOWN_CONTEXT;
// TODO: There are other possible errors // TODO: There are other possible errors
int ret;
sceNpTrophyInternalContext& ctxt = s_npTrophyInstance.contexts[context]; sceNpTrophyInternalContext& ctxt = s_npTrophyInstance.contexts[context];
if (!ctxt.trp_stream)
return SCE_NP_TROPHY_ERROR_CONF_DOES_NOT_EXIST;
int ret;
TRPLoader trp(*(ctxt.trp_stream)); TRPLoader trp(*(ctxt.trp_stream));
// TODO: Get the path of the current user // TODO: Get the path of the current user
@ -150,11 +156,16 @@ int sceNpTrophyGetRequiredDiskSpace(u32 context, u32 handle, mem64_t reqspace, u
return SCE_NP_TROPHY_ERROR_NOT_INITIALIZED; return SCE_NP_TROPHY_ERROR_NOT_INITIALIZED;
if (!reqspace.IsGood()) if (!reqspace.IsGood())
return SCE_NP_TROPHY_ERROR_INVALID_ARGUMENT; return SCE_NP_TROPHY_ERROR_INVALID_ARGUMENT;
if (context >= s_npTrophyInstance.contexts.size())
return SCE_NP_TROPHY_ERROR_UNKNOWN_CONTEXT;
// TODO: There are other possible errors // TODO: There are other possible errors
sceNpTrophyInternalContext& ctxt = s_npTrophyInstance.contexts[context]; sceNpTrophyInternalContext& ctxt = s_npTrophyInstance.contexts[context];
reqspace = ctxt.trp_stream->GetSize(); // TODO: This is not accurate. It's just an approximation of the real value
if (!ctxt.trp_stream)
return SCE_NP_TROPHY_ERROR_CONF_DOES_NOT_EXIST;
reqspace = ctxt.trp_stream->GetSize(); // TODO: This is not accurate. It's just an approximation of the real value
return CELL_OK; return CELL_OK;
} }