Advertising (This ad goes away for registered users. You can Login or Register)

[TUTORIAL] Getting resolution addresses for vitaRescale

Post here your guides, tips, how-to, etc...
Post Reply
User avatar
Rinnegatamante
VIP
Posts: 742
Joined: Sat Mar 26, 2011 10:02 am
Contact:

[TUTORIAL] Getting resolution addresses for vitaRescale

Post by Rinnegatamante » Sun Nov 12, 2017 5:21 pm

What's vitaRescale

vitaRescale is an upcoming plugin that will allow you to change PSVITA games resolution in order to get smoother fps or better looking graphics.

To do so, vitaRescale patches some data in the game executable on boot so that it will change renderer and framebuffer settings.

Requirements
  • IDA Pro 6.8 32 Bit
  • vitaldr by zecoxao
  • unfself
  • An eboot.bin file from a Vitamin/maiDumpTool dump
Refer to the Readme of these tools if you need help installing them.
IDA Pro is not linked here since it's not a freeware tool.

Decrypting the eboot.bin

The eboot.bin file is just a standard decrypted SELF executable. To let us use it with IDA Pro, we'll need to strip the SELF header and so get the decrypted ELF file. To do so we'll use unfself.
  • Place eboot.bin and unfself.exe in the same directory.
  • Open a command line window (cmd) and go into where unfself is located with it.
  • Type unfself eboot.bin eboot.elf
When done, you'll get an eboot.elf file. This is what we'll use for our research.

Getting ready with IDA Pro

Start IDA Pro 32 Bit and drag the eboot.elf file in it.
You'll get asked how you want to load the file.
Be sure the settings are set the same as this screenshot and press OK:
Image

Getting the address(es)

Now the funny part starts.
We must find the references in the game code where the resolution is set.
Short story long, the easiest way to find some references are to search for the original resolution the game runs at (Can be checked with VITA2PC plugin) and look into the code for some juicy reference.
There will be games having even more resolution values depending on what elements it's drawing (eg. Ridge Racer has a 3D Rendering resolution (720x408) and a Vita framebuffer resolution (960x544).).
In this way we'll for sure get the Vita framebuffer resolution to change getting some difference on screen with the original game.
In this sample, we're going to look into Digimon Story: CyberSleuth.
This game runs at 960x544 resolution natively so let's press ALT+I and let's write 960 in Value to search and let's check Find all occurrences.
We'll get a screen with all the results.
What we're looking to are plain values and or MOV calls. These are the most possible to be our desired resolution.
We can be also sure we're facing resolution value if the value of the screen height is near the width value (in hexadecimal).
In the case of Digimon, we have this:
Image
If we right click on the address we found, we can switch set the view as Double word:
Image
And right clicking again will allow us to set the decimal rappresentation (960 in this case):
Image
Repeating this with the next value will show us this:
Image
Seems we found our address!
Now the last step remaining is to get the relative address depending on the segment it's in.
Near the address we can see the segment number (seg001 -> 1).
Now press Shift + F7 to open the segments subview.
Check the relative segment Start and do a simple subtraction: segment you got - segment start; this will be the address to use in vitaRescale!
In our case it's 0x81507F8C - 0x815007C0 = 0x77CC on segment 1:
Image

That's all folks, hope you get into this and push new addresses to improve vitaRescale more and more!
Cya!
Advertising
If you want, visit my website: http://rinnegatamante.it :D

spacebruce
Posts: 1
Joined: Sun Nov 12, 2017 11:35 pm

Re: [TUTORIAL] Getting resolution addresses for vitaRescale

Post by spacebruce » Sun Nov 12, 2017 11:43 pm

Interesting, looking forward to trying this out.
What do we do when the values are separated by a few instructions like this? (408 & 720) Note down both locations?
Image
Advertising

User avatar
Rinnegatamante
VIP
Posts: 742
Joined: Sat Mar 26, 2011 10:02 am
Contact:

Re: [TUTORIAL] Getting resolution addresses for vitaRescale

Post by Rinnegatamante » Tue Nov 14, 2017 11:02 am

spacebruce wrote:Interesting, looking forward to trying this out.
What do we do when the values are separated by a few instructions like this? (408 & 720) Note down both locations?
Image
You can grab both addresses and patch them singularly with taiInjectData ( https://github.com/Rinnegatamante/vitaR ... main.c#L27 ).

A new function can be added to handle this easily.
If you want, visit my website: http://rinnegatamante.it :D

Post Reply

Return to “Tutorials”