mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-12-06 07:12:14 +01:00
53 lines
728 B
C++
53 lines
728 B
C++
#pragma once
|
|
#include "Loader.h"
|
|
|
|
struct vfsStream;
|
|
|
|
struct SceHeader
|
|
{
|
|
u32 se_magic;
|
|
u32 se_hver;
|
|
u16 se_flags;
|
|
u16 se_type;
|
|
u32 se_meta;
|
|
u64 se_hsize;
|
|
u64 se_esize;
|
|
|
|
void Load(vfsStream& f);
|
|
|
|
void Show();
|
|
|
|
bool CheckMagic() const { return se_magic == 0x53434500; }
|
|
};
|
|
|
|
struct SelfHeader
|
|
{
|
|
u64 se_htype;
|
|
u64 se_appinfooff;
|
|
u64 se_elfoff;
|
|
u64 se_phdroff;
|
|
u64 se_shdroff;
|
|
u64 se_secinfoff;
|
|
u64 se_sceveroff;
|
|
u64 se_controloff;
|
|
u64 se_controlsize;
|
|
u64 pad;
|
|
|
|
void Load(vfsStream& f);
|
|
|
|
void Show();
|
|
};
|
|
|
|
class SELFLoader : public LoaderBase
|
|
{
|
|
vfsStream& self_f;
|
|
|
|
SceHeader sce_hdr;
|
|
SelfHeader self_hdr;
|
|
|
|
public:
|
|
SELFLoader(vfsStream& f);
|
|
|
|
virtual bool LoadInfo();
|
|
virtual bool LoadData(u64 offset = 0);
|
|
}; |