The Short Version
- taiHEN is for plugins
- taiHEN loads plugins by reading
ux0:tai/config.txtorur0:tai/config.txt ux0:andur0:will display in your Vita3K filesystem folder as the foldersux0andur0respectively- You write them with the colon (
:) because that's how a real Vita handles paths (likeC:\on Windows but with a forward slash:/)
- You write them with the colon (
- Plugins (
*.skprx/*.suprx) go inux0:tai/orur0:tai/. It doesn't matter which, but the paths inside the .txt matter.
Kubridge Quickstart Guide
- Download kubridge from https://github.com/bythos14/kubridge/releases/latest
- Put it in
ur0:tai/ - Create a file called config.txt in
ur0:tai/ - Add kubridge under
*KERNELsection like so:
# taiHEN config
*KERNEL
ur0:tai/kubridge.skprx
- Save the file
- That's all :)
PLEASE NOTE: NOT ALL PLUGINS WILL WORK!
PLEASE NOTE: NOT ALL PLUGINS WILL WORK!!
PLEASE NOTE: NOT ALL PLUGINS WILL WORK!!!
Introduction
From the main taiHEN repository, taiHEN (大変) is a CFW framework for PS Vita™. It acts as a common substrate for patching the system. taiHEN provides three main functions:
- It disables code signature checks to allow unsigned executables.
- It exposes kernel peek/poke syscalls to user applications and allows loading of kernel modules.
- Most importantly, it provides an API for hooking and replacing functions based off of substitute. The last point means that developers can add custom patches to kernel, system applications, and games alike.
In short, taiHEN allows more full access to the PS Vita system, allowing you to write plugins (also called modules), tweaks, modifications, and more. As stated, these plugins can be used to modify functions and data inside the kernel, system applications, retail games, and even homebrew. This allows for things such as accessing limited-time events (like in the case of mikuar and HATSUNE MIKU AR STAGE), creating game patches and cheats (such as with the tools provided by vitacheat), tweaking game graphics (with plugins like sharpscale), and more.
In pull #3855 initial support for loading taihen modules was added, allowing Vita3K to also take advantage of these plugins. This page serves to document the content of and usability of the current taihen HLE implementation.
Using taiHEN plugins
For the most part, using taiHEN plugins in Vita3K is the same as on a real PS Vita. There are two types of plugins: Kernel plugins (which end in .skprx) and User plugins (which end in .suprx). Notice the K versus the U in the file extensions.
The different types of plugins indicate which part of the operating system the plugin targets, with kernel plugins often targeting system/OS behavior and user plugins targeting apps, games, and even LiveArea. More than likely you will mostly use user plugins, though some homebrew may ask you to install plugins such as kubridge.
Plugins are loaded by reading from the file at ux0:tai/config.txt or ur0:tai/config.txt, and you can find these folders at the pref-path for your system. You should store your plugins in ur0:tai/ or ux0:tai/. Just pick one. Flip a coin if you have to.
On a real PS Vita, it's recommended to store your plugins and config.txt in ur0:tai/, since ur0: on a real PS Vita is internal storage as opposed to ux0:, which is often external storage (i.e. memory card, SD2Vita, USB drive, PSVSD, etc.). Since we aim to mirror taiHEN's behavior, Vita3K will first look for config.txt in ux0:, and if it is not present, will look for the file in ur0:.
Note: On the PS Vita, the filesystem is not unix-like. Each main "folder" (ux0, ur0, vs0, os0, pd0, etc.) can be thought of like Windows disks/drives, using a colon to denote the "disk", and are called "mount points". Each of these "folders" on a real PS Vita are more like virtual disks, and can be mounted and unmounted through various operations. Thus, you will see file paths start with ux0: or ux0:/.
It's not ux0/folder/path/, it's not ux0:\folder\path\, it is ux0:folder/path/ or ux0:/folder/path/.
Format of config.txt
An example config.txt file looks like this:
# ignored line starting with #
# Kernel plugins are started with taiHEN and are in this section
*KERNEL
ur0:app/MLCL00001/henkaku.skprx
ur0:path/to/another.skprx
ur0:tai/plugin3.skprx
ur0:data/tai/plugin4.skprx
# titleid for SceSettings
*NPXS10015
ur0:app/MLCL00001/henkaku.suprx
ur0:data/tai/some_settings_plugin.suprx
# titleid for Package Installer
*NPXS10031
ur0:path/to/some_pkg_installer_plgin.suprx
# Gravity Rush (USA)
*PCSA00011
ur0:tai/game_plugins/vitagrafix.suprx
# titleid for SceShell is special (does not follow the XXXXYYYYY format)
*main
ur0:app/MLCL00001/henkaku.skprx
ur0:data/tai/shell_plgin.skprx
*ALL
ur0:tai/vitagrafix.suprx
Plugins are declared by writing their path in the config file under a Title ID or other special identifier, indicating which game, app, or other process to inject the plugin into. A line declaring an identifier should start with an asterisk (*). Any line that begins with a hashtag/pound sign is treated as a comment, and will be ignored. Because of this, disabling a plugin is simple and can be done by adding a # to the beginning of a line with a file path.
Furthermore, there are three reserved identifiers: *ALL, *KERNEL, and *main. *ALL will inject the plugin(s) into every user process/game/app. *KERNEL will inject the plugin(s) into the kernel. *main is a special identifier for SceShell, better known as the Home Screen and often incorrectly referred to as LiveArea or "PS Vita OS" (though at the time of writing, Shell support is pretty spotty).
Thusly, the format should be
# This is a comment telling you that this is a comment!
*IDENTIFIER
ur0:tai/user_plugin.suprx
*KERNEL
ur0:tai/kplugin1.skprx
ur0:another_directory/kernel_plugin.skprx
# Persona 4 Golden
*PCSA00120
ur0:tai/vitagrafix.suprx
You shouldn't worry about having henkaku.skprx or henkaku.suprx, since they are for disabling codesigning checks and other physical PS Vita patches.
Compatibility
All functions taiHEN itself relies on are implemented. Plugins that use functions Vita3K does not implement likely will not work.
Notes for developers
- Currently the file is case sensitive, this mirrors a real vita but could be changed for convenience
- A kubridge implementation exists, but some homebrews may check for it in its path (ur0:tai/kubridge.skprx) before loading it and throw an error. This could be changed.
- The kubridge implementation does not work without kubridge on disk (that is, you still have to download kubridge, put it in place, and add the line(s) to config.txt)