endian for sceChnnlsv

This commit is contained in:
Ced2911 2013-07-31 17:40:10 +02:00
parent aa1787411e
commit c1ffaa9e1f
2 changed files with 11 additions and 7 deletions

View File

@ -491,7 +491,9 @@ int sceSdSetMember_(pspChnnlsvContext2& ctx, u8* data, int alignedLen)
{
for(i = 0; alignedLen >= 2048; i += 2048)
{
int res = sub_0000(kirkData, data + i, 2048, ctx.cryptedData, ctx.unkn, ctx.mode);
int ctx_unkn = ctx.unkn;
int res = sub_0000(kirkData, data + i, 2048, ctx.cryptedData, ctx_unkn, ctx.mode);
ctx.unkn = ctx_unkn;
alignedLen -= 2048;
if (res)
return res;
@ -501,8 +503,10 @@ int sceSdSetMember_(pspChnnlsvContext2& ctx, u8* data, int alignedLen)
{
return 0;
}
return sub_0000(kirkData, data + i, alignedLen, ctx.cryptedData, ctx.unkn, ctx.mode);
int ctx_unkn = ctx.unkn;
int res = sub_0000(kirkData, data + i, alignedLen, ctx.cryptedData, ctx_unkn, ctx.mode);
ctx.unkn = ctx_unkn;
return res;
}
int sceChnnlsv_21BE78B4(u32 ctxAddr)

View File

@ -19,18 +19,18 @@
typedef struct _pspChnnlsvContext1 {
/** Cipher mode */
int mode;
s32_le mode;
/** Context data */
u8 result[0x10];
u8 key[0x10];
int keyLength;
s32_le keyLength;
} pspChnnlsvContext1;
typedef struct _pspChnnlsvContext2 {
/** Context data */
int mode;
int unkn;
s32_le mode;
s32_le unkn;
u8 cryptedData[0x92];
} pspChnnlsvContext2;