diff --git a/NEWS b/NEWS index e813e6e1..c66812ea 100644 --- a/NEWS +++ b/NEWS @@ -7,11 +7,15 @@ User visible changes for UPX [ WARNING: there are known bugs in the win32/pe format which cause crashes on a number of exes ] -Changes in 1.91 beta (XX Sep 2003): +Changes in 1.91 beta (XX Apr 2004): * UNSTABLE BETA VERSION - DO NOT USE EXCEPT FOR TESTING * djgpp2/coff: added support for recent binutils versions * watcom/le: don't crash on files without relocations * Option `--brute' now implies `--crp-ms=999999'. + * source code: much improved portability using ACC, the + Automatic Compiler Configuration + * source code: compile fixes for strict ISO C++ compilers + * source code: compile fixes for Win64 Changes in 1.90 beta (11 Nov 2002): * UNSTABLE BETA VERSION - DO NOT USE EXCEPT FOR TESTING @@ -51,8 +55,8 @@ Changes in 1.23 (05 Sep 2002) Changes in 1.22 (27 Jun 2002) * atari/tos: the stub now flushes the CPU cache to avoid problems on 68030+ machines - * source code: additional compiler support for Borland C++ 5.5.1, - Digital Mars C++ 8.28 and Watcom C++ 11.0c + * source code: additional compiler support for Borland C++, + Digital Mars C++ and Watcom C++ Changes in 1.21 (01 Jun 2002) * New option `--crp-ms=' for slightly better compression at the cost diff --git a/README.SRC b/README.SRC index af7bcd1f..40311199 100644 --- a/README.SRC +++ b/README.SRC @@ -96,7 +96,7 @@ To compile the packer sources If you want to modify the stub sources you'll also need ------------------------------------------------------- - - Nasm 0.98.36 - the Netwide Assembler + - Nasm 0.98.38 - the Netwide Assembler http://upx.sourceforge.net/download/tools/ http://sourceforge.net/projects/nasm/ @@ -106,7 +106,7 @@ If you want to modify the stub sources you'll also need - djasm - an assembler for the djgpp stub http://upx.sourceforge.net/download/tools/ - - Perl 5.004 or better + - Perl 5.6 or better - Linux (for the linux/386 stubs) diff --git a/doc/upx.pod b/doc/upx.pod index f652ec33..2b9ab08a 100644 --- a/doc/upx.pod +++ b/doc/upx.pod @@ -704,6 +704,9 @@ Maximum uncompressed size: ~1998848 bytes. Notes: + - UPX creates as default a 'CD-Rom only' PS1/PS2 compatible executable. + For transfer between client/target use options below. + - Normally the packed files use the same memory areas like the uncompressed versions, so they will not override other memory areas while unpacking. If this isn't possible UPX will abort showing a 'packed data overlap' @@ -718,10 +721,17 @@ Extra options available for this executable format: the compression ratio in some cases, but usually the default method gives the best results anyway. + --console-run This enables client/target transfer compatibility. + This format also run from a CD, except the "--no-align" + option is used. Upto 2024 bytes larger files + than [default] will be the result, also a + slower decompression speed can be expected. + --no-align This option disables CD mode 2 data sector format - alignment. This will slightly improve the compression - ratio, but the compressed executable will not work - when started from a CD. + alignment, and enables "--console-run". + This will slightly improve the compression ratio, + but the compressed executable will not boot from a CD. + So use it for client/target transfer only!. diff --git a/src/acc/acclib/.cvsignore b/src/acc/acclib/.cvsignore index 711bdb99..84a506a3 100644 --- a/src/acc/acclib/.cvsignore +++ b/src/acc/acclib/.cvsignore @@ -1,2 +1,3 @@ -getopt.ch fnmatch.ch +getopt.ch +perfctr.ch diff --git a/src/help.cpp b/src/help.cpp index 444b327e..b4db5b80 100644 --- a/src/help.cpp +++ b/src/help.cpp @@ -195,7 +195,8 @@ void show_help(int x) fg = con_fg(f,fg); con_fprintf(f, " --all-methods try all available compression methods\n" - " --no-align don't align to mode2 sector format\n" + " --console-run enables client/host transfer compatibility\n" + " --no-align don't align to 2048 bytes [enables: --console-run]\n" "\n"); fg = con_fg(f,FG_YELLOW); con_fprintf(f,"Options for tmt/adam:\n"); diff --git a/src/main.cpp b/src/main.cpp index c9b29dff..7fd258e0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -699,7 +699,11 @@ static int do_option(int optc, const char *arg) opt->o_unix.ptinterp = true; break; case 670: + opt->ps1_exe.console_run = true; + break; + case 671: opt->ps1_exe.no_align = true; + opt->ps1_exe.console_run = true; break; case '\0': @@ -818,7 +822,8 @@ static const struct mfx_option longopts[] = {"compress-resources", 2, 0, 632}, {"strip-relocs", 2, 0, 633}, // ps1/exe - {"no-align", 0x10, 0, 670}, + {"console-run", 0x10, 0, 670}, + {"no-align", 0x10, 0, 671}, { NULL, 0, NULL, 0 } }; diff --git a/src/options.h b/src/options.h index 79a7cc7c..75f26db9 100644 --- a/src/options.h +++ b/src/options.h @@ -109,6 +109,7 @@ struct options_t { bool no_reloc; } dos_exe; struct { + bool console_run; bool no_align; } ps1_exe; struct { diff --git a/src/p_ps1.cpp b/src/p_ps1.cpp index 738946ae..553f77ae 100644 --- a/src/p_ps1.cpp +++ b/src/p_ps1.cpp @@ -37,7 +37,9 @@ #include "p_ps1.h" static const -#include "stub/l_ps1.h" +#include "stub/l_ps1b.h" +static const +#include "stub/l_ps1c.h" #define MIPS_HI(a) ((a) >> 16) @@ -50,10 +52,7 @@ static const #define PS_MAX_SIZE 0x1e8000 #define SZ_IH_BKUP (10 * sizeof(LE32)) - -// FIXME: would be nice to set this once, so runtime and handler will -// use this define together -#define EIGHTBIT +#define HD_CODE_OFS (sizeof(ps1_exe_t)) /************************************************************************* @@ -71,27 +70,24 @@ static const **************************************************************************/ PackPs1::PackPs1(InputFile *f) : - super(f), overlap(0), sa_cnt(0), cfile_size(0) + super(f), overlap(0), sa_cnt(0), cfile_size(0), isCon(false) { COMPILE_TIME_ASSERT(sizeof(ps1_exe_t) == 188); COMPILE_TIME_ASSERT(PS_HDR_SIZE > sizeof(ps1_exe_t)); COMPILE_TIME_ASSERT(SZ_IH_BKUP == 40); -#if defined(WITH_NRV) - COMPILE_TIME_ASSERT(sizeof(nrv_loader) == 1570); - COMPILE_TIME_ASSERT(NRV_LOADER_CRC32 == 0xd78b1eb4); +#if 1 || defined(WITH_NRV) + COMPILE_TIME_ASSERT(sizeof(nrv_boot_loader) == 1950); + COMPILE_TIME_ASSERT(NRV_BOOT_LOADER_CRC32 == 0x10936e44); + COMPILE_TIME_ASSERT(sizeof(nrv_con_loader) == 1434); + COMPILE_TIME_ASSERT(NRV_CON_LOADER_CRC32 == 0xe2a42bc3); #endif - fdata_size = file_size - PS_HDR_SIZE; } const int *PackPs1::getCompressionMethods(int method, int level) const { -#ifdef EIGHTBIT return Packer::getDefaultCompressionMethods_8(method, level); -#else - return Packer::getDefaultCompressionMethods_le32(method, level); -#endif } @@ -132,8 +128,9 @@ bool PackPs1::checkFileHeader() } cfile_size = fdata_size; } - if (ih.da_ptr != 0 && ih.da_len != 0 - && ih.bs_ptr != 0 && ih.bs_len != 0 && !opt->force) + if (ih.da_ptr != 0 || ih.da_len != 0 + || ih.bs_ptr != 0 || ih.bs_len != 0 + && !opt->force) return false; cfile_size = ih.tx_len; return true; @@ -196,7 +193,7 @@ bool PackPs1::canPack() throwCantPack("file is too small (try --force)"); if (file_size > PS_MAX_SIZE && !opt->force) throwCantPack("file is too big (try --force)"); - + isCon = opt->ps1_exe.console_run; return true; } @@ -207,32 +204,36 @@ bool PackPs1::canPack() int PackPs1::buildLoader(const Filter *) { - initLoader(nrv_loader,sizeof(nrv_loader)); - addLoader("PS1MAIN0", - ih.tx_ptr & 0xffff ? "PS1JSTA0" : "PS1JSTH0", - "PS1DECO0", NULL); -#ifdef EIGHTBIT + if (isCon) + initLoader(nrv_con_loader,sizeof(nrv_con_loader)); + else + initLoader(nrv_boot_loader,sizeof(nrv_boot_loader)); + + addLoader("PS1START", + isCon ? ph.c_len & 3 ? "PS1PADCD" : "" : "PS1ENTRY", + ih.tx_ptr & 0xffff ? "PS1CONHL" : "PS1CONHI", + isCon ? "PS1ENTRY" : "", + NULL + ); + if (ph.method == M_NRV2B_8) - addLoader("PS1N2BD0", NULL); + addLoader("PS1N2BD8", NULL); else if (ph.method == M_NRV2D_8) - addLoader("PS1N2DD0", NULL); + addLoader("PS1N2DD8", NULL); else if (ph.method == M_NRV2E_8) - addLoader("PS1N2ED0", NULL); -#else - if (ph.method == M_NRV2B_LE32) - addLoader("PS1N2BD0", NULL); - else if (ph.method == M_NRV2D_LE32) - addLoader("PS1N2DD0", NULL); - else if (ph.method == M_NRV2E_LE32) - addLoader("PS1N2ED0", NULL); -#endif + addLoader("PS1N2ED8", NULL); else throwInternalError("unknown compression method"); + if (sa_cnt) - addLoader((sa_cnt > 0xfffc) ? "MSETBIG0" : "MSETSML0", // set small/big memset - (ih.tx_len & 3) ? "MSETUAL0" : "MSETALG0", // un/aligned memset - NULL); - addLoader("PS1EXIT0", "IDENTSTR", "PS1PHDR0", "PS1RGSZ0", NULL); + addLoader(sa_cnt > 0xfffc ? "PS1MSETB" : "PS1MSETS", // set small/big memset + ih.tx_len & 3 ? "PS1MSETU" : "PS1MSETA", // un/aligned memset + NULL + ); + addLoader("PS1FLUSH", "PS1JMPEP", "IDENTSTR", "PS1PAHDR", + isCon ? "PS1SREGS" : "", + NULL + ); return getLoaderSize(); } @@ -254,6 +255,7 @@ void PackPs1::pack(OutputFile *fo) // scan the end of file for 2048 bytes sector alignment // the removed space will secure in-place decompression while (!(*p_scan--)) { if (sa_cnt++ > (0xfffc<<3)) break; } + if (sa_cnt > 0xfffc) sa_cnt = ALIGN_DOWN(sa_cnt,8); else @@ -262,8 +264,8 @@ void PackPs1::pack(OutputFile *fo) // prepare packheader ph.u_len = (fdata_size - sa_cnt); ph.filter = 0; - Filter ft(ph.level); + // compress (max_match = 65535) compressWithFilters(&ft, 512, 0, NULL, 0, 65535); @@ -278,7 +280,7 @@ void PackPs1::pack(OutputFile *fo) { overlap = ALIGN_UP((ph.overlap_overhead-sa_cnt),4); opt->info_mode += !opt->info_mode ? 1 : 0; - infoWarning("%s will load to a %d bytes higher offset",fi->getName(),overlap); + infoWarning("%s: memory overlap %d bytes",fi->getName(),overlap); } } @@ -287,40 +289,46 @@ void PackPs1::pack(OutputFile *fo) oh.ih_csum = upx_adler32(&ih.epc, SZ_IH_BKUP); const int lsize = getLoaderSize(); - MemBuffer loader(lsize); memcpy(loader,getLoader(),lsize); + patchPackHeader(loader,lsize); + unsigned pad = 0; unsigned filelen = ALIGN_UP((cfile_size ? cfile_size : (unsigned) ih.tx_len), 4); unsigned pad_code = TIL_ALIGNED(ph.c_len, 4); - const int h_len = lsize-getLoaderSectionStart("IDENTSTR"); - const int e_len = lsize-h_len; - const int d_len = e_len-getLoaderSectionStart("PS1DECO0"); - const int s_len = get_le32(&loader[getLoaderSectionStart("PS1RGSZ0")]); - - // set the offset for compressed stuff at the very end of file const unsigned decomp_data_start = ih.tx_ptr; const unsigned comp_data_start = ((decomp_data_start + filelen + overlap) - ph.c_len); - const unsigned entry = comp_data_start - e_len - pad_code; - patchPackHeader(loader,lsize); - patch_mips_le(loader,e_len,"JPEP",MIPS_JP(ih.epc)); + const int h_len = lsize-getLoaderSectionStart("IDENTSTR"); + const int c_len = lsize-h_len; + int d_len = 0; + int e_len = 0; - if (sa_cnt) - patch_mips_le(loader,e_len,"SC",MIPS_LO(sa_cnt > 0xfffc ? sa_cnt >> 3 : sa_cnt)); - if (ih.tx_ptr & 0xffff) - patch_mips_le(loader,e_len,"DECO",decomp_data_start); + if (isCon) + { + e_len = lsize - h_len; + d_len = e_len - getLoaderSectionStart("PS1ENTRY"); + } else - patch_mips_le(loader,e_len,"DE",MIPS_HI(decomp_data_start)); - patch_mips_le(loader,e_len,"COMP",comp_data_start); - patch_mips_le(loader,e_len,"DCRT",entry + (e_len - d_len)); - patch_mips_le(loader,e_len,"LS",d_len + s_len); + { + d_len = (lsize - h_len) - getLoaderSectionStart("PS1ENTRY"); + e_len = (lsize - d_len) - h_len; + } + patch_mips_le(loader,c_len,"JPEP",MIPS_JP(ih.epc)); + if (sa_cnt) + patch_mips_le(loader,c_len,"SC",MIPS_LO(sa_cnt > 0xfffc ? sa_cnt >> 3 : sa_cnt)); + if (ih.tx_ptr & 0xffff) + patch_mips_le(loader,c_len,"DECO",decomp_data_start); + else + patch_mips_le(loader,c_len,"DE",MIPS_HI(decomp_data_start)); + + const unsigned entry = comp_data_start - e_len - pad_code; oh.tx_ptr = entry; oh.tx_len = ph.c_len + e_len + pad_code; - oh.epc = entry; + oh.epc = comp_data_start - e_len - pad_code; if (!opt->ps1_exe.no_align) { @@ -333,24 +341,45 @@ void PackPs1::pack(OutputFile *fo) ibuf.clear(0,fdata_size); upx_bytep paddata = ibuf; + if (isCon) + { + if (pad_code) + patch_mips_le(loader,c_len,"PC",pad_code); + patch_mips_le(loader, c_len, "DCRT", entry + (e_len - d_len)); + patch_mips_le(loader, c_len, "LS", + d_len + get_le32(&loader[getLoaderSectionStart("PS1SREGS")])); + // ps1_exe_t structure 188 bytes fo->write(&oh,sizeof(oh)); - // id & upx header some more bytes - fo->write(loader+e_len,h_len); - // remember? header size is 2048 bytes so we write the rest - fo->write(paddata,PS_HDR_SIZE - fo->getBytesWritten()); + // id & upx header + fo->write(loader + e_len,h_len); + } + else + { + patch_mips_le(loader,c_len,"CPDO",comp_data_start); + patch_mips_le(loader, e_len,"PSVR", + (0xa0000000 - (ih.epc & 0x80000000)) + (0x800 - HD_CODE_OFS)); - // padding placed in front of the runtime, so it doesn't overwrite other - // than the allowed space (ih.tx_ptr >= allowed space <= (ih.tx_ptr+ih.tx_len)) + // ps1_exe_t structure 188 bytes + fo->write(&oh,sizeof(oh)); + // decompressor + fo->write(loader + e_len, d_len); + // id & upx header + fo->write(loader + e_len + d_len, h_len); + } + + // header size is 2048 bytes + fo->write(paddata, PS_HDR_SIZE - fo->getBytesWritten()); + // sector alignment if (pad) - fo->write(paddata,pad); - // runtime - fo->write(loader,e_len); - // does the code need to be padded? must be aligned to 4! + fo->write(paddata, pad); + // entry + fo->write(loader, e_len); + // code must be aligned to 4! if (pad_code) - fo->write(paddata,pad_code); + fo->write(paddata, pad_code); // compressed binary / data - fo->write(obuf,ph.c_len); + fo->write(obuf, ph.c_len); verifyOverlappingDecompression(); if (!checkFinalCompressionRatio(fo)) @@ -358,12 +387,14 @@ void PackPs1::pack(OutputFile *fo) #if 0 printf("%-13s: compressed : %8ld bytes\n", getName(), (long) ph.c_len); - printf("%-13s: decompressor : %8ld bytes\n", getName(), (long) e_len); + printf("%-13s: decompressor : %8ld bytes\n", getName(), (long) lsize - h_len); printf("%-13s: code entry : %08X bytes\n", getName(), (unsigned int) oh.epc); printf("%-13s: load address : %08X bytes\n", getName(), (unsigned int) oh.tx_ptr); printf("%-13s: section size : %8ld bytes\n", getName(), (long) oh.tx_len); printf("%-13s: eof in mem IF: %08X bytes\n", getName(), (unsigned int) ih.tx_ptr+ih.tx_len); printf("%-13s: eof in mem OF: %08X bytes\n", getName(), (unsigned int) oh.tx_ptr+oh.tx_len); + char method_name[32+1]; set_method_name(method_name, sizeof(method_name), ph.method, ph.level); + printf("%-13s: compressor : %s\n", getName(), method_name); #endif } diff --git a/src/p_ps1.h b/src/p_ps1.h index 0859f255..908f8feb 100644 --- a/src/p_ps1.h +++ b/src/p_ps1.h @@ -110,6 +110,8 @@ protected: unsigned fdata_size; // calculated filesize unsigned cfile_size; + + bool isCon; }; diff --git a/src/stub/Makefile b/src/stub/Makefile index d15f5fd3..c6b08cd5 100644 --- a/src/stub/Makefile +++ b/src/stub/Makefile @@ -26,7 +26,7 @@ STUBS = \ l_com.h \ l_djgpp2.h stubify.h \ l_exe.h \ - l_ps1.h \ + l_ps1b.h l_ps1c.h \ l_sys.h \ l_t_n2b.h l_t_n2bs.h l_t_n2d.h l_t_n2ds.h l_t_n2e.h l_t_n2es.h \ l_tmt.h \ @@ -298,11 +298,17 @@ l_t_x2ds.h: l_tos2.s # // ps1/exe # ************************************************************************/ -l_ps1.h: l_ps1.asm +l_ps1b.h: l_ps1.asm + $(CPP_MR3K) -DCDBOOT -o $T.asx $< + $(APP_MR3K) $T.asx $T.asy + $(ASM_MR3K) $T.asy -o$T.bin -l$T.lst + $(BIN2H) $T.bin nrv_boot_loader $@ + +l_ps1c.h: l_ps1.asm $(CPP_MR3K) -o $T.asx $< $(APP_MR3K) $T.asx $T.asy $(ASM_MR3K) $T.asy -o$T.bin -l$T.lst - $(BIN2H) $T.bin nrv_loader $@ + $(BIN2H) $T.bin nrv_con_loader $@ # /*********************************************************************** diff --git a/src/stub/l_ps1.asm b/src/stub/l_ps1.asm index 6d822fc9..f360a377 100644 --- a/src/stub/l_ps1.asm +++ b/src/stub/l_ps1.asm @@ -32,9 +32,36 @@ #include +#define HI(a) (a >> 16) +#define LO(a) (a & 0xffff) + +#if 1 +# define NRV_BB 8 +#else +# define NRV_BB 32 +#endif + #define SZ_REG 4 -do_regs MACRO _w +#if CDBOOT +regs MACRO _w, marker + _w a0,SZ_REG*0(sp) + _w a1,SZ_REG*1(sp) + _w a2,SZ_REG*2(sp) + _w a3,SZ_REG*3(sp) + _w v0,SZ_REG*4(sp) + _w v1,SZ_REG*5(sp) +IF (marker != 0) + DW marker +ENDIF + _w ra,SZ_REG*6(sp) +regs ENDM + +#define REG_SZ (7*SZ_REG) + +#else //console + +regs MACRO _w _w at,SZ_REG*0(sp) _w a0,SZ_REG*1(sp) _w a1,SZ_REG*2(sp) @@ -43,119 +70,136 @@ do_regs MACRO _w _w v0,SZ_REG*5(sp) _w v1,SZ_REG*6(sp) _w ra,SZ_REG*7(sp) -do_regs ENDM +regs ENDM #define REG_SZ (8*SZ_REG) -#define HI(a) (a >> 16) -#define LO(a) (a & 0xffff) +#endif //CDBOOT ORG 0 +start: + +#if CDBOOT ; ============= ; ============= ENTRY POINT ; ============= +; for cd-boot only -entry: -; __PS1MAIN0__ +; __PS1START__ + li t0,'PSVR' ; prepare to compute value + subu t0,s0,t0 ; get stored header offset in mem + jr t0 + subiu sp,REG_SZ ; adjust stack +cutpoint: +; __PS1ENTRY__ + regs sw, 0 ; push used regs + li a0,'CPDO' ; load COMPDATA offset +; li a1,'CDSZ' ; compressed data size - disabled! +; __PS1CONHL__ + li a2,'DECO' +; __PS1CONHI__ + lui a2,HI('DECO') + + +#else //CONSOLE +; ============= +; ============= ENTRY POINT +; ============= +; for console- / cd-boot + +; __PS1START__ addiu at,zero,'LS' ; size of decomp. routine subu sp,at ; adjust the stack with this size - do_regs sw ; push used regs - subiu a0,at,REG_SZ ; a0 = counter copyloop + regs sw ; push used regs + subiu a2,at,REG_SZ ; a0 = counter copyloop addiu a3,sp,REG_SZ ; get offset for decomp. routine move a1,a3 - li a2,'DCRT' ; load decompression routine's offset + li a0,'DCRT' ; load decompression routine's offset copyloop: - addi a0,-4 - lw at,0(a2) ; memcpy *a2 -> at -> *a1 - addiu a2,4 + addi a2,-4 + lw at,0(a0) ; memcpy *a2 -> at -> *a1 + addiu a0,4 sw at,0(a1) - bnez a0,copyloop + bnez a2,copyloop addiu a1,4 - li a0,'COMP' ; load COMPDATA HI offset -; li a1,'CDSZ' ; compressed data size !disabled -; __PS1MAINZ__ - -; ============= - -; __PS1JSTA0__ +; __PS1PADCD__ + addiu a0,'PC' ; a0 = pointer compressed data +; __PS1CONHL__ lui a2,HI('DECO') ; load DECOMPDATA HI offset jr a3 ori a2,LO('DECO') ; load DECOMPDATA LO offset -; __PS1JSTAZ__ -; __PS1JSTH0__ +; __PS1CONHI__ jr a3 lui a2,HI('DECO') ; same for HI only !(offset&0xffff) -; __PS1JSTHZ__ +cutpoint: +; __PS1ENTRY__ +#endif //CDBOOT ; ============= ; ============= DECOMPRESSION ; ============= -#if 1 -# define NRV_BB 8 -#else -# define NRV_BB 32 -#endif -#if 1 +#if CDBOOT +# if SMALL +# undef SMALL +# endif +#else //CONSOLE +# if !SMALL # define SMALL -#endif +# endif +#endif //CDBOOT -; __PS1DECO0__ -; __PS1DECOZ__ -; __PS1N2BD0__ +; __PS1N2BD8__ #include -; __PS1N2BDZ__ -; __PS1N2DD0__ +; __PS1N2DD8__ #include -; __PS1N2DDZ__ -; __PS1N2ED0__ +; __PS1N2ED8__ #include -; __PS1N2EDZ__ ; ============= -; __MSETBIG0__ +; __PS1MSETB__ ori a0,zero,'SC' ; amount of removed zero's at eof sll a0,3 ; (cd mode 2 data sector alignment) -; __MSETBIGZ__ -; __MSETSML0__ +; __PS1MSETS__ ori a0,zero,'SC' ; amount of removed zero's at eof -; __MSETSMLZ__ - -; ============= - -; __MSETALG0__ +; __PS1MSETA__ memset_aligned: addi a0,-4 sw zero,0(a2) bnez a0,memset_aligned addiu a2,4 -; __MSETALGZ__ -; __MSETUAL0__ +; __PS1MSETU__ memset_unaligned: addi a0,-4 swl zero,3(a2) swr zero,0(a2) bnez a0,memset_unaligned addiu a2,4 -; __MSETUALZ__ ; ============= -; __PS1EXIT0__ +; __PS1FLUSH__ li t2,160 ; flushes jalr ra,t2 ; instruction li t1,68 ; cache - do_regs lw ; pop used regs - DW 'JPEP' ; marker for the entry jump - addu sp,at -; __PS1EXITZ__ ; ============= -; __PS1PHDR0__ +; __PS1JMPEP__ +#if CDBOOT + regs lw, 'JPEP' ; marker for the entry jump + +#else //CONSOLE + regs lw ; pop used regs + DW 'JPEP' ; marker for the entry jump + addu sp,at +#endif //CDBOOT +; ============= + +; __PS1PAHDR__ DB 85,80,88,33 ; 0 UPX_MAGIC_LE32 ; another magic for PackHeader::putPackHeader DB 161,216,208,213 ; UPX_MAGIC2_LE32 @@ -168,17 +212,16 @@ memset_unaligned: DB 0 ; 29 filter cto DB 0 ; unsused DB 45 ; 31 header checksum -; __PS1PHDRZ__ ; ============= -; __PS1RGSZ0__ +#if !CDBOOT +; __PS1SREGS__ DW REG_SZ -; __PS1RGSZZ__ -eof: +#endif //CDBOOT +; __PS1EOASM__ +eof: ; section .data DW -1 DH eof - -; vi:ts=8:et:nowrap diff --git a/src/stub/l_ps1b.h b/src/stub/l_ps1b.h new file mode 100644 index 00000000..3406e455 --- /dev/null +++ b/src/stub/l_ps1b.h @@ -0,0 +1,155 @@ +/* l_ps1b.h -- created from l_ps1b.bin, 1950 (0x79e) bytes + + This file is part of the UPX executable compressor. + + Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer + Copyright (C) 1996-2004 Laszlo Molnar + All Rights Reserved. + + UPX and the UCL library are free software; you can redistribute them + and/or modify them under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. + If not, write to the Free Software Foundation, Inc., + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + Markus F.X.J. Oberhumer Laszlo Molnar + + */ + + +#define NRV_BOOT_LOADER_ADLER32 0x0aef52ee +#define NRV_BOOT_LOADER_CRC32 0x10936e44 + +unsigned char nrv_boot_loader[1950] = { + 83, 80, 8, 60, 82, 86, 8, 53, 35, 64, 8, 2, 8, 0, 0, 1, /* 0x 0 */ +228,255,189, 39, 0, 0,164,175, 4, 0,165,175, 8, 0,166,175, /* 0x 10 */ + 12, 0,167,175, 16, 0,162,175, 20, 0,163,175, 24, 0,191,175, /* 0x 20 */ + 80, 67, 4, 60, 79, 68,132, 52, 69, 68, 6, 60, 79, 67,198, 52, /* 0x 30 */ + 69, 68, 6, 60, 33, 72, 0, 0, 1, 0, 11, 36, 33, 64,128, 0, /* 0x 40 */ +127, 0, 34, 49, 5, 0, 64, 20, 64, 72, 9, 0, 0, 0, 2,145, /* 0x 50 */ + 1, 0, 8, 37, 64, 16, 2, 0, 1, 0, 73, 36, 2, 18, 9, 0, /* 0x 60 */ + 1, 0, 66, 48, 6, 0, 64, 16, 1, 0, 3, 36, 0, 0, 2,145, /* 0x 70 */ + 1, 0, 8, 37, 0, 0,194,160,241,255, 0, 16, 1, 0,198, 36, /* 0x 80 */ +127, 0, 34, 49, 5, 0, 64, 20, 64, 72, 9, 0, 0, 0, 2,145, /* 0x 90 */ + 1, 0, 8, 37, 64, 16, 2, 0, 1, 0, 73, 36, 2, 18, 9, 0, /* 0x a0 */ + 1, 0, 66, 48, 64, 24, 3, 0, 33, 24, 98, 0,127, 0, 34, 49, /* 0x b0 */ + 5, 0, 64, 20, 64, 72, 9, 0, 0, 0, 2,145, 1, 0, 8, 37, /* 0x c0 */ + 64, 16, 2, 0, 1, 0, 73, 36, 2, 18, 9, 0, 1, 0, 66, 48, /* 0x d0 */ +236,255, 64, 16,127, 0, 34, 49, 2, 0, 2, 36, 3, 0, 98, 20, /* 0x e0 */ +253,255, 99, 36, 9, 0, 0, 16, 33, 24, 96, 1, 0, 0, 2,145, /* 0x f0 */ + 1, 0, 8, 37, 0, 26, 3, 0, 33, 24, 98, 0,255,255, 2, 36, /* 0x 100 */ + 62, 0, 98, 16, 1, 0, 99, 36, 33, 88, 96, 0,127, 0, 34, 49, /* 0x 110 */ + 5, 0, 64, 20, 64, 72, 9, 0, 0, 0, 2,145, 1, 0, 8, 37, /* 0x 120 */ + 64, 16, 2, 0, 1, 0, 73, 36, 2, 18, 9, 0, 1, 0, 66, 48, /* 0x 130 */ +194, 17, 9, 0, 2, 0, 76, 48,127, 0, 34, 49, 5, 0, 64, 20, /* 0x 140 */ + 64, 72, 9, 0, 0, 0, 2,145, 1, 0, 8, 37, 64, 16, 2, 0, /* 0x 150 */ + 1, 0, 73, 36, 2, 18, 9, 0, 1, 0, 66, 48, 33, 96,130, 1, /* 0x 160 */ + 26, 0,128, 21, 1, 13, 98, 44, 1, 0, 12, 36,127, 0, 34, 49, /* 0x 170 */ + 5, 0, 64, 20, 64, 72, 9, 0, 0, 0, 2,145, 1, 0, 8, 37, /* 0x 180 */ + 64, 16, 2, 0, 1, 0, 73, 36, 2, 18, 9, 0, 1, 0, 66, 48, /* 0x 190 */ + 64, 96, 12, 0, 33, 96,130, 1,127, 0, 34, 49, 5, 0, 64, 20, /* 0x 1a0 */ + 64, 72, 9, 0, 0, 0, 2,145, 1, 0, 8, 37, 64, 16, 2, 0, /* 0x 1b0 */ + 1, 0, 73, 36, 2, 18, 9, 0, 1, 0, 66, 48,236,255, 64, 16, /* 0x 1c0 */ +127, 0, 34, 49, 2, 0,140, 37, 1, 13, 98, 44, 1, 0, 66, 56, /* 0x 1d0 */ + 33, 96,130, 1, 35, 24,195, 0, 1, 0,140, 37, 0, 0, 98,144, /* 0x 1e0 */ + 1, 0, 99, 36,255,255,140, 37, 0, 0,194,160,251,255,128, 21, /* 0x 1f0 */ + 1, 0,198, 36,147,255, 0, 16,127, 0, 34, 49, 33, 72, 0, 0, /* 0x 200 */ + 1, 0, 11, 36, 33, 64,128, 0,127, 0, 34, 49, 5, 0, 64, 20, /* 0x 210 */ + 64, 72, 9, 0, 0, 0, 2,145, 1, 0, 8, 37, 64, 16, 2, 0, /* 0x 220 */ + 1, 0, 73, 36, 2, 18, 9, 0, 1, 0, 66, 48, 6, 0, 64, 16, /* 0x 230 */ + 1, 0, 3, 36, 0, 0, 2,145, 1, 0, 8, 37, 0, 0,194,160, /* 0x 240 */ +241,255, 0, 16, 1, 0,198, 36,127, 0, 34, 49, 5, 0, 64, 20, /* 0x 250 */ + 64, 72, 9, 0, 0, 0, 2,145, 1, 0, 8, 37, 64, 16, 2, 0, /* 0x 260 */ + 1, 0, 73, 36, 2, 18, 9, 0, 1, 0, 66, 48, 64, 24, 3, 0, /* 0x 270 */ + 33, 24, 98, 0,127, 0, 34, 49, 5, 0, 64, 20, 64, 72, 9, 0, /* 0x 280 */ + 0, 0, 2,145, 1, 0, 8, 37, 64, 16, 2, 0, 1, 0, 73, 36, /* 0x 290 */ + 2, 18, 9, 0, 1, 0, 66, 48, 13, 0, 64, 20,255,255, 98, 36, /* 0x 2a0 */ + 64, 24, 2, 0,127, 0, 34, 49, 5, 0, 64, 20, 64, 72, 9, 0, /* 0x 2b0 */ + 0, 0, 2,145, 1, 0, 8, 37, 64, 16, 2, 0, 1, 0, 73, 36, /* 0x 2c0 */ + 2, 18, 9, 0, 1, 0, 66, 48,223,255, 0, 16, 33, 24, 98, 0, /* 0x 2d0 */ + 2, 0, 2, 36, 13, 0, 98, 20,253,255, 99, 36,127, 0, 34, 49, /* 0x 2e0 */ + 5, 0, 64, 20, 64, 72, 9, 0, 0, 0, 2,145, 1, 0, 8, 37, /* 0x 2f0 */ + 64, 16, 2, 0, 1, 0, 73, 36, 2, 18, 9, 0, 1, 0, 66, 48, /* 0x 300 */ + 33, 24, 96, 1, 12, 0, 0, 16, 1, 0, 76, 48, 0, 0, 2,145, /* 0x 310 */ + 1, 0, 8, 37, 0, 26, 3, 0, 33, 24, 98, 0,255,255, 2, 36, /* 0x 320 */ + 55, 0, 98, 16, 39, 16, 3, 0, 1, 0, 76, 48, 66, 24, 3, 0, /* 0x 330 */ + 1, 0, 99, 36, 33, 88, 96, 0,127, 0, 34, 49, 5, 0, 64, 20, /* 0x 340 */ + 64, 72, 9, 0, 0, 0, 2,145, 1, 0, 8, 37, 64, 16, 2, 0, /* 0x 350 */ + 1, 0, 73, 36, 2, 18, 9, 0, 1, 0, 66, 48, 64, 96, 12, 0, /* 0x 360 */ + 33, 96,130, 1, 26, 0,128, 21, 1, 5, 98, 44, 1, 0, 12, 36, /* 0x 370 */ +127, 0, 34, 49, 5, 0, 64, 20, 64, 72, 9, 0, 0, 0, 2,145, /* 0x 380 */ + 1, 0, 8, 37, 64, 16, 2, 0, 1, 0, 73, 36, 2, 18, 9, 0, /* 0x 390 */ + 1, 0, 66, 48, 64, 96, 12, 0, 33, 96,130, 1,127, 0, 34, 49, /* 0x 3a0 */ + 5, 0, 64, 20, 64, 72, 9, 0, 0, 0, 2,145, 1, 0, 8, 37, /* 0x 3b0 */ + 64, 16, 2, 0, 1, 0, 73, 36, 2, 18, 9, 0, 1, 0, 66, 48, /* 0x 3c0 */ +236,255, 64, 16,127, 0, 34, 49, 2, 0,140, 37, 1, 5, 98, 44, /* 0x 3d0 */ + 1, 0, 66, 56, 33, 96,130, 1, 35, 24,195, 0, 1, 0,140, 37, /* 0x 3e0 */ + 0, 0, 98,144, 1, 0, 99, 36,255,255,140, 37, 0, 0,194,160, /* 0x 3f0 */ +251,255,128, 21, 1, 0,198, 36,132,255, 0, 16,127, 0, 34, 49, /* 0x 400 */ + 33, 72, 0, 0, 1, 0, 11, 36, 33, 64,128, 0,127, 0, 34, 49, /* 0x 410 */ + 5, 0, 64, 20, 64, 72, 9, 0, 0, 0, 2,145, 1, 0, 8, 37, /* 0x 420 */ + 64, 16, 2, 0, 1, 0, 73, 36, 2, 18, 9, 0, 1, 0, 66, 48, /* 0x 430 */ + 6, 0, 64, 16, 1, 0, 3, 36, 0, 0, 2,145, 1, 0, 8, 37, /* 0x 440 */ + 0, 0,194,160,241,255, 0, 16, 1, 0,198, 36,127, 0, 34, 49, /* 0x 450 */ + 5, 0, 64, 20, 64, 72, 9, 0, 0, 0, 2,145, 1, 0, 8, 37, /* 0x 460 */ + 64, 16, 2, 0, 1, 0, 73, 36, 2, 18, 9, 0, 1, 0, 66, 48, /* 0x 470 */ + 64, 24, 3, 0, 33, 24, 98, 0,127, 0, 34, 49, 5, 0, 64, 20, /* 0x 480 */ + 64, 72, 9, 0, 0, 0, 2,145, 1, 0, 8, 37, 64, 16, 2, 0, /* 0x 490 */ + 1, 0, 73, 36, 2, 18, 9, 0, 1, 0, 66, 48, 13, 0, 64, 20, /* 0x 4a0 */ +255,255, 98, 36, 64, 24, 2, 0,127, 0, 34, 49, 5, 0, 64, 20, /* 0x 4b0 */ + 64, 72, 9, 0, 0, 0, 2,145, 1, 0, 8, 37, 64, 16, 2, 0, /* 0x 4c0 */ + 1, 0, 73, 36, 2, 18, 9, 0, 1, 0, 66, 48,223,255, 0, 16, /* 0x 4d0 */ + 33, 24, 98, 0, 2, 0, 2, 36, 13, 0, 98, 20,253,255, 99, 36, /* 0x 4e0 */ + 33, 24, 96, 1,127, 0, 34, 49, 5, 0, 64, 20, 64, 72, 9, 0, /* 0x 4f0 */ + 0, 0, 2,145, 1, 0, 8, 37, 64, 16, 2, 0, 1, 0, 73, 36, /* 0x 500 */ + 2, 18, 9, 0, 1, 0, 66, 48, 12, 0, 0, 16, 1, 0, 76, 48, /* 0x 510 */ + 0, 0, 2,145, 0, 26, 3, 0, 33, 24, 98, 0,255,255, 2, 36, /* 0x 520 */ + 77, 0, 98, 16, 1, 0, 8, 37, 39, 16, 3, 0, 1, 0, 76, 48, /* 0x 530 */ + 66, 24, 3, 0, 1, 0, 99, 36, 33, 88, 96, 0, 13, 0,128, 17, /* 0x 540 */ +127, 0, 34, 49,127, 0, 34, 49, 5, 0, 64, 20, 64, 72, 9, 0, /* 0x 550 */ + 0, 0, 2,145, 1, 0, 8, 37, 64, 16, 2, 0, 1, 0, 73, 36, /* 0x 560 */ + 2, 18, 9, 0, 1, 0, 66, 48, 46, 0, 0, 16, 1, 0, 76, 36, /* 0x 570 */ +127, 0, 34, 49, 5, 0, 64, 20, 64, 72, 9, 0, 0, 0, 2,145, /* 0x 580 */ + 1, 0, 8, 37, 64, 16, 2, 0, 1, 0, 73, 36, 2, 18, 9, 0, /* 0x 590 */ + 1, 0, 66, 48, 12, 0, 64, 16, 1, 0,140, 37,127, 0, 34, 49, /* 0x 5a0 */ + 5, 0, 64, 20, 64, 72, 9, 0, 0, 0, 2,145, 1, 0, 8, 37, /* 0x 5b0 */ + 64, 16, 2, 0, 1, 0, 73, 36, 2, 18, 9, 0, 1, 0, 66, 48, /* 0x 5c0 */ + 24, 0, 0, 16, 3, 0, 76, 36,127, 0, 34, 49, 5, 0, 64, 20, /* 0x 5d0 */ + 64, 72, 9, 0, 0, 0, 2,145, 1, 0, 8, 37, 64, 16, 2, 0, /* 0x 5e0 */ + 1, 0, 73, 36, 2, 18, 9, 0, 1, 0, 66, 48, 64, 96, 12, 0, /* 0x 5f0 */ + 33, 96,130, 1,127, 0, 34, 49, 5, 0, 64, 20, 64, 72, 9, 0, /* 0x 600 */ + 0, 0, 2,145, 1, 0, 8, 37, 64, 16, 2, 0, 1, 0, 73, 36, /* 0x 610 */ + 2, 18, 9, 0, 1, 0, 66, 48,236,255, 64, 16,127, 0, 34, 49, /* 0x 620 */ + 3, 0,140, 37, 1, 5, 98, 44, 1, 0, 66, 56, 33, 96,130, 1, /* 0x 630 */ + 35, 24,195, 0, 1, 0,140, 37, 0, 0, 98,144, 1, 0, 99, 36, /* 0x 640 */ +255,255,140, 37, 0, 0,194,160,251,255,128, 21, 1, 0,198, 36, /* 0x 650 */ +111,255, 0, 16,127, 0, 34, 49, 67, 83, 4, 52,192, 32, 4, 0, /* 0x 660 */ + 67, 83, 4, 52,252,255,132, 32, 0, 0,192,172,253,255,128, 20, /* 0x 670 */ + 4, 0,198, 36,252,255,132, 32, 3, 0,192,168, 0, 0,192,184, /* 0x 680 */ +252,255,128, 20, 4, 0,198, 36,160, 0, 10, 36, 9,248, 64, 1, /* 0x 690 */ + 68, 0, 9, 36, 0, 0,164,143, 4, 0,165,143, 8, 0,166,143, /* 0x 6a0 */ + 12, 0,167,143, 16, 0,162,143, 20, 0,163,143, 80, 69, 80, 74, /* 0x 6b0 */ + 24, 0,191,143, 85, 80, 88, 33,161,216,208,213, 0, 0, 0, 0, /* 0x 6c0 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 6d0 */ + 0, 0, 0, 45, 80, 83, 49, 83, 84, 65, 82, 84, 0, 0, 0, 0, /* 0x 6e0 */ + 80, 83, 49, 69, 78, 84, 82, 89, 20, 0, 0, 0, 80, 83, 49, 67, /* 0x 6f0 */ + 79, 78, 72, 76, 56, 0, 0, 0, 80, 83, 49, 67, 79, 78, 72, 73, /* 0x 700 */ + 64, 0, 0, 0, 80, 83, 49, 78, 50, 66, 68, 56, 68, 0, 0, 0, /* 0x 710 */ + 80, 83, 49, 78, 50, 68, 68, 56, 12, 2, 0, 0, 80, 83, 49, 78, /* 0x 720 */ + 50, 69, 68, 56, 16, 4, 0, 0, 80, 83, 49, 77, 83, 69, 84, 66, /* 0x 730 */ +104, 6, 0, 0, 80, 83, 49, 77, 83, 69, 84, 83,112, 6, 0, 0, /* 0x 740 */ + 80, 83, 49, 77, 83, 69, 84, 65,116, 6, 0, 0, 80, 83, 49, 77, /* 0x 750 */ + 83, 69, 84, 85,132, 6, 0, 0, 80, 83, 49, 70, 76, 85, 83, 72, /* 0x 760 */ +152, 6, 0, 0, 80, 83, 49, 74, 77, 80, 69, 80,164, 6, 0, 0, /* 0x 770 */ + 80, 83, 49, 80, 65, 72, 68, 82,196, 6, 0, 0, 80, 83, 49, 69, /* 0x 780 */ + 79, 65, 83, 77,228, 6, 0, 0,255,255,255,255,228, 6 /* 0x 790 */ +}; diff --git a/src/stub/l_ps1.h b/src/stub/l_ps1c.h similarity index 51% rename from src/stub/l_ps1.h rename to src/stub/l_ps1c.h index 187636ce..7bdc7dec 100644 --- a/src/stub/l_ps1.h +++ b/src/stub/l_ps1c.h @@ -1,4 +1,4 @@ -/* l_ps1.h -- created from l_ps1.bin, 1570 (0x622) bytes +/* l_ps1c.h -- created from l_ps1c.bin, 1434 (0x59a) bytes This file is part of the UPX executable compressor. @@ -26,33 +26,33 @@ */ -#define NRV_LOADER_ADLER32 0x0cf34d3a -#define NRV_LOADER_CRC32 0xd78b1eb4 +#define NRV_CON_LOADER_ADLER32 0x2b312d43 +#define NRV_CON_LOADER_CRC32 0xe2a42bc3 -unsigned char nrv_loader[1570] = { +unsigned char nrv_con_loader[1434] = { 83, 76, 1, 36, 35,232,161, 3, 0, 0,161,175, 4, 0,164,175, /* 0x 0 */ 8, 0,165,175, 12, 0,166,175, 16, 0,167,175, 20, 0,162,175, /* 0x 10 */ - 24, 0,163,175, 28, 0,191,175,224,255, 36, 36, 32, 0,167, 39, /* 0x 20 */ - 33, 40,224, 0, 67, 68, 6, 60, 84, 82,198, 52,252,255,132, 32, /* 0x 30 */ - 0, 0,193,140, 4, 0,198, 36, 0, 0,161,172,251,255,128, 20, /* 0x 40 */ - 4, 0,165, 36, 79, 67, 4, 60, 80, 77,132, 52, 69, 68, 6, 60, /* 0x 50 */ - 8, 0,224, 0, 79, 67,198, 52, 8, 0,224, 0, 69, 68, 6, 60, /* 0x 60 */ - 33, 72, 0, 0, 1, 0, 11, 36, 33, 64,128, 0, 60, 0, 17, 4, /* 0x 70 */ -127, 0, 34, 49, 6, 0, 64, 16, 1, 0, 3, 36, 0, 0, 2,145, /* 0x 80 */ - 1, 0, 8, 37, 0, 0,194,160,248,255, 0, 16, 1, 0,198, 36, /* 0x 90 */ - 51, 0, 17, 4,127, 0, 34, 49, 64, 24, 3, 0, 33, 24, 98, 0, /* 0x a0 */ - 47, 0, 17, 4,127, 0, 34, 49,249,255, 64, 16, 2, 0, 2, 36, /* 0x b0 */ + 24, 0,163,175, 28, 0,191,175,224,255, 38, 36, 32, 0,167, 39, /* 0x 20 */ + 33, 40,224, 0, 67, 68, 4, 60, 84, 82,132, 52,252,255,198, 32, /* 0x 30 */ + 0, 0,129,140, 4, 0,132, 36, 0, 0,161,172,251,255,192, 20, /* 0x 40 */ + 4, 0,165, 36, 67, 80,132, 36, 69, 68, 6, 60, 8, 0,224, 0, /* 0x 50 */ + 79, 67,198, 52, 8, 0,224, 0, 69, 68, 6, 60, 33, 72, 0, 0, /* 0x 60 */ + 1, 0, 11, 36, 33, 64,128, 0, 61, 0, 17, 4,127, 0, 34, 49, /* 0x 70 */ + 6, 0, 64, 16, 1, 0, 3, 36, 0, 0, 2,145, 1, 0, 8, 37, /* 0x 80 */ + 0, 0,194,160,248,255, 0, 16, 1, 0,198, 36, 52, 0, 17, 4, /* 0x 90 */ +127, 0, 34, 49, 64, 24, 3, 0, 33, 24, 98, 0, 48, 0, 17, 4, /* 0x a0 */ +127, 0, 34, 49,249,255, 64, 16, 0, 0, 0, 0, 2, 0, 2, 36, /* 0x b0 */ 3, 0, 98, 20,253,255, 99, 36, 9, 0, 0, 16, 33, 24, 96, 1, /* 0x c0 */ 0, 0, 2,145, 1, 0, 8, 37, 0, 26, 3, 0, 33, 24, 98, 0, /* 0x d0 */ -255,255, 2, 32, 43, 0, 98, 16, 1, 0, 99, 36, 33, 88, 96, 0, /* 0x e0 */ - 31, 0, 17, 4,127, 0, 34, 49, 33, 96, 64, 0, 64, 96, 12, 0, /* 0x f0 */ +255,255, 2, 36, 43, 0, 98, 16, 1, 0, 99, 36, 33, 88, 96, 0, /* 0x e0 */ + 31, 0, 17, 4,127, 0, 34, 49,194, 17, 9, 0, 2, 0, 76, 48, /* 0x f0 */ 27, 0, 17, 4,127, 0, 34, 49, 33, 96,130, 1, 12, 0,128, 21, /* 0x 100 */ 1, 13, 98, 44, 1, 0, 12, 36, 21, 0, 17, 4,127, 0, 34, 49, /* 0x 110 */ 64, 96, 12, 0, 33, 96,130, 1, 17, 0, 17, 4,127, 0, 34, 49, /* 0x 120 */ 249,255, 64, 16, 0, 0, 0, 0, 2, 0,140, 37, 1, 13, 98, 44, /* 0x 130 */ 1, 0, 66, 56, 33, 96,130, 1, 35, 24,195, 0, 1, 0,140, 37, /* 0x 140 */ -255,255,140, 37, 0, 0, 98,144, 1, 0, 99, 36, 0, 0,194,160, /* 0x 150 */ -251,255,128, 21, 1, 0,198, 36,196,255, 0, 16, 0, 0, 0, 0, /* 0x 160 */ + 0, 0, 98,144, 1, 0, 99, 36,255,255,140, 37, 0, 0,194,160, /* 0x 150 */ +251,255,128, 21, 1, 0,198, 36,195,255, 0, 16, 0, 0, 0, 0, /* 0x 160 */ 5, 0, 64, 20, 64, 72, 9, 0, 0, 0, 2,145, 1, 0, 8, 37, /* 0x 170 */ 64, 16, 2, 0, 1, 0, 73, 36, 2, 18, 9, 0, 8, 0,224, 3, /* 0x 180 */ 1, 0, 66, 48, 33, 72, 0, 0, 1, 0, 11, 36, 33, 64,128, 0, /* 0x 190 */ @@ -64,69 +64,60 @@ unsigned char nrv_loader[1570] = { 244,255, 0, 16, 33, 24, 98, 0, 2, 0, 2, 36, 6, 0, 98, 20, /* 0x 1f0 */ 253,255, 99, 36, 44, 0, 17, 4,127, 0, 34, 49, 33, 24, 96, 1, /* 0x 200 */ 12, 0, 0, 16, 1, 0, 76, 48, 0, 0, 2,145, 1, 0, 8, 37, /* 0x 210 */ - 0, 26, 3, 0, 33, 24, 98, 0,255,255, 2, 32, 43, 0, 98, 16, /* 0x 220 */ + 0, 26, 3, 0, 33, 24, 98, 0,255,255, 2, 36, 43, 0, 98, 16, /* 0x 220 */ 39, 16, 3, 0, 1, 0, 76, 48, 66, 24, 3, 0, 1, 0, 99, 36, /* 0x 230 */ 33, 88, 96, 0, 28, 0, 17, 4,127, 0, 34, 49, 64, 96, 12, 0, /* 0x 240 */ 33, 96,130, 1, 12, 0,128, 21, 1, 5, 98, 44, 1, 0, 12, 36, /* 0x 250 */ 21, 0, 17, 4,127, 0, 34, 49, 64, 96, 12, 0, 33, 96,130, 1, /* 0x 260 */ 17, 0, 17, 4,127, 0, 34, 49,249,255, 64, 16, 0, 0, 0, 0, /* 0x 270 */ 2, 0,140, 37, 1, 5, 98, 44, 1, 0, 66, 56, 33, 96,130, 1, /* 0x 280 */ - 35, 24,195, 0, 1, 0,140, 37,255,255,140, 37, 0, 0, 98,144, /* 0x 290 */ - 1, 0, 99, 36, 0, 0,194,160,251,255,128, 21, 1, 0,198, 36, /* 0x 2a0 */ + 35, 24,195, 0, 1, 0,140, 37, 0, 0, 98,144, 1, 0, 99, 36, /* 0x 290 */ +255,255,140, 37, 0, 0,194,160,251,255,128, 21, 1, 0,198, 36, /* 0x 2a0 */ 187,255, 0, 16, 0, 0, 0, 0, 5, 0, 64, 20, 64, 72, 9, 0, /* 0x 2b0 */ 0, 0, 2,145, 1, 0, 8, 37, 64, 16, 2, 0, 1, 0, 73, 36, /* 0x 2c0 */ 2, 18, 9, 0, 8, 0,224, 3, 1, 0, 66, 48, 33, 72, 0, 0, /* 0x 2d0 */ - 1, 0, 11, 36, 33, 64,128, 0, 77, 0, 17, 4,127, 0, 34, 49, /* 0x 2e0 */ + 1, 0, 11, 36, 33, 64,128, 0, 76, 0, 17, 4,127, 0, 34, 49, /* 0x 2e0 */ 6, 0, 64, 16, 1, 0, 3, 36, 0, 0, 2,145, 1, 0, 8, 37, /* 0x 2f0 */ - 0, 0,194,160,248,255, 0, 16, 1, 0,198, 36, 68, 0, 17, 4, /* 0x 300 */ -127, 0, 34, 49, 64, 24, 3, 0, 33, 24, 98, 0, 64, 0, 17, 4, /* 0x 310 */ + 0, 0,194,160,248,255, 0, 16, 1, 0,198, 36, 67, 0, 17, 4, /* 0x 300 */ +127, 0, 34, 49, 64, 24, 3, 0, 33, 24, 98, 0, 63, 0, 17, 4, /* 0x 310 */ 127, 0, 34, 49, 6, 0, 64, 20,255,255, 98, 36, 64, 24, 2, 0, /* 0x 320 */ - 59, 0, 17, 4,127, 0, 34, 49,244,255, 0, 16, 33, 24, 98, 0, /* 0x 330 */ + 58, 0, 17, 4,127, 0, 34, 49,244,255, 0, 16, 33, 24, 98, 0, /* 0x 330 */ 2, 0, 2, 36, 6, 0, 98, 20,253,255, 99, 36, 33, 24, 96, 1, /* 0x 340 */ - 51, 0, 17, 4,127, 0, 34, 49, 12, 0, 0, 16, 1, 0, 76, 48, /* 0x 350 */ - 0, 0, 2,145, 0, 26, 3, 0, 33, 24, 98, 0,255,255, 2, 32, /* 0x 360 */ - 52, 0, 98, 16, 1, 0, 8, 37, 39, 16, 3, 0, 1, 0, 76, 48, /* 0x 370 */ + 50, 0, 17, 4,127, 0, 34, 49, 12, 0, 0, 16, 1, 0, 76, 48, /* 0x 350 */ + 0, 0, 2,145, 0, 26, 3, 0, 33, 24, 98, 0,255,255, 2, 36, /* 0x 360 */ + 51, 0, 98, 16, 1, 0, 8, 37, 39, 16, 3, 0, 1, 0, 76, 48, /* 0x 370 */ 66, 24, 3, 0, 1, 0, 99, 36, 33, 88, 96, 0, 5, 0,128, 17, /* 0x 380 */ - 0, 0, 0, 0, 34, 0, 17, 4,127, 0, 34, 49, 19, 0, 0, 16, /* 0x 390 */ - 1, 0, 76, 36, 30, 0, 17, 4,127, 0, 34, 49, 5, 0, 64, 16, /* 0x 3a0 */ - 0, 0, 0, 0, 26, 0, 17, 4,127, 0, 34, 49, 11, 0, 0, 16, /* 0x 3b0 */ - 3, 0, 76, 36, 1, 0,140, 37, 21, 0, 17, 4,127, 0, 34, 49, /* 0x 3c0 */ - 64, 96, 12, 0, 33, 96,130, 1, 17, 0, 17, 4,127, 0, 34, 49, /* 0x 3d0 */ -249,255, 64, 16, 0, 0, 0, 0, 3, 0,140, 37, 1, 5, 98, 44, /* 0x 3e0 */ - 1, 0, 66, 56, 33, 96,130, 1, 35, 24,195, 0, 1, 0,140, 37, /* 0x 3f0 */ -255,255,140, 37, 0, 0, 98,144, 1, 0, 99, 36, 0, 0,194,160, /* 0x 400 */ -251,255,128, 21, 1, 0,198, 36,179,255, 0, 16, 0, 0, 0, 0, /* 0x 410 */ - 5, 0, 64, 20, 64, 72, 9, 0, 0, 0, 2,145, 1, 0, 8, 37, /* 0x 420 */ - 64, 16, 2, 0, 1, 0, 73, 36, 2, 18, 9, 0, 8, 0,224, 3, /* 0x 430 */ - 1, 0, 66, 48, 67, 83, 4, 52,192, 32, 4, 0, 67, 83, 4, 52, /* 0x 440 */ -252,255,132, 32, 0, 0,192,172,253,255,128, 20, 4, 0,198, 36, /* 0x 450 */ -252,255,132, 32, 3, 0,192,168, 0, 0,192,184,252,255,128, 20, /* 0x 460 */ - 4, 0,198, 36,160, 0, 10, 36, 9,248, 64, 1, 68, 0, 9, 36, /* 0x 470 */ - 0, 0,161,143, 4, 0,164,143, 8, 0,165,143, 12, 0,166,143, /* 0x 480 */ - 16, 0,167,143, 20, 0,162,143, 24, 0,163,143, 28, 0,191,143, /* 0x 490 */ - 80, 69, 80, 74, 33,232,161, 3, 85, 80, 88, 33,161,216,208,213, /* 0x 4a0 */ + 0, 0, 0, 0, 33, 0, 17, 4,127, 0, 34, 49, 18, 0, 0, 16, /* 0x 390 */ + 1, 0, 76, 36, 29, 0, 17, 4,127, 0, 34, 49, 5, 0, 64, 16, /* 0x 3a0 */ + 1, 0,140, 37, 25, 0, 17, 4,127, 0, 34, 49, 10, 0, 0, 16, /* 0x 3b0 */ + 3, 0, 76, 36, 21, 0, 17, 4,127, 0, 34, 49, 64, 96, 12, 0, /* 0x 3c0 */ + 33, 96,130, 1, 17, 0, 17, 4,127, 0, 34, 49,249,255, 64, 16, /* 0x 3d0 */ + 0, 0, 0, 0, 3, 0,140, 37, 1, 5, 98, 44, 1, 0, 66, 56, /* 0x 3e0 */ + 33, 96,130, 1, 35, 24,195, 0, 1, 0,140, 37, 0, 0, 98,144, /* 0x 3f0 */ + 1, 0, 99, 36,255,255,140, 37, 0, 0,194,160,251,255,128, 21, /* 0x 400 */ + 1, 0,198, 36,180,255, 0, 16, 0, 0, 0, 0, 5, 0, 64, 20, /* 0x 410 */ + 64, 72, 9, 0, 0, 0, 2,145, 1, 0, 8, 37, 64, 16, 2, 0, /* 0x 420 */ + 1, 0, 73, 36, 2, 18, 9, 0, 8, 0,224, 3, 1, 0, 66, 48, /* 0x 430 */ + 67, 83, 4, 52,192, 32, 4, 0, 67, 83, 4, 52,252,255,132, 32, /* 0x 440 */ + 0, 0,192,172,253,255,128, 20, 4, 0,198, 36,252,255,132, 32, /* 0x 450 */ + 3, 0,192,168, 0, 0,192,184,252,255,128, 20, 4, 0,198, 36, /* 0x 460 */ +160, 0, 10, 36, 9,248, 64, 1, 68, 0, 9, 36, 0, 0,161,143, /* 0x 470 */ + 4, 0,164,143, 8, 0,165,143, 12, 0,166,143, 16, 0,167,143, /* 0x 480 */ + 20, 0,162,143, 24, 0,163,143, 28, 0,191,143, 80, 69, 80, 74, /* 0x 490 */ + 33,232,161, 3, 85, 80, 88, 33,161,216,208,213, 0, 0, 0, 0, /* 0x 4a0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x 4b0 */ - 0, 0, 0, 0, 0, 0, 0, 45, 32, 0, 0, 0, 80, 83, 49, 77, /* 0x 4c0 */ - 65, 73, 78, 48, 0, 0, 0, 0, 80, 83, 49, 77, 65, 73, 78, 90, /* 0x 4d0 */ - 92, 0, 0, 0, 80, 83, 49, 74, 83, 84, 65, 48, 92, 0, 0, 0, /* 0x 4e0 */ - 80, 83, 49, 74, 83, 84, 65, 90,104, 0, 0, 0, 80, 83, 49, 74, /* 0x 4f0 */ - 83, 84, 72, 48,104, 0, 0, 0, 80, 83, 49, 74, 83, 84, 72, 90, /* 0x 500 */ -112, 0, 0, 0, 80, 83, 49, 68, 69, 67, 79, 48,112, 0, 0, 0, /* 0x 510 */ - 80, 83, 49, 68, 69, 67, 79, 90,112, 0, 0, 0, 80, 83, 49, 78, /* 0x 520 */ - 50, 66, 68, 48,112, 0, 0, 0, 80, 83, 49, 78, 50, 66, 68, 90, /* 0x 530 */ -148, 1, 0, 0, 80, 83, 49, 78, 50, 68, 68, 48,148, 1, 0, 0, /* 0x 540 */ - 80, 83, 49, 78, 50, 68, 68, 90,220, 2, 0, 0, 80, 83, 49, 78, /* 0x 550 */ - 50, 69, 68, 48,220, 2, 0, 0, 80, 83, 49, 78, 50, 69, 68, 90, /* 0x 560 */ - 68, 4, 0, 0, 77, 83, 69, 84, 66, 73, 71, 48, 68, 4, 0, 0, /* 0x 570 */ - 77, 83, 69, 84, 66, 73, 71, 90, 76, 4, 0, 0, 77, 83, 69, 84, /* 0x 580 */ - 83, 77, 76, 48, 76, 4, 0, 0, 77, 83, 69, 84, 83, 77, 76, 90, /* 0x 590 */ - 80, 4, 0, 0, 77, 83, 69, 84, 65, 76, 71, 48, 80, 4, 0, 0, /* 0x 5a0 */ - 77, 83, 69, 84, 65, 76, 71, 90, 96, 4, 0, 0, 77, 83, 69, 84, /* 0x 5b0 */ - 85, 65, 76, 48, 96, 4, 0, 0, 77, 83, 69, 84, 85, 65, 76, 90, /* 0x 5c0 */ -116, 4, 0, 0, 80, 83, 49, 69, 88, 73, 84, 48,116, 4, 0, 0, /* 0x 5d0 */ - 80, 83, 49, 69, 88, 73, 84, 90,168, 4, 0, 0, 80, 83, 49, 80, /* 0x 5e0 */ - 72, 68, 82, 48,168, 4, 0, 0, 80, 83, 49, 80, 72, 68, 82, 90, /* 0x 5f0 */ -200, 4, 0, 0, 80, 83, 49, 82, 71, 83, 90, 48,200, 4, 0, 0, /* 0x 600 */ - 80, 83, 49, 82, 71, 83, 90, 90,204, 4, 0, 0,255,255,255,255, /* 0x 610 */ -204, 4 /* 0x 620 */ + 0, 0, 0, 45, 32, 0, 0, 0, 80, 83, 49, 83, 84, 65, 82, 84, /* 0x 4c0 */ + 0, 0, 0, 0, 80, 83, 49, 80, 65, 68, 67, 68, 84, 0, 0, 0, /* 0x 4d0 */ + 80, 83, 49, 67, 79, 78, 72, 76, 88, 0, 0, 0, 80, 83, 49, 67, /* 0x 4e0 */ + 79, 78, 72, 73,100, 0, 0, 0, 80, 83, 49, 69, 78, 84, 82, 89, /* 0x 4f0 */ +108, 0, 0, 0, 80, 83, 49, 78, 50, 66, 68, 56,108, 0, 0, 0, /* 0x 500 */ + 80, 83, 49, 78, 50, 68, 68, 56,148, 1, 0, 0, 80, 83, 49, 78, /* 0x 510 */ + 50, 69, 68, 56,220, 2, 0, 0, 80, 83, 49, 77, 83, 69, 84, 66, /* 0x 520 */ + 64, 4, 0, 0, 80, 83, 49, 77, 83, 69, 84, 83, 72, 4, 0, 0, /* 0x 530 */ + 80, 83, 49, 77, 83, 69, 84, 65, 76, 4, 0, 0, 80, 83, 49, 77, /* 0x 540 */ + 83, 69, 84, 85, 92, 4, 0, 0, 80, 83, 49, 70, 76, 85, 83, 72, /* 0x 550 */ +112, 4, 0, 0, 80, 83, 49, 74, 77, 80, 69, 80,124, 4, 0, 0, /* 0x 560 */ + 80, 83, 49, 80, 65, 72, 68, 82,164, 4, 0, 0, 80, 83, 49, 83, /* 0x 570 */ + 82, 69, 71, 83,196, 4, 0, 0, 80, 83, 49, 69, 79, 65, 83, 77, /* 0x 580 */ +200, 4, 0, 0,255,255,255,255,200, 4 /* 0x 590 */ };