aboutsummaryrefslogtreecommitdiff
path: root/tools/util
diff options
context:
space:
mode:
authorspicyjpeg <88942473+spicyjpeg@users.noreply.github.com>2021-09-27 20:11:10 +0200
committerspicyjpeg <88942473+spicyjpeg@users.noreply.github.com>2021-09-27 20:11:10 +0200
commit0e3278a087daa25cba541d7c1dae19dfd4e2d422 (patch)
treedbd8ea7b2f3398865a396d3f425a6ab4ba4bed94 /tools/util
parent5bc36dfcfc64e48401a9c6472062020681b3511f (diff)
downloadpsn00bsdk-0e3278a087daa25cba541d7c1dae19dfd4e2d422.tar.gz
Misc MSVC/CMake fixes, also fixed childexec example
Diffstat (limited to 'tools/util')
-rw-r--r--tools/util/elf2cpe.c4
-rw-r--r--tools/util/elf2x.c9
2 files changed, 12 insertions, 1 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" );