Options / Configuration
How to use
- Run Ainex if you haven't before.
- Show file name extensions in Explorer.
- Go to
Documents\Ainex
and openainex.config.toml
in a text editor like Notepad++.- If a
portable.txt
file is present in the same directory asainex.exe
it will be in the same directory asainex.exe
. - Per-game configs go in
config\TitleID.config.toml
. Note that per-game configs are highly unstable, only very few options can be changed from it safely or at all, as most emulator subsystems are initialized before per-game configs are loaded.
- If a
- For launchers/frontends like Bottlenose you can use the
--config
launch parameter to specify what config to use.- To launch specific games, add the path to the game before the launch options. For
example:
ainex.exe path/to/game/default.xex --vsync=false
- To launch specific games, add the path to the game before the launch options. For
example:
Config Settings
Each setting has a table explaining the different options.
Expand a section by clicking it to see the table.
Each table follows this pattern.
setting_name | value type |
---|---|
description | value |
APU
APU
The system used to output audio to the speakers.
apu | string |
---|---|
The first available. (default) | any |
No audio | nop |
SDL2 | sdl |
XAudio2 | xaudio2 |
FFMPEG Verbose
Makes FFMPEG output verbose logging.
ffmpeg_verbose | boolean |
---|---|
Disable verbose logging. (default) | false |
Enable verbose logging. | true |
Mute
Mutes all audio output.
mute | boolean |
---|---|
Audio is enabled. (default) | false |
Audio is disabled. | true |
CPU
Break on Unimplemented Instructions
Break to the host debugger if an unimplemented PowerPC instruction is encountered (or crash if no debugger is attached).
break_on_unimplemented_instructions | bool |
---|---|
On (default) | true |
Off (hack, needed for certain games) | false |
Clock: No scaling
Disable real-time clock scaling code.
Time management and locking is bypassed.
Guest system time is directly pulled from the host.
clock_no_scaling | bool |
---|---|
Guest time is scaled proportionally to the running speed. (default) | false |
System time is pulled from directly the host. | true |
Clock Source: Raw
Use the RDTSC
instruction as the time source.
Host CPU must support invariant TSC.
clock_source_raw | bool |
---|---|
Gets the guest time using the system clock. (default) | false |
Gets the guest time using the RDTSC instruction. |
true |
CPU
The CPU backend to be used for emulation.
cpu | string |
---|---|
The first available. (default) | any |
x86_64 architecture | x64 |
In all reality, the emulator can only be compiled for one CPU architecture at a time. This option is completely useless.
Config
Content
License Mask
Set the license mask for activated content.
license_mask | # |
---|---|
No licenses enabled (Demo/Trial mode. default) | 0 |
XBLA activated mode (First license enabled) | 1 |
Full mode (All licenses enabled) | -1 0xFFFFFFFF |
D3D12
DXGI Adapter
Index of the DXGI adapter to use. Enter any positive number to use a specific physical adapter.
d3d12_adapter | # |
---|---|
WARP software rendering. | -2 |
Any physical adapter. (default) | -1 |
CPU Readback After Render Target Resolving
This is needed for certain games
d3d12_readback_resolve | bool |
---|---|
Off (default) | false |
On | true |
Display
GPU
Allow Invalid Fetch Constants
Allow texture and vertex fetch constants with invalid type - generally unsafe because the constant may contain completely invalid values, but may be used to bypass fetch constant type errors in certain games until the real reason why they're invalid is found.
gpu_allow_invalid_fetch_constants | bool |
---|---|
Off (default) | false |
On (hack) | true |
Renderer/Backend
gpu | string |
---|---|
Any backend (default, recommended) | any |
Direct3D 12 | d3d12 |
Vulkan | vulkan |
Null (blank/nothing) | null |
Render target path
Leave this option blank for auto-selection.
render_target_path_d3d12 | string |
---|---|
Auto-selection | |
RTV (recommended for speed) | rtv |
ROV (if available, for higher accuracy in certain cases) | rov |
What is ROV (rasterizer-ordered views)?
Improves accuracy at the cost of performance. Recommended to be disabled.
Long ROV (rasterizer-ordered views) explanation
The Direct3D 12 mode in Ainex has two code paths for rendering output (the currently used one is displayed in the window title bar): "RTV" (Render Target Views) and "ROV" (Rasterizer-Ordered Views).
On the Xbox 360, pixels are written to a 10 MB memory chip called the eDRAM, and many games reinterpret the data in it in different formats for various purposes (clearing, HDR rendering, etc.) This is not the case on PC, where different render targets are independent from each other.
The "RT" path uses conventional PC render targets (RTV — Render Target Views — and DSV — Depth-Stencil Views — in Direct3D terms) for rendering output, and copies data between PC render target textures and the 10 MB buffer to allow for reinterpretation of eDRAM data in different formats.
However, copying has a very heavy performance impact, causing noticeable slowdowns even on modern graphics cards. Another issue is that the Xbox 360 has certain render target formats not available on the PC (7e3 HDR floating-point, 16-bit fixed-point with −32…32 range, 20^4 floating-point depth) that have to be approximated with other render target formats. This causes unfixable transparency issues (because the blending hardware works with different ranges and precision of numbers) and depth buffer-related issues such as shadow acne.
Using the Rasterizer-Ordered Views (ROV) feature of Direct3D 12 allows Ainex to overcome those issues by doing blending and depth/stencil testing manually in pixel shaders, rendering directly to the 10 MB buffer. This allows for much higher performance since there's no expensive data copying, and better accuracy because of no pixel format limitations.
"Rasterizer-ordered" here means that access to the buffer is synchronized — if multiple polygons in a single draw call are covering the same pixel, the buffer will be accessed in the correct order, without conflicts that would happen if the data was written through a regular unordered access view (UAV). You can read more about this feature at Intel.com, another common use for ROV in game development is order-independent transparency algorithms.
However, this is a hardware feature, and thus on older graphics cards, Ainex is limited to the RT path.
Rasterizer-ordered views are used by default in Ainex where available, but if you're experiencing graphical issues, you may try disabling it in the config.
The minimum requirements for ROV are:
- Nvidia GeForce GTX 950 on desktops, GTX 965M on laptops (Maxwell 2nd generation — 2014)
- AMD Radeon Vega (GCN 5th generation — 2017)
- Intel HD Graphics 4200 (2013)
Resolution Scaling
This is a hack, and as such, bugs should be expected.
Horizontal Scale
draw_resolution_scale_x | # |
---|---|
1x (1280x, default) | 1 |
2x (2560x) | 2 |
3x (3840x) | 3 |
4x (5120x) | 4 |
5x (6400x) | 5 |
6x (7680x) | 6 |
7x (8960x) | 7 |
Vertical Scale:
draw_resolution_scale_y | # |
---|---|
1x (x720, default) | 1 |
2x (x1440) | 2 |
3x (x2160) | 3 |
4x (x2880) | 4 |
5x (x3600) | 5 |
6x (x4320) | 6 |
7x (x5040) | 7 |
Vertical Sync
vsync | bool |
---|---|
On (default) | true |
Off (uncaps FPS) | false |
This won’t improve the framerate if your PC can’t handle running the game at it’s native FPS.
General
HID
Input Backend
This option controls which backend the controller is mapped to.
hid | string |
---|---|
Any input method (default) | any |
SDL2* | sdl |
XInput | xinput |
Keyboard | winkey |
- SDL supports many controllers and many advanced features (not all of them are implemented).
SDL supports an ever-growing list of controllers. - XInput supports all Xbox controllers starting with the Xbox 360,
including the Guitar Hero and Rock Band instruments.
Wireless Xbox 360 controllers and some Wireless Xbox One controllers require you to own a USB wireless adapter. - WinKey only supports keyboards that are compatible with your device.
When using SDL
If your game controller is not mapped correctly, download gamecontrollerdb.txt and place it in the folder next to your Xenia executable.
HID WinKey
Windows Key Bindings
The following settings all follow the same rules.
The value must be a key identifier, or multiple key identifiers separated by spaces.
Modifiers may be added in front of key identifiers to change the meaning of a bind while another key is pressed.
Key identifiers
- Virtual-Key Codes (hex)
- A character corresponding to a key
Key modifiers
Modifier | Meaning |
---|---|
_ |
only with Caps Lock enabled |
^ |
only while Shift is pressed |
Examples
Setting and Value | Meaning |
---|---|
keybind_a = "0xBA" |
Bind to ; |
keybind_x = "X" |
Bind to X |
keybind_y = "Y U 0xA0" |
Bind to Y, U or Left Shift |
keybind_b = "_0xBA" |
Bind to ; only when Caps Lock is enabled |
keybind_dpad_up = "^X" |
Bind to Shift+X |
Default bindings
Setting Name | Default Value | Meaning |
---|---|---|
keybind_a | 0xBA | Bind to ; |
keybind_b | 0xDE | Bind to " |
keybind_back | Z | Bind to Z |
keybind_dpad_down | ^S | Bind to S (Caps Lock on) |
keybind_dpad_left | ^A | Bind to A (Caps Lock on) |
keybind_dpad_right | ^D | Bind to D (Caps Lock on) |
keybind_dpad_up | ^W | Bind to W (Caps Lock on) |
keybind_left_shoulder | 1 | Bind to 1 |
keybind_left_thumb | F | Bind to F |
keybind_left_thumb_down | _S | Bind to Shift+S |
keybind_left_thumb_left | _A | Bind to Shift+A |
keybind_left_thumb_right | _D | Bind to Shift+D |
keybind_left_thumb_up | _W | Bind to Shift+W |
keybind_left_trigger | Q I | Bind to Q or I |
keybind_right_shoulder | 3 | Bind to 3 |
keybind_right_thumb | K | Bind to K |
keybind_right_thumb_down | 0x28 | Bind to Up |
keybind_right_thumb_left | 0x25 | Bind to Left |
keybind_right_thumb_right | 0x27 | Bind to Right |
keybind_right_thumb_up | 0x26 | Bind to Up |
keybind_right_trigger | E O | Bind to E or O |
keybind_start | X | Bind to X |
keybind_x | L | Bind to L |
keybind_y | P | Bind to P |
Kernel
Logging
Memory
Protect Zero
protect_zero | bool |
---|---|
On (default) | true |
Off (hack, needed for certain games*) | false |
Certain games require this to set be set to false to work around crashes.
This includes, but isn't limited to:
SDL
Storage
UI
Vulkan
Win32
XConfig
User Language
user_language | # | region code | native name |
---|---|---|---|
English (default) | 1 | EN | English |
Japanese | 2 | JA | 日本語 |
German | 3 | DE | Deutsche |
French | 4 | FR | Français |
Spanish | 5 | ES | Español |
Italian | 6 | IT | Italiano |
Korean | 7 | KO | 한국어 |
Traditional Chinese | 8 | ZH | 繁體中文 |
Portuguese | 9 | PT | Português |
Polish | 10 | PL | Polski |
Russian | 11 | RU | русский |
Swedish | 12 | SV | Svenska |
Turkish | 13 | TR | Türk |
Norwegian | 14 | NB | Norsk |
Dutch | 15 | NL | Nederlands |
Simplified Chinese | 16 | ZH | 简体中文 |