diff options
| author | John "Lameguy" Wilbert Villamor <lameguy64@gmail.com> | 2022-09-26 16:49:56 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-26 16:49:56 +0800 |
| commit | c4a2533d21dfd05cde841ea48c67b05e0e6a853f (patch) | |
| tree | c7ef61653b157b69fb0956709366996ddbc4ecfa /tools | |
| parent | a8b404b3400c3ebd8e0b923dcaefcc49ea563e36 (diff) | |
| parent | 86f0064afb8200e60dd80827535cac30d0eab028 (diff) | |
| download | psn00bsdk-c4a2533d21dfd05cde841ea48c67b05e0e6a853f.tar.gz | |
Merge pull request #55 from spicyjpeg/psxmdec
Full MDEC support, C library refactors, cleanups and bugfixes (v0.20)
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/lzpack/main.cpp | 8 | ||||
| m--------- | tools/mkpsxiso | 0 | ||||
| m--------- | tools/tinyxml2 | 0 | ||||
| -rw-r--r-- | tools/util/elf2x.c | 44 |
4 files changed, 26 insertions, 26 deletions
diff --git a/tools/lzpack/main.cpp b/tools/lzpack/main.cpp index 506b76c..798408c 100644 --- a/tools/lzpack/main.cpp +++ b/tools/lzpack/main.cpp @@ -28,10 +28,10 @@ typedef struct { } PCK_FILE; typedef struct { - char id[3]; - u_char numFiles; - PCK_FILE file[85]; // File entries - int lba; // LBA of the PCK file (in 2048 byte sector units) + char id[3]; + unsigned char numFiles; + PCK_FILE file[85]; // File entries + int lba; // LBA of the PCK file (in 2048 byte sector units) } PCK_TOC; diff --git a/tools/mkpsxiso b/tools/mkpsxiso -Subproject f07f5e6002beccfa95e88a841a16b8ace456c61 +Subproject 7bcb4ad2086a8004da32d0ee2289093ed8d4872 diff --git a/tools/tinyxml2 b/tools/tinyxml2 -Subproject a9773976845b19e89020c1215781e71116477ef +Subproject e45d9d16d430a3f5d3eee9fe40d5e194e1e5e63 diff --git a/tools/util/elf2x.c b/tools/util/elf2x.c index 9a7c126..38ed60d 100644 --- a/tools/util/elf2x.c +++ b/tools/util/elf2x.c @@ -154,31 +154,31 @@ int main(int argc, char** argv) { } - exe_tsize = (exe_haddr-exe_taddr); - exe_tsize += prg_heads[head.prg_entry_count-1].p_filesz; + exe_tsize = (exe_haddr - exe_taddr); + exe_tsize += prg_heads[head.prg_entry_count - 1].p_filesz; - if( !quiet ) { - - printf( "pc:%08x t_addr:%08x t_size:%d\n", - head.prg_entry_addr, exe_taddr, exe_tsize ); - - } + if (!quiet) + printf( + "pc:%08x t_addr:%08x t_size:%d\n", + head.prg_entry_addr, + exe_taddr, + exe_tsize + ); // Check if load address is appropriate in main RAM locations - if( ( ( exe_taddr>>24 ) == 0x0 ) || ( ( exe_taddr>>24 ) == 0x80 ) || - ( ( exe_taddr>>24 ) == 0xA0 ) ) { - - if( ( exe_taddr&0x00ffffff ) < 65536 ) { - - printf( "Warning: Program text address overlaps kernel area!\n" ); - - } - - } - - - // Pad out the size to multiples of 2KB - exe_tsize = 2048*((exe_tsize+2047)/2048); + if ( + ((exe_taddr >= 0x00000000) && (exe_taddr < 0x00001000)) || + ((exe_taddr >= 0x80000000) && (exe_taddr < 0x80001000)) || + ((exe_taddr >= 0xa0000000) && (exe_taddr < 0xa0001000)) + ) + printf("WARNING: program text address overlaps kernel area!\n"); + + // Throw warning if executable is larger than 2MB + if (exe_tsize > 0x1f0000) + printf("WARNING: executable is larger than available RAM on a stock console!\n"); + + // Pad out the size to multiples of 2KB (CD sector size) + exe_tsize = ((exe_tsize + 2047) / 2048) * 2048; // Load the binary data binary = (unsigned char*)malloc( exe_tsize ); |
