Hacking [Tutorial] How to decompress and repack RPX/RPL files

  • Thread starter Thread starter Pounou
  • Start date Start date
  • Views Views 49,239
  • Replies Replies 75
  • Likes Likes 20

Pounou

Well-Known Member
Member
Joined
Sep 4, 2014
Messages
188
Reaction score
94
Trophies
0
Age
40
XP
349
Country
France
With the help of @Markus95 and @gamesquest1 i have understand how to decompress and repack RPX/RPL files.
With this you can modify the .elf of rpx/rpl files to inject an other rom or compress it for use with loadiine.

Disclaimer: In this tutorial you will need makerpl64.exe, i will not share this its Nintendo coprighted ! Plz dont ask for this it's only for people who get the SDK on their hands. All comments about asking download link or something related to the SDK will be deleted. I open this thread like that everybody can try to make things goes faster. I hope the compatibility list will grow every day.

What you need:
rpl2elf.exe by Hykem
makerpl64.exe
Hex editor

First step: Convert RPX/RPL files to ELF

For this we need the tool created by Hykem
-Download it on the attached files and take the file you want to convert
In my exemple i take an rpx file "Block.rpx"
-Put them on the same folder and type on your command invit :
Code:
rpl2elf Block.rpx block.elf
For you replace block by the name of your file

Now we get the .elf file we will see how to repack them.

Second step: Repack your file to compress his size

For this we will use makerpl64.exe, it allows you to set the compression level with -z9 for max compression, and you can also add -s to strip some extra unnecessary leftover stuff off the rpx.

-Put the elf file in the folder of makerpl64.exe open your command invite and type:
Code:
makerpl64 -f -z9 -s xxxx.elf
Replace the "xxxx" by the name of your file
-You got now your RPX/RPL file compressed and ready to use with loadiine

Third step: How to inject a VC rom in your .elf file
For replace rom in Punch out nes (EUR):
- Open your rom *.nes with hex editor
- Copy all offset
- Decompress .rpx of VC punch out nes
- Open *.elf with hex editor, the rom is between offset 00100640 and offset 00140620
- Replace offset rom of punch out VC by all offset of your rom *.nes
- Save .elf
- Repack .elf>>>.rpx
- Load with Loadiine

New games confirmed working with loadiine now:
Sonic boom
Batman Arkham City - Armored Edition
Fifa 13

PS: Big thanks to markus95 and gamesquest1 for all the technicall informations and Hykem for his incredible tool
Don't forgot to post here if your new compressed rpx file make the game compatible with loadiine i will update your result here
 

Attachments

Last edited by Pounou,
Isn't there a command line option for it to exclude redundancies? Or is that automatic now? (Reduces file size?)

* i was in process of automating this. if anyone knows any other command line options that are relevant or useful let me know..
 
Last edited by mixelpixx,
  • Like
Reactions: CableLeecher
This is cool, maybe someone could share before and after figures on these RPX files? Interested in knowing how much the compression can affect them.
 
Thank you for sharing this! I was hoping a tutorial would be posted :)

Has anyone found any downside to compressing these? Longer load times or anything?
 
Thank you for sharing this! I was hoping a tutorial would be posted :)

Has anyone found any downside to compressing these? Longer load times or anything?
Why should there be longer loading times?
You just "make" the rpx/rpl file smaller so loadiine can load the games
My english isnt so good, I would like to explain it better for you.
 
Last edited by jeppad,
Thank you for sharing this! I was hoping a tutorial would be posted :)

Has anyone found any downside to compressing these? Longer load times or anything?
nope, the decompression will add virtually nothing in terms of load times, as once the game is booted it will run fine then, most of the space saving comes from the -s command which will strip out left over junk from the rpx file
also FIFA 13 works

oh and if the rpx doesn't work try adding the -old command, that was required to get sonic boom working, makes the rpx slightly larger but unless i messed up sonic boom didnt work without using -old
 
Last edited by gamesquest1,
nope, the decompression will add virtually nothing in terms of load times, as once the game is booted it will run fine then, most of the space saving comes from the -s command which will strip out left over junk from the rpx file

also FIFA 13 works

oh and if the rpx doesn't work try adding the -old command, that was required to get sonic boom working, makes the rpx slightly larger but unless i messed up sonic boom didnt work without using -old
What was the file size of the rpx for sonic boom before and after compression?
 
Did makerpl works without installing the green hill compiler? I mean are some of you able to run the 32 or 64bit version of makerpl without the sdk chaintool?
 
i need some help. i have installed cygwin and green hill. i'm getting this error:
C:\Users....\wiiu\cafe_sdk-2_12_13\cafe_sdk-2_12_13-2
0150609_en\cafe_sdk\system\bin\tool>makerpl32 -f -z9 -s test.elf
***Error: CAFE_ROOT is not defined


C:\Users...\wiiu\cafe_sdk-2_12_13\cafe_sdk-2_12_13-2
0150609_en\cafe_sdk\system\bin\tool\makerpl\makerpl32.exe FAILED Error = -1
 
i need some help. i have installed cygwin and green hill. i'm getting this error:
C:\Users....\wiiu\cafe_sdk-2_12_13\cafe_sdk-2_12_13-2
0150609_en\cafe_sdk\system\bin\tool>makerpl32 -f -z9 -s test.elf
***Error: CAFE_ROOT is not defined


C:\Users...\wiiu\cafe_sdk-2_12_13\cafe_sdk-2_12_13-2
0150609_en\cafe_sdk\system\bin\tool\makerpl\makerpl32.exe FAILED Error = -1
Code:
SET CAFE_ROOT=C:\Users....\wiiu\cafe_sdk-2_12_13\cafe_sdk-2_12_13-2
 
Suggested games for testing, which has RPX/RPL large files:

- Assassin's Creed III
- Assassin's Creed IV
- Darksiders 2
- Disney Infinity 2.0
- Epic Mickey 2
- Mario Party 10
- Splinter Cell Blacklist
- Tekken Tag Tournament 2
- Watch Dogs
- Transformers: The Dark Spark
 
  • Like
Reactions: paulloeduardo
where is the makerpl64.exe I have downloaed the sdk files but cannot find it? do you have to extract it or something?
 
Last edited by Reecey,
Switches for makerpl64.exe

-zx
Do not compress (default is to compress). May hamper disassembly of the RPX/RPL file with ELF dump tools. See -s option also.

-z[1-9] Compression level. Default is 6.

-f Force as RPX (required to build RPXs).

-d Deprecated. Set dynamic-only flag in file info.

-s Strip function symbols that are not imported or exported.

-new New, smaller RPL symbol table. Default.

-old Use old larger method for generating the symbol table.

-h <n> Override the default system heap size with new value <n> in bytes. Default heap size is 32 KB.

-checknosda Verify that the RPX/RPL does not use a Small Data Area.

-stack <n> Override the default initial stack size with new value <n> in bytes. Default is 64 KB.

-l <file> Compatibility for pre-v1.0 RPL Tools. Specify the output import library file (.a).

-v Print verbose info.

-warnemptyrela Emit a warning if a relocation section points to the NULL section and has empty relocations.

-t BUILD_TYPE=<build_type> Embed BUILD_TYPE information into the output file. A string “DEBUG” or “NDEBUG” is assignable to <build_type>. This option is required when the output is an RPX file.

-nolib
Disable generation of the import library. Always use this option if preprpl[32|64] is used to build the import library

-padall <n>
Pad the TEXT, DATA, LOAD and TEMP sections by <n> percent.

-sizedata <n> Set data area to <n> bytes. Must also set -sizetext <n> -sizeload <n> -sizetemp <n>.

-sizetext <n> Set text area to <n> bytes. Must also set -sizedata <n> -sizeload <n> -sizetemp <n>.

-sizeload <n> Set load area to <n> bytes. Must also set -sizedata <n> -sizetext <n> -sizetemp <n>.

-sizetemp <n> Set temp area to <n> bytes. Must also set -sizedata <n> -sizetext <n> -sizeload <n>.

-sizefileinfo <n> FileInfo set to <n> bytes. Can be used independently of other padding options. FileInfo must be at least 96 bytes.

-dbg_source_root <dir> <dir> is a file path (Windows, Cygwin or mixed). Review all source roots passed to makerpl[32|64] to use the first one that matches up with the input ELF file to create a relative path in the FileInfo. $(CAFE_ROOT)/system is added implicitly by the N*nte*ndo makefile build system and additional paths may be added.
 
Last edited by mixelpixx,
Suggested games for testing, which has RPX/RPL large files:

- Assassin's Creed III (size makes it unlikely to work)
- Assassin's Creed IV (compatibility list is wrong, there is actually 2 rpl files totalling 50MB+....will test but not hopeful )
- Darksiders 2 (tested, doesnt compress down enough)

- Disney Infinity 2.0 (looks likely to work)
- Epic Mickey 2 (looks likely to work)

- Mario Party 10 (very unlikley to work due to the sheer size)
- Splinter Cell Blacklist (tested with update rpx and didnt get it small enough.worth trying, but i doubt it will make much difference)
- Tekken Tag Tournament 2 (rpx/rpl size looks to be too big, but worth trying)
- Watch Dogs (rpx/rpl size looks to be too big, but worth trying)

- Transformers: The Dark Spark (looks "possible" to work but it will be close)
 
- Assassin's Creed III (size makes it unlikely to work)
- Assassin's Creed IV (compatibility list is wrong, there is actually 2 rpl files totalling 50MB+....will test but not hopeful )
- Darksiders 2 (tested, doesnt compress down enough)

- Disney Infinity 2.0 (looks likely to work)
- Epic Mickey 2 (looks likely to work)

- Mario Party 10 (very unlikley to work due to the sheer size)
- Splinter Cell Blacklist (tested with update rpx and didnt get it small enough.worth trying, but i doubt it will make much difference)
- Tekken Tag Tournament 2 (rpx/rpl size looks to be too big, but worth trying)
- Watch Dogs (rpx/rpl size looks to be too big, but worth trying)

- Transformers: The Dark Spark (looks "possible" to work but it will be close)

When you finish your test send me the result i will update the list. Thanks for your time
 
  • Like
Reactions: paulloeduardo
where is the makerpl64.exe I have downloaed the sdk files but cannot find it? do you have to extract it or something?


I was literally just doing the same thing, downloaded the SDK, no files in it, installed the compiler tools, still no joy. I'm thinking I don't have the correct download or something? Let us know if you find an answer for it! Thanks!
 

Site & Scene News

Popular threads in this forum