- Joined
- Apr 29, 2011
- Messages
- 31,284
- Trophies
- 2
- Age
- 38
- Location
- Dr. Wahwee's castle
- XP
- 18,969
- Country
So, with the advent of Loadiine being an extremely useful and versatile app for the Wii U homebrew scene, it got me to thinking on what could be done with Virtual Console games, notably with DS games as there are config files that increase their internal resolution. Now, the thing that bothered me the most about the Wii U VC is that GBA games have filtering, DS games have filtering, as do NES, but not Snes for one reason or another. Some may debate that they like the unfiltered pixels and that's fine, but in my case (well and others' too), they tend to be painful at 1080p. With that being said, Snes RPX files surely have to store the emulator settings in there for filtering and/or the aspect ratio. What I need help with is figuring out where to look, which offsets to scan and search and if this is even remotely possible to change.
@ShadowOne333 suggested that I use a hex editor to see what can be found and I've been doing so for the past bit, trying to find out where to begin my search. I know to some this may seem odd or trivial, but if anything, I want to be able to learn a bit of hacking on my own by figuring out RPX files work, and thank you for your time
I don't want to give up on figuring out a way to do this, not now, because I feel like I'm so close to figuring it out
UPDATE 5/11/2016
Disclaimer:
You will need the Wii U SDK, but I can't give it out, so please get that on your own!!
Guide to doing this, as quoted from @shutterbug2000, so a huge thanks to him for Snes VC hacking
quoted from @shutterbug2000,
Here's a basic guide:
How to inject Snes/NES ROMs into RPX files
You will need the following programs:
1 - rpx2elf: located in this thread here https://gbatemp.net/threads/tutorial-how-to-decompress-and-repack-rpx-rpl-files.399934/
2 - makerpl64: This is included with the Wii U Cafe SDK, I cannot provide this as it is copyrighted, so I trust people to get this on their own.
3 - Titledumper/DDD: For extracting Virtual Console games over a network to your PC
http://gbatemp.net/threads/ddd-wiiu-title-dumper.418492/
4 - HxD or any free hex editor program of your choice, the process is the same For this tutorial I will be using HxD as it's easy to start up and quick for searching for ROM swapping.
https://mh-nexus.de/en/hxd/
I should note that while ELF/RPX injection is higher compatability than RAM injection methods, not all games are going to work with perfect emulation, some games like Chrono Trigger has a minor visual bug where the screen flickers whenever you enter a battle and enter commands.
Open up .RPX with the hex editor, along with the ROM you wish to inject it with, for example, WUP-JANE.elf (which is the NTSC version of Kirby's Dream Land 3), and then another ROM to match up, use for comparison to find the offsets in the RPX file. So you should have three tabs.
- Go to the first line of the ROM file, the ROM I injected earlier was Power Rangers The Movie, the beginning of this game will contain the offset 78D818FB.
- Go back to the Kirby tab, you'll need the Kirby Dream Land 3 ROM open as well, this will tell you where to inject Power Rangers into the ELF file (and thus can be used as a template for others).
- Once you match up the Kirby ROM with the Kirby ELF, you highlight it at the first ROM offset within said RPX file as they both should match up. We will now specify how much to highlight in the RPX file.
- Kirby's Dream Land 3 is 4 MB in length, so you will need to highlight the entire ROMs code.
Starting offset: 00FCB080
Length of selection: 4 MB or 400000 or until the beginning and the end match up to the separate ROM file. Now, we go back to the Power Rangers ROM, highlight all the ROM code, copy.
- Now, in the WUP-JANE.elf paste-write to replace the Kirby's Dream Land 3 code, it will look red, this is normal, after you've injected Power Rangers's code into WUP-JANE.elf, save and exit.
Once you're done swapping out the code from one game into the Elf file:
Follow the normal conversion process to converting ELF to RPX. Place it in an appropriate game folder with code and content folders as any other Loadiine game
Hopefully I did a decent job explaining it, I don't know, but if you have any concerns or questions, let me know
Another update 5-15-16
Retroinject method to injecting ROMs in to Snes and NES games,
Found a guide on Reddit where it shows there's an injection method using a command-line program posted here
https://www.reddit.com/r/WiiUHacks/comments/4igfgz/injecting_roms_into_vc_games/
To quote
Essentially, the same as replacing ROMs as we had done before, and you still will need the Wii U SDK tools for all this, and I won't be providing them, but this will make it a lot easier to test injections
Update as of 10/13/16
An excellent find from user @AlanLC for resizing or rather, forcing the Snes and NES aspect ratios to
scale better than the default settings!
@ShadowOne333 suggested that I use a hex editor to see what can be found and I've been doing so for the past bit, trying to find out where to begin my search. I know to some this may seem odd or trivial, but if anything, I want to be able to learn a bit of hacking on my own by figuring out RPX files work, and thank you for your time
I don't want to give up on figuring out a way to do this, not now, because I feel like I'm so close to figuring it out
UPDATE 5/11/2016
Disclaimer:
You will need the Wii U SDK, but I can't give it out, so please get that on your own!!
Guide to doing this, as quoted from @shutterbug2000, so a huge thanks to him for Snes VC hacking
quoted from @shutterbug2000,
Here's a basic guide:
Code:
Run rpl2elf on the dumped .rpx.
Open the elf in a hex editor and search for 392003563860(hex)
Replace the 0356 part with 0280
Search again for 043838E0078090(hex) and replace the 0438 with 01E0 and the 0780 with 0280
Convert back to rpx by running in the sdk tools folder:
set CAFE_ROOT=../../../
makerpl64 -f -z8 -old -s name.elf
Copy back to sd card and run with loadiine.
Done![
How to inject Snes/NES ROMs into RPX files
You will need the following programs:
1 - rpx2elf: located in this thread here https://gbatemp.net/threads/tutorial-how-to-decompress-and-repack-rpx-rpl-files.399934/
2 - makerpl64: This is included with the Wii U Cafe SDK, I cannot provide this as it is copyrighted, so I trust people to get this on their own.
3 - Titledumper/DDD: For extracting Virtual Console games over a network to your PC
http://gbatemp.net/threads/ddd-wiiu-title-dumper.418492/
4 - HxD or any free hex editor program of your choice, the process is the same For this tutorial I will be using HxD as it's easy to start up and quick for searching for ROM swapping.
https://mh-nexus.de/en/hxd/
I should note that while ELF/RPX injection is higher compatability than RAM injection methods, not all games are going to work with perfect emulation, some games like Chrono Trigger has a minor visual bug where the screen flickers whenever you enter a battle and enter commands.
Open up .RPX with the hex editor, along with the ROM you wish to inject it with, for example, WUP-JANE.elf (which is the NTSC version of Kirby's Dream Land 3), and then another ROM to match up, use for comparison to find the offsets in the RPX file. So you should have three tabs.
- Go to the first line of the ROM file, the ROM I injected earlier was Power Rangers The Movie, the beginning of this game will contain the offset 78D818FB.
- Go back to the Kirby tab, you'll need the Kirby Dream Land 3 ROM open as well, this will tell you where to inject Power Rangers into the ELF file (and thus can be used as a template for others).
- Once you match up the Kirby ROM with the Kirby ELF, you highlight it at the first ROM offset within said RPX file as they both should match up. We will now specify how much to highlight in the RPX file.
- Kirby's Dream Land 3 is 4 MB in length, so you will need to highlight the entire ROMs code.
Starting offset: 00FCB080
Length of selection: 4 MB or 400000 or until the beginning and the end match up to the separate ROM file. Now, we go back to the Power Rangers ROM, highlight all the ROM code, copy.
- Now, in the WUP-JANE.elf paste-write to replace the Kirby's Dream Land 3 code, it will look red, this is normal, after you've injected Power Rangers's code into WUP-JANE.elf, save and exit.
Once you're done swapping out the code from one game into the Elf file:
Follow the normal conversion process to converting ELF to RPX. Place it in an appropriate game folder with code and content folders as any other Loadiine game
Hopefully I did a decent job explaining it, I don't know, but if you have any concerns or questions, let me know
Another update 5-15-16
Retroinject method to injecting ROMs in to Snes and NES games,
Found a guide on Reddit where it shows there's an injection method using a command-line program posted here
https://www.reddit.com/r/WiiUHacks/comments/4igfgz/injecting_roms_into_vc_games/
To quote
1) open the command prompt and run rpl2elf like this: rpl2elf mahgaem.rpx mahgaem.elf
2) run RetroInject.exe like this: retroinject mahgaem.elf verygud.smc coolfile.elf
3) open up your cafe_sdk (also, make sure the path doesn't contain spaces), and run cafex_env.bat that should make a command prompt appear.
4) the makerpl64 utility should be in your path now. run it like: makerpl64 -z9 -f -s -old coolfile.elf
5) now you have coolfile.rpx
6) enjoy
use snesROMUtil.exe to make sure that the size of base rom is greater or equal to injected rom, and that they are both lorom/hirom.
Essentially, the same as replacing ROMs as we had done before, and you still will need the Wii U SDK tools for all this, and I won't be providing them, but this will make it a lot easier to test injections
Update as of 10/13/16
An excellent find from user @AlanLC for resizing or rather, forcing the Snes and NES aspect ratios to
scale better than the default settings!
Perfect Pixel NES SNES
Run rpl2elf on the dumped .rpx.
Open the elf in a hex editor Search for 043838E0078090(hex) and replace the 0780 with 095F (NES)
Open the elf in a hex editor Search for 043838E0078090(hex) and replace the 0780 with 08C0 (SNES)
Convert back to rpx by running in the sdk tools folder:
set CAFE_ROOT=../../../
makerpl64 -f -z8 -old -s name.elf
Copy back to sd card and run with loadiine.
Done!
Last edited by the_randomizer,