diff options
| author | John "Lameguy" Wilbert Villamor <lameguy64@gmail.com> | 2021-10-15 09:22:45 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-15 09:22:45 +0800 |
| commit | dd0f088aaa4c6bf013643be2d1d8621dbffdb000 (patch) | |
| tree | d848d6ce007d8bb9357c8b99d6a0a39ec41d244e /tools/util | |
| parent | 9e08d1047fa8deeb3ccb3ce9bb11d69e25a52d56 (diff) | |
| parent | eb719a424e6a16fb64209139a32c9f8a7235a929 (diff) | |
| download | psn00bsdk-dd0f088aaa4c6bf013643be2d1d8621dbffdb000.tar.gz | |
Merge pull request #38 from spicyjpeg/cmake
Full CMake support (in place of makefiles)
Diffstat (limited to 'tools/util')
| -rw-r--r-- | tools/util/elf2cpe.c | 4 | ||||
| -rw-r--r-- | tools/util/elf2x.c | 9 | ||||
| -rw-r--r-- | tools/util/makefile | 20 |
3 files changed, 12 insertions, 21 deletions
diff --git a/tools/util/elf2cpe.c b/tools/util/elf2cpe.c index 4379f4a..46b0a37 100644 --- a/tools/util/elf2cpe.c +++ b/tools/util/elf2cpe.c @@ -3,6 +3,10 @@ #include <malloc.h> #include "elf.h" +#ifdef WIN32 +#define strcasecmp _stricmp +#endif + #define MAX_prg_entry_count 128 #ifndef false diff --git a/tools/util/elf2x.c b/tools/util/elf2x.c index 26ec9a3..9a7c126 100644 --- a/tools/util/elf2x.c +++ b/tools/util/elf2x.c @@ -6,6 +6,10 @@ #include <string.h> #include "elf.h" +#ifdef WIN32 +#define strcasecmp _stricmp +#endif + #define MAX_prg_entry_count 128 #define true (1) #define false (0) @@ -233,9 +237,12 @@ int main(int argc, char** argv) { exe.params.t_size = exe_tsize; exe.params.pc0 = head.prg_entry_addr; + // Some later PAL BIOS versions seem to actually verify the license string + // in the executable (despite what the nocash docs claim) and display the + // dreaded "insert PlayStation CD-ROM" screen if it's not valid. strncpy( exe.header, "PS-X EXE", 8 ); strcpy( exe.license, - "Not Licensed or Endorsed by Sony Computer Entertainment Inc." ); + "Sony Computer Entertainment Inc. for Europe area" ); strcpy( exe.pad2, "Built using GCC and PSn00bSDK libraries" ); diff --git a/tools/util/makefile b/tools/util/makefile deleted file mode 100644 index fe7aed5..0000000 --- a/tools/util/makefile +++ /dev/null @@ -1,20 +0,0 @@ -CFLAGS = -O2 -s - -CC = gcc - -ifeq "$(OS)" "Windows_NT" -EXE_SUFFIX = .exe -else -EXE_SUFFIX = -endif - -all: - $(CC) $(CFLAGS) elf2x.c -o elf2x$(EXE_SUFFIX) - $(CC) $(CFLAGS) elf2cpe.c -o elf2cpe$(EXE_SUFFIX) - -install: - mkdir -p ../bin - cp elf2x$(EXE_SUFFIX) ../bin/elf2x$(EXE_SUFFIX) - -clean: - rm -f elf2x$(EXE_SUFFIX) |
