Skip to main content

Configuration

Emulator Compatibility

This analysis is based on v1.9 of the emulator (Tekken 3 V1.01)

Configuration Files

Configuration files are loaded from the following locations. These paths are relative to the games sandbox, and some of the paths can be re-defined by configuration parameters.

See Command Line Parameters for more details on the available configuration options.

These are listed in the order that the emulator appears to try and load them.

PathNotes
/temp0/reboot-params.txtThis file is created when using the Region Change option to tell the emulator which region to switch to
/app0/conf/PS1HD/defaults.conf
/app0/revision.conf
/app0/config-title.txtThe majority of configuration is usually in this file
/app0/SIEA/config-region.txtRegion specific configuration is usually in this file
SIEA path is defined by the presence of --region-dir=SIEA in a prior configuration file, otherwise it will default to /app0/config-region.txt

LUA Script Files

LUA script files are loaded from the following locations.

See the LUA Script section for examples and details on the available functions.

caution

It is really essential that your configuration includes --region-dir, otherwise /app0/app_boot.lua and everything within /app0/scripts will be executed twice (if they exist). This is because it seems to default the region dir to the root path when the parameter has not been configured.

These are listed in the order that the emulator appears to try and load them.

PathNotes
/app0/app_boot.lua
/app0/SIEA/app_boot.luaRegion specific configuration is usually in this file
SIEA path is defined by the presence of --region-dir=SIEA in a configuration file, otherwise it will default to executing /app0/app_boot.lua again
/app0/scripts/*.luaLoads all .lua files within folder
Executes in alphabetical order
/app0/SIEA/scripts/*.luaLoads all .lua files within folder
Executes in alphabetical order
SIEA path is defined by the presence of --region-dir=SIEA in a configuration file, otherwise it will default to executing /app0/scripts/*.lua again

The app_boot.lua name can be overridden using configuration --boot-script

Example 1
--boot-script=my_boot_script.lua

# The following script files will now be loaded on boot
# /app0/my_boot_script.lua
# /app0/SIEA/my_boot_script.lua

You can disable loading files from the scripts folder; this does not disable loading app_boot.lua

Example
--load-scripts=0

# app_boot.lua will still be loaded

Includes

The LUA scripts can use require to load content from external LUA files. In official releases this is mostly used for configuring disc images when the region switcher is enabled, and for loading frequently used helper functions.

The path that is searched when calling this is:

info

Note this is when configuration --globalgamedata-dir=global has been set. If this is not included in your configuration then it will default to searching /app0/_global instead of /app0/global

/app0/lua_include/?.lua;/app0/lua_include/?/init.lua;/app0/lua_include/?.lua;/app0/lua_include/?/init.lua;./?.lua;./?/init.lua;/app0/global/scripts/lua_include/?.lua

PathNotes
/app0/lua_include/?.lua
/app0/lua_include/?/init.lua
/app0/global/scripts/lua_include/?.luaglobal path is defined by the presence of --globalgamedata-dir=global in a configuration file, otherwise it will default to /app0/_global/scripts/lua_include/?.lua
Example - require(disc-selection.lua)
require("disc-selection")

-- Will search for disc-selection.lua in these locations:
-- /app0/lua_include/disc-selection.lua
-- /app0/lua_include/disc-selection/init.lua
-- /app0/global/scripts/lua_include/disc-selection.lua

-- It actually tries the /app0/lua_include/ paths twice because they are in the path command twice

Loading of compiled C modules is disabled.

Changing the search path

Your script can change the search path by setting package.path.

Example 1
--- Append /app0/SIEA to the search path
package.path = package.path .. ";/app0/SIEA/?.lua"
Example 2
--- Replace the search path with /app0/scripts
package.path = "/app0/scripts/?.lua"

Visual Preset Definition Files

Newer versions of the emulator moved the configuration for the Visual Preset options into external JSON configuration files (from previously seemingly being hardcoded in the application).

These are listed in the order that the emulator appears to try and load them.

PathNotes
/app0/presets/*.json
/app0/global/presets/*.jsonOfficial releases store them in this folder
global path is defined by the presence of --globalgamedata-dir=global in a configuration file, otherwise it will default to /app0/_global/presets/*.json

While many of the options are self explanatory, a number are not immediately clear and would likely require a lot of trial and error to figure out.

Some options include:

OptionValuesNotes
uprendering_factorNumber
1 to 9
Set the uprendering scale
1 is no uprendering
4 is the default in most releases
This seems to be ignored if --scale or --uprender-scale are set
nameLocalizationKeyStringThe display name for the preset
Official releases use a localisation string name ie. "i18nPresetDefault", but this can be a regular string too eg. "My Custom Preset"

The included configuration files are below:

Default
{
"version" : 1,
"brightness": 0,
"contrast": 0.00,
"gamma": 1.10,
"saturation": 1.0,
"uprendering_factor": 4,

"cubic_A": -0.5,
"enable_color_shader": true,
"enable_fx_arcade": false,
"enable_fx_cel": false,
"enable_fx_smoothing": false,
"fx_arcade_b": 0.075,
"fx_arcade_bleed": 0.40,
"fx_arcade_blur_level": "Blur_9",
"fx_arcade_c": 0,
"fx_arcade_h": 0,
"fx_arcade_mask": 0,
"fx_arcade_s": 1,
"fx_arcade_scanline_dark": 0.60,
"fx_arcade_scanline_light": 0.30,
"fx_arcade_scanline_opacity": 0.56,
"fx_cel_brightness": 1,
"fx_cel_color_step": 10,
"fx_cel_outline": 0.20,
"fx_cel_saturation": 1.20,
"fx_cel_strength": 0.5,
"fx_fxaa_dark_threshold": 0.0625,
"fx_fxaa_subpix": 0.75,
"fx_fxaa_threshold": 0.125,
"fx_smoothing_strength": 1,
"hue": 0,
"luma_video_filter": 0,
"mn_B": 0.33,
"mn_C": 0.33,
"nameLocalizationKey": "i18nPresetDefault",
"upscaling_aa": 0,
"upscaling_factor": 3,
"upscaling_line": 30
}
Modern
{
"version" : 1,
"brightness": -0.03,
"contrast": 0.06,
"gamma": 1.15,
"saturation": 1.12,
"uprendering_factor": 4,

"cubic_A": -0.5,
"enable_color_shader": true,
"enable_fx_arcade": false,
"enable_fx_cel": false,
"enable_fx_smoothing": false,
"fx_arcade_b": 0.075,
"fx_arcade_bleed": 0.40,
"fx_arcade_blur_level": "Blur_9",
"fx_arcade_c": 0,
"fx_arcade_h": 0,
"fx_arcade_mask": 0,
"fx_arcade_s": 1,
"fx_arcade_scanline_dark": 0.60,
"fx_arcade_scanline_light": 0.30,
"fx_arcade_scanline_opacity": 0.56,
"fx_cel_brightness": 1,
"fx_cel_color_step": 10,
"fx_cel_outline": 0.20,
"fx_cel_saturation": 1.20,
"fx_cel_strength": 0.5,
"fx_fxaa_dark_threshold": 0.0625,
"fx_fxaa_subpix": 0.75,
"fx_fxaa_threshold": 0.125,
"fx_smoothing_strength": 1,
"hue": 0,
"luma_video_filter": 3,
"mn_B": 0.33,
"mn_C": 0.33,
"nameLocalizationKey": "i18nPresetModern",
"upscaling_aa": 2,
"upscaling_factor": 3,
"upscaling_line": 60
}
Retro Classic
{
"version" : 1,
"fx_arcade_bleed": 0.50,
"fx_arcade_mask": 0.11,
"fx_arcade_scanline_dark": 0.50,
"fx_arcade_scanline_light": 0.25,
"uprendering_factor": 1,

"brightness": -0.015,
"contrast": 0.09,
"gamma": 1.20,
"saturation": 1.20,

"cubic_A": -0.5,
"enable_color_shader": true,
"enable_fx_arcade": true,
"enable_fx_cel": false,
"enable_fx_smoothing": false,
"fx_cel_brightness": 1,
"fx_cel_color_step": 10,
"fx_cel_outline": 0.20,
"fx_cel_saturation": 1.20,
"fx_cel_strength": 0.5,
"fx_fxaa_dark_threshold": 0.0625,
"fx_fxaa_subpix": 0.75,
"fx_fxaa_threshold": 0.125,
"fx_smoothing_strength": 1,
"hue": 0,
"luma_video_filter": 3,
"mn_B": 0.33,
"mn_C": 0.33,
"nameLocalizationKey": "i18nPresetRetroClassic",

"upscaling_aa": 0,
"upscaling_factor": 0,
"upscaling_line": 30
}
Retro Modern
{
"version" : 1,
"fx_arcade_bleed": 0.00,
"fx_arcade_mask": 0.00,
"fx_arcade_scanline_dark": 0.60,
"fx_arcade_scanline_light": 0.30,
"brightness": 0.0,
"contrast": 0.08,
"gamma": 1.12,
"saturation": 1.16,

"cubic_A": -0.5,
"enable_color_shader": true,
"enable_fx_arcade": true,
"enable_fx_cel": false,
"enable_fx_smoothing": false,
"fx_cel_brightness": 1,
"fx_cel_color_step": 10,
"fx_cel_outline": 0.20,
"fx_cel_saturation": 1.20,
"fx_cel_strength": 0.5,
"fx_fxaa_dark_threshold": 0.0625,
"fx_fxaa_subpix": 0.75,
"fx_fxaa_threshold": 0.125,
"fx_smoothing_strength": 1,
"hue": 0,
"luma_video_filter": 3,
"mn_B": 0.33,
"mn_C": 0.33,
"nameLocalizationKey": "i18nPresetRetroModern",

"upscaling_aa": 0,
"upscaling_factor": 1,
"upscaling_line": 30
}