Copy Link
Add to Bookmark
Report
Playstation EXE header
I know of 3 types (SCE, PS-X, CPE), but 2 of them are almost the same, and share most of the fields. The CPE structure will be left for another time as i miss some info that is needed to start parsing objects.
typedef struct _EXE_HEADER_ {
u_byte id[8];
u_long text; /* SCE only */
u_long data; /* SCE only */
u_long pc0;
u_long gp0; /* SCE only */
u_long t_addr;
u_long t_size;
u_long d_addr; /* SCE only */
u_long d_size; /* SCE only */
u_long b_addr; /* SCE only */
u_long b_size; /* SCE only */
u_long s_addr;
u_long s_size;
u_long SavedSP;
u_long SavedFP;
u_long SavedGP;
u_long SavedRA;
u_long SavedS0;
} EXE_HEADER;
Explanation
ExeType = { 'SCE EXE' || 'PS-X EXE' };
text - Offset of the text segment
data - Offset of the data segment
pc0 - Program Counter.
gp0 - Address of the Global Pointer
t_addr - The address where the text segment is loaded
t_size - The size of the text segment
d_addr - The address where the text segment is loaded
d_size - The size of the data segment
b_addr - The address of the BSS segment
b_size - The size of the BSS segment
s_addr - The address of the stack
s_size - The size of the stack.
SavedXX -The Exec system call saves some registers to these fields before jumping to the program