More actions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{#seo: | {{#seo: | ||
|title=Vita Homebrew Apps (Plugins) - GameBrew! | |title=Vita Homebrew Apps (Plugins) - GameBrew! | ||
Line 11: | Line 10: | ||
|description=Change games resolution/FPS cap. | |description=Change games resolution/FPS cap. | ||
|author=Electry | |author=Electry | ||
|lastupdated=2019/12/ | |lastupdated=2019/12/29 | ||
|type=Plugins | |type=Plugins | ||
|version=5.0. | |version=5.0.2 | ||
|license=GPL-3.0 | |license=GPL-3.0 | ||
|download=https://dlhb.gamebrew.org/vitahomebrews/vitagrafixvita.7z | |download=https://dlhb.gamebrew.org/vitahomebrews/vitagrafixvita.7z | ||
Line 19: | Line 18: | ||
|source=https://github.com/Electry/VitaGrafix | |source=https://github.com/Electry/VitaGrafix | ||
}} | }} | ||
'''VitaGrafix''' is allowing user to change games resolution/FPS cap. | |||
==What is VitaGrafix?== | |||
VitaGrafix is a taiHEN plugin that allows you to change resolution and FPS cap of PS Vita games (to get better visuals, higher FPS or longer battery life). | |||
VitaGrafix was originally, in it’s early days, based on [https://github.com/Rinnegatamante/vitaRescale vitaRescale] by Rinnegatamante (which was unfortunately quickly abandoned), with hardcoded patches only for a dozen of games. | |||
The project has evolved quite a bit since then. It is now an independent taiHEN plugin with custom interpreter to easily support user-made patches. The official [https://github.com/Electry/VitaGrafixPatchlist patchlist] contains support for over 50 games. | |||
'''Note: Per-game patches are required. Some are easy to patch, others plainly impossible.''' | |||
==What VitaGrafix does== | |||
It patches eboot.bin executable on game start-up, allowing us to alter game’s graphics initialization and runtime code. Because each game does this differently, per-game patches are required. | |||
==Media== | ==Media== | ||
<youtube>LdrVZkVJ19c</youtube> | <youtube>LdrVZkVJ19c</youtube> | ||
==Screenshots== | ==Screenshots== | ||
https://dlhb.gamebrew.org/vitahomebrews/vitagrafixvita-01.jpg | https://dlhb.gamebrew.org/vitahomebrews/vitagrafixvita-01.jpg | ||
https://dlhb.gamebrew.org/vitahomebrews/vitagrafixvita-02.jpg | https://dlhb.gamebrew.org/vitahomebrews/vitagrafixvita-02.jpg | ||
== | ==How To Install VitaGrafix== | ||
# Download latest ''VitaGrafix.suprx'' on gamebrew or from the [https://github.com/Electry/VitaGrafix/releases releases] section and ''ioPlus.skprx'' '''(v0.1)''' from [[ioPlus Vita]] | |||
# If ''ux0:tai/config.txt'' file does exist | |||
## Copy ''VitaGrafix.suprx'' and ''ioPlus.skprx'' to ''ux0:tai/'' directory | |||
## Open ''ux0:tai/config.txt'' in a text editor | |||
## Add following lines to the file | |||
<pre>*KERNEL | |||
ux0:tai/ioPlus.skprx | |||
*ALL | |||
ux0:tai/VitaGrafix.suprx</pre> | |||
<ol start="3"> | |||
<li>Otherwise (e.g. if you are using SD2VITA mounted as ux0) | |||
<ol> | |||
<li>Copy ''VitaGrafix.suprx'' and ''ioPlus.skprx'' to ''ur0:tai/'' directory</li> | |||
<li>Open ''ur0:tai/config.txt'' in a text editor</li> | |||
<li>Add following lines to the file</li></ol> | |||
</li></ol> | |||
<pre>*KERNEL | |||
ur0:tai/ioPlus.skprx | |||
*ALL | |||
ur0:tai/VitaGrafix.suprx</pre> | |||
<ol start="4"> | |||
<li>Create ''ux0:data/VitaGrafix/'' folder</li> | |||
<li>Download patchlist.txt from [https://github.com/Electry/VitaGrafixPatchlist HERE] and move it to the folder</li> | |||
<li>Create and open ''ux0:data/VitaGrafix/config.txt'' file</li> | |||
<li>Add games to the config you wish to apply patches for (refer to your patchlist.txt)</li></ol> | |||
==VitaGrafix's Configuration== | |||
You can configure every game separately using unified configuration file.<br /> | |||
<code>ux0:data/VitaGrafix/config.txt</code> | |||
=== MAIN section === | |||
* This section applies to all games, unless specific entry for a game exists. Available options are listed below. | |||
<pre>[MAIN] | |||
# Same options as in GAME section are permitted here.</pre> | |||
=== GAME section === | |||
* This section applies to a single game. These options override the [MAIN] section (for that game). Each game supports different options! Refer to the compatibility table of your patchlist.txt | |||
==== Example: ==== | |||
<pre>[PCSA00001] | |||
# options...</pre> | |||
'''TIP:''' Because collections share one TITLE ID for multiple games, you might want to configure each game individually. To do that you need to specify game's .self path/name (and optionally NID). If you're not sure what those are, check ''patchlist.txt'', it uses the same ''header'' format. | |||
<pre>[PCSA00001, GOW1.self, 0x12345678]</pre> | |||
{| | |||
!align="center"| ↑ | |||
! | |||
! | |||
|- | |||
|align="center"| '''PCSA00001''' | |||
| game's TITLE ID | |||
| required | |||
|- | |||
|align="center"| '''GOW1.self''' | |||
| a part of executable's full path | |||
| optional | |||
|- | |||
|align="center"| '''0x12345678''' | |||
| main module NID, 8 hex digits with '0x' prefix | |||
| optional | |||
|} | |||
==Patchlist For VitaGrafix == | |||
Collection of [https://github.com/Electry/VitaGrafixPatchlist patches for VitaGrafix] below. | |||
=== How To Install VitaGrafix's Patchlist=== | |||
# Download raw '''[https://raw.githubusercontent.com/Electry/VitaGrafixPatchlist/master/patchlist.txt patchlist.txt]''' | |||
#* optionally download files in '''[https://github.com/Electry/VitaGrafixPatchlist/tree/master/patch patch/]''' folder, these are separated due to their larger size (100+ lines for one game) | |||
# Copy it to ''ux0:/data/VitaGrafix/'' | |||
#* ''patch/'' files go into ''ux0:/data/VitaGrafix/patch/'' | |||
# Configure your game by editing ''ux0:/data/VitaGrafix/config.txt'' or by using [[Vitagrafix Configurator Vita|VitaGrafixConfigurator]] | |||
=== Supported games === | |||
{| | |||
!width="16%"| | |||
!width="16%"| Game | |||
!width="16%"| Title ID(s) | |||
!width="16%"| Supported features | |||
!width="16%"| Game defaults | |||
!width="16%"| Notes.............. | |||
|- | |||
| | |||
| Assassin's Creed III: Liberation | |||
| PCSB00074<br /> | |||
PCSE00053<br /> | |||
PCSG00116 | |||
| Internal res.<br /> | |||
FPS cap. | |||
| 720x408<br /> | |||
30 | |||
| | |||
|- | |||
| | |||
| Asphalt: Injection | |||
| PCSB00040<br /> | |||
PCSE00007 | |||
| Framebuffer<br /> | |||
FPS cap | |||
| 720x408<br /> | |||
50 | |||
| | |||
|- | |||
| | |||
| Atelier Firis: The Alchemist and the Mysterious Journey | |||
| PCSB01087<br /> | |||
PCSE01044<br /> | |||
PCSG00929<br /> | |||
PCSH10026 | |||
| Internal res. | |||
| 960x442 | |||
| | |||
|- | |||
| | |||
| Atelier Lydie & Soeur: Fushigi na Kaiga no Renkinjutsu Samurai | |||
| PCSG01116 | |||
| Internal res. | |||
| 960x442 | |||
| | |||
|- | |||
| | |||
| Atelier Shallie Plus: Alchemists of the Dusk Sea | |||
| PCSB01043<br /> | |||
PCSE00998<br /> | |||
PCSG00821 | |||
| Internal res. | |||
| 960x408 | |||
| | |||
|- | |||
| | |||
| Atelier Sophie: The Alchemist of the Mysterious Book | |||
| PCSB00973<br /> | |||
PCSE00892<br /> | |||
PCSG00694<br /> | |||
PCSH00220 | |||
| Internal res. | |||
| 960x442 | |||
| | |||
|- | |||
| | |||
| Blue Reflection: Maboroshi ni Mau - Shoujo no Ken | |||
| PCSG00987 | |||
| Internal res. | |||
| 960x442 | |||
| | |||
|- | |||
| | |||
| Borderlands 2 | |||
| PCSF00570<br /> | |||
PCSF00576<br /> | |||
PCSE00383<br /> | |||
PCSG00400 | |||
| Framebuffer | |||
| 960x544 | |||
| | |||
|- | |||
| | |||
| Catherine: Full Body | |||
| PCSG01179 | |||
| Internal res. | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| Dead or Alive 5 Plus | |||
| PCSB00296<br /> | |||
PCSE00235<br /> | |||
PCSG00167 | |||
| Internal res. | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| Dead or Alive Xtreme 3: Venus | |||
| PCSG00773<br /> | |||
PCSH00250<br /> | |||
PCSH00281 | |||
| 2x Internal res. | |||
| 736x416, 640x368 | |||
| | |||
|- | |||
| | |||
| Deception IV: Blood Ties<br /> | |||
Kagero: Darkside Princess | |||
| PCSB00499<br /> | |||
PCSE00401<br /> | |||
PCSG00304 | |||
| 3x Internal res. | |||
| 960x544, 720x408, 640x368 | |||
| | |||
|- | |||
| | |||
| Deception IV: The Nightmare Princess<br /> | |||
Kagero: Mou Hitori no Princess | |||
| PCSB00829<br /> | |||
PCSE00743<br /> | |||
PCSG00565 | |||
| 3x Internal res. | |||
| 960x544, 720x408, 640x368 | |||
| | |||
|- | |||
| | |||
| Disney Epic Mickey 2: The Power of Two | |||
| PCSF00308<br /> | |||
PCSF00309<br /> | |||
PCSA00110 | |||
| Internal res. | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| Dragon Ball Z: Battle of Z | |||
| PCSB00396<br /> | |||
PCSE00305<br /> | |||
PCSG00213 | |||
| Internal res. | |||
| 704x448 | |||
| | |||
|- | |||
| | |||
| Dragon Quest Builders | |||
| PCSB00981<br /> | |||
PCSE00912<br /> | |||
PCSG00697<br /> | |||
PCSH00221 | |||
| Internal res.<br /> | |||
FPS cap | |||
| 720x408<br /> | |||
60 | |||
| | |||
|- | |||
| | |||
| Dungeon Hunter: Alliance | |||
| PCSB00041<br /> | |||
PCSE00008 | |||
| Internal res. | |||
| 702x408 | |||
| | |||
|- | |||
| | |||
| Fantasy Hero: Unsigned Legacy | |||
| PCSB00663<br /> | |||
PCSE00536<br /> | |||
PCSG00280<br /> | |||
PCSH00157 | |||
| Framebuffer | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| Fate/EXTELLA (The Umbral Star) | |||
| PCSB01030<br /> | |||
PCSE00928<br /> | |||
PCSH00299<br /> | |||
PCSG00600 | |||
| Internal res. | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| Fate/EXTELLA LINK | |||
| PCSE01254<br /> | |||
PCSG01091<br /> | |||
PCSH10121 | |||
| Internal res. | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| F1 2011 | |||
| PCSB00027<br /> | |||
PCSE00002 | |||
| Internal res. | |||
| 640x384 | |||
| | |||
|- | |||
| | |||
| God of War Collection | |||
| PCSF00438<br /> | |||
PCSA00126<br /> | |||
PCSC00059 | |||
| Framebuffer<br /> | |||
FPS cap | |||
| 720x408<br /> | |||
30 | |||
| | |||
|- | |||
| | |||
| Gundam Breaker 2 | |||
| PCSG00412<br /> | |||
PCSH00132 | |||
| Internal res. | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| Hatsune Miku: Project Diva f | |||
| PCSB00419<br /> | |||
PCSE00326<br /> | |||
PCSG00074 | |||
| Internal res.<br /> | |||
FPS cap | |||
| 640x352<br /> | |||
30 | |||
| [https://github.com/Electry/VitaGrafix/issues/120 #120], [https://github.com/Electry/VitaGrafix/issues/81 #81] | |||
|- | |||
| | |||
| Hatsune Miku: Project Diva f 2nd | |||
| PCSB00554<br /> | |||
PCSE00434<br /> | |||
PCSG00205<br /> | |||
PCSH00088 | |||
| Internal res.<br /> | |||
FPS cap | |||
| 720x408<br /> | |||
30 | |||
| [https://github.com/Electry/VitaGrafix/issues/120 #120], [https://github.com/Electry/VitaGrafix/issues/80 #80] | |||
|- | |||
| | |||
| Hatsune Miku: Project Diva X | |||
| PCSB01007<br /> | |||
PCSE00867<br /> | |||
PCSH00176<br /> | |||
PCSG00683 | |||
| Internal res. | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| Helldivers | |||
| PCSF00465<br /> | |||
PCSA00134<br /> | |||
PCSC00078<br /> | |||
PCSD00086<br /> | |||
PCSD00097 | |||
| Framebuffer | |||
| 960x544 | |||
| [https://github.com/Electry/VitaGrafixPatchlist/issues/82 #82] | |||
|- | |||
| | |||
| I am Setsuna | |||
| PCSG00756 | |||
| FPS cap | |||
| 30 | |||
| | |||
|- | |||
| | |||
| Injustice: Gods Among Us | |||
| PCSB00356<br /> | |||
PCSE00271 | |||
| Framebuffer | |||
| 720x408 | |||
| [https://github.com/Electry/VitaGrafixPatchlist/issues/82 #82] | |||
|- | |||
| | |||
| Jak and Daxter: The Precursor Legacy | |||
| PCSF00247<br /> | |||
PCSF00248<br /> | |||
PCSA00080 | |||
| Framebuffer<br /> | |||
FPS cap | |||
| 720x408<br /> | |||
20 | |||
| | |||
|- | |||
| | |||
| Jak II | |||
| PCSF00247<br /> | |||
PCSF00249<br /> | |||
PCSA00080 | |||
| Framebuffer | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| Jak 3 | |||
| PCSF00247<br /> | |||
PCSF00250<br /> | |||
PCSA00080 | |||
| Framebuffer | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| J-Stars Victory Vs | |||
| PCSG00300 | |||
| Internal res. | |||
| 768x448 | |||
| | |||
|- | |||
| | |||
| J-Stars Victory Vs+ | |||
| PCSB00713<br /> | |||
PCSE00595<br /> | |||
PCSH00136 | |||
| Internal res. | |||
| 768x448 | |||
| | |||
|- | |||
| | |||
| Kidou Senshi Gundam Seed: Battle Destiny | |||
| PCSG00040 | |||
| Internal res.<br /> | |||
FPS cap | |||
| 704x384<br /> | |||
30 | |||
| | |||
|- | |||
| | |||
| Killzone: Mercenary | |||
| PCSF00243<br /> | |||
PCSF00403<br /> | |||
PCSA00107<br /> | |||
PCSC00045<br /> | |||
PCSD00071 | |||
| Internal res.<br /> | |||
FPS cap | |||
| Dynamic<br /> | |||
30 | |||
| | |||
|- | |||
| | |||
| LEGO Batman 3: Beyond Gotham | |||
| PCSB00563<br /> | |||
PCSE00442 | |||
| Internal res. | |||
| 640x368 | |||
| | |||
|- | |||
| | |||
| LEGO Harry Potter: Years 5–7 | |||
| PCSB00103<br /> | |||
PCSE00057 | |||
| Framebuffer | |||
| 640x368 | |||
| [https://github.com/Electry/VitaGrafixPatchlist/issues/3 #3] | |||
|- | |||
| | |||
| LEGO Jurassic World | |||
| PCSB00703<br /> | |||
PCSE00587 | |||
| Internal res. | |||
| 640x368 | |||
| | |||
|- | |||
| | |||
| LEGO Marvel Super Heroes: Universe in Peril | |||
| PCSB00315<br /> | |||
PCSE00250 | |||
| Internal res. | |||
| 640x368 | |||
| | |||
|- | |||
| | |||
| LEGO Marvel's Avengers | |||
| PCSB00764<br /> | |||
PCSE00670 | |||
| Internal res. | |||
| 640x368 | |||
| | |||
|- | |||
| | |||
| LEGO Ninjago: Shadow of Ronin | |||
| PCSB00706<br /> | |||
PCSE00534 | |||
| Internal res. | |||
| 640x368 | |||
| | |||
|- | |||
| | |||
| LEGO Star Wars: The Force Awakens | |||
| PCSB00877<br /> | |||
PCSE00791 | |||
| Internal res. | |||
| 640x368 | |||
| | |||
|- | |||
| | |||
| LEGO The Hobbit | |||
| PCSB00503<br /> | |||
PCSE00390 | |||
| Internal res. | |||
| 640x368 | |||
| | |||
|- | |||
| | |||
| LittleBigPlanet | |||
| PCSF00021<br /> | |||
PCSA00017<br /> | |||
PCSC00013<br /> | |||
PCSD00006 | |||
| Internal res. | |||
| 720x408 | |||
| [https://github.com/Electry/VitaGrafix/issues/24 #24] | |||
|- | |||
| | |||
| Lumines: Electronic Symphony | |||
| PCSB00061<br /> | |||
PCSE00009<br /> | |||
PCSG00014 | |||
| FPS cap | |||
| 30 | |||
| | |||
|- | |||
| | |||
| Macross Delta Scramble | |||
| PCSG00947 | |||
| Internal res. | |||
| 800x448 | |||
| | |||
|- | |||
| | |||
| Mahouka Koukou no Rettousei: Out of Order | |||
| PCSG00456 | |||
| Internal res.<br /> | |||
FPS cap | |||
| 720x408<br /> | |||
30 | |||
| | |||
|- | |||
| | |||
| Minecraft: PlayStation Vita Edition | |||
| PCSB00560<br /> | |||
PCSE00491<br /> | |||
PCSG00302 | |||
| Framebuffer<br /> | |||
FPS cap | |||
| 720x408<br /> | |||
60 | |||
| | |||
|- | |||
| | |||
| Miracle Girls Festival | |||
| PCSG00610 | |||
| Internal res. | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| MotoGP 13 | |||
| PCSB00316<br /> | |||
PCSE00409 | |||
| Internal res. | |||
| 704x448 | |||
| | |||
|- | |||
| | |||
| MotoGP 14 | |||
| PCSB00498<br /> | |||
PCSE00529 | |||
| Internal res. | |||
| 704x448 | |||
| | |||
|- | |||
| | |||
| MUD - FIM Motocross World Championship | |||
| PCSB00182<br /> | |||
PCSE00219 | |||
| Internal res. | |||
| 704x448 | |||
| | |||
|- | |||
| | |||
| MXGP: The Official Motocross Videogame | |||
| PCSB00470<br /> | |||
PCSE00530 | |||
| Internal res. | |||
| 704x448 | |||
| | |||
|- | |||
| | |||
| Need for Speed: Most Wanted | |||
| PCSB00183<br /> | |||
PCSE00089<br /> | |||
PCSG00106 | |||
| Internal res. | |||
| 640x368 | |||
| | |||
|- | |||
| | |||
| Nelke to Densetsu no Renkinjutsushi Tachi: Aratana Daichi no Atelier | |||
| PCSG01223 | |||
| Internal res. | |||
| 960x442 | |||
| | |||
|- | |||
| | |||
| Ninja Gaiden Sigma 2 Plus | |||
| PCSB00294<br /> | |||
PCSE00233<br /> | |||
PCSG00157 | |||
| 2x Internal res. | |||
| 864x480, 640x416 | |||
| | |||
|- | |||
| | |||
| Oddworld: Munch's Oddysee HD | |||
| PCSB00275<br /> | |||
PCSE00369 | |||
| FPS cap | |||
| 30 | |||
| | |||
|- | |||
| | |||
| One Piece: Burning Blood | |||
| PCSB00893<br /> | |||
PCSE00808<br /> | |||
PCSH00202 | |||
| Internal res. | |||
| 704x384 | |||
| | |||
|- | |||
| | |||
| Persona 4 Golden | |||
| PCSB00245<br /> | |||
PCSE00120<br /> | |||
PCSG00004<br /> | |||
PCSG00563<br /> | |||
PCSH00021 | |||
| Internal res. | |||
| 840x476 | |||
| | |||
|- | |||
| | |||
| Phantasy Star Nova | |||
| PCSG00351<br /> | |||
PCSH00143 | |||
| Internal res. | |||
| 960x544 | |||
| | |||
|- | |||
| | |||
| Project Root | |||
| PCSB00650<br /> | |||
PCSE00486<br /> | |||
PCSG00783 | |||
| FPS cap | |||
| 30 | |||
| | |||
|- | |||
| | |||
| Puella Magi Madoka Magica: The Battle Pentagram | |||
| PCSG00214 | |||
| Internal res.<br /> | |||
FPS cap | |||
| 704x448<br /> | |||
30 | |||
| | |||
|- | |||
| | |||
| Ratchet & Clank | |||
| PCSF00484<br /> | |||
PCSF00482<br /> | |||
PCSA00133 | |||
| Framebuffer | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| Ratchet & Clank 2: Locked and Loaded / Going Commando | |||
| PCSF00485<br /> | |||
PCSF00482<br /> | |||
PCSA00133 | |||
| Framebuffer | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| Ratchet & Clank 3 / Up Your Arsenal | |||
| PCSF00486<br /> | |||
PCSF00482<br /> | |||
PCSA00133 | |||
| Framebuffer | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| Ratchet & Clank: QForce / Full Frontal Assault | |||
| PCSF00191<br /> | |||
PCSA00086<br /> | |||
PCSC00041 | |||
| Framebuffer | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| Resident Evil: Revelations 2 | |||
| PCSF00728<br /> | |||
PCSE00608<br /> | |||
PCSG00594<br /> | |||
PCSH00187 | |||
| Internal res. | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| RESOGUN | |||
| PCSF00262<br /> | |||
PCSA00103<br /> | |||
PCSC00088 | |||
| Framebuffer | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| Ridge Racer | |||
| PCSB00048<br /> | |||
PCSE00001<br /> | |||
PCSG00001 | |||
| Internal res. | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| Sly Cooper and the Thievius Raccoonus | |||
| PCSF00269<br /> | |||
PCSF00338<br /> | |||
PCSA00095<br /> | |||
PCSA00096<br /> | |||
| Framebuffer<br /> | |||
FPS cap | |||
| 720x408<br /> | |||
30 | |||
| | |||
|- | |||
| | |||
| Sly Cooper 2: Band of Thieves | |||
| PCSF00270<br /> | |||
PCSF00338<br /> | |||
PCSA00095<br /> | |||
PCSA00097<br /> | |||
| Framebuffer<br /> | |||
FPS cap | |||
| 960x544<br /> | |||
30 | |||
| | |||
|- | |||
| | |||
| Sly Cooper 3: Honor Among Thieves | |||
| PCSF00271<br /> | |||
PCSF00338<br /> | |||
PCSA00095<br /> | |||
PCSA00098<br /> | |||
| Framebuffer<br /> | |||
FPS cap | |||
| 960x544<br /> | |||
30 | |||
| | |||
|- | |||
| | |||
| Sly Cooper: Thieves in Time | |||
| PCSF00156<br /> | |||
PCSF00206<br /> | |||
PCSF00207<br /> | |||
PCSF00208<br /> | |||
PCSF00209<br /> | |||
PCSA00068 | |||
| FPS cap | |||
| 30 | |||
| | |||
|- | |||
| | |||
| Soul Sacrifice | |||
| PCSF00178<br /> | |||
PCSA00092<br /> | |||
PCSD00065<br /> | |||
PCSC00039 | |||
| Internal res. | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| Soul Sacrifice Delta | |||
| PCSF00532<br /> | |||
PCSA00152<br /> | |||
PCSD00079<br /> | |||
PCSC00049 | |||
| Internal res. | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| Spy Hunter | |||
| PCSB00166<br /> | |||
PCSE00068 | |||
| Framebuffer<br /> | |||
FPS cap<br /> | |||
MSAA | |||
| 640x368<br /> | |||
30<br /> | |||
4x | |||
| | |||
|- | |||
| | |||
| SteamWorld Heist | |||
| PCSB00693<br /> | |||
PCSE00583 | |||
| FPS cap | |||
| 30 | |||
| | |||
|- | |||
| | |||
| Street Fighter X Tekken | |||
| PCSB00144<br /> | |||
PCSE00005<br /> | |||
PCSG00063 | |||
| Internal res. | |||
| 640x480 | |||
| | |||
|- | |||
| | |||
| Summon Night 6: Lost Borders | |||
| PCSB01013<br /> | |||
PCSE00951<br /> | |||
PCSG00827<br /> | |||
PCSH00225 | |||
| MSAA | |||
| 2x | |||
| | |||
|- | |||
| | |||
| Supremacy MMA: Unrestricted | |||
| PCSE00012 | |||
| Internal res. | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| The Amazing Spider-Man | |||
| PCSB00428<br /> | |||
PCSE00333 | |||
| Internal res.<br /> | |||
FPS cap | |||
| 704x400<br /> | |||
60 | |||
| | |||
|- | |||
| | |||
| The Legend of Heroes: Trails of Cold Steel<br /> | |||
Eiyuu Densetsu: Sen no Kiseki | |||
| PCSB00866<br /> | |||
PCSE00786<br /> | |||
PCSG00195<br /> | |||
PCSH00074 | |||
| Internal res. | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| The Legend of Heroes: Trails of Cold Steel II<br /> | |||
Eiyuu Densetsu: Sen no Kiseki II | |||
| PCSB01016<br /> | |||
PCSE00896<br /> | |||
PCSG00354<br /> | |||
PCSH00075 | |||
| Internal res.<br /> | |||
MSAA | |||
| 720x408<br /> | |||
2x | |||
| | |||
|- | |||
| | |||
| The LEGO Movie Videogame | |||
| PCSB00553<br /> | |||
PCSE00353 | |||
| Internal res. | |||
| 640x368 | |||
| | |||
|- | |||
| | |||
| Tokyo Xanadu | |||
| PCSB01062<br /> | |||
PCSE00893<br /> | |||
PCSG00608<br /> | |||
PCSH10009 | |||
| Internal res.<br /> | |||
MSAA | |||
| 720x408<br /> | |||
2x | |||
| | |||
|- | |||
| | |||
| Ukiyo no Roushi | |||
| PCSG00480 | |||
| Internal res.<br /> | |||
FPS cap | |||
| 704x384<br /> | |||
30 | |||
| | |||
|- | |||
| | |||
| Urban Trial Freestyle | |||
| PCSB00038<br /> | |||
PCSE00051<br /> | |||
PCSG00231 | |||
| Framebuffer | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| Utawarerumono: Mask of Deception / Itsuwari no Kamen | |||
| PCSB01093<br /> | |||
PCSE00959<br /> | |||
PCSG00617 | |||
| Internal res. | |||
| 672x384 | |||
| | |||
|- | |||
| | |||
| Utawarerumono: Mask of Truth / Futari no Hakuoro | |||
| PCSB01145<br /> | |||
PCSE01102<br /> | |||
PCSG00838 | |||
| Internal res. | |||
| 672x384 | |||
| | |||
|- | |||
| | |||
| Utawarerumono: Chiriyuku Mono he no Komoriuta | |||
| PCSG01079 | |||
| Internal res. | |||
| 672x384 | |||
| | |||
|- | |||
| | |||
| Valhalla Knights 3 | |||
| PCSB00432<br /> | |||
PCSE00244<br /> | |||
PCSG00076 | |||
| Internal res. | |||
| 640x384 | |||
| | |||
|- | |||
| | |||
| Valhalla Knights 3 GOLD | |||
| PCSG00307 | |||
| Internal res.<br /> | |||
FPS cap | |||
| 640x384<br /> | |||
30 | |||
| | |||
|- | |||
| | |||
| Wipeout 2048 | |||
| PCSF00007<br /> | |||
PCSA00015<br /> | |||
PCSC00006<br /> | |||
PCSD00005 | |||
| 14x Internal res.<br /> | |||
FPS cap | |||
| up to 960x544<br /> | |||
30 | |||
| | |||
|- | |||
| | |||
| World of Final Fantasy | |||
| PCSB00951<br /> | |||
PCSE00880<br /> | |||
PCSH00223<br /> | |||
PCSG00709 | |||
| Internal res. | |||
| 640x384 | |||
| | |||
|- | |||
| | |||
| WRC 3: FIA World Rally Championship | |||
| PCSB00204<br /> | |||
PCSE00242 | |||
| Internal res. | |||
| 704x448 | |||
| | |||
|- | |||
| | |||
| WRC 4: FIA World Rally Championship | |||
| PCSB00345<br /> | |||
PCSE00411<br /> | |||
PCSG00376 | |||
| Internal res. | |||
| 704x448 | |||
| | |||
|- | |||
| | |||
| WRC 5: FIA World Rally Championship | |||
| PCSB00762<br /> | |||
PCSE00667 | |||
| Framebuffer | |||
| 960x544 | |||
| | |||
|- | |||
| | |||
| Ys: Memories of Celceta | |||
| PCSB00497<br /> | |||
PCSE00245<br /> | |||
PCSH00181<br /> | |||
PCSG00105 | |||
| Internal res. | |||
| 720x408 | |||
| | |||
|- | |||
| | |||
| Ys Origin | |||
| PCSB01081<br /> | |||
PCSE01033<br /> | |||
PCSH10049 | |||
| FPS cap | |||
| 30 | |||
| | |||
|- | |||
| | |||
| Ys VIII: Lacrimosa of Dana | |||
| PCSB01128<br /> | |||
PCSE01103<br /> | |||
PCSG00881<br /> | |||
PCSH00297 | |||
| 3x Internal res.<br /> | |||
FPS cap | |||
| 960x512, 840x476, 720x320<br /> | |||
30 | |||
| | |||
|} | |||
=== Supported games (patch/) === | |||
These require ''patchlist.txt'' as well as additional files located in ''patch/'' folder. | |||
{| | |||
!width="16%"| | |||
!width="16%"| Game | |||
!width="16%"| Title ID(s) | |||
!width="16%"| Supported features | |||
!width="16%"| Game defaults | |||
!width="16%"| Notes.............. | |||
|- | |||
| | |||
| Mortal Kombat | |||
| PCSB00106<br /> | |||
PCSE00023 | |||
| Framebuffer | |||
| 640x368 | |||
| [https://raw.githubusercontent.com/Electry/VitaGrafixPatchlist/master/patch/PCSB00106.txt PCSB00106.txt]<br /> | |||
[https://raw.githubusercontent.com/Electry/VitaGrafixPatchlist/master/patch/PCSE00023.txt PCSE00023.txt] | |||
|- | |||
| | |||
| Uncharted: Golden Abyss | |||
| PCSF00001<br /> | |||
PCSF00012<br /> | |||
PCSA00029<br /> | |||
PCSD00001 | |||
| Internal res. | |||
| 768x384 | |||
| [https://raw.githubusercontent.com/Electry/VitaGrafixPatchlist/master/patch/PCSF00001.txt PCSF00001.txt] | |||
|} | |||
* no known issues | |||
* playable, but with some minor issues (check ''[https://github.com/Electry/VitaGrafixPatchlist/issues Issues]'' section) | |||
Adding support for each and every game requires manual disassembly of game's binary to find addresses in the game code where the resolution is set. Some are easy to patch, others plainly impossible. | |||
=== FAQ === | |||
* Encountered a bug? Feel free to open a Github issue [https://github.com/Electry/VitaGrafixPatchlist/issues here]. | |||
* Found a new patch? I'll gladly include it in here :) Just open a new issue or create a merge request. | |||
=== Available options When Using VitaGrafix === | |||
The format is <code>OPTION=VALUE</code>, each on a separate line. | |||
{| | |||
!align="center" width="25%"| option | |||
!width="25%"| description | |||
!width="25%"| valid values | |||
!width="25%"| default | |||
|- | |||
|align="center"| ENABLED | |||
| Enables/disables game modifications (and OSD). | |||
| '''ON:''' <code>1</code>, <code>on</code> or <code>true</code><br /> | |||
'''OFF:''' <code>0</code>, <code>off</code> or <code>false</code> | |||
| '''ON''' | |||
|- | |||
|align="center"| OSD | |||
| Enables/disables the small overlay that is<br /> | |||
shown during first few seconds when starting a game. | |||
| '''ON:''' <code>1</code>, <code>on</code> or <code>true</code><br /> | |||
'''OFF:''' <code>0</code>, <code>off</code> or <code>false</code> | |||
| '''ON''' | |||
|- | |||
|align="center"| LOG | |||
| Enables/disables logging<br /> | |||
(to ''ux0:data/VitaGrafix/log.txt'' file) | |||
| '''ON:''' <code>1</code>, <code>on</code> or <code>true</code><br /> | |||
'''OFF:''' <code>0</code>, <code>off</code> or <code>false</code> | |||
| '''ON''' | |||
|- | |||
|align="center"| FB | |||
| Framebuffer resolution | |||
| '''ON:'''<br /> | |||
<code>960x544</code><br /> | |||
<code>720x408</code><br /> | |||
<code>640x368</code><br /> | |||
<br /> | |||
'''OFF:'''<br /> | |||
<code>0</code>, <code>off</code> or <code>false</code> | |||
| '''OFF''' | |||
|- | |||
|align="center"| IB | |||
| Internal buf. resolution | |||
| '''ON:'''<br /> | |||
<code>WxH</code> where:<br /> | |||
''1 <= '''W''' <= 960''<br /> | |||
''1 <= '''H''' <= 544''<br /> | |||
<br /> | |||
If patch supports multiple res.<br /> | |||
(e.g. dyn. res. scaling) use:<br /> | |||
<code>WxH,WxH,...</code><br /> | |||
<br /> | |||
'''OFF:'''<br /> | |||
<code>0</code>, <code>off</code> or <code>false</code> | |||
| '''OFF''' | |||
|- | |||
|align="center"| FPS | |||
| Frames per second cap (upper limit) | |||
| '''ON:'''<br /> | |||
<code>60</code><br /> | |||
<code>30</code><br /> | |||
<code>20</code><br /> | |||
<br /> | |||
'''OFF:'''<br /> | |||
<code>0</code>, <code>off</code> or <code>false</code> | |||
| '''OFF''' | |||
|- | |||
|align="center"| MSAA | |||
| Multisample anti-aliasing | |||
| '''ON:'''<br /> | |||
<code>4x</code><br /> | |||
<code>2x</code><br /> | |||
<code>1x</code> (no AA)<br /> | |||
<br /> | |||
'''OFF:'''<br /> | |||
<code>0</code>, <code>off</code> or <code>false</code> | |||
| '''OFF''' | |||
|} | |||
'''TIP:''' If you leave some options out, the plugin will use their default values.<br /> | |||
'''TIP:''' If patch supports multiple '''IB''' res. and you don't specify them all, the last <code>WxH</code> will be used for those that would go after. It is therefore perfectly fine to just use <code>IB=960x544</code> to set them all to 960x544 (e.g. to disable dynamic res. scaling) in such situations. | |||
=== Comments === | |||
Comments always start with ''#'' character. They can, but don't need to be on a separate line. | |||
<pre># This is a comment | |||
[PCSA00001] # This is also a valid comment | |||
...</pre> | |||
=== Example config.txt === | |||
<pre>[MAIN] | |||
# Set default options for all games | |||
FB=960x544 | |||
IB=960x544 | |||
FPS=60 | |||
MSAA=4x | |||
# Persona 4 Golden [EU], disable osd | |||
# Notice that IB=960x544 is redundant here as it is | |||
# the same resolution as the 'fallback' one in [MAIN] section above. | |||
# This of course doesn't cause any harm. | |||
[PCSB00245] | |||
OSD=0 | |||
IB=960x544 | |||
# Ninja Gaiden Sigma 2 Plus, uses dynamic resolution scaling | |||
# and switches between two specified IB resolutions when patched | |||
# (based on framerate) | |||
# Override the [MAIN] IB resolution(s) for this game. | |||
[PCSB00294] | |||
IB=960x544,720x408 | |||
# LittleBigPlanet res. patch introduces some glitches, | |||
# let's disable it here. | |||
[PCSA00017] | |||
ENABLED=0 | |||
# GoW 2 won't reach 60 FPS @ 960x544 very often, so let's | |||
# keep it locked to 30 (default FPS cap). | |||
[PCSF00438, GOW2.self] | |||
FPS=OFF | |||
# I think you get what this does by now. | |||
[PCSB00204] | |||
IB=OFF</pre> | |||
==Advanced - The VG Language== | |||
To facilitate user-made game patches without having to recompile the whole plugin, a domain specific language was created. Similar, but somewhat simplified to that of VitaCheat. | |||
Written in ''patchlist.txt'', patches are parsed and applied during game boot-up. | |||
=== Section header === | |||
A patch for each game starts with a header. Header identifies SKU/region (TITLE ID), the executable name (because several “collections” use the same TITLE ID for multiple games in their series) and the game version (indirectly, in a form of module NID). | |||
<pre>[PCSA00001, eboot.bin, 0x12345678]</pre> | |||
{| | |||
!align="center"| ↑ | |||
! | |||
! | |||
|- | |||
|align="center"| '''PCSA00001''' | |||
| game's TITLE ID | |||
| required | |||
|- | |||
|align="center"| '''eboot.bin''' | |||
| a part of executable's full path | |||
| recommended | |||
|- | |||
|align="center"| '''0x12345678''' | |||
| main module NID, 8 hex digits with '0x' prefix | |||
| recommended | |||
|} | |||
<br /> | |||
Executable name/path is used to differentiate between games that share a single TITLE ID (e.g. collections). | |||
NID is used to inform user about potentional version mismatch (e.g. when game gets a new update), instead of applying patches to wrong/old memory addresses and then crashing. | |||
If multiple regions/SKUs share the same offsets, having to duplicate patches would be wasteful. You can freely stack multiple headers after each other, like shown below. Patches will then be applied for all matching games/regions. | |||
<pre>[PCSA00001, eboot.bin, 0x12345678] | |||
[PCSB00023, eboot.bin, 0x87654321] | |||
...</pre> | |||
=== Feature type === | |||
Header is followed by patch feature/type marking. This indicates that subsequent patches shall only be applied if user has enabled said feature in their configuration file. | |||
Use one of the following: | |||
<pre>@FB | |||
@IB | |||
@FPS | |||
@MSAA</pre> | |||
=== Patches === | |||
The rules for patches are simple. Each patched memory location is on a separate line, starts with a relative address (segment:offset) followed by the new value. | |||
<pre>0:0x1234 0xDEADBEEF</pre> | |||
=== Datatypes === | |||
VitaGrafix internally always works with one of the following datatypes: | |||
* Primitive types: | |||
** '''int''' (32-bit signed integer) | |||
** '''uint''' (32-bit unsigned integer) | |||
** '''float''' (32-bit floating point number) | |||
* Raw type: | |||
** '''bytes''' (size up to 32 B) | |||
You can cast between those types freely using casting functions (see '''Explicit type conversion'''). | |||
==== Immediate values are always parsed as ==== | |||
* '''int''' – when <code>+</code> or <code>-</code> sign precedes 1 or more decimal digits (with no space inbetween) | |||
** OK - <code>+1</code>, <code>-1</code> | |||
** KO - <code>+ 1</code> | |||
* '''uint''' – when: | |||
** hex number is prefixed with <code>0x</code> or <code>0X</code> | |||
** octal number is prefixed with <code>0</code> | |||
** decimal integer does not have prefix or suffix | |||
** OK - <code>0xCAFE</code>, <code>0876</code>, <code>123</code> | |||
** KO - <code>CAFE</code> | |||
* '''float''' – when 1 or more decimal digits (optionally with preceding <code>+</code> or <code>-</code> sign) are followed by: | |||
** <code>.</code> and optionally: | |||
*** 1 or more digits after the decimal point and optionally <code>f</code> | |||
*** <code>f</code> | |||
** <code>f</code> | |||
** OK - <code>1.</code>, <code>1.2</code>, <code>1.2f</code>, <code>1f</code>, <code>1.f</code>, <code>-1.0</code>, <code>-2f</code>, <code>+123.4f</code> | |||
** KO - <code>.1</code>, <code>.1f</code>, <code>1 . 0 f</code> | |||
* '''bytes''' – when 1 or more (up to 32) 8-bit hex values (without the 0x prefix) are followed by <code>r</code> | |||
** OK - <code>DEADr</code>, <code>DE AD r</code> | |||
** KO - <code>DEAD</code>, <code>0xDEADr</code>, <code>0xDE 0xAD r</code> | |||
=== Implicit type conversion === | |||
The interpreter makes use of implicit conversion when necessary. This is done when applying '''infix operator''' or '''math function''' (arity >= 2) to following operand types (in no particular order): | |||
{| | |||
!align="center"| operand 1 | |||
!align="center"| operand 2, 3, ... | |||
! | |||
!align="center"| result | |||
! example | |||
|- | |||
|align="center"| '''float''' | |||
|align="center"| '''int''' or '''uint''' | |||
| all casted to '''float''' | |||
|align="center"| '''float''' | |||
| <code>100 / 2.0</code> equals <code>50.0</code> | |||
|- | |||
|align="center"| '''int''' | |||
|align="center"| '''uint''' | |||
| all casted to '''int''' | |||
|align="center"| '''int''' | |||
| <code>100 / -2</code> equals <code>-50</code> | |||
|- | |||
|align="center"| '''uint''' | |||
|align="center"| '''uint''' | |||
| ONLY if result is < 0 | |||
|align="center"| '''int''' | |||
| <code>1 - 2</code> equals <code>-1</code> | |||
|- | |||
|align="center"| any | |||
|align="center"| any | |||
| ONLY when applying <code>.</code> (concat) | |||
|align="center"| '''bytes''' | |||
| <code>1 . 2</code> equals <code>0100000002000000r</code> | |||
|} | |||
=== Explicit type conversion === | |||
While working with values, changing the datatype manually might sometimes be desirable. | |||
To convert value of any type to one of the primitive types use following functions: | |||
{| | |||
! function | |||
!align="center"| argument type | |||
!align="center"| result type | |||
! example | |||
|- | |||
| int(value) | |||
|align="center"| any | |||
|align="center"| '''int''' | |||
| <code>int(-2.0)</code> equals <code>-2</code> | |||
|- | |||
| uint(value) | |||
|align="center"| any | |||
|align="center"| '''uint''' | |||
| <code>uint(FFr)</code> equals <code>255</code> | |||
|- | |||
| float(value) | |||
|align="center"| any | |||
|align="center"| '''float''' | |||
| <code>float(2)</code> equals <code>2.0</code> | |||
|} | |||
To convert value of any type to raw type use: | |||
{| | |||
! function | |||
!align="center"| argument type | |||
!align="center"| result type | |||
!align="center"| result size (B) | |||
! example | |||
|- | |||
| int8(value) | |||
|align="center"| any | |||
|align="center"| '''bytes''' | |||
|align="center"| 1 | |||
| <code>int8(-128)</code> equals <code>80 r</code> | |||
|- | |||
| int16(value) | |||
|align="center"| any | |||
|align="center"| '''bytes''' | |||
|align="center"| 2 | |||
| <code>int16(-32768)</code> equals <code>00 80 r</code> | |||
|- | |||
| int32(value) | |||
|align="center"| any | |||
|align="center"| '''bytes''' | |||
|align="center"| 4 | |||
| <code>int32(-2147483648)</code> equals <code>00 00 00 80 r</code> | |||
|- | |||
| uint8(value) | |||
|align="center"| any | |||
|align="center"| '''bytes''' | |||
|align="center"| 1 | |||
| <code>uint8(255)</code> equals <code>FF r</code> | |||
|- | |||
| uint16(value) | |||
|align="center"| any | |||
|align="center"| '''bytes''' | |||
|align="center"| 2 | |||
| <code>uint16(65535)</code> equals <code>FF FF r</code> | |||
|- | |||
| uint32(value) | |||
|align="center"| any | |||
|align="center"| '''bytes''' | |||
|align="center"| 4 | |||
| <code>uint32(4294967295)</code> equals <code>FF FF FF FF r</code> | |||
|- | |||
| fl32(value) | |||
|align="center"| any | |||
|align="center"| '''bytes''' | |||
|align="center"| 4 | |||
| <code>fl32(12345.0)</code> equals <code>00 E4 40 46 r</code> | |||
|} | |||
If you don't wish to cast the value, but rather just reinterpret bytes, use: | |||
{| | |||
! function | |||
!align="center"| value type | |||
!align="center"| result type | |||
!align="center"| result size (B) | |||
! example | |||
|- | |||
| raw(value) | |||
|align="center"| any | |||
|align="center"| '''bytes''' | |||
|align="center"| sizeof(''value'') | |||
| <code>raw(1.0 >> 16)</code> equals <code>80 3F 00 00 r</code> | |||
|- | |||
| rawn(value, n) | |||
|align="center"| any | |||
|align="center"| '''bytes''' | |||
|align="center"| ''n'' | |||
| <code>rawn(1.0 >> 16, 2)</code> equals <code>80 3F r</code> | |||
|} | |||
=== Infix operators === | |||
Operator precedence is honored, order is similar to C-like languages. Brackets (parentheses) are allowed and evaluated first. | |||
{| | |||
!align="center"| operator | |||
!align="center"| operand type | |||
! description | |||
! example | |||
|- | |||
|align="center"| + | |||
|align="center"| primitive | |||
| addition | |||
| <code>1 + 2</code> equals <code>3</code> | |||
|- | |||
|align="center"| - | |||
|align="center"| primitive | |||
| subtraction | |||
| <code>1 - 2</code> equals <code>-1</code> | |||
|- | |||
|align="center"| * | |||
|align="center"| primitive | |||
| multiplication | |||
| <code>2 * 3</code> equals <code>6</code> | |||
|- | |||
|align="center"| / | |||
|align="center"| primitive | |||
| division | |||
| <code>3 / 2.0</code> equals <code>1.5</code> | |||
|- | |||
|align="center"| % | |||
|align="center"| '''int''' or '''uint''' | |||
| modulo (division remainder) | |||
| <code>123 % 23</code> equals <code>8</code> | |||
|- | |||
|align="center"| | | |||
|align="center"| primitive | |||
| bitwise OR | |||
| <code>14 | 5</code> equals <code>15</code> | |||
|- | |||
|align="center"| ^ | |||
|align="center"| primitive | |||
| bitwise XOR | |||
| <code>14 ^ 5</code> equals <code>11</code> | |||
|- | |||
|align="center"| & | |||
|align="center"| primitive | |||
| bitwise AND | |||
| <code>14 & 5</code> equals <code>4</code> | |||
|- | |||
|align="center"| << | |||
|align="center"| primitive | |||
| bitwise left shift | |||
| <code>14 >> 2</code> equals <code>3</code> | |||
|- | |||
|align="center"| >> | |||
|align="center"| primitive | |||
| bitwise right shift | |||
| <code>14 << 2</code> equals <code>56</code> | |||
|- | |||
|align="center"| . | |||
|align="center"| raw | |||
| concatenation | |||
| <code>DEr . ADr</code> equals <code>DE AD r</code> | |||
|- | |||
|align="center"| * | |||
|align="center"| primitive '''*''' raw | |||
| raw repeat | |||
| <code>nop * 2</code> equals <code>00 BF 00 BF r</code> | |||
|} | |||
=== Math functions === | |||
{| | |||
! function | |||
! description | |||
! example | |||
|- | |||
| abs(value) | |||
| absolute ''value'' | |||
| <code>abs(-1.0)</code> equals <code>1.0</code> | |||
|- | |||
| acos(rad) | |||
| arc cosine (inverse cosine) in radians | |||
| <code>acos(-0.5)</code> equals <code>2.094395</code> | |||
|- | |||
| align(value, al) | |||
| aligns ''value'' to a multiple of ''al'' | |||
| <code>align(720, 32)</code> equals <code>736</code> | |||
|- | |||
| asin(rad) | |||
| arc sine (inverse sine) in radians | |||
| <code>asin(0.5)</code> equals <code>0.523599</code> | |||
|- | |||
| atan(rad) | |||
| arc tangent (inverse tangent) in radians | |||
| <code>atan(1.0)</code> equals <code>0.785398</code> | |||
|- | |||
| atan2(y, x) | |||
| arc tangent of ''y''/''x'' in radians | |||
| <code>atan2(0.5, 0.4)</code> equals <code>0.896055</code> | |||
|- | |||
| ceil(value) | |||
| nearest integer greater than ''value'' | |||
| <code>ceil(1.23)</code> equals <code>2.0</code> | |||
|- | |||
| cos(rad) | |||
| cosine in radians | |||
| <code>cos(0.5)</code> equals <code>0.877583</code> | |||
|- | |||
| cosh(rad) | |||
| hyperbolic cosine in radians | |||
| <code>cosh(0.5)</code> equals <code>1.127626</code> | |||
|- | |||
| exp(value) | |||
| exponential (Euler's number) raised to ''value'' | |||
| <code>exp(2.0)</code> equals <code>7.389056</code> | |||
|- | |||
| floor(value) | |||
| nearest integer lesser than ''value'' | |||
| <code>floor(1.23)</code> equals <code>1.0</code> | |||
|- | |||
| ln(value) | |||
| natural logarithm of ''value'' | |||
| <code>ln(10.0)</code> equals <code>2.302585</code> | |||
|- | |||
| log10(value) | |||
| base 10 logarithm of ''value'' | |||
| <code>log10(10.0)</code> equals <code>1.0</code> | |||
|- | |||
| min(a, b) | |||
| the smaller of ''a'' and ''b'' | |||
| <code>min(123, 23)</code> equals <code>23</code> | |||
|- | |||
| max(a, b) | |||
| the greater of ''a'' and ''b'' | |||
| <code>max(123, 23)</code> equals <code>123</code> | |||
|- | |||
| pow(base, power) | |||
| ''base'' raised to the ''power'' | |||
| <code>pow(2, 4)</code> equals <code>16</code> | |||
|- | |||
| round(value) | |||
| nearest integer to ''value'' (0.5 rounds up) | |||
| <code>round(1.23)</code> equals <code>1.0</code> | |||
|- | |||
| sin(rad) | |||
| sine in radians | |||
| <code>sin(0.5)</code> equals <code>0.479426</code> | |||
|- | |||
| sinh(rad) | |||
| hyperbolic sine in radians | |||
| <code>sinh(0.5)</code> equals <code>0.521095</code> | |||
|- | |||
| sqrt(value) | |||
| square root of ''value'' | |||
| <code>sqrt(10.0)</code> equals <code>3.162278</code> | |||
|- | |||
| tan(rad) | |||
| tangent in radians | |||
| <code>tan(0.5)</code> equals <code>0.546302</code> | |||
|- | |||
| tanh(rad) | |||
| hyperbolic tangent in radians | |||
| <code>tanh(0.5)</code> equals <code>0.462117</code> | |||
|} | |||
=== Math constants === | |||
{| | |||
! constant | |||
! description | |||
! defined as | |||
|- | |||
| pi | |||
| The number π | |||
| <code>3.141593</code> | |||
|- | |||
| e | |||
| Euler's number | |||
| <code>2.718282</code> | |||
|} | |||
=== User configuration macros === | |||
These return values based on user configuration entry (in ''config.txt'') for current game. | |||
{| | |||
! macro | |||
! description | |||
! config option | |||
|- | |||
| fb_w | |||
| Framebuffer width in pixels | |||
| FB | |||
|- | |||
| fb_h | |||
| Framebuffer height in pixels | |||
| FB | |||
|- | |||
| ib_w | |||
| Internal buf. width in pixels | |||
| IB | |||
|- | |||
| ib_h | |||
| Internal buf. height in pixels | |||
| IB | |||
|- | |||
| ib_wi(index) | |||
| Internal buf. width in pixels (indexed from 0) | |||
| IB (multiple) | |||
|- | |||
| ib_hi(index) | |||
| Internal buf. height in pixels (indexed from 0) | |||
| IB (multiple) | |||
|- | |||
| vblank | |||
| Vertical blanking interval (1 for 60Hz, 2 for 30, etc...) | |||
| FPS | |||
|- | |||
| msaa | |||
| SceGxmMultisampleMode (0 for no MSAA, 1 for 2x, 2 for 4x) | |||
| MSAA | |||
|} | |||
== Instruction encoders == | |||
These encode few of the commonly used instructions. Result type is always raw, size depends on encoder. All are unconditional. | |||
Register arguments are expected to be decimal integers.<br /> | |||
'''ARM''' within '''0 <= ''reg'' <= 14''' range, where 0 denotes R0 or A1, 13 = SP and 14 = LR.<br /> | |||
'''VFP''' within '''0 <= ''reg'' <= 31''' range, where 0 denotes S0. | |||
{| | |||
!width="25%"| encoder | |||
!width="25%"| description | |||
!align="center" width="25%"| instr. set<br /> | |||
(enc.) | |||
!align="center" width="25%"| size (B) | |||
|- | |||
| t1_mov(reg, imm) | |||
| Insert an immediate value to a register.<br /> | |||
<br /> | |||
<code>MOV <Rd>,#<imm8></code><br /> | |||
<br /> | |||
''reg'' - destination<br /> | |||
''imm'' - immediate value (up to 8-bit) | |||
|align="center"| Thumb<br /> | |||
(T1) | |||
|align="center"| 2 | |||
|- | |||
| t2_mov(sf, reg, imm) | |||
| Insert an immediate value to a register.<br /> | |||
<br /> | |||
<code>MOV{S}.W <Rd>,#<const></code><br /> | |||
<br /> | |||
''sf'' - set condition flags (0 = MOV.W, 1 = MOVS.W)<br /> | |||
''reg'' - destination<br /> | |||
''imm'' - immediate value ([http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0204j/Cihbeage.html#Cjachigd constant]) | |||
|align="center"| Thumb-2<br /> | |||
(T2) | |||
|align="center"| 4 | |||
|- | |||
| t3_mov(reg, imm) | |||
| Insert an immediate value to a register.<br /> | |||
<br /> | |||
<code>MOVW <Rd>,#<imm16></code><br /> | |||
<br /> | |||
''reg'' - destination<br /> | |||
''imm'' - immediate value (up to 16-bit) | |||
|align="center"| Thumb-2<br /> | |||
(T3) | |||
|align="center"| 4 | |||
|- | |||
| t1_movt(reg, imm) | |||
| Insert 16-bit immediate value to the top halfword of a register.<br /> | |||
Bottom halfword is not affected.<br /> | |||
<br /> | |||
<code>MOVT <Rd>,#<imm16></code><br /> | |||
<br /> | |||
''reg'' - destination<br /> | |||
''imm'' - immediate value (up to 16-bit) | |||
|align="center"| Thumb-2<br /> | |||
(T1) | |||
|align="center"| 4 | |||
|- | |||
| mov32(reg, imm, gap) | |||
| Pseduo-instruction, generates MOVW, MOVT pair,<br /> | |||
allows you to load any 32-bit value into a register.<br /> | |||
<br /> | |||
<code>MOVW <Rd>,#<imm16></code><br /> | |||
<code>...</code><br /> | |||
<code>MOVT <Rd>,#<imm16></code><br /> | |||
<br /> | |||
''reg'' - destination<br /> | |||
''imm'' - immediate value (up to 32-bit)<br /> | |||
''gap'' - gap size (in bytes) between MOVW and MOVT (max. 24 B) | |||
|align="center"| Thumb-2<br /> | |||
(T3 + T1) | |||
|align="center"| 4 + ''gap'' + 4 | |||
|- | |||
| a1_mov(sf, reg, imm) | |||
| Insert an immediate value to a register.<br /> | |||
<br /> | |||
<code>MOV{S} <Rd>,#<const></code><br /> | |||
<br /> | |||
''sf'' - set condition flags (0 = MOV, 1 = MOVS)<br /> | |||
''reg'' - destination<br /> | |||
''imm'' - immediate value ([http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0204j/Cihbeage.html#Cjachigd constant]) | |||
|align="center"| Arm<br /> | |||
(A1) | |||
|align="center"| 4 | |||
|- | |||
| a2_mov(reg, imm) | |||
| Insert an immediate value to a register.<br /> | |||
<br /> | |||
<code>MOVW <Rd>,#<imm16></code><br /> | |||
<br /> | |||
''reg'' - destination<br /> | |||
''imm'' - immediate value (up to 16-bit) | |||
|align="center"| Arm<br /> | |||
(A2) | |||
|align="center"| 4 | |||
|- | |||
| t2_vmov(reg, imm) | |||
| Insert a floating-point immediate value in a single-precision register.<br /> | |||
<br /> | |||
<code>VMOV.F32 <Sd>, #<imm></code><br /> | |||
<br /> | |||
''reg'' - destination (VFP)<br /> | |||
''imm'' - float immediate (+/-n * 2^-r, 16 <= n <= 31, 0 <= r <= 7) | |||
|align="center"| VFPv3<br /> | |||
(T2/A2) | |||
|align="center"| 4 | |||
|- | |||
| bkpt | |||
| Breakpoint (enter debug state).<br /> | |||
<br /> | |||
<code>BKPT #0</code> | |||
|align="center"| Thumb<br /> | |||
(T1) | |||
|align="center"| 2 | |||
|- | |||
| nop | |||
| No operation.<br /> | |||
<br /> | |||
<code>NOP</code> | |||
|align="center"| Thumb-2<br /> | |||
(T1) | |||
|align="center"| 2 | |||
|} | |||
== Comments == | |||
Comments always start with ''#'' character. They can, but don't need to be on a separate line. | |||
<pre># This is a comment | |||
[PCSA00001, eboot.bin, 0x12345678] # This is also a valid comment | |||
...</pre> | |||
=== Backwards compatibility with v4.x === | |||
All older patches are compatible with v5.x, however, support for the old syntax/style might be dropped in future versions. It is highly advised to use the new syntax for new patches. | |||
==== Changes: ==== | |||
'''v4.x''': <code>nop()</code> and <code>bkpt()</code> encoders must have brackets<br /> | |||
'''v5.x''': <code>nop</code> and <code>bkpt</code> encoders are classified as ''constants'', ''constants'' do not have brackets<br /> | |||
'''example''': | |||
* <code>nop()</code> => <code>nop</code> | |||
'''v4.x''': no support for math operators/fns/precedence, macros start with '''<''' and end with '''>'''<br /> | |||
'''v5.x''': infix operators and math ''functions'' are available<br /> | |||
'''example''': | |||
* <code><+,1,2></code> => <code>1 + 2</code> | |||
* <code><*,<&,<+,<fb_w>,31>,0xFFFFFFE0>,4></code> => <code>align(fb_w, 32) * 4</code> | |||
'''v4.x''': config-option macros start with '''<''' and end with '''>'''<br /> | |||
'''v5.x''': config-option macros are used just like regular ''constants'' and ''functions''<br /> | |||
'''example''': | |||
* <code><fb_w></code> => <code>fb_w</code> | |||
* <code><ib_w></code> => <code>ib_w</code> | |||
* <code><ib_w,2></code> => <code>ib_wi(2)</code> | |||
'''v4.x''': no extra spaces are allowed, comments have to be on a separate line<br /> | |||
'''v5.x''': spaces are ignored, anything after ''#'' too (until EOL)<br /> | |||
'''example''': | |||
* <code>t2_mov(1,1,<fb_w>)</code> => <code>t2_mov(1, 1, fb_w)</code> | |||
* <code># Comment</code><br /> | |||
<code>0:0x1234 nop</code> is valid just like <code>0:0x1234 nop # Comment</code> | |||
'''v4.x''': '''bytes()''' is used to parse raw bytes<br /> | |||
'''v5.x''': '''r''' suffix is used to parse raw bytes, '''raw()''' is used for reinterpreting/conversion<br /> | |||
'''example''': | |||
* <code>bytes(DE AD BE EF)</code> => <code>DEADBEEF r</code> | |||
'''and more...''' | |||
=== Examples === | |||
Here are some examples of valid patches. | |||
<pre>[PCSF00243,eboot.bin] # Killzone Mercenary [EU 1.12] | |||
[PCSF00403,eboot.bin] # Killzone Mercenary [EU 1.12] | |||
[PCSA00107,eboot.bin,0x0F9D3B7C] # Killzone Mercenary [US 1.12] | |||
[PCSC00045,eboot.bin] # Killzone Mercenary [JP 1.12] | |||
[PCSD00071,eboot.bin] # Killzone Mercenary [ASIA 1.12] | |||
@IB | |||
0:0x15A5C8 nop *4 | |||
1:0xD728 uint32(ib_w) . uint32(ib_h) | |||
1:0xD730 uint32(ib_w) . uint32(ib_h)</pre> | |||
<pre># God of War Collection [EU 1.00] | |||
[PCSF00438,GOW1.self,0x8638ffed] | |||
@FB | |||
0:0x9E212 t2_mov(1, 4, fb_w) | |||
0:0x9E21A t2_mov(1, 2, fb_h) | |||
0:0x9F0F0 t2_mov(1, 0, fb_w) | |||
0:0x9F0F8 t2_mov(1, 1, fb_h) | |||
0:0xA31C6 t2_mov(1, 7, fb_w) | |||
0:0xA31CC t2_mov(1, 1, fb_h) | |||
0:0xCEF06 t2_mov(1, 0, fb_w) | |||
0:0xCEF0E t2_mov(1, 2, fb_h) | |||
0:0xA1098 t2_mov(1, 14, fb_h) | |||
@FPS | |||
0:0x9E228 t1_mov(0, vblank)</pre> | |||
<pre># LEGO Star Wars: The Force Awakens [EU 1.00] | |||
[PCSB00877,eboot.bin] | |||
@IB | |||
0:0x2241C4 t2_mov(1, 1, 0xA00000) | |||
0:0x1F313E t2_mov(1, 4, ib_w) | |||
0:0x1F3144 t2_mov(1, 5, ib_h) | |||
1:0x4650 uint32(ib_w) . uint32(ib_h) | |||
# Fix touchscreen/touchpad pos calc | |||
0:0x223AF6 t2_mov(0, 0, 640) . nop *3 | |||
0:0x223B36 t2_mov(0, 0, 368) . nop *3</pre> | |||
=== IO/patcher/syntax errors === | |||
The parser will try to warn you if you make a mistake. Nevertheless, it isn't perfect so you shouldn't rely on it. | |||
==== Example: ==== | |||
https://dlhb.gamebrew.org/vitahomebrews/vitagrafix_errors.png | |||
==Changelog== | |||
'''(v.5.0.2)''' | |||
* Fixed a bug where "Your game version is not supported" message would not appear if you had a different game version to that of a patch | |||
'''(v.5.0.1)''' | |||
* Fixed bug where last IB res. in config.txt was not propagated, causing crash in multi-res. games (e.g. those with dynamic scaling such as Wipeout 2048) | |||
* Added support for manual redirection to alternate patch file (aka. !USE directive in patchlist.txt) | |||
'''(v.5.0.0)''' | |||
* Vastly improved UX (UI, logging, error reporting, etc...) | |||
*Rewritten parser/interpreter from scratch - revamped patchlist.txt syntax (compatible with v4.x patches) | |||
*Added support for per-self headers in config.txt | |||
**Now you can use separate options for each game in "collections" with single Title ID (e.g. GoW 1/2) | |||
*Added internal log buffer - reduced game startup times due to I/O stall | |||
*Added config.txt option to disable logging altogether | |||
*Added support for 20 FPS option in config.txt | |||
*Added support for individual per-game patchlists (e.g. ux0:data/VitaGrafix/patch/PCSF00001.txt) | |||
*Added support for inline comments on the same line as code | |||
*Bug fixes | |||
'''(v.4.1.1)''' | |||
*Fixed bug where [MAIN] options were ignored in some occasions. | |||
*Minor UI QoL improvements | |||
*Config/patchlist parsing is now case-insensitive | |||
*[MAIN] accepts same options as GAME section - the latter takes precedence if both are present. You can set your FB/IB/FPS/etc.. in [MAIN], those will be used as default values. | |||
*Added support for Arm A2 MOVW encoding (a2_mov) in patchlist.txt | |||
'''(v.4.0)''' | |||
* Hardcoded patches were removed, which means, updates to VitaGrafix plugin in the future will only bring new feature support / bug fixes. | |||
* All game related stuff, new game support, fixes, etc... will be available here: VitaGrafixPatchlist (changelog) | |||
* Download patchlist.txt (or make your own) and place it in ux0:data/VitaGrafix/ | |||
'''(v.3.2)''' | |||
*Game support: | |||
**Wipeout 2048 [EU/US/JP/ASIA] - 14x IB resolution - game uses dynamic res. scaling, you can specify up to 14 IB resolutions to override the default ones (or just 1 to disable the scaling completely) | |||
**Fate/EXTELLA LINK [JP/ASIA] - IB resolution | |||
**Assassin's Creed III: Liberation [EU/US] - IB resolution + FPS cap | |||
Thanks to @FormerNoob: | |||
*The Legend of Heroes: Trails of Cold Steel [EU/US/JP/ASIA] - IB resolution | |||
*The Legend of Heroes: Trails of Cold Steel II [EU/US/JP/ASIA] - IB resolution | |||
*Dead or Alive Xtreme 3: Venus [JP/ASIA] - 2x IB resolution - uses dynamic scaling | |||
Thanks to @nigelweng: | |||
*Resident Evil: Revelations 2 [EU/US/JP] - IB resolution | |||
'''(v.3.1.1)''' | |||
*Fixed bug where Jak & Daxter Collection [EU/US] would show 'game version unsupported' message in the game shell (Jak 1, 2, 3 game selection menu). | |||
*Fixed crash when only one IB resolution was specified for Ninja Gaiden Sigma 2 Plus. | |||
*Fixed issue where World of Final Fantasy would not show any special effects at 960x544 (hopefully). | |||
*Fixed log messages line feed. | |||
'''(v.3.1)''' | |||
* New game support: | |||
**Sly Cooper Collection (1, 2, 3) [EU/US] - FB res. + FPS cap | |||
**Sly Cooper Thieves in Time [EU/US] - FPS cap | |||
**Ninja Gaiden Sigma 2 Plus [EU/US/JP] - 2x IB res. (game uses dynamic scaling, you need to specify two res. e.g. IB=960x544,720x408) | |||
**Dragon Quest Builders [EU/US/JP/ASIA] - FPS cap (you can force 30 FPS lock) | |||
**Ratchet & Clank Collection (1, 2, 3) [EU/US] - FB res. | |||
**Ratchet & Clank Full Frontal Assault / QForce [EU/US] - FB res. | |||
**Utawarerumono: Chiriyuku Mono he no Komoriuta [JP] - IB res. | |||
**Dragon Ball Z: Battle of Z [EU/US/JP] - IB res. | |||
New region support: | |||
*Borderlands 2 [EU-2] (PCSF00576) - FB res. | |||
Fixes: | |||
*LEGO Star Wars: The Force Awakens [EU/US] - now playable at 960x544 without crashes | |||
Known issues: | |||
*Ratchet & Clank 2 + 3 has some UI clipping issues. #16 | |||
'''(v.2.4)''' | |||
* Game support | |||
**Added Hatsune Miku: Project Diva f [EUR/USA/JPN] internal res. patch | |||
**Added Hatsune Miku: Project Diva f 2nd [EUR/USA/JPN/ASA] internal res. + FPS cap patch | |||
**Added Hatsune Miku: Project Diva X [EUR/USA/ASA] internal res. patch | |||
**Added The Amazing Spider-Man [EUR] internal res. + FPS cap patch | |||
**Added Sly Cooper and the Thievius Raccoonus [USA] framebuffer res. + FPS cap patch | |||
**Fixed the issue in Killzone: Mercenary where (controller) input didn't work at >59 fps. | |||
Known issues | |||
*The Amazing Spider-Man: Only few IB resolutions work properly. 960x544 causes GPU crash in some areas. | |||
'''(v.2.3)''' | |||
* Game support | |||
**Added MotoGP 13 [EUR/USA] internal res. patch | |||
**Added MotoGP 14 [USA] internal res. patch | |||
**Added WRC 5 [EUR] framebuffer res. patch | |||
**Added Utawarerumono: Mask of Deception [EUR] internal res. patch | |||
**Added Utawarerumono: Mask of Truth [EUR/USA/JPN] internal res. patch | |||
**Added Dragon Quest Builders [EUR/USA/JPN/ASA] internal res. patch | |||
'''(v.2.2)''' | |||
* Game support | |||
**Added Ridge Racer [EUR/USA/JPN] internal res. patch. | |||
**Added Utawarerumono: Mask of Deception [USA/JPN] internal res. patch. | |||
**Added World of Final Fantasy [JPN] internal res. patch. | |||
**Added Dead or Alive 5 Plus [EUR/USA/JPN] internal res. patch. | |||
**Added Miracle Girls Festival [JPN] internal res. patch. | |||
**Added Jak and Daxter Collection [EUR/USA] framebuffer res. patch. | |||
**Added Hatsune Miku: Project Diva f [EUR/USA/JPN] FPS cap patch. | |||
Known issues | |||
*World of Final Fantasy: Only few resolutions work properly. Default has been changed to 800x480 (known working res.). | |||
*LEGO Star Wars: The Force Awakens: Crashes at native res (when opening pause menu, and possibly at other times too). Default has been changed to 720x408 (still higher than original 640x384). | |||
*LittleBigPlanet: Particles don't render correctly at native res. Default has been changed to OFF. | |||
*Hatsune Miku: Project Diva f: 60 FPS doubles menu animations speed. Gameplay remains normal. | |||
'''(v.2.1)''' | |||
* Game support | |||
**Added F1 2011 [EUR] internal resolution patch | |||
**Added LittleBigPlanet [EUR/USA/JPN/ASA] internal resolution patch | |||
**Added Borderlands 2 [EUR/USA] framebuffer resolution patch | |||
**Added Asphalt: Injection [EUR/USA] internal resolution patch | |||
**Added LEGO Star Wars: The Force Awakens [EUR/USA] internal resolution patch | |||
**Added World of Final Fantasy [EUR/USA/ASA] internal resolution patch | |||
'''(v.2.0)''' | |||
* Game support: | |||
**Added Killzone Mercenary [EUR/USA/JPN/ASA] internal resolution patch | |||
**Added WRC 3 [EUR] internal resolution patch* | |||
**Added WRC 4 [EUR/USA] internal resolution patch* | |||
**Added Persona 4 Golden [JPN] (PCSG00004) internal resolution patch | |||
**Added God of War Collection [EUR/USA/JPN] framebuffer resolution + FPS cap patch (GoW 1 + 2) | |||
**Added MUD - FIM Motocross World Championship [EUR] internal resolution patch | |||
**Added MXGP: The Official Motocross Videogame [EUR/USA] internal resolution patch | |||
Thanks to InquisitionImplied for finding the HEX edits | |||
'''(v.1.3.1)''' | |||
* Fixed P4G offsets for JPN+ASA (hopefully) | |||
'''(v.1.3)''' | |||
* Added Persona 4 Golden 476p -> 544p 3D resolution hack for ASA (PCSH00021). (thanks to /u/kane159) | |||
* The plugin now shows OSD for a few seconds after starting the game. | |||
'''(v.1.2)''' | |||
* Added Persona 4 Golden 476p -> 544p 3D resolution hack for USA + JPN versions | |||
'''(v.1.1)''' | |||
* Added Persona 4 Golden [EUR] 476p -> 544p 3D resolution hack | |||
'''(v.1.0)''' | '''(v.1.0)''' | ||
* | * Add Killzone Mercenary 60 fps patch | ||
==Credits== | |||
I'd like to thank the following people who made this possible: | |||
*Team Molecule for [https://henkaku.xyz/ HENkaku]/[[Taihen Vita|taiHEN]] | |||
*Rinnegatamante for [https://github.com/Rinnegatamante/vitaRescale vitaRescale] | |||
*dots_tb for [[ioPlus Vita]] | |||
*[https://www.youtube.com/user/IgiFactor Gontko Productions] for the VitaGrafix logo | |||
*all the supporters and patch-makers :) | |||
== External links == | == External links == | ||
* Github - https://github.com/Electry/VitaGrafix | * Github - https://github.com/Electry/VitaGrafix | ||
* VitaDB - https://vitadb.rinnegatamante.it/#/info/396 | * VitaDB - https://vitadb.rinnegatamante.it/#/info/396 | ||
* | * VitaGrafixPatchlist - https://github.com/Electry/VitaGrafixPatchlist | ||
Revision as of 04:18, 9 November 2022
VitaGrafix | |
---|---|
File:Vitagrafixvita.jpg | |
General | |
Author | Electry |
Type | Plugins |
Version | 5.0.2 |
License | GPL-3.0 |
Last Updated | 2019/12/29 |
Links | |
Download | |
Source | |
VitaGrafix is allowing user to change games resolution/FPS cap.
What is VitaGrafix?
VitaGrafix is a taiHEN plugin that allows you to change resolution and FPS cap of PS Vita games (to get better visuals, higher FPS or longer battery life).
VitaGrafix was originally, in it’s early days, based on vitaRescale by Rinnegatamante (which was unfortunately quickly abandoned), with hardcoded patches only for a dozen of games.
The project has evolved quite a bit since then. It is now an independent taiHEN plugin with custom interpreter to easily support user-made patches. The official patchlist contains support for over 50 games.
Note: Per-game patches are required. Some are easy to patch, others plainly impossible.
What VitaGrafix does
It patches eboot.bin executable on game start-up, allowing us to alter game’s graphics initialization and runtime code. Because each game does this differently, per-game patches are required.
Media
Screenshots
How To Install VitaGrafix
- Download latest VitaGrafix.suprx on gamebrew or from the releases section and ioPlus.skprx (v0.1) from ioPlus Vita
- If ux0:tai/config.txt file does exist
- Copy VitaGrafix.suprx and ioPlus.skprx to ux0:tai/ directory
- Open ux0:tai/config.txt in a text editor
- Add following lines to the file
*KERNEL ux0:tai/ioPlus.skprx *ALL ux0:tai/VitaGrafix.suprx
- Otherwise (e.g. if you are using SD2VITA mounted as ux0)
- Copy VitaGrafix.suprx and ioPlus.skprx to ur0:tai/ directory
- Open ur0:tai/config.txt in a text editor
- Add following lines to the file
*KERNEL ur0:tai/ioPlus.skprx *ALL ur0:tai/VitaGrafix.suprx
- Create ux0:data/VitaGrafix/ folder
- Download patchlist.txt from HERE and move it to the folder
- Create and open ux0:data/VitaGrafix/config.txt file
- Add games to the config you wish to apply patches for (refer to your patchlist.txt)
VitaGrafix's Configuration
You can configure every game separately using unified configuration file.
ux0:data/VitaGrafix/config.txt
MAIN section
- This section applies to all games, unless specific entry for a game exists. Available options are listed below.
[MAIN] # Same options as in GAME section are permitted here.
GAME section
- This section applies to a single game. These options override the [MAIN] section (for that game). Each game supports different options! Refer to the compatibility table of your patchlist.txt
Example:
[PCSA00001] # options...
TIP: Because collections share one TITLE ID for multiple games, you might want to configure each game individually. To do that you need to specify game's .self path/name (and optionally NID). If you're not sure what those are, check patchlist.txt, it uses the same header format.
[PCSA00001, GOW1.self, 0x12345678]
↑ | ||
---|---|---|
PCSA00001 | game's TITLE ID | required |
GOW1.self | a part of executable's full path | optional |
0x12345678 | main module NID, 8 hex digits with '0x' prefix | optional |
Patchlist For VitaGrafix
Collection of patches for VitaGrafix below.
How To Install VitaGrafix's Patchlist
- Download raw patchlist.txt
- optionally download files in patch/ folder, these are separated due to their larger size (100+ lines for one game)
- Copy it to ux0:/data/VitaGrafix/
- patch/ files go into ux0:/data/VitaGrafix/patch/
- Configure your game by editing ux0:/data/VitaGrafix/config.txt or by using VitaGrafixConfigurator
Supported games
Game | Title ID(s) | Supported features | Game defaults | Notes.............. | |
---|---|---|---|---|---|
Assassin's Creed III: Liberation | PCSB00074 PCSE00053 |
Internal res. FPS cap. |
720x408 30 |
||
Asphalt: Injection | PCSB00040 PCSE00007 |
Framebuffer FPS cap |
720x408 50 |
||
Atelier Firis: The Alchemist and the Mysterious Journey | PCSB01087 PCSE01044 |
Internal res. | 960x442 | ||
Atelier Lydie & Soeur: Fushigi na Kaiga no Renkinjutsu Samurai | PCSG01116 | Internal res. | 960x442 | ||
Atelier Shallie Plus: Alchemists of the Dusk Sea | PCSB01043 PCSE00998 |
Internal res. | 960x408 | ||
Atelier Sophie: The Alchemist of the Mysterious Book | PCSB00973 PCSE00892 |
Internal res. | 960x442 | ||
Blue Reflection: Maboroshi ni Mau - Shoujo no Ken | PCSG00987 | Internal res. | 960x442 | ||
Borderlands 2 | PCSF00570 PCSF00576 |
Framebuffer | 960x544 | ||
Catherine: Full Body | PCSG01179 | Internal res. | 720x408 | ||
Dead or Alive 5 Plus | PCSB00296 PCSE00235 |
Internal res. | 720x408 | ||
Dead or Alive Xtreme 3: Venus | PCSG00773 PCSH00250 |
2x Internal res. | 736x416, 640x368 | ||
Deception IV: Blood Ties Kagero: Darkside Princess |
PCSB00499 PCSE00401 |
3x Internal res. | 960x544, 720x408, 640x368 | ||
Deception IV: The Nightmare Princess Kagero: Mou Hitori no Princess |
PCSB00829 PCSE00743 |
3x Internal res. | 960x544, 720x408, 640x368 | ||
Disney Epic Mickey 2: The Power of Two | PCSF00308 PCSF00309 |
Internal res. | 720x408 | ||
Dragon Ball Z: Battle of Z | PCSB00396 PCSE00305 |
Internal res. | 704x448 | ||
Dragon Quest Builders | PCSB00981 PCSE00912 |
Internal res. FPS cap |
720x408 60 |
||
Dungeon Hunter: Alliance | PCSB00041 PCSE00008 |
Internal res. | 702x408 | ||
Fantasy Hero: Unsigned Legacy | PCSB00663 PCSE00536 |
Framebuffer | 720x408 | ||
Fate/EXTELLA (The Umbral Star) | PCSB01030 PCSE00928 |
Internal res. | 720x408 | ||
Fate/EXTELLA LINK | PCSE01254 PCSG01091 |
Internal res. | 720x408 | ||
F1 2011 | PCSB00027 PCSE00002 |
Internal res. | 640x384 | ||
God of War Collection | PCSF00438 PCSA00126 |
Framebuffer FPS cap |
720x408 30 |
||
Gundam Breaker 2 | PCSG00412 PCSH00132 |
Internal res. | 720x408 | ||
Hatsune Miku: Project Diva f | PCSB00419 PCSE00326 |
Internal res. FPS cap |
640x352 30 |
#120, #81 | |
Hatsune Miku: Project Diva f 2nd | PCSB00554 PCSE00434 |
Internal res. FPS cap |
720x408 30 |
#120, #80 | |
Hatsune Miku: Project Diva X | PCSB01007 PCSE00867 |
Internal res. | 720x408 | ||
Helldivers | PCSF00465 PCSA00134 |
Framebuffer | 960x544 | #82 | |
I am Setsuna | PCSG00756 | FPS cap | 30 | ||
Injustice: Gods Among Us | PCSB00356 PCSE00271 |
Framebuffer | 720x408 | #82 | |
Jak and Daxter: The Precursor Legacy | PCSF00247 PCSF00248 |
Framebuffer FPS cap |
720x408 20 |
||
Jak II | PCSF00247 PCSF00249 |
Framebuffer | 720x408 | ||
Jak 3 | PCSF00247 PCSF00250 |
Framebuffer | 720x408 | ||
J-Stars Victory Vs | PCSG00300 | Internal res. | 768x448 | ||
J-Stars Victory Vs+ | PCSB00713 PCSE00595 |
Internal res. | 768x448 | ||
Kidou Senshi Gundam Seed: Battle Destiny | PCSG00040 | Internal res. FPS cap |
704x384 30 |
||
Killzone: Mercenary | PCSF00243 PCSF00403 |
Internal res. FPS cap |
Dynamic 30 |
||
LEGO Batman 3: Beyond Gotham | PCSB00563 PCSE00442 |
Internal res. | 640x368 | ||
LEGO Harry Potter: Years 5–7 | PCSB00103 PCSE00057 |
Framebuffer | 640x368 | #3 | |
LEGO Jurassic World | PCSB00703 PCSE00587 |
Internal res. | 640x368 | ||
LEGO Marvel Super Heroes: Universe in Peril | PCSB00315 PCSE00250 |
Internal res. | 640x368 | ||
LEGO Marvel's Avengers | PCSB00764 PCSE00670 |
Internal res. | 640x368 | ||
LEGO Ninjago: Shadow of Ronin | PCSB00706 PCSE00534 |
Internal res. | 640x368 | ||
LEGO Star Wars: The Force Awakens | PCSB00877 PCSE00791 |
Internal res. | 640x368 | ||
LEGO The Hobbit | PCSB00503 PCSE00390 |
Internal res. | 640x368 | ||
LittleBigPlanet | PCSF00021 PCSA00017 |
Internal res. | 720x408 | #24 | |
Lumines: Electronic Symphony | PCSB00061 PCSE00009 |
FPS cap | 30 | ||
Macross Delta Scramble | PCSG00947 | Internal res. | 800x448 | ||
Mahouka Koukou no Rettousei: Out of Order | PCSG00456 | Internal res. FPS cap |
720x408 30 |
||
Minecraft: PlayStation Vita Edition | PCSB00560 PCSE00491 |
Framebuffer FPS cap |
720x408 60 |
||
Miracle Girls Festival | PCSG00610 | Internal res. | 720x408 | ||
MotoGP 13 | PCSB00316 PCSE00409 |
Internal res. | 704x448 | ||
MotoGP 14 | PCSB00498 PCSE00529 |
Internal res. | 704x448 | ||
MUD - FIM Motocross World Championship | PCSB00182 PCSE00219 |
Internal res. | 704x448 | ||
MXGP: The Official Motocross Videogame | PCSB00470 PCSE00530 |
Internal res. | 704x448 | ||
Need for Speed: Most Wanted | PCSB00183 PCSE00089 |
Internal res. | 640x368 | ||
Nelke to Densetsu no Renkinjutsushi Tachi: Aratana Daichi no Atelier | PCSG01223 | Internal res. | 960x442 | ||
Ninja Gaiden Sigma 2 Plus | PCSB00294 PCSE00233 |
2x Internal res. | 864x480, 640x416 | ||
Oddworld: Munch's Oddysee HD | PCSB00275 PCSE00369 |
FPS cap | 30 | ||
One Piece: Burning Blood | PCSB00893 PCSE00808 |
Internal res. | 704x384 | ||
Persona 4 Golden | PCSB00245 PCSE00120 |
Internal res. | 840x476 | ||
Phantasy Star Nova | PCSG00351 PCSH00143 |
Internal res. | 960x544 | ||
Project Root | PCSB00650 PCSE00486 |
FPS cap | 30 | ||
Puella Magi Madoka Magica: The Battle Pentagram | PCSG00214 | Internal res. FPS cap |
704x448 30 |
||
Ratchet & Clank | PCSF00484 PCSF00482 |
Framebuffer | 720x408 | ||
Ratchet & Clank 2: Locked and Loaded / Going Commando | PCSF00485 PCSF00482 |
Framebuffer | 720x408 | ||
Ratchet & Clank 3 / Up Your Arsenal | PCSF00486 PCSF00482 |
Framebuffer | 720x408 | ||
Ratchet & Clank: QForce / Full Frontal Assault | PCSF00191 PCSA00086 |
Framebuffer | 720x408 | ||
Resident Evil: Revelations 2 | PCSF00728 PCSE00608 |
Internal res. | 720x408 | ||
RESOGUN | PCSF00262 PCSA00103 |
Framebuffer | 720x408 | ||
Ridge Racer | PCSB00048 PCSE00001 |
Internal res. | 720x408 | ||
Sly Cooper and the Thievius Raccoonus | PCSF00269 PCSF00338 |
Framebuffer FPS cap |
720x408 30 |
||
Sly Cooper 2: Band of Thieves | PCSF00270 PCSF00338 |
Framebuffer FPS cap |
960x544 30 |
||
Sly Cooper 3: Honor Among Thieves | PCSF00271 PCSF00338 |
Framebuffer FPS cap |
960x544 30 |
||
Sly Cooper: Thieves in Time | PCSF00156 PCSF00206 |
FPS cap | 30 | ||
Soul Sacrifice | PCSF00178 PCSA00092 |
Internal res. | 720x408 | ||
Soul Sacrifice Delta | PCSF00532 PCSA00152 |
Internal res. | 720x408 | ||
Spy Hunter | PCSB00166 PCSE00068 |
Framebuffer FPS cap |
640x368 30 |
||
SteamWorld Heist | PCSB00693 PCSE00583 |
FPS cap | 30 | ||
Street Fighter X Tekken | PCSB00144 PCSE00005 |
Internal res. | 640x480 | ||
Summon Night 6: Lost Borders | PCSB01013 PCSE00951 |
MSAA | 2x | ||
Supremacy MMA: Unrestricted | PCSE00012 | Internal res. | 720x408 | ||
The Amazing Spider-Man | PCSB00428 PCSE00333 |
Internal res. FPS cap |
704x400 60 |
||
The Legend of Heroes: Trails of Cold Steel Eiyuu Densetsu: Sen no Kiseki |
PCSB00866 PCSE00786 |
Internal res. | 720x408 | ||
The Legend of Heroes: Trails of Cold Steel II Eiyuu Densetsu: Sen no Kiseki II |
PCSB01016 PCSE00896 |
Internal res. MSAA |
720x408 2x |
||
The LEGO Movie Videogame | PCSB00553 PCSE00353 |
Internal res. | 640x368 | ||
Tokyo Xanadu | PCSB01062 PCSE00893 |
Internal res. MSAA |
720x408 2x |
||
Ukiyo no Roushi | PCSG00480 | Internal res. FPS cap |
704x384 30 |
||
Urban Trial Freestyle | PCSB00038 PCSE00051 |
Framebuffer | 720x408 | ||
Utawarerumono: Mask of Deception / Itsuwari no Kamen | PCSB01093 PCSE00959 |
Internal res. | 672x384 | ||
Utawarerumono: Mask of Truth / Futari no Hakuoro | PCSB01145 PCSE01102 |
Internal res. | 672x384 | ||
Utawarerumono: Chiriyuku Mono he no Komoriuta | PCSG01079 | Internal res. | 672x384 | ||
Valhalla Knights 3 | PCSB00432 PCSE00244 |
Internal res. | 640x384 | ||
Valhalla Knights 3 GOLD | PCSG00307 | Internal res. FPS cap |
640x384 30 |
||
Wipeout 2048 | PCSF00007 PCSA00015 |
14x Internal res. FPS cap |
up to 960x544 30 |
||
World of Final Fantasy | PCSB00951 PCSE00880 |
Internal res. | 640x384 | ||
WRC 3: FIA World Rally Championship | PCSB00204 PCSE00242 |
Internal res. | 704x448 | ||
WRC 4: FIA World Rally Championship | PCSB00345 PCSE00411 |
Internal res. | 704x448 | ||
WRC 5: FIA World Rally Championship | PCSB00762 PCSE00667 |
Framebuffer | 960x544 | ||
Ys: Memories of Celceta | PCSB00497 PCSE00245 |
Internal res. | 720x408 | ||
Ys Origin | PCSB01081 PCSE01033 |
FPS cap | 30 | ||
Ys VIII: Lacrimosa of Dana | PCSB01128 PCSE01103 |
3x Internal res. FPS cap |
960x512, 840x476, 720x320 30 |
Supported games (patch/)
These require patchlist.txt as well as additional files located in patch/ folder.
Game | Title ID(s) | Supported features | Game defaults | Notes.............. | |
---|---|---|---|---|---|
Mortal Kombat | PCSB00106 PCSE00023 |
Framebuffer | 640x368 | PCSB00106.txt | |
Uncharted: Golden Abyss | PCSF00001 PCSF00012 |
Internal res. | 768x384 | PCSF00001.txt |
- no known issues
- playable, but with some minor issues (check Issues section)
Adding support for each and every game requires manual disassembly of game's binary to find addresses in the game code where the resolution is set. Some are easy to patch, others plainly impossible.
FAQ
- Encountered a bug? Feel free to open a Github issue here.
- Found a new patch? I'll gladly include it in here :) Just open a new issue or create a merge request.
Available options When Using VitaGrafix
The format is OPTION=VALUE
, each on a separate line.
option | description | valid values | default |
---|---|---|---|
ENABLED | Enables/disables game modifications (and OSD). | ON: 1 , on or true OFF: |
ON |
OSD | Enables/disables the small overlay that is shown during first few seconds when starting a game. |
ON: 1 , on or true OFF: |
ON |
LOG | Enables/disables logging (to ux0:data/VitaGrafix/log.txt file) |
ON: 1 , on or true OFF: |
ON |
FB | Framebuffer resolution | ON:
|
OFF |
IB | Internal buf. resolution | ON:
|
OFF |
FPS | Frames per second cap (upper limit) | ON:
|
OFF |
MSAA | Multisample anti-aliasing | ON:
|
OFF |
TIP: If you leave some options out, the plugin will use their default values.
TIP: If patch supports multiple IB res. and you don't specify them all, the last WxH
will be used for those that would go after. It is therefore perfectly fine to just use IB=960x544
to set them all to 960x544 (e.g. to disable dynamic res. scaling) in such situations.
Comments
Comments always start with # character. They can, but don't need to be on a separate line.
# This is a comment [PCSA00001] # This is also a valid comment ...
Example config.txt
[MAIN] # Set default options for all games FB=960x544 IB=960x544 FPS=60 MSAA=4x # Persona 4 Golden [EU], disable osd # Notice that IB=960x544 is redundant here as it is # the same resolution as the 'fallback' one in [MAIN] section above. # This of course doesn't cause any harm. [PCSB00245] OSD=0 IB=960x544 # Ninja Gaiden Sigma 2 Plus, uses dynamic resolution scaling # and switches between two specified IB resolutions when patched # (based on framerate) # Override the [MAIN] IB resolution(s) for this game. [PCSB00294] IB=960x544,720x408 # LittleBigPlanet res. patch introduces some glitches, # let's disable it here. [PCSA00017] ENABLED=0 # GoW 2 won't reach 60 FPS @ 960x544 very often, so let's # keep it locked to 30 (default FPS cap). [PCSF00438, GOW2.self] FPS=OFF # I think you get what this does by now. [PCSB00204] IB=OFF
Advanced - The VG Language
To facilitate user-made game patches without having to recompile the whole plugin, a domain specific language was created. Similar, but somewhat simplified to that of VitaCheat.
Written in patchlist.txt, patches are parsed and applied during game boot-up.
Section header
A patch for each game starts with a header. Header identifies SKU/region (TITLE ID), the executable name (because several “collections” use the same TITLE ID for multiple games in their series) and the game version (indirectly, in a form of module NID).
[PCSA00001, eboot.bin, 0x12345678]
↑ | ||
---|---|---|
PCSA00001 | game's TITLE ID | required |
eboot.bin | a part of executable's full path | recommended |
0x12345678 | main module NID, 8 hex digits with '0x' prefix | recommended |
Executable name/path is used to differentiate between games that share a single TITLE ID (e.g. collections).
NID is used to inform user about potentional version mismatch (e.g. when game gets a new update), instead of applying patches to wrong/old memory addresses and then crashing.
If multiple regions/SKUs share the same offsets, having to duplicate patches would be wasteful. You can freely stack multiple headers after each other, like shown below. Patches will then be applied for all matching games/regions.
[PCSA00001, eboot.bin, 0x12345678] [PCSB00023, eboot.bin, 0x87654321] ...
Feature type
Header is followed by patch feature/type marking. This indicates that subsequent patches shall only be applied if user has enabled said feature in their configuration file.
Use one of the following:
@FB @IB @FPS @MSAA
Patches
The rules for patches are simple. Each patched memory location is on a separate line, starts with a relative address (segment:offset) followed by the new value.
0:0x1234 0xDEADBEEF
Datatypes
VitaGrafix internally always works with one of the following datatypes:
- Primitive types:
- int (32-bit signed integer)
- uint (32-bit unsigned integer)
- float (32-bit floating point number)
- Raw type:
- bytes (size up to 32 B)
You can cast between those types freely using casting functions (see Explicit type conversion).
Immediate values are always parsed as
- int – when
+
or-
sign precedes 1 or more decimal digits (with no space inbetween)- OK -
+1
,-1
- KO -
+ 1
- OK -
- uint – when:
- hex number is prefixed with
0x
or0X
- octal number is prefixed with
0
- decimal integer does not have prefix or suffix
- OK -
0xCAFE
,0876
,123
- KO -
CAFE
- hex number is prefixed with
- float – when 1 or more decimal digits (optionally with preceding
+
or-
sign) are followed by:.
and optionally:- 1 or more digits after the decimal point and optionally
f
f
- 1 or more digits after the decimal point and optionally
f
- OK -
1.
,1.2
,1.2f
,1f
,1.f
,-1.0
,-2f
,+123.4f
- KO -
.1
,.1f
,1 . 0 f
- bytes – when 1 or more (up to 32) 8-bit hex values (without the 0x prefix) are followed by
r
- OK -
DEADr
,DE AD r
- KO -
DEAD
,0xDEADr
,0xDE 0xAD r
- OK -
Implicit type conversion
The interpreter makes use of implicit conversion when necessary. This is done when applying infix operator or math function (arity >= 2) to following operand types (in no particular order):
operand 1 | operand 2, 3, ... | result | example | |
---|---|---|---|---|
float | int or uint | all casted to float | float | 100 / 2.0 equals 50.0
|
int | uint | all casted to int | int | 100 / -2 equals -50
|
uint | uint | ONLY if result is < 0 | int | 1 - 2 equals -1
|
any | any | ONLY when applying . (concat)
|
bytes | 1 . 2 equals 0100000002000000r
|
Explicit type conversion
While working with values, changing the datatype manually might sometimes be desirable.
To convert value of any type to one of the primitive types use following functions:
function | argument type | result type | example |
---|---|---|---|
int(value) | any | int | int(-2.0) equals -2
|
uint(value) | any | uint | uint(FFr) equals 255
|
float(value) | any | float | float(2) equals 2.0
|
To convert value of any type to raw type use:
function | argument type | result type | result size (B) | example |
---|---|---|---|---|
int8(value) | any | bytes | 1 | int8(-128) equals 80 r
|
int16(value) | any | bytes | 2 | int16(-32768) equals 00 80 r
|
int32(value) | any | bytes | 4 | int32(-2147483648) equals 00 00 00 80 r
|
uint8(value) | any | bytes | 1 | uint8(255) equals FF r
|
uint16(value) | any | bytes | 2 | uint16(65535) equals FF FF r
|
uint32(value) | any | bytes | 4 | uint32(4294967295) equals FF FF FF FF r
|
fl32(value) | any | bytes | 4 | fl32(12345.0) equals 00 E4 40 46 r
|
If you don't wish to cast the value, but rather just reinterpret bytes, use:
function | value type | result type | result size (B) | example |
---|---|---|---|---|
raw(value) | any | bytes | sizeof(value) | raw(1.0 >> 16) equals 80 3F 00 00 r
|
rawn(value, n) | any | bytes | n | rawn(1.0 >> 16, 2) equals 80 3F r
|
Infix operators
Operator precedence is honored, order is similar to C-like languages. Brackets (parentheses) are allowed and evaluated first.
operator | operand type | description | example |
---|---|---|---|
+ | primitive | addition | 1 + 2 equals 3
|
- | primitive | subtraction | 1 - 2 equals -1
|
* | primitive | multiplication | 2 * 3 equals 6
|
/ | primitive | division | 3 / 2.0 equals 1.5
|
% | int or uint | modulo (division remainder) | 123 % 23 equals 8
|
| | primitive | bitwise OR | 5 equals 15
|
^ | primitive | bitwise XOR | 14 ^ 5 equals 11
|
& | primitive | bitwise AND | 14 & 5 equals 4
|
<< | primitive | bitwise left shift | 14 >> 2 equals 3
|
>> | primitive | bitwise right shift | 14 << 2 equals 56
|
. | raw | concatenation | DEr . ADr equals DE AD r
|
* | primitive * raw | raw repeat | nop * 2 equals 00 BF 00 BF r
|
Math functions
function | description | example |
---|---|---|
abs(value) | absolute value | abs(-1.0) equals 1.0
|
acos(rad) | arc cosine (inverse cosine) in radians | acos(-0.5) equals 2.094395
|
align(value, al) | aligns value to a multiple of al | align(720, 32) equals 736
|
asin(rad) | arc sine (inverse sine) in radians | asin(0.5) equals 0.523599
|
atan(rad) | arc tangent (inverse tangent) in radians | atan(1.0) equals 0.785398
|
atan2(y, x) | arc tangent of y/x in radians | atan2(0.5, 0.4) equals 0.896055
|
ceil(value) | nearest integer greater than value | ceil(1.23) equals 2.0
|
cos(rad) | cosine in radians | cos(0.5) equals 0.877583
|
cosh(rad) | hyperbolic cosine in radians | cosh(0.5) equals 1.127626
|
exp(value) | exponential (Euler's number) raised to value | exp(2.0) equals 7.389056
|
floor(value) | nearest integer lesser than value | floor(1.23) equals 1.0
|
ln(value) | natural logarithm of value | ln(10.0) equals 2.302585
|
log10(value) | base 10 logarithm of value | log10(10.0) equals 1.0
|
min(a, b) | the smaller of a and b | min(123, 23) equals 23
|
max(a, b) | the greater of a and b | max(123, 23) equals 123
|
pow(base, power) | base raised to the power | pow(2, 4) equals 16
|
round(value) | nearest integer to value (0.5 rounds up) | round(1.23) equals 1.0
|
sin(rad) | sine in radians | sin(0.5) equals 0.479426
|
sinh(rad) | hyperbolic sine in radians | sinh(0.5) equals 0.521095
|
sqrt(value) | square root of value | sqrt(10.0) equals 3.162278
|
tan(rad) | tangent in radians | tan(0.5) equals 0.546302
|
tanh(rad) | hyperbolic tangent in radians | tanh(0.5) equals 0.462117
|
Math constants
constant | description | defined as |
---|---|---|
pi | The number π | 3.141593
|
e | Euler's number | 2.718282
|
User configuration macros
These return values based on user configuration entry (in config.txt) for current game.
macro | description | config option |
---|---|---|
fb_w | Framebuffer width in pixels | FB |
fb_h | Framebuffer height in pixels | FB |
ib_w | Internal buf. width in pixels | IB |
ib_h | Internal buf. height in pixels | IB |
ib_wi(index) | Internal buf. width in pixels (indexed from 0) | IB (multiple) |
ib_hi(index) | Internal buf. height in pixels (indexed from 0) | IB (multiple) |
vblank | Vertical blanking interval (1 for 60Hz, 2 for 30, etc...) | FPS |
msaa | SceGxmMultisampleMode (0 for no MSAA, 1 for 2x, 2 for 4x) | MSAA |
Instruction encoders
These encode few of the commonly used instructions. Result type is always raw, size depends on encoder. All are unconditional.
Register arguments are expected to be decimal integers.
ARM within 0 <= reg <= 14 range, where 0 denotes R0 or A1, 13 = SP and 14 = LR.
VFP within 0 <= reg <= 31 range, where 0 denotes S0.
encoder | description | instr. set (enc.) |
size (B) |
---|---|---|---|
t1_mov(reg, imm) | Insert an immediate value to a register.
|
Thumb (T1) |
2 |
t2_mov(sf, reg, imm) | Insert an immediate value to a register.
|
Thumb-2 (T2) |
4 |
t3_mov(reg, imm) | Insert an immediate value to a register.
|
Thumb-2 (T3) |
4 |
t1_movt(reg, imm) | Insert 16-bit immediate value to the top halfword of a register. Bottom halfword is not affected. |
Thumb-2 (T1) |
4 |
mov32(reg, imm, gap) | Pseduo-instruction, generates MOVW, MOVT pair, allows you to load any 32-bit value into a register. |
Thumb-2 (T3 + T1) |
4 + gap + 4 |
a1_mov(sf, reg, imm) | Insert an immediate value to a register.
|
Arm (A1) |
4 |
a2_mov(reg, imm) | Insert an immediate value to a register.
|
Arm (A2) |
4 |
t2_vmov(reg, imm) | Insert a floating-point immediate value in a single-precision register.
|
VFPv3 (T2/A2) |
4 |
bkpt | Breakpoint (enter debug state).
|
Thumb (T1) |
2 |
nop | No operation.
|
Thumb-2 (T1) |
2 |
Comments
Comments always start with # character. They can, but don't need to be on a separate line.
# This is a comment [PCSA00001, eboot.bin, 0x12345678] # This is also a valid comment ...
Backwards compatibility with v4.x
All older patches are compatible with v5.x, however, support for the old syntax/style might be dropped in future versions. It is highly advised to use the new syntax for new patches.
Changes:
v4.x: nop()
and bkpt()
encoders must have brackets
v5.x: nop
and bkpt
encoders are classified as constants, constants do not have brackets
example:
nop()
=>nop
v4.x: no support for math operators/fns/precedence, macros start with < and end with >
v5.x: infix operators and math functions are available
example:
<+,1,2>
=>1 + 2
<*,<&,<+,<fb_w>,31>,0xFFFFFFE0>,4>
=>align(fb_w, 32) * 4
v4.x: config-option macros start with < and end with >
v5.x: config-option macros are used just like regular constants and functions
example:
<fb_w>
=>fb_w
<ib_w>
=>ib_w
<ib_w,2>
=>ib_wi(2)
v4.x: no extra spaces are allowed, comments have to be on a separate line
v5.x: spaces are ignored, anything after # too (until EOL)
example:
t2_mov(1,1,<fb_w>)
=>t2_mov(1, 1, fb_w)
# Comment
0:0x1234 nop
is valid just like 0:0x1234 nop # Comment
v4.x: bytes() is used to parse raw bytes
v5.x: r suffix is used to parse raw bytes, raw() is used for reinterpreting/conversion
example:
bytes(DE AD BE EF)
=>DEADBEEF r
and more...
Examples
Here are some examples of valid patches.
[PCSF00243,eboot.bin] # Killzone Mercenary [EU 1.12] [PCSF00403,eboot.bin] # Killzone Mercenary [EU 1.12] [PCSA00107,eboot.bin,0x0F9D3B7C] # Killzone Mercenary [US 1.12] [PCSC00045,eboot.bin] # Killzone Mercenary [JP 1.12] [PCSD00071,eboot.bin] # Killzone Mercenary [ASIA 1.12] @IB 0:0x15A5C8 nop *4 1:0xD728 uint32(ib_w) . uint32(ib_h) 1:0xD730 uint32(ib_w) . uint32(ib_h)
# God of War Collection [EU 1.00] [PCSF00438,GOW1.self,0x8638ffed] @FB 0:0x9E212 t2_mov(1, 4, fb_w) 0:0x9E21A t2_mov(1, 2, fb_h) 0:0x9F0F0 t2_mov(1, 0, fb_w) 0:0x9F0F8 t2_mov(1, 1, fb_h) 0:0xA31C6 t2_mov(1, 7, fb_w) 0:0xA31CC t2_mov(1, 1, fb_h) 0:0xCEF06 t2_mov(1, 0, fb_w) 0:0xCEF0E t2_mov(1, 2, fb_h) 0:0xA1098 t2_mov(1, 14, fb_h) @FPS 0:0x9E228 t1_mov(0, vblank)
# LEGO Star Wars: The Force Awakens [EU 1.00] [PCSB00877,eboot.bin] @IB 0:0x2241C4 t2_mov(1, 1, 0xA00000) 0:0x1F313E t2_mov(1, 4, ib_w) 0:0x1F3144 t2_mov(1, 5, ib_h) 1:0x4650 uint32(ib_w) . uint32(ib_h) # Fix touchscreen/touchpad pos calc 0:0x223AF6 t2_mov(0, 0, 640) . nop *3 0:0x223B36 t2_mov(0, 0, 368) . nop *3
IO/patcher/syntax errors
The parser will try to warn you if you make a mistake. Nevertheless, it isn't perfect so you shouldn't rely on it.
Example:
Changelog
(v.5.0.2)
- Fixed a bug where "Your game version is not supported" message would not appear if you had a different game version to that of a patch
(v.5.0.1)
- Fixed bug where last IB res. in config.txt was not propagated, causing crash in multi-res. games (e.g. those with dynamic scaling such as Wipeout 2048)
- Added support for manual redirection to alternate patch file (aka. !USE directive in patchlist.txt)
(v.5.0.0)
- Vastly improved UX (UI, logging, error reporting, etc...)
- Rewritten parser/interpreter from scratch - revamped patchlist.txt syntax (compatible with v4.x patches)
- Added support for per-self headers in config.txt
- Now you can use separate options for each game in "collections" with single Title ID (e.g. GoW 1/2)
- Added internal log buffer - reduced game startup times due to I/O stall
- Added config.txt option to disable logging altogether
- Added support for 20 FPS option in config.txt
- Added support for individual per-game patchlists (e.g. ux0:data/VitaGrafix/patch/PCSF00001.txt)
- Added support for inline comments on the same line as code
- Bug fixes
(v.4.1.1)
- Fixed bug where [MAIN] options were ignored in some occasions.
- Minor UI QoL improvements
- Config/patchlist parsing is now case-insensitive
- [MAIN] accepts same options as GAME section - the latter takes precedence if both are present. You can set your FB/IB/FPS/etc.. in [MAIN], those will be used as default values.
- Added support for Arm A2 MOVW encoding (a2_mov) in patchlist.txt
(v.4.0)
- Hardcoded patches were removed, which means, updates to VitaGrafix plugin in the future will only bring new feature support / bug fixes.
- All game related stuff, new game support, fixes, etc... will be available here: VitaGrafixPatchlist (changelog)
- Download patchlist.txt (or make your own) and place it in ux0:data/VitaGrafix/
(v.3.2)
- Game support:
- Wipeout 2048 [EU/US/JP/ASIA] - 14x IB resolution - game uses dynamic res. scaling, you can specify up to 14 IB resolutions to override the default ones (or just 1 to disable the scaling completely)
- Fate/EXTELLA LINK [JP/ASIA] - IB resolution
- Assassin's Creed III: Liberation [EU/US] - IB resolution + FPS cap
Thanks to @FormerNoob:
- The Legend of Heroes: Trails of Cold Steel [EU/US/JP/ASIA] - IB resolution
- The Legend of Heroes: Trails of Cold Steel II [EU/US/JP/ASIA] - IB resolution
- Dead or Alive Xtreme 3: Venus [JP/ASIA] - 2x IB resolution - uses dynamic scaling
Thanks to @nigelweng:
- Resident Evil: Revelations 2 [EU/US/JP] - IB resolution
(v.3.1.1)
- Fixed bug where Jak & Daxter Collection [EU/US] would show 'game version unsupported' message in the game shell (Jak 1, 2, 3 game selection menu).
- Fixed crash when only one IB resolution was specified for Ninja Gaiden Sigma 2 Plus.
- Fixed issue where World of Final Fantasy would not show any special effects at 960x544 (hopefully).
- Fixed log messages line feed.
(v.3.1)
- New game support:
- Sly Cooper Collection (1, 2, 3) [EU/US] - FB res. + FPS cap
- Sly Cooper Thieves in Time [EU/US] - FPS cap
- Ninja Gaiden Sigma 2 Plus [EU/US/JP] - 2x IB res. (game uses dynamic scaling, you need to specify two res. e.g. IB=960x544,720x408)
- Dragon Quest Builders [EU/US/JP/ASIA] - FPS cap (you can force 30 FPS lock)
- Ratchet & Clank Collection (1, 2, 3) [EU/US] - FB res.
- Ratchet & Clank Full Frontal Assault / QForce [EU/US] - FB res.
- Utawarerumono: Chiriyuku Mono he no Komoriuta [JP] - IB res.
- Dragon Ball Z: Battle of Z [EU/US/JP] - IB res.
New region support:
- Borderlands 2 [EU-2] (PCSF00576) - FB res.
Fixes:
- LEGO Star Wars: The Force Awakens [EU/US] - now playable at 960x544 without crashes
Known issues:
- Ratchet & Clank 2 + 3 has some UI clipping issues. #16
(v.2.4)
- Game support
- Added Hatsune Miku: Project Diva f [EUR/USA/JPN] internal res. patch
- Added Hatsune Miku: Project Diva f 2nd [EUR/USA/JPN/ASA] internal res. + FPS cap patch
- Added Hatsune Miku: Project Diva X [EUR/USA/ASA] internal res. patch
- Added The Amazing Spider-Man [EUR] internal res. + FPS cap patch
- Added Sly Cooper and the Thievius Raccoonus [USA] framebuffer res. + FPS cap patch
- Fixed the issue in Killzone: Mercenary where (controller) input didn't work at >59 fps.
Known issues
- The Amazing Spider-Man: Only few IB resolutions work properly. 960x544 causes GPU crash in some areas.
(v.2.3)
- Game support
- Added MotoGP 13 [EUR/USA] internal res. patch
- Added MotoGP 14 [USA] internal res. patch
- Added WRC 5 [EUR] framebuffer res. patch
- Added Utawarerumono: Mask of Deception [EUR] internal res. patch
- Added Utawarerumono: Mask of Truth [EUR/USA/JPN] internal res. patch
- Added Dragon Quest Builders [EUR/USA/JPN/ASA] internal res. patch
(v.2.2)
- Game support
- Added Ridge Racer [EUR/USA/JPN] internal res. patch.
- Added Utawarerumono: Mask of Deception [USA/JPN] internal res. patch.
- Added World of Final Fantasy [JPN] internal res. patch.
- Added Dead or Alive 5 Plus [EUR/USA/JPN] internal res. patch.
- Added Miracle Girls Festival [JPN] internal res. patch.
- Added Jak and Daxter Collection [EUR/USA] framebuffer res. patch.
- Added Hatsune Miku: Project Diva f [EUR/USA/JPN] FPS cap patch.
Known issues
- World of Final Fantasy: Only few resolutions work properly. Default has been changed to 800x480 (known working res.).
- LEGO Star Wars: The Force Awakens: Crashes at native res (when opening pause menu, and possibly at other times too). Default has been changed to 720x408 (still higher than original 640x384).
- LittleBigPlanet: Particles don't render correctly at native res. Default has been changed to OFF.
- Hatsune Miku: Project Diva f: 60 FPS doubles menu animations speed. Gameplay remains normal.
(v.2.1)
- Game support
- Added F1 2011 [EUR] internal resolution patch
- Added LittleBigPlanet [EUR/USA/JPN/ASA] internal resolution patch
- Added Borderlands 2 [EUR/USA] framebuffer resolution patch
- Added Asphalt: Injection [EUR/USA] internal resolution patch
- Added LEGO Star Wars: The Force Awakens [EUR/USA] internal resolution patch
- Added World of Final Fantasy [EUR/USA/ASA] internal resolution patch
(v.2.0)
- Game support:
- Added Killzone Mercenary [EUR/USA/JPN/ASA] internal resolution patch
- Added WRC 3 [EUR] internal resolution patch*
- Added WRC 4 [EUR/USA] internal resolution patch*
- Added Persona 4 Golden [JPN] (PCSG00004) internal resolution patch
- Added God of War Collection [EUR/USA/JPN] framebuffer resolution + FPS cap patch (GoW 1 + 2)
- Added MUD - FIM Motocross World Championship [EUR] internal resolution patch
- Added MXGP: The Official Motocross Videogame [EUR/USA] internal resolution patch
Thanks to InquisitionImplied for finding the HEX edits
(v.1.3.1)
- Fixed P4G offsets for JPN+ASA (hopefully)
(v.1.3)
- Added Persona 4 Golden 476p -> 544p 3D resolution hack for ASA (PCSH00021). (thanks to /u/kane159)
- The plugin now shows OSD for a few seconds after starting the game.
(v.1.2)
- Added Persona 4 Golden 476p -> 544p 3D resolution hack for USA + JPN versions
(v.1.1)
- Added Persona 4 Golden [EUR] 476p -> 544p 3D resolution hack
(v.1.0)
- Add Killzone Mercenary 60 fps patch
Credits
I'd like to thank the following people who made this possible:
- Team Molecule for HENkaku/taiHEN
- Rinnegatamante for vitaRescale
- dots_tb for ioPlus Vita
- Gontko Productions for the VitaGrafix logo
- all the supporters and patch-makers :)
External links
- Github - https://github.com/Electry/VitaGrafix
- VitaDB - https://vitadb.rinnegatamante.it/#/info/396
- VitaGrafixPatchlist - https://github.com/Electry/VitaGrafixPatchlist