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

Pounou

Well-Known Member
OP
Member
Joined
Sep 4, 2014
Messages
188
Trophies
0
Age
38
XP
329
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

  • rpl2elf.rar
    36.2 KB · Views: 3,128
Last edited by Pounou,

mixelpixx

hardware monkey
Member
Joined
Aug 10, 2014
Messages
133
Trophies
0
Location
y0uR m0mz b0x
XP
356
Country
United States
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

ByteBite

Well-Known Member
Member
Joined
Aug 20, 2013
Messages
316
Trophies
1
XP
635
Country
Seychelles
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.
 

jeppad

Well-Known Member
Newcomer
Joined
Sep 27, 2014
Messages
86
Trophies
0
Age
32
XP
486
Country
Gambia, The
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,

gamesquest1

Nabnut
Former Staff
Joined
Sep 23, 2013
Messages
15,153
Trophies
2
XP
12,247
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,

yahoo

G͝B͢A͜t͞em҉p̡ R̨e͢g̷ul̨aŗ
Member
Joined
Aug 4, 2014
Messages
345
Trophies
0
XP
522
Country
United States
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?
 

asper

Well-Known Member
Member
Joined
May 14, 2010
Messages
942
Trophies
1
XP
2,030
Country
United States
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?
 

dernettemann1983

Well-Known Member
Member
Joined
Mar 7, 2006
Messages
290
Trophies
1
Age
40
Website
Visit site
XP
1,686
Country
Gambia, The
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
 

wj44

Well-Known Member
Member
Joined
Jun 18, 2015
Messages
477
Trophies
0
XP
506
Country
Gambia, The
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
 

Bahax FZ

Well-Known Member
Member
Joined
Oct 31, 2013
Messages
159
Trophies
0
Age
32
XP
714
Country
Brazil
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

Reecey

Mario 64 (favorite game of all time)
Member
Joined
Mar 7, 2010
Messages
5,864
Trophies
2
Location
At Home :)
XP
4,450
Country
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,

mixelpixx

hardware monkey
Member
Joined
Aug 10, 2014
Messages
133
Trophies
0
Location
y0uR m0mz b0x
XP
356
Country
United States
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,

gamesquest1

Nabnut
Former Staff
Joined
Sep 23, 2013
Messages
15,153
Trophies
2
XP
12,247
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)
 

Pounou

Well-Known Member
OP
Member
Joined
Sep 4, 2014
Messages
188
Trophies
0
Age
38
XP
329
Country
France
- 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

Skater4599

Well-Known Member
Member
Joined
May 29, 2008
Messages
965
Trophies
1
Location
United States
XP
1,554
Country
United States
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

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: https://youtu.be/MddR6PTmGKg?si=mU2EO5hoE7XXSbSr