ghidra_psx_ldr icon indicating copy to clipboard operation
ghidra_psx_ldr copied to clipboard

Support for the CPE format

Open tomsons26 opened this issue 5 years ago • 5 comments

Some games have CPE's too, its especially common with non-retail releases

tomsons26 avatar Jul 25 '19 13:07 tomsons26

Is that format executable by PSX? Is there a structure description?

lab313ru avatar Nov 30 '19 11:11 lab313ru

CPE is the initial binary the PSX sdk produces, then it converts it to a PSX EXE, as i understand the PSX could run CPE's too. Tbh thought it was the same header as the PSX EXE, but with section info, seems it isn't. https://github.com/GirianSeed/cpe2psx/blob/master/cpe2psx.cpp

The sdk has a dumpcpe.exe and cpe2x.exe, maybe those provide some insight? Apparently the one with section info might had been SCE which i have not seen in any game so far.

tomsons26 avatar Nov 30 '19 12:11 tomsons26

So, do you know some game which uses CPE instead of PS-X EXE?

lab313ru avatar Nov 30 '19 15:11 lab313ru

Well Need for Speed: High Stakes (Feb 23, 1999 prototype) has a CPE on the disc along the exe, a lot of other pre-release builds will. In the PSX sdk there's a lot of CPE's, some projects just have a CPE, no EXE.

tomsons26 avatar Nov 30 '19 16:11 tomsons26

https://github.com/FoxdieTeam/CpeConv/blob/master/CpeDump.cpp

A bit more reference code if you ever do this. CPEs just seem to be some form of pesudo concatenated object files.

MrSapps avatar Dec 01 '19 13:12 MrSapps