PS2 Emulation: Difference between revisions
Line 759: | Line 759: | ||
| || Game fixes || || | | || Game fixes || || | ||
|- | |- | ||
| <pre>--ee-sif0-cycle-scalar || | | <pre>--ee-sif0-cycle-scalar || || '''Not a Speedhack''', Sif0 cycle skipping, loading times will increase and the graphics will stutter, Not recommended. [https://github.com/PCSX2/pcsx2/blob/master/pcsx2/Sif0.cpp#L33 More info here] || --ee-sif0-cycle-scalar=6000 | ||
|- | |- | ||
| --ee-sif1-cycle-scalar || | | --ee-sif1-cycle-scalar || || '''Not a Speedhack''', Sif1 cycle skipping, you will only encounter stuttering graphics, may be helpful as a debug option for some games that require better sif1 Sync, not recommended. [https://github.com/PCSX2/pcsx2/blob/master/pcsx2/Sif1.cpp#L34 more info here] || --ee-sif1-cycle-scalar=6000 | ||
|- | |- | ||
| --iop-sif0-cycle-scalar || | | --iop-sif0-cycle-scalar || || '''Not a Speedhack''', IOP's Sif0 cycle scalar [https://github.com/PCSX2/pcsx2/blob/master/pcsx2/Sif0.cpp#L34 more info here] || --iop-sif0-cycle-scalar=1.0 | ||
|- | |- | ||
| --iop-sif1-cycle-scalar || | | --iop-sif1-cycle-scalar || || '''Not a Speedhack''', IOP's Sif1 cycle scalar [https://github.com/PCSX2/pcsx2/blob/master/pcsx2/Sif1.cpp#L35 more info here] || --iop-sif1-cycle-scalar=1.0 | ||
|- | |- | ||
|} | |} |
Revision as of 00:36, 2 January 2023
Description
PlayStation 2 emulation on the Playstaion 4 is handled with little difference to the Playstation 3, But still many issues that the Playstation 3 faced Have moved into the Playstation 4 along with Many new issues. The fact of the matter is that the PS4 is too weak for emulation, For that reason alone, Sony had to sacrifice accuracy in order to gain Performance, But the Ps4's emu has more accuracy than PCSX2 in terms of GS and SPU Emulation, As for the other parts, PCSX2 is much better at emulating it, For instance PCSX2 syncs VU0 extremely well, the Ps4 doesn't, And it's because it doesn't have the horsepower to do that, And that has to lead to games like Rayman 3 being unplayable without overclocking the EE at a specific offset.
Each PS2 game PS4 package file (.pkg) includes the emulator itself, there is no included emulator in the PS4 firmware. although The PS4 firmware has some PS2 emulator specific features, like the functions sceLncUtilIsPs2Emu, sceShellCoreUtilGetImposeMenuFlagForPs2Emu, sceSystemServiceAddLocalProcessForPs2Emu, or sceSystemServiceShowImposeMenuForPs2Emu. Emulators are programmed to be accurate for the games that they were extracted from, and that alone provides a challenge For accurate Emulation. since emulators include per title patches, and different default settings, and since the Playstation 2 hardware is known to be one of the most complex systems to emulate, any small change in configuration can have negative consequences in Games. Currently the most used emulator is Jakv2 since it is the most compatible, but for game crashes we use RECVX, and for VU accuracy we use roguev1. Also note that the BIOS itself is included in the game's pkg and it is the exact same BIOS that was used in the ps2_netemu. Another important thing is the lack of encryption mechanism for PS2 game disc image file, this time it is just a plain ISO file, but the emulator still supports LIMG sector that allows the usage of non-2048 sector size discs. Memory card is also decrypted, but the emulator checks the crc of some of the regions to ensure that the memory card was Not modified. the PS2 Emulator supports LUA scripting by "Lua Bridge", and it is an extremely powerful interface that provide many possibilities to improve compatibility. This is first time that sony really cared about floats in their emulator. Compared to the PS3 CPU, x86-64 is doing a worse job in mimicing PS2 FPU, and VU floats calculation behavior. This is resolved by clamping, accurate math used per memory offset, and/or converting floats to double precision. the emulator uses openCL for GS, and probably other components.
Emulator Configuration
Files
Emulator configuration is handled by 4 files:
- config-emu-ps4.txt - Stores paths, basic video/audio settings in official packages. But unofficially can be also used for advanced settings for global effect in multi disc .pkg with all commands originally used in cli.conf file.
- XXXX-YYYYY_cli.conf - Stores per disc advanced settings. GS, VU, EE, IOP, FPU, COP2 emulation settings, are here. Also hacks, and hooks.
- XXXX-YYYYY_config.lua - Used for per disc advanced scripts. Patching EE/IOP memory, Conditional hooks.
- disc-swap-cli.conf - Stores info of multi disc games.
Commands
Known functions: Require cleanup.
The rest of the cli and lua commands can all be found inside of an emu's decrypted eboot.bin.
config-emu-ps4.txt commands
Command | Values | Notes | Usage |
---|---|---|---|
Misc | |||
--config-local-lua | --config-local-lua="" | ||
--load-tooling-lua | --load-tooling-lua=0 | ||
--max-console-spam | |||
--path-snaps | dir/folder | Path to savestates folder | --path-snaps="/tmp/snapshots" |
--path-recordings | dir/folder | --path-recordings="/tmp/recordings" | |
--path-memcards | dir/folder | ||
--path-vmc | dir/folder | --path-vmc="/tmp/vmc" | |
--emulog-file | 0, 1 | Creates a log file with information that is Rarely useful | --emulog-file=1 |
--path-emulog | dir/folder | Sets the directory of the emulog file, Requires --emulog-file=1 command | --path-emulog="/tmp/recordings" |
--path-manual | dir/folder | ||
--path-patches | dir/folder | Path to patches folder | --path-patches="/app0/patches" |
--path-trophydata | dir/folder | --path-trophydata="/app0/trophy_data" | |
--path-featuredata | dir/folder | Path to folder with XXXX-YYYYY_features.lua file | --path-featuredata="/app0/feature_data" |
--path-postproc | dir/folder | Post-processing (shaders?) | |
--path-toolingscript | dir/folder | --path-toolingscript="/app0/patches" | |
--snapshot-name | |||
--snapshot-datafile | |||
--snapshot-restore | |||
--snapshot-save | frameId(?) | ||
--snapshot-mcd-files | |||
--snapshot-repeat | repeat_count | ||
--snapshot-modulo | |||
--host-keyboard | slot [0-7] | --host-keyboard=4 | |
--host-window-scale | scale/float | --host-window-scale=0.5 | |
--host-window-pos | x,y | ||
--host-display-mode | normal,full,4:3,16:9 | Set display mode | --host-display-mode=full |
--host-graph | fps | Debug option that requires an unleaked debug ps2 bios | --host-graph=fps |
--host-osd | verbose, minimal | --host-osd=0 | |
--host-vsync | 0, 1 | Enable or disable vsync | --host-vsync=1 |
--host-trophy-support | |||
--rtc-epoch | unix_time (seconds since epoch) | --rtc-epoch=1523776362 | |
--framelimiter | 0, 1 | Enable or disable Frame limiting | --framelimiter=1 |
--framelimit-fps | FPS/float | framelimiter | --framelimit-fps=0.8 |
--framelimit-scalar | scalar/float | scalar must be between 0.1 and 5.0 | --framelimit-scalar=3.2 |
--framelimit-mode | slowest,slower,slow,normal,fast,fastest,turbo | A Standalone framelimiter | --framelimit-mode=fast |
--mfifo-manual-drain | 0.1/5.0 | A command for changing the functionality of --ee-hook=0x0,Mfifodrain | --mfifo-manual-drain=0.30 |
--mfifo-chunk-drain-cycles | 1/400000 | A command for changing the functionality of --ee-hook=0x0,Mfifodrain | --mfifo-chunk-drain-cycles=210000 |
--ps2-lang | system | sets language, Might seem like a useless command, but a Tiny number of games refuse to boot without a selected language. | --ps2-lang=system |
--ps2-title-id | XXXX-YYYYY Example: (SLUS-21515) | Sets title-id for patches, Requires the game's region code as value | --ps2-title-id=SLES-50366 |
--gs-uprender | none, 2x2 | Internal resolution upscaler. | --gs-uprender=2x2 |
--gs-upscale | none, gpu, edgesmooth, motionvec, point, motionvector, smooth, motion | upscaling type | --gs-upscale=EdgeSmooth |
--pcr0-delta-hack | 0, 1 | DPCR - DMA priority control option ? | --pcr0-delta-hack=1 |
CDVD | |||
--max-disc-num | 1-5 | numbers of discs in package (maximum=5) | --max-disc-num=1 |
--boot-disc-id | 1-5 | sets boot disc for multi-disc pkg | --boot-disc-id=0 |
--switch-disc-reset | 0, 1 | 0 Can be used to prevent Resetting The game when switching multiple discs, Useful for games Like SW2 that have Import data Feature | --switch-disc-reset=1 |
--cdvd-sector-read-cycles | 1, 40000 | Set DVD reading speed, higher values are slower, lower values are faster, Kinetica uses 40000, Psychonauts 4000, Red dead revolver 5000, Rise of kasai 31000, some games require moderate speed, too slow or too fast could cause audio problems. | --cdvd-sector-read-cycles=40000 |
--cdvd-sector-seek-cycles | 1, 40000 | Fixes boot-up sometimes, More info here [1] | --cdvd-sector-seek-cycles=1 |
--verbose-cdvd-reads | 0, 1 | Might improve disc reading if set to 1 | --verbose-cdvd-reads=0 |
Audio | |||
--host-audio-latency | msec/float | Audio latency must be between 0.010 and 4.0 | --host-audio-latency=1.5 |
--path-audio-images | dir/folder | ||
--record-audio | |||
--record-audio-img | |||
--record-audio-image | |||
--record-audio-ext | |||
--host-audio | 1,0,on,off,mono | --host-audio=1 | |
--mute-audio | all,none,main,bgm | --mute-audio=all | |
--mute-streaming-audio | all,none,main,bgm | --mute-streaming-audio=all | |
Controllers | |||
--ds4-deadzone-adjust | |||
--ds4-diagonal-adjust | |||
--host-pad-loses-focus | --host-pad-loses-focus=1 | ||
--host-gamepads | ? | Correct values might be 0-3, But no one knows the values for sure, This command might have a function if multitap is set byhost | --host-gamepads=1 |
--pad-record | 0, 1 | Enables Logging pad info in emulog | |
--pad-analog-to-digital | 0, 1 | Eternel ring Emu uses the value 0 | --pad-analog-to-digital=0 |
--mtap1 | Disabled, Always, ByHost | Multitap switch, The values are correct but the multitap only works in certain games. | --mtap1=always |
--mtap2 | Disabled, Always, ByHost | Multitap switch, some games require multitap to be selected only on second port (1, 2-a, 2-b, 2-c layout). To achieve that we need to disable first mtap. | --mtap2=always |
XXXX-YYYYY_cli.conf commands
Please note that commands listed here also work in config-emu-ps4.txt. But the official way to use them is by CLI file. The CLI file way is also needed for multi-disc packages, Some of the Commands are still not discovered, And some known commands are missing some of their values Due to them being not Discovered. The scene has named "CLI" with 3 names, including TXT, CLI, CONF. all 3 are the exact same thing.
All CLI commands are pre-made by sony, We sadly cannot create CLI commands out of thin air. The values of the commands are also pre-defined by sony and /or have a quota for possible values/ranges
( EE )
Commands for the emulated Emotion Engine. these commands may assist you in gaining performance or better sync.
Command | Values | Notes | Usage |
---|---|---|---|
Speedhacks | |||
--ee-cycle-scalar | [Overclocking] (0.99 => 0.1) [Cycle skipping] (1.1 => 5.0) |
If set Higher than 1.0 the Emotion engine Begins skipping cycles, you might face Problems in FMVs if you skip too many cycles. but you will gain a better performance | --ee-cycle-scalar=1.0 |
--ee-context-switch-cycles | Range between (0.1 & integer value limit) | A speedhack, rather than skipping the cycles for The entirety of the emulated EE, it seems to only skip VU1 cycles(?), The higher the value, the higher the performance. This command doesn't work on jak emulators along with a few others. | --ee-context-switch-cycles=2700? |
--ee-hook | AdvanceClock, FastForwardClock, Mfifodrain | Hook a function to a EE offset. it can be used either as a speedhack or a gamefix, Advance clock will overclock the EE and it is the only one that needs a value to be set. FastForwardClock will skip cycles, Mfifodrain is unknown. |
--ee-hook=0x0028A7B0,AdvanceClock,,500 Example for usage: --ee-hook=0xEEOFFSET,FUNCTION,OPTIONALOPCODE,VALUEFOROVERCLOCKING |
Game fixes | |||
--ee-jit-pagefault-threshold | 20-200 | Seems to reduce blue screen occurrence the higher the value | --ee-jit-pagefault-threshold=40 |
--ee-block-validation | PageProt, PageProtection, Hash, Full, none | way of validating that block been modified, and require recompilation. [Some info about PageProt way] | --ee-block-validation=None |
--ee-shorthash-len | inst_count/integer | Length of shorthash in instruction/opcode count. Require --ee-block-validation=Hash | |
--ee-const-folding | None,Gpr,Fpu,All | EE constant folding, More info | --ee-const-folding=none |
--ee-ignore-segfault | [none,R,W,RW] | Ignore segmentation fault, may help with crashes but will probably cause graphical issues | --ee-ignore-segfault=read |
--ee-native-function | memcpy, memset, 0x0000 | --ee-native-function=memcpy,0x11e328 | |
Other | |||
--ee-jit-disasm | 0 or 1 for mips and 2 for x86 | Emotion engine Just in Time disassembler mode (seems to be debug log option) | --ee-jit-disasm=1 |
--ee-ignore-break | 0, 1 | Ignore Break instructions. | |
--ee-break-as-nop | 0, 1 | Turns a break instruction into a nop Instruction (this seems to be rarely useful as Break usually mean eof) | --ee-break-as-nop=1 |
--ee-jit-opt-debug | 0, 1 | ||
--ee-pc-coherency | 0,1?? | Seems to be a debug option for the Program counter. | |
--ee-inst-marking | 0,1? | ||
--ee-insn-marking | 0,1? | ||
--ee-kernel-hle | 0, 1 | High-level emulation kernel | |
--ee-injection-kernel | 0, 1 | ||
--ee-injection-title | 0, 1 | ||
--ee-validate-kernel | 0, 1 | ||
--ee-regalloc-scalar | 0,none,ReadOnly,WriteOnly,RW | register allocation setting | |
--ee-regalloc-simd | register allocation setting | ||
--ee-regalloc-preserve-scalar | LoadOnly, StoreOnly, SO, LoadStore, LS | EE JIT Scalar/Int Regalloc Mode | --ee-regalloc-preserve-scalar=LoadStore |
--ee-regalloc-preserve-simd | ReadOnly, RO, WO, WriteOnly ,RW | EE JIT SIMD/XMM Regalloc Mode | --ee-regalloc-preserve-simd=RW |
--ee-static-block-links | options Type,Type,... [Branch,Branches,JAL,COP2,All] | --ee-static-block-links=JAL,COP2 | |
--vtune-ee | Could be support for intel vtune, Might be related to this | ||
--ee-live32 | 0,1? | ||
--ee-cache-breaks-block | 0,1? | ||
--ee-evt-check-full | 0, 1 | ||
--ee-peephole | 0, 1? | Use peephole optimization for the EE (?) could possibly be a speedhack | |
--ee-load-rewrites | 0,1? | ||
--ee-store-rewrites | 0,1? | ||
--ee-precompile-trace | |||
--ee-penalize-short-blocks | 0, 1 | ||
--ee-mem-check-eob | EE memory check end of block | ||
--ee-insn-flush-pc | 0, 1 | A debug option that updates the EE's program counter more often when enabled | |
--ee-insn-callmark | |||
--ee-inline-limit-full | insn_count/integer | ||
--ee-inline-limit-partial | |||
--ee-stlf-cycle-threshold | ? | ? | |
--detect-idle-ee | 0, 1 | Enabled by default, Uknown what it does | --detect-idle-ee=1 |
( FPU )
The FPU is a fast single-precision unit that serves the EE. It's also called (COP1).
Command | Values | Notes | Usage |
---|---|---|---|
Game fixes | |||
--fpu-no-clamping | 0, 1 | Setting it to 1 enables clamping for the FPU, Can be used to fix any game with FPU clamping issues, More here | --fpu-no-clamping=0 |
--fpu-custom-fused-madd | 0, 1 | Custom FMA (fused multiply-add) | --fpu-custom-fused-madd=0 |
--fpu-accurate-range | start,end offset (0x0 - 0x1FFFFFF) | Accurate Mul/Div/Add/Sub Math instructions for the FPU, used for full ee/fpu accuracy in specified range | --fpu-accurate-range=0x1acce0,0x2acce0 |
--fpu-no-clamp-range | start,end offset (0x0 - 0x1FFFFFF) | Full clamping for fpu in selected memory range | --fpu-no-clamp-range=0x1acce0,0x2acce0 |
--fpu-accurate-muldiv | offset (0x1FFFFFF) | Fix for games that divide/multiply by 0 in specified address | --fpu-accurate-muldiv=0x123456 |
--fpjk-muldiv-range | offset (0x0 - 0x1FFFFFF) | Bully uses this command, unknown usage, possibly even more accurate divide/multiply | --fpjk-muldiv-range=0x123456 |
--fpu-accurate-muldiv-range | start,end offset (0x0 - 0x1FFFFFF) | Fix for games that divide/multiply by 0 in specified range | --fpu-accurate-muldiv-range=0x1acce0,0x2acce0 |
--fpu-accurate-addsub | offset (0x1FFFFFF) | Accurate fpu Add/Subtract instructions in specified Address | --fpu-accurate-addsub=0x234567 |
--fpu-accurate-addsub-range | start,end offset (0x0 - 0x1FFFFFF) | Accurate fpu Add/Subtract instructions in specified address range | --fpu-accurate-addsub-range=0x1acce0,0x2acce0 |
Speedhacks | |||
--fpu-custom-min-max | 0, 1 | Custom Max/Mini logic for denormals, Disabling it might break some games | --fpu-custom-min-max=0 |
--fpu-rsqrt-fast-estimate | 0, 1 | less accurate rsqrt (possible speedhack, but can degrade accuracy) | --fpu-rsqrt-fast-estimate=1 |
--fpu-accurate-mul-fast | 0, 1 | A speed up option for --fpu-accurate-muldiv-range And only has an effect when muldiv command is being used, the command basically removes the accurate divide part from muldiv for the purpose of performance | --fpu-accurate-mul-fast=1 |
Other | |||
--fpu-to-double | 0, 1 | Converts floats to double, enabling it will increase the fpu's accuracy | |
--fpu-clamp-operands | 0, 1 | A clamping setting that increases clamping functionality when FPU clamping is enabled. | --fpu-clamp-operands=1 |
--fpu-clamp-results | 0, 1 | A clamping setting that increases clamping functionality when FPU clamping is enabled. | --fpu-clamp-results=1 |
Vector Interface ( VIF )
Decompresses vector data, uploads microprograms to the VUs, and sends graphical data to the GIF.
Command | Values | Notes | Usage |
---|---|---|---|
Game fixes | |||
--vif-ignore-invalid-cmd | 0, 1 | Ignore invalid vif commands | --vif-ignore-invalid-cmd=1 |
--vif1-ignore-cmd-ints | 0, 1 | possible fix for games that Crash at startup when set to 1 | --vif1-ignore-cmd-ints=1 |
--vif1-instant-xfer | 0, 1 | "Instant VIF transfer" Default 1. correct behavior is 0, but we don't know how accurate VIF timing is in that emu, can be used to fix graphical glitches when set to 0, Or to prevent the game from freezing | --vif1-instant-xfer=0 |
--vif-thread-chunk-size | 1, 1000 | Can be used to fix Games stuck at splash screen or later in the game. 1024 seems to be the limit | --vif-thread-chunk-size=100 |
--detect-idle-vif | 0, 1 | Most likely turns off VIF when it's not needed if this command was set to 0 | --detect-idle-vif=0 |
( GS )
GS stands for Graphics Synthesizer PlayStation®2 co-processor responsible for rendering the graphics (but is also used by some games for additional calculations and other purposes)
Command | Values | Notes | Usage |
---|---|---|---|
Speedhacks | |||
--gs-optimize-30fps | 0, 1 | Speedhack for gpu hungry games | --gs-optimize-30fps=1 |
--gs-adaptive-frameskip | 0, 1 | Speedhack, skips frames when the Game starts demanding more resources than there are available. doesn't work on all emulators. confirmed to be working on jak emulators | |
--threaded-gs | 0, 1 | Threading the GS is done by waiting for data to be received then have multiple rendering threads in parallel when all transfers are achieved. it's basically a speedhack that hardly ever causes problems. PCSX2 Calls it MTGS and it's very similar to MTVU Except it's a much more safer option with less performance gain. | --threaded-gs=1 |
Graphical fixes / Improvement | |||
--force-frame-blend | 0, 1 | Fix for shaking screens (Deinterlacing), seems to be one of Pcsx2's Blend tff or Blend bff deinterlacing options | --force-frame-blend=1 |
--force-pal-60hz | 0, 1 | Force 60hz PAL mode | --force-pal-60hz=1 |
--gs-use-deferred-l2h | 0, 1 | Some delay option for L2H (local to host, GS to EE) | --gs-use-deferred-l2h=1 |
--gs-use-mipmap | 0, 1 | Turn mipmapping on or off, the original ps2 hardware enables mipmapping by default, but in the case of emulation it will generally cause performance issues. Required for CL kernels using mipmaping | --gs-use-mipmap=1 |
--gs-use-clut-merge | 0, 1 | CLUT = Color lookup table, it could possibly solve graphical issues or improve the quality of the colors. it is Required for CL kernels using merging CLUT | --gs-use-clut-merge=1 |
--l2h-2d-params | TRXREG,BITBLTBUF,height | --l2h-2d-params=0x0000000800000001,0x000000003a0a2300,512,2 | |
--gs-h2l-accurate-hash | 0, 1 | Used with h2l Upscaler | --gs-h2l-accurate-hash=1 |
--gs-h2l-list-opt | 0, 1 | Used with h2l Upscaler | --gs-h2l-list-opt=1 |
--gs-progressive | 0, 1 | Force progressive scan, it's used to fix Graphical glitches/double screen issues when used | |
--gs-vert-precision | 8, 16 | 3D Rendering vertex precision, the eboot expects the value of 8 or 16 , any other value will cause a blue screen crash. | --gs-vert-precision=8 |
--gs-force-bilinear | 0, 1 | force bilinear filtering. Can fix ghosting problems. but it's not recommended in games that use 2D images | --gs-force-bilinear=1 |
--gs-ignore-dirty-page-border | 0, 1 | This seems to be one of pcsx2's Blending accuracy options. | --gs-ignore-dirty-page-border=1 |
--gs-check-trans-rejection | 0, 1 | Check transfer rejection ? | --gs-check-trans-rejection=1 |
--gs-check-trans-rejection68 | 0, 1 | --gs-check-trans-rejection68=1 | |
--gs-skip-dirty-flush-on-mipmap | 0, 1 | Skip flushing the texture cache when mipmap settings change (?) Require mipmap GS CL kernel | --gs-skip-dirty-flush-on-mipmap=1 |
--gs-packed15-fmv-opt | 0, 1 | --gs-packed15-fmv-opt=1 | |
--gs-dirty-page-policy | 0, 1 | --gs-dirty-page-policy=1 | |
--gs-fieldswap-delay | 0, 254 | Wait longer than usual to change field, reduces Sharpness | |
--gs-uv-shift-pointsampling | 0, 1 | Can be used with games like manhunt that have issues with UV light | --gs-uv-shift-pointsampling=1 |
--gs-opt-frbuff-switch | 0, 1 | Used to fix Fmvs | --gs-opt-frbuff-switch=1 |
--gs-ignore-rect-correction | 0, 1 | --gs-ignore-rect-correction=1 | |
--gs-uprender | none,2x2 | Internal resolution upscaler. | --gs-uprender=2x2 |
--gs-upscale | none, gpu, edgesmooth, smooth, motion, motionvec, motionvector, point | Upscaling type Selector | --gs-upscale=EdgeSmooth |
--gs-aspect-ratio | aspect/float (default=0.81) | --gs-aspect-ratio=0.65 | |
--gs-frontend-opt-mode | 0, 1, 2 | Seems to be an optimization for the gs with 1 being safe and 2 being unstable but with good performance | --gs-frontend-opt-mode=1 |
--gs-kernel-cl | h2lpool, clutmerge, mipmap, DarkCloud2, fantavision, | Kernel Variant | --gs-kernel-cl="clutmerge" |
--gs-kernel-cl-up | h2lpool2x2, OptRightTri, clutmerge2x2, mipmap2x2, up2x2simple, up2x2skipinterp, up2x2tc, up2x2, default | Kernel Variant Upscaler, up2x2simple Is the best if you are encountering Upscaling glitches | --gs-kernel-cl-up="clutmerge2x2" |
--gs-motion-factor | 25, 50 | --gs-motion-factor=25 | |
--gs-override-small-tri-area | 0, 1 | Enabling it might fix missing text. | --gs-override-small-tri-area=1 |
--gs-render-tile-threshold | 0, 3000000 | --gs-render-tile-threshold=300000 | |
--gs-scanout-delay | 0, 200 | --gs-scanout-delay=200 | |
--gs-scanout-offsetx | relative offset/ignored | Directly overwrite GS register? | --gs-scanout-offsetx=27 |
--gs-scanout-offsety | relative offset/ignored | Directly overwrite GS register? | --gs-scanout-offsety=27 |
--gs-flush-ad-xyz | always, safe, off, 0 | Force a primitive flush when a framebuffer is also an input texture, fixes some processing effects but it's very heavy on the GS and will cost you performance, GTA: SA and Jak games need this command. | --gs-flush-ad-xyz=safe |
--safe-area-min | area/float (range 0.9 to 1.0) any other values outside of that range will not be accepted by the emulator | --safe-area-min=0.9 | |
Other | |||
--framelimit-mode | slowest,slower,slow,normal,fast,fastest,turbo | a Standalone Framelimiter | --framelimit-mode=fast |
--no-gs | 0, 1 | Debug option that turns gs off | |
--gs-hdr-support | 0, 1? | Enable hdr support ? | |
--idec-cycles-per-qwc | int/multiplier | --idec-cycles-per-qwc=768 |
Vector Units ( VU )
Custom DSPs used to process vertex data, physics calculations, and other related tasks. Settings found here affect VU1 & VU0 & COP2
Command | Values | Notes | Usage |
---|---|---|---|
Game fixes | |||
--vu-xgkick-delay | 0, 8 | Delay xgkick instruction execute, pcsx2 use 6 cycles, emu in ps3 use 2-8 cycles depend on game, Can be used to either cause or fix Graphical glitches | --vu-xgkick-delay=8 |
--vu-hack-triace | 0, 1 | Special hack for games that were Developed by Tri Ace, correct VU addi calculation. Without it result is one bit off, which is enough to break game decryption algo, and thus crashing the game. | --vu-hack-triace=1 |
--vu-branch-hazard | 0, 1 | Disabling it managed to prevent Batman - Rise of Sin Tzu from Crashing | --vu-branch-hazard=0 |
--vu-evil-branches | 0, 1 | Take in count branch in delay slot, or not. More Info | |
--vu-custom-fused-madd | 0, 1 | Custom FMA (fused multiply-add) | --vu-custom-fused-madd=1 |
--vu-custom-min-max | 0, 1 | Custom Max/Mini logic for denormals, Disabled on pcsx2 by default. But enabled by default on the ps4, Disabling it might break some games | --vu-custom-min-max=1 |
Speedhacks | |||
--vu-opt-sf-check | 0, 1 | Updates status flags only on blocks which will read them, known in pcsx2 as mVU flag hack (Speedhack), Won't work with most emulators, confirmed to be supported by Arc Twilight of the Spirits™ | --vu-opt-sf-check=1 |
--vu-opt-jr-caching | 0, 1 | Optimize Jump Register caching. (vi15). Won't work with most emulators, confirmed to be supported by Arc Twilight of the Spirits™ | --vu-opt-jr-caching=1 |
Other | |||
--vu-to-double | 0, 1 | Converts floats to double, Enabling it will increase the VU's Accuracy | |
--vu-d-bit | 0, 1 | Debug break. Halts the VU and sends an interrupt to the EE. | --vu-d-bit=0 |
--vu-t-bit | 0, 1 | Debug halt. Acts similarly to D-bit | --vu-t-bit=0 |
--vu-inst-mflag | 0, 1 | Enable instant mac flag | --vu-inst-mflag=1 |
--vu-inst-cflag | 0, 1 | Enable instant clip flag | --vu-inst-cflag=1 |
--vu-aot-disasm | 0, 1 ? | Seems to be only working in jakxv2, unknown usage | --vu-aot-disasm=1 |
--vtune-vu | ? | ? | |
--vu-jit-disasm | 0, 1, 2 | VU Just-in-time Dissassembler? Seems to be a debug option | 0,1=mips,2=x86 |
--vu-range-merge | vu_inst_cnt | ? |
( VU1 )
VU1 is the GS’s alternate processing unit, Commands here can possibly improve performance and/or Prevent crashes.
Command | Values | Notes | Usage |
---|---|---|---|
Speedhacks | |||
--vu1-mpg-cycles | 1-3000 | Set cycle skipping for VU1 Micro-programs, 100 is default value, Increase the value for better VU1 performance, With no downsides to FMVs | --vu1-mpg-cycles=1000 |
--vu1-di-bits | 0, 1 | 0 to skip setting Invalid, and Div by zero flags in status register. Can be used as speedhack as it skips costly calculations, but at the same time can cause issues like broken geometry. | vu1-di-bits=0 |
--vu1-const-prop | 0, 1 | The constant propagation speedhack is enabled by default. 1 will enable the speedhack and thus improve performance, and 0 will disable it and cause performance issues.More info | --vu1-const-prop=1 |
--vu1-opt-flags | 0, 1, 2 | Optimize flags instances when do VU recompilation (1 is safe, 2 update sticky, and mac flag on every status flag update) More Info | --vu1-opt-flags=0 |
--vu1-opt-vf00 | 0, 1, 2 | Optimization for the vf00 register. Setting it to 1 is safe but setting it to 2 is highly unstable. | --vu1-opt-vf00=2 |
--vu1-jr-cache-policy | newprog, sameprog, auto, new, same | PCSX2 uses newprog as default setting.Info | --vu1-jr-cache-policy=sameprog |
--vu1-jalr-cache-policy | newprog, sameprog, auto, new, same | PCSX2 uses newprog as default setting.Info | --vu1-jalr-cache-policy=sameprog |
--vu1-injection | 0, 1 | unsure what it does, But it might be possibly a command to Keep commands like vu1mpgcycles on during the entire game rather than when vu1 is experiencing slowdowns. | --vu1-injection=1 |
--vu1-opt-subroutine | 0, 1 | Optimization for the VU1 when enabled | |
Game fixes | |||
--vu1 | jit-sync, jit, trans, jit-async | Selector between IR/JIT and it modes, jit-sync works the same as disabling MTVU. | --vu1=jit-sync |
--vu1-no-clamping | 0, 1 | Despite how sony named this command, 1 enables full clamping, 0 Disables it, Can be used to fix graphical glitches. | --vu1-no-clamping=0 |
--vu1-clamp-range | vu1 memory offset start,end (0x0 - 0x3FF) | Values must be 2 bytes or lower and should not exceed 0x0800 | |
--vu1-accurate-addsub-range | vu1 memory offset start,end (0x0 - 0x3FF) | Accurate VU1 Add/Subtract Instructions in specified Address Range, Values must be 2 bytes or lower and should not exceed 0x0800 | --vu1-accurate-addsub-range=0x0000,0x0600 |
--vu1-mul0fix-range | vu1 memory offset start,end (0x0 - 0x3FF) | Enables VU1 to accurately multiply by 0 in specified range | --vu1-mul0fix-range=0x123,0x123 |
--vu1-inst-q | 0, 1 | instant Q, no stalling on WAITQ, or instances of Q, Can fix or cause Graphical glitches. | --vu0-inst-q=1 |
--vu1-inst-p | 0, 1 | instant P, no stalling on WAITP, or instances of P | --vu0-inst-p=1 |
--vu1-use-rcp | 0, 1 | use sse rcp | |
--vu1-use-rsqrt | 0, 1 | use sse rsqrt | |
--vu1-native-patch | 0, 1 | Use native patches from recompiler, not compatible with jak emus, Could be VU1 round mode | --vu1-native-patch=1 |
Other | |||
--vu1-opt-aot | 0, 1? | Seems to be only working in jakxv2, unknown usage | --vu1-opt-aot=1 |
--vu1-aot-outmode | out/overwrite, append | ||
--vu1-aot-start-crc | Offset start | ||
--vu1-aot-end-crc | Offset End?? | ||
--vu1-aot-start-addr | Offset start | ||
--vu1-aot-end-addr | Offset End | ||
--vu1-clamp-operands | 0, 1 | A clamping setting that increases clamping functionality when VU1 clamping is enabled. | --vu1-clamp-operands=1 |
--vu1-clamp-results | 0, 1 | A clamping setting that increases clamping functionality when VU1 clamping is enabled. | --vu1-clamp-results=1 |
--assert-path1-ad | 0, 1 | Path 1 is how the GIF takes data from VU1 via XGKICK instruction. It's unknown what this command does but it's related to VU1 | --assert-path1-ad=1 |
( VU0 )
VU0 is the EE’s alternate processing unit , it is also called "micro-mode"
Command | Values | Notes | Usage |
---|---|---|---|
Speedhacks | |||
--vu0-injection | 0, 1 | no one knows what this is used for | --vu0-injection=1 |
--vu0-mpg-cycles | 100-3000 | set initial cycles for vu0 microprograms, 100 is the Default value, 3000 Should more than enough for performance | --vu0-mpg-cycles=1000 |
--vu0-di-bits | 0, 1 | 0 to skip setting Invalid, and Div by zero flags in status register. Can be used as speedhack as it skips costly calculations, but at the same time can cause issues like broken geometry, and weird physics behavior. Depending per game. | --vu0-di-bits=0 |
--vu0-const-prop | 0, 1 | Constant propagation, can Be used as speedhack for VU0 hungry games when set to 1 More info | --vu0-const-prop=0 |
--vu0-opt-vf00 | 0, 1, 2 | Optimization for the vf00 register. Setting it to 1 is safe but setting it to 2 is highly unstable. | --vu0-opt-vf00=1 |
--vu0-opt-subroutine | 0, 1? | ||
--vu0-opt-flags | 0, 1, 2 | Optimize flags when do VU recompilation (1 is safe, 2 update sticky, and mac flag on every status flag update) More Info | --vu0-opt-flags=1 |
--vu0-jr-cache-policy | newprog, sameprog, auto, new, same | PCSX2 use newprog as default setting Info | --vu0-jr-cache-policy=sameprog |
--vu0-jalr-cache-policy | newprog, sameprog, auto, new, same | PCSX2 use newprog as default setting Info | --vu0-jalr-cache-policy=sameprog |
Game fixes | |||
--vu0-clamp-range | start, end offset (0x0 - 0xA000) | per range clamping for VU0 | --vu0-clamp-range=0x100,0x120 |
--vu0-no-clamping | 0, 1 | Set to 1 to enable clamping for VU0, Set to 0 to disable it. | --vu0-no-clamping=0 |
--vu0-inst-q | 0, 1 | instant Q, no stalling on WAITQ, or instances of Q | --vu0-inst-q=1 |
--vu0-inst-p | 0, 1 | instant P, not stalling on WAITP, or instances of P | --vu0-inst-p=1 |
--vu0-use-rcp | 0, 1 | use sse rcp | --vu0-use-rcp=1 |
--vu0-use-rsqrt | 0, 1 | use sse rsqrt | --vu0-use-rsqrt=1 |
--vu0-accurate-addsub-range | offset (0x0 - 0xA000) | Accurate VU0 Add/Subtract Instructions in specified Address range | |
--vu0-mul0fix-range | vu0 memory offset start,end (0x0 - 0xA000) | Fix for games that multiply by zero | |
Other | |||
--vu0-clamp-operands | 0, 1 | A clamping setting that increases clamping functionality when VU0 clamping is enabled. | --vu0-clamp-operands=1 |
--vu0-clamp-results | 0, 1 | A clamping setting that increases clamping functionality when VU0 clamping is enabled. | --vu0-clamp-results=1 |
--vu0-opt-aot | 0, 1 ? | Seems to be only working in jakxv2, unknown usage | --vu0-opt-aot=1 |
--vu0-aot-outmode | out/overwrite, append | ||
--vu0-aot-start-addr | start address | Seems to be PS3 command 0x12 replacement ahead of time compilation with CRC then to start, and CRC when to finish, or VBLANK | |
--vu0-aot-end-addr | end address for ahead of time compilation | ||
--vu0-aot-start-crc | ? | verify crc for aot start block (registers) | |
--vu0-aot-end-crc | ? | verify crc for aot end block (registers) |
( COP2 )
COP2, Also known as VU0 Macro-mode. these commands "may" only be useful for games that use M-bit
Command | Values | Notes | Usage |
---|---|---|---|
Speedhacks | |||
--cop2-opt-flags | 0, 1 ,2 | Optimize flags when do VU recompilation (1 is safe, 2 update sticky, and mac flag on every status flag update) More Info | --cop2-opt-flags=1 |
--cop2-opt-vf00 | 0, 1, 2 | Optimization for the vf00 register. Setting it to 1 is safe but setting it to 2 is highly unstable. | --cop2-opt-vf00=1 |
--cop2-const-prop | 0, 1 | Constant propagation, Can Be Used as speedhack for cop2 hungry games when set to 1 More info | --cop2-const-prop=1 |
--cop2-di-bits | 0, 1 | 0 to skip setting Invalid, and Div by Zero flags in status register, and therefore improve performance. Can be used as speedhack as it skip costly calculations. | --cop2-di-bits=0 |
Game fixes | |||
--cop2-no-clamping | 0, 1 | Setting it to 1 enables COP2 clamping, Setting it to 0 disables it. | --cop2-no-clamping=0 |
--cop2-regalloc | 0, 1 ? | PCSX2 seems to have this enabled by default. | |
--cop2-inst-q | 0, 1 | instant Q, no stalling on VWAITQ, or instances of Q. | |
--cop2-inst-p | 0, 1 | instant P, no stalling on VWAITP, or instances of P. | |
--cop2-use-rcp | 0, 1 | use sse rcp | |
--cop2-use-rsqrt | 0, 1 | use sse rsqrt | --cop2-use-rsqrt=0 |
--cop2-accurate-range | start,end offset (0x0 - 0x1FFFFFF) | Accurate COP2 Assembly instructions in the cop2 Address range, Can be used to fix SPS | --cop2-accurate-range=0x123456,0x134567 |
--cop2-no-clamp-range | start,end offset (0x0 - 0x1FFFFFF) | Full clamping for COP2 in selected range | --cop2-no-clamp-range=0x123456,0x134567 |
--cop2-accurate-mul-range | start,end offset (0x0 - 0x1FFFFFF) | Accurate Multiplication instructions in the cop2 Address range | --cop2-accurate-mul-range=0x123456,0x134567 |
--cop2-accurate-mul | offset (0x0 - 0x1FFFFFF) | Accurate Multiplication instructions in the cop2 Address | --cop2-accurate-mul=0x123456 |
--cop2-accurate-addsub-range | start,end offset (0x0 - 0x1FFFFFF) | Accurate Add/Subtract instructions in the cop2 Address range | --cop2-accurate-addsub-range=0x123456,0x134567 |
--cop2-accurate-addsub | offset (0x0 - 0x1FFFFFF) | Accurate Add/Subtract instructions in the cop2 Address | --cop2-accurate-addsub=0x123456 |
Other | |||
--cop2-clamp-operands | 0, 1 | A clamping setting that increases clamping functionality when COP2 clamping is enabled. | --cop2-clamp-operands=1 |
--cop2-clamp-results | 0, 1 | A clamping setting that increases clamping functionality when COP2 clamping is enabled. | --cop2-clamp-results=1 |
--cop2 | jit - trans | Uknown usage |
( CDVD )
Commands for changing the nature of CDVD emulation.
Command | Values | Notes | Usage |
---|---|---|---|
Game fixes | |||
--cdvd-sector-read-cycles | 1, 40000 | Set DVD reading speed, higher values are slower, lower values are faster, Kinetica uses 40000, Psychonauts 4000, Red dead revolver 5000, Rise of kasai 31000, some games require moderate speed, too slow or too fast could cause audio problems. |
--cdvd-sector-read-cycles=40000 |
--cdvd-sector-seek-cycles | 1, 40000 | Fixes boot-up sometimes, More info here [2], similar usage and effect as cdvd-sector-read-cycles | --cdvd-sector-seek-cycles=1 |
Misc | |||
--max-disc-num | 1-5 | numbers of discs in package (maximum=5) | --max-disc-num=1 |
--boot-disc-id | 1-5 | sets boot disc for multi-disc pkg | --boot-disc-id=0 |
--switch-disc-reset | 0, 1 | 0 Can be used to prevent Resetting the game when switching multiple discs, useful for games like SW2 that have Import data Feature | --switch-disc-reset=1 |
--cdvd-determinism | 0, 1 | Determines if the iso is double layer or not (?) | --cdvd-determinism=1 |
--verbose-cdvd-reads | 0, 1 | Seems to slightly improve reading speed when enabled (?) | --verbose-cdvd-reads=1 |
( IOP )
The emulated I/O Processor (IOP) settings, Commands here are rarely useful, since the ps4 emulates it very accurately, very few games will require these options. the iop controls the emulated DEV9, SPU2, USB, Memory cards, CDVD, Firewire, along with other input/output Devices
Command | Values | Notes | Usage |
---|---|---|---|
Game fixes | |||
--iop-cycle-scalar | [Overclocking] (0.99 => 0.1) [Cycle skipping] (1.1 => 5.0) |
Not a Speedhack, when you lower it below 1.0 the iop is overclocked, when you increase it above 1.0 the iop cycles are skipped. the only thing you will notice from this is faster/slower loading speed | --iop-cycle-scalar=1.0 |
--iop-const-folding | None,Gpr,All | IOP constant folding More info | --iop-const-folding=All |
--iop-tight-slice-count | 12? | --iop-tight-slice-count=12 | |
--iop-hook | AdvanceClock, FastForwardClock | iop native hook | --iop-hook=0x0086ac,FastForwardClock |
--iop-block-validation | IsC, ShortHash, Hash | Way of validating that block been modified, and require recompilation, other Possible values include PageProt, None, PageProtection | --iop-block-validation=IsC |
Other | |||
--iop-validate-kernel | 0, 1 | ||
--iop-shorthash-len | inst_count/integer | Length of shorthash in instruction/opcode count. Require --iop-block-validation=ShortHash | |
--iop-pc-coherency | 0, 1 | Most likely updates the (Program counter) more frequently for the iop (?) | |
--iop-inst-marking | 0, 1? | ||
--iop-jit-disasm | |||
--iop-evt-check-full |
( SIF )
The SIF is how the EE and IOP communicate with each other. SIF has some mailbox hardware registers that the CPUs can use to pass values to each other, which happens during SIF initialization. However, once both sides have booted, they use the SIF0 (IOP->EE) and SIF1 (EE->IOP) DMA channels to communicate. Contrary to popular belief, These commands have absolutely no effect on performance.
Command | Values | Notes | Usage | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Game fixes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
--ee-sif0-cycle-scalar || || '''Not a Speedhack''', Sif0 cycle skipping, loading times will increase and the graphics will stutter, Not recommended. [https://github.com/PCSX2/pcsx2/blob/master/pcsx2/Sif0.cpp#L33 More info here] || --ee-sif0-cycle-scalar=6000 |- | --ee-sif1-cycle-scalar || || '''Not a Speedhack''', Sif1 cycle skipping, you will only encounter stuttering graphics, may be helpful as a debug option for some games that require better sif1 Sync, not recommended. [https://github.com/PCSX2/pcsx2/blob/master/pcsx2/Sif1.cpp#L34 more info here] || --ee-sif1-cycle-scalar=6000 |- | --iop-sif0-cycle-scalar || || '''Not a Speedhack''', IOP's Sif0 cycle scalar [https://github.com/PCSX2/pcsx2/blob/master/pcsx2/Sif0.cpp#L34 more info here] || --iop-sif0-cycle-scalar=1.0 |- | --iop-sif1-cycle-scalar || || '''Not a Speedhack''', IOP's Sif1 cycle scalar [https://github.com/PCSX2/pcsx2/blob/master/pcsx2/Sif1.cpp#L35 more info here] || --iop-sif1-cycle-scalar=1.0 |- |} ==== PCSX2's Gameindex.yaml Settings ==== <br>[https://raw.githubusercontent.com/PCSX2/pcsx2/master/bin/resources/GameIndex.yaml Current Gameindex.yaml] <br>[https://github.com/Scalerize/Pcsx2-gameindexes Old Gameindex.yaml files in case these settings get deleted from PCSX2] <pre>This list will help you use PCSX2's gameindex settings on the ps4. These commands are fully tested. there's no need to edit them
EmulatorsEvery emulator is programmed in a different way, Sometimes Choosing the right emulator is the only possible way to fix a game, this list includes The typical usage of some of The emulators.
XXXX-YYYYY_config.luaIt is the most powerful Configuration on the emulator, it Allows direct patching of EE/IOP/VU memory, hooks registers, hook dma, '''almost Everything can be done here'''. If needed it can hook registers by using register names from alias files. Alias files (ee-cpr0-alias.lua, ee-gpr-alias.lua, ee-hwaddr.lua) are stored in lua_include folder, and can be included to config by using require ( "alias file name" ). Known functions: Require cleanup. ApiRequestThe most important part of a lua. without it the lua will crash the game.
(Emulator) EmuObjectCommands for the emulatorEnableImposeMenu || emuObj.EnableImposeMenu(<true/false>) || EnableImposeMenu(false)
(EE) EEObjectCommands for the emulated Emotion Engine
(IOP) IOPObjectCommands for the emulated input-output processor
(GS) GsObjectCommands for the emulated Graphics synthesizer
Does not require Object calling or Uknown
Note: eeObj, emuObj, gsObj, etc are described as required, this is not really true. You can set functions locals they use as whatever you want, but due to specify of that emulator it will be better to keep official naming used in official configs.
Other objects
Registers for hookRegisters defined in alias files. GetGpr/SetGpr gpr.zero gpr.at gpr.v0 gpr.v1 gpr.a0 gpr.a1 gpr.a2 gpr.a3 gpr.t0 gpr.t1 gpr.t2 gpr.t3 gpr.t4 gpr.t5 gpr.t6 gpr.t7 gpr.s0 gpr.s1 gpr.s2 gpr.s3 gpr.s4 gpr.s5 gpr.s6 gpr.s7 gpr.t8 gpr.t9 gpr.k0 gpr.k1 gpr.gp gpr.sp gpr.fp gpr.ra gpr.lo gpr.hi gpr.sa example: eeObj.GetGpr(gpr.a1) GetCPR0/SetCPR0 cpr.index cpr.pagemask cpr.random cpr.wired cpr.entrylo0 cpr.badvaddr cpr.entrylo1 cpr.count cpr.context cpr.entryhi cpr.compare cpr.config cpr.taglo cpr.status cpr.badpaddr cpr.taghi cpr.cause cpr.hwbk cpr.errorepc cpr.epc cpr.pccr cpr.prid example: eeObj.GetCPR0(cpr.status) Registers information
Aside from zero, all GPRs may be freely accessed if convention rules are respected. SetGsTitleFixOne of the most important commands in lua, allows to change the GS's behavior. Part of EmuObject() class, used frequently in official configs. Examples -- fix vision logo (Wild Arms 3) local thresholdArea = 0 -- ignore alls items : fix #112276 emuObj.SetGsTitleFix( "ignoreUpRender", thresholdArea , { texType = 3, cbp = 0x2390, tbp = 0x288000} ) ------------------------------------------------------------------------------------------------------ -- Ignore up-render shift for triangles when writing mask = write alpha only . Will fix shadows (bug# 6724). emuObj.SetGsTitleFix( "ignoreUpShiftTri", "reserved" , { fbmask = 0x00FFFFFF } ) ------------------------------------------------------------------------------------------------------ -- Performance fix ( bug# 9474 ) if 0 then -- emuObj.IsNeoMode() then -- neo mode check disabled, due to bug #10442 emuObj.SetGsTitleFix( "globalSet", "reserved", { workLoadThreshold = 125000} ) else emuObj.SetGsTitleFix( "globalSet", "reserved", { workLoadThreshold = 100000} ) end ------------------------------------------------------------------------------------------------------ -- bug# 9972 emuObj.SetGsTitleFix( "ignoreSubBuffCov", "reserved", { } ) ------------------------------------------------------------------------------------------------------ -- Bully bug 9392 -- Performace fix local thresholdArea = 600 emuObj.SetGsTitleFix( "ignoreUpRender", thresholdArea , {alpha=0x80000044 , zmsk=1 , tw=4, th=4 } ) ------------------------------------------------------------------------------------------------------ -- Bug#9174 - emuObj.SetGsTitleFix( "ignoreSubBuffCov", "reserved", { } ) ------------------------------------------------------------------------------------------------------ -- Bug#9240 (Light maps uprender) -- Copy z-buffer for future use with light maps. psm = SCE_GS_PSMZ24 (49) emuObj.SetGsTitleFix( "forceSimpleFetch", "reserved", {tw=9, th=9, psm=49, zmsk=1 } ) ------------------------------------------------------------------------------------------------------ -- Apply light maps texMode=2 (bilinear) psm= SCE_GS_PSMCT32 (0) emuObj.SetGsTitleFix( "forceSimpleFetch", "reserved", {tw=8, th=8, psm=0, ztst=1, texMode=2 } ) ------------------------------------------------------------------------------------------------------ -- Performace fix (bug #9785 ) emuObj.SetGsTitleFix( "globalSet", "reserved", { waveThreshold = 90000} ) emuObj.SetGsTitleFix( "ignoreAreaUpdate", 0, { } ) ------------------------------------------------------------------------------------------------------ -- Accumulate fill area only when conditions are met emuObj.SetGsTitleFix( "includeAreaUpdate", "reserved" , {alphaIsNot = 0, zmsk = 1, tw = 6, th = 6 , tbp = 0x00302000} ) emuObj.SetGsTitleFix( "ignoreUpRender", 130 , { totalArea= 700} ) ------------------------------------------------------------------------------------------------------ -- Fix shadow emuObj.SetGsTitleFix( "forceSimpleFetch", "reserved", { texMode=1 } ) ------------------------------------------------------------------------------------------------------ -- Reduce flush count emuObj.SetGsTitleFix( "SetSelfRender", "reserved", { fbmask= 0x00FFFFFF , renderSelf=1 , zmsk=1 , alpha=0 , texMode=1 } ) ------------------------------------------------------------------------------------------------------ -- Disable post-processing emuObj.SetGsTitleFix( "ignoreSprite", "reserved", { texType=1 , tw=5 , th=8, zmsk=1 , alpha=0x80000044 } ) ------------------------------------------------------------------------------------------------------ -- Small triangle rejection. Works in conjunction with CLI setting gs-override-small-tri-area=1 -- keep default area for texture 256x256 ( no blend) (Anakin face) emuObj.SetGsTitleFix( "setRejectionArea", 500,{twIsNot=8, thIsNot=8 } ) ------------------------------------------------------------------------------------------------------ -- Set triangle rejection area= 1000 when alpha blend is not 0 ( i.e blend is On) emuObj.SetGsTitleFix( "setRejectionArea", 1000, {alphaIsNot=0 } ) ------------------------------------------------------------------------------------------------------ -- Performace fix local thresholdArea = 600 emuObj.SetGsTitleFix( "ignoreUpRender", thresholdArea , {alpha=0x80008068 , zmsk=1 } ) ------------------------------------------------------------------------------------------------------ -- Performace fix local thresholdArea = 700 emuObj.SetGsTitleFix( "ignoreUpRender", thresholdArea , {alpha=0x80000044 , zmsk=1 } ) ------------------------------------------------------------------------------------------------------ -- Disable uprender on the draw command which samples the framebuffer (0x3200) using bilinear sampling (texMode=2) -- All lighting effects use TriFan prim type, so use that as well to filter against. emuObj.SetGsTitleFix( "forceSimpleFetch", "reserved", {prim=5, texMode=2, tbp=0x320000} )
Arguments/variables
Official examplesYou can find the rest of them here
require( "ee-gpr-alias" ) -- you can access EE GPR by alias (gpr.a0 / gpr["a0"]) apiRequest(0.1) -- EA sports cricket 07 bug 9392 -- Performance fix local emuObj = getEmuObject() local thresholdArea = 600 emuObj.SetGsTitleFix( "ignoreUpRender", thresholdArea , {alpha=0x80000044 , zmsk=1 , tw=4, th=4 } ) Custom config.lua examplesHere is the first custom lua config created by the community: apiRequest(0.1) -- Fix black screen SLUS-20064 eeInsnReplace(0x1CF3CC, 0x4100ffff, 0x00000000) -- bc0f 0x1CF3CC to nop This is very basic command to replace part of EE memory with other instruction.
Other custom configurations made by users can be found here Memory Mapping
Registers MapIncomplete. Warning: 0x1000000xxx base is not guaranteed in different emu revisions, but layout should be the same regardless of base. Some emulators require all of these addresses to be reduced by 8 hex values for currently unknown reasons.
Open CL and FloatsPS4 native Floating point supports and OpenCL info, for both CPU, and GPU. Understanding of floating points conversion is very important in emulating PS2.
CPU
GPU
PS3 Config supportEmulator support configs in format known from ps2_netemu/ps2classic from PS3. This feature was officially used in Arc the Lad Twilight of the Spirits ps2-ps4 classic. To enable ps3 style config add this to config-emu-ps4.txt: --lopnor-config=1 --ps2-title-id=TITLE-ID Config file need to be in folder ...'''/patches/{TITLE-ID}/''' and file need to have name '''{TITLE-ID}_lopnor.cfgbin'''. title id need to be in XXXX-YYYYY format (ex. SLUS-12345). Example path: /patches/SLUS-12345/SLUS-12345_lopnor.cfgbin Tester confirmed that configs work like that. We don't even need to edit them, they work as is. Please keep in mind that not all commands are recognized, only 0x01 (can depend upon emu revision), 0x09, 0x0A, 0x0B, 0x0F, 0x10, 0x26, 0x27, 0x42. For example Rayman 3 config Does not work due to the command being unsupported Command 0x07 is NOT recognized, but can be manually translated to cli config (to: --vu-xgkick-delay=value). Same goes for 0x11 (--vu0-accurate-addsub-range can be used).
Known issuesList of known issues in the PS4's PS2 emulator
Diagnosing problemsThis guide will assist you in tracing the issue's cause,The list is based on what you can possibly solve using CLI
Performance bottleneck order: VU1 ==> EE ==> FPU ==> GS ==> VU0/COP2 Note: VU1 Speedhacks will be the most effective for performance. Debugging through PS4CHEATER: You can also use for instance the program PS4CHEATER and add the addresses of 1000000368 1000000360 And change the type into > View as Hex. One of them will show the Current (Program counter) which will lead you to find out which EE offset the game gets stuck on! TutorialsEmulator's grammarThis list was made since most of the emulator's Commands and /or Wiki instructions are hard to comprehend for most users. Insn = Instruction | lopnor = (Ps3 config) [It's unknown what lopnor stands for] Addsub = Add / Subtract (MATH) | CLI = Command line instruction (?) muldiv = Multiply / Divide (MATH) | Mem = Memory opt = Optimize (?) | Int = Integer (?) jr = Jump register | cmd = Command ad = Address (?) | XXXX-YYYYY = The ps2 game's region code inst = Instant (?) | PC = Program counter Scalar = A multiplier for the default value | Hook = Attach a function to an offset r59 = EE | r30 = IOP | =============================================================================================================================================== CLIMaking a comment inside the CLI, and making the CLI. #You can make a comment inside a cli by using a Hashtag (#) #Your comments will be fully ignored if they are in the same line as the hashtag #As for hyphens, (--) they are used in a cli so that the ps4 understands that it is a command #And as for the equals, (=) everything that comes after it is the value that the command will use --vu1-mpg-cycles=1000 #On a lua hyphens (--) mean it is a comment, but on the cli it's the start of the command. --ee-cycle-scalar=1.6 #Some cli commands support multiple values. --ee-hook=0x0028A578,AdvanceClock,,1000 LUAMaking a lua When making a lua there is 1 part that is always necessary (Apirequest) and 2 parts that are almost always necessary (Object) (Object's commands). By order it goes like this: 1. Apirequest 2. Object calling, gsobj/eeobj/iopobj, etc 3. the object's command You cannot call an object without first requesting an api, as that will cause a crash. and you most certainly cannot use an object's command without calling the object first For instance you cannot use iopObj.ReadMem32(0x400000) Without first having this in your lua local iopObj = getIOPObject() Making a comment inside the lua -- You can make a comment in a lua by using two hyphens (--) -- Your comments will be ignored by the lua -- author=refraction apiRequest(0.1) local eeObj = getEEObject() local emuObj = getEmuObject() local patcher = function() eeObj.WriteMem32(0x0037EB14,0x4b000460) end emuObj.AddVsyncHook(patcher) PS2 BiosDescriptionThe PS2 bios is the file PS20220WD20050620.crack included in every PS2 game .pkg. It Is exactly the same BIOS that Sony used in ps2_netemu.self in PS3. Due to lack of many X modules homebrew compatibility is limited, and many of those need to be recompiled to use non X versions of modules, or need to load open source versions of them thru mc/cdvd. Important non X module that is missing is libsd, and homebrew that need it, will most likely fail to boot, or error.
Bios version seems to be Developement v2.20 from Japan region (22/01/2007), but it's of course not limited to booting only NTSC-J games. Emulator not support USB peripherals, but this seems to be not limitation of BIOS, as it is used also in CECH C/E PS3 consoles. There are signs that different bios version exist, named PS20190AC20030623_nordram_miniOSD.bin. This bios have included handy extensions for debugging, and can debug print with "debug osd verbosity" from CLI set to "verbose". Most noticeable difference for both bios files seems to be special RDRAM module. While PS3 emulators patch bios to preferred region, emulator used in PS4 use so called CallHook which is known better for pcsx2 users as fastboot. No need to describe patch here, just look at PCSX2 fastboot code. It's literally the same code, but PS4 emus don't have patches for different bios revisions.
File name: PS20220WD20050620.crack MD5: 83AD2B530C9C102A561BA1CDC6D996D5 Files inside ROM image
Description source: https://gist.github.com/uyjulian/25291080f083987d3f3c134f593483c5 Game_ID/DiscID in PS20220WD20050620.crackThere are 193 titleIDs listed inside XPARAM2.ELF file of PS2 Bios included in PS20220WD20050620.crack. XPARAM2.ELF is called by OSDSYS, then ID check is performed. If titleID match to one of included in the table, different IOP emulation settings are applied. This include blacklisting for some specific titles. Original PS2 bios from models with emulated IOP, include similar list file called XPARAM.ELF. Title IDs there are not the same, although some of them exist on both lists.
Folder/File layoutExample: Max Payne Classic ├── config-emu-ps4.txt ├── docs │ └── revision.h ├── eboot.bin ├── feature_data │ └── SLES-50326_features.lua ├── formatted.card ├── image │ └── disc01.iso ├── lua_include │ ├── ee-cpr0-alias.lua │ ├── ee-gpr-alias.lua │ ├── ee-hwaddr.lua │ ├── language.lua │ ├── pad-and-key.lua │ ├── ps2.lua │ └── utils.lua ├── patches │ └── SLES-50326_cli.conf ├── PS20220WD20050620.crack ├── ps2-emu-compiler.self ├── sce_companion_httpd │ └── html │ ├── BackCover.jpg │ ├── base │ │ ├── arrow_up.png │ │ └── sprites.png │ ├── css │ │ ├── default-skin.png │ │ └── styles.min.css │ ├── index.html │ ├── js │ │ └── app.min.js │ ├── large │ │ ├── Box01.jpg │ │ ├── Box04.jpg │ │ ├── landscape │ │ │ ├── Box01.jpg │ │ │ ├── Box04.jpg │ │ │ ├── Page01.jpg From 01 to 59 │ │ │ └── Page59.jpg │ │ ├── Page01.jpg From 01 to 116 │ │ └── Page116.jpg │ ├── medium │ │ ├── Box01.jpg │ │ ├── Box04.jpg │ │ ├── landscape │ │ │ ├── Box01.jpg │ │ │ ├── Box04.jpg │ │ │ ├── Page01.jpg From 01 to 59 │ │ │ └── Page59.jpg │ │ ├── Page01.jpg from 01 to 116 │ │ └── Page116.jpg │ ├── small │ │ ├── Box01.jpg from 01 to 04 │ │ ├── Box04.jpg │ │ ├── landscape │ │ │ ├── Box01.jpg from 01 to 04 │ │ │ ├── Box04.jpg │ │ │ ├── Page01.jpg From 01 to 59 │ │ │ └── Page59.jpg │ │ ├── Page01.jpg From 01 to 116 │ │ └── Page116.jpg │ └── thumbnails │ ├── BoxThumb01.jpg │ ├── BoxThumb04.jpg │ ├── landscape │ │ ├── BoxThumb01.jpg │ │ ├── BoxThumb04.jpg │ │ ├── Thumb01.jpg from 01 to 59 │ │ └── Thumb59.jpg │ ├── Thumb01.jpg From 01 to 116 │ └── Thumb116.jpg ├── sce_module │ ├── libc.prx │ └── libSceFios2.prx ├── sce_sys │ ├── about │ │ └── right.sprx │ └── keystone └── trophy_data └── SLES-50326_trophies.lua LinksThese links can Assist you in improving your knowledge about ps2 emulation
|