lzma support for ps1 from Jens

This commit is contained in:
László Molnár
2006-08-11 11:18:01 +02:00
parent 4715cbb70d
commit 1554e2b135
11 changed files with 2250 additions and 1182 deletions
+19 -11
View File
@@ -42,7 +42,7 @@ class PackPs1 : public Packer
{
typedef Packer super;
public:
PackPs1(InputFile *f);
PackPs1(InputFile *f);
virtual int getVersion() const { return 13; }
virtual int getFormat() const { return UPX_F_PS1_EXE; }
virtual const char *getName() const { return "ps1/exe"; }
@@ -56,6 +56,8 @@ public:
virtual int canUnpack();
protected:
virtual bool readBkupHeader();
virtual void buildPS1Loader(const Filter *ft=0);
virtual int buildLoader(const Filter *ft);
virtual Linker* newLinker() const;
@@ -84,25 +86,31 @@ protected:
LE32 sp, fp, gp0, ra, k0;
// origin Jap/USA/Europe
char origin[60];
// some safety space after that
char pad[8];
// backup of the original header (epc - is_len)
LE32 ih_bkup[10];
// plus checksum for the backup
LE32 ih_csum;
// id & the upx header.
// id & the upx header ...
}
__attribute_packed;
struct ps1_exe_cp_t
{
LE32 ih_bkup[10];
// plus checksum for the backup
LE32 ih_csum;
}
__attribute_packed;
// unpack_only
ps1_exe_cp_t bh;
ps1_exe_t ih, oh;
bool build_Loader;
bool isCon;
bool is32Bit;
unsigned ram_size;
unsigned overlap;
unsigned sa_cnt;
unsigned sa_cnt, overlap;
unsigned sz_unc, sz_cpr;
unsigned pad_code;
// filesize-PS_HDR_SIZE
unsigned fdata_size;
};