Editing PS2 Emulation
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 2: | Line 2: | ||
= Description = | = Description = | ||
<pre>PlayStation 2 emulation on the PlayStation 4 is handled with little difference to the PlayStation 3. | |||
Some issues on PS3's PS2 emulator were left unfixed on the PlayStation 4. Consequently, the PS4 inherited some of PS3's emulation glitches, while introducing new ones. | |||
The new issues came as a result of PS4's weakness with emulation, which likely resulted in the trade of accuracy for performance. | |||
Each | Each PS2ONPS4 package file (.pkg) includes the emulator itself. The ps4 does not have a native built-in emulator in its firmware, but it does a few PS2 emulator specific features, like the functions sceLncUtilIsPs2Emu, sceShellCoreUtilGetImposeMenuFlagForPs2Emu, sceSystemServiceAddLocalProcessForPs2Emu, and sceSystemServiceShowImposeMenuForPs2Emu. | ||
Emulators are programmed to be accurate for the games they were designed to emulate. In turn, this makes accurate emulation challenging, as emulators include per title patches and different default settings. The Playstation 2 hardware is a complex system to emulate; any small change in configuration can make or break a game. | |||
Currently the most commonly used emulator is Jakv2 as it is the most compatible one out there. When game crashes are concerned, RECVX is typically used, whereas for VU accuracy it is roguev1. | |||
The PS2 BIOS is included in the game's pkg | The PS2 BIOS is included in the game's pkg, the same one used on the ps2_netemu. The lack of encryption mechanism for PS2 game disc image file is also important. This time it is a plain ISO file, but the emulator still supports LIMG sector that allows the usage of non-2048 sector size discs. Moreover, memory cards are also decrypted, but the emulator checks the CRC of some of the regions to ensure that the memory card was not modified. This PS2 Emulator also supports LUA scripting by "Lua Bridge", which is a powerful interface that may prove exceptionally handy in fixing games. | ||
This is first time that Sony has ever cared about floats in its emulators. Compared to the PS3 CPU, x86-64 is doing a worse job in mimicking 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 | This is first time that Sony has ever cared about floats in its emulators. Compared to the PS3 CPU, x86-64 is doing a worse job in mimicking 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 likely other components as well.</pre> | ||
= Emulator Configuration = | = Emulator Configuration = | ||
Line 155: | Line 158: | ||
=== XXXX-YYYYY_cli.conf commands === | === XXXX-YYYYY_cli.conf commands === | ||
<pre>These commands work in config-emu-ps4.txt, but the official way to use them is through the CLI file (It is also needed for multi-disc packages). Additionally, some commands are still not discovered, and known commands might be missing their values. | <pre>These commands work in config-emu-ps4.txt, but the official way to use them is through the CLI file (It is also needed for multi-disc packages). Additionally, some commands are still not discovered, and known commands might be missing their values. </pre> | ||
All commands are pre-made. Creating new CLI commands is impossible. | <pre>All commands are pre-made. Creating new CLI commands is impossible. | ||
The values of the commands are also pre-defined by Sony and/or have a set of possible values or ranges. | The values of the commands are also pre-defined by Sony and/or have a set of possible values or ranges. | ||
Some CLI commands have no effect, as they were added to the eboot.bin without being programmed. Some useful commands were removed or added in or from different emu revisions, or their effects were changed. In some emulators, CLI configurations can be found in the ram at SceLibcHeap[0]-3-881004000.</pre> | Some CLI commands have no effect, as they were added to the eboot.bin without being programmed. Some useful commands were removed or added in or from different emu revisions, or their effects were changed. In some emulators, CLI configurations can be found in the ram at SceLibcHeap[0]-3-881004000.</pre> | ||
Line 748: | Line 751: | ||
==== PCSX2's gameindex ==== | ==== PCSX2's gameindex ==== | ||
<pre>PCSX2's commands on the PS4 | <pre>PCSX2's commands on the PS4</pre> | ||
<br>[https://raw.githubusercontent.com/PCSX2/pcsx2/master/bin/resources/GameIndex.yaml Current Gameindex.yaml] | <br>[https://raw.githubusercontent.com/PCSX2/pcsx2/master/bin/resources/GameIndex.yaml Current Gameindex.yaml] | ||
Line 842: | Line 845: | ||
<br>It is the most powerful configuration on the emulator, it allows for direct patching of EE/IOP/VU memory, hooks registers, hook dma. Almost Everything can be done here. | <br>It is the most powerful configuration on the emulator, it allows for direct patching of EE/IOP/VU memory, hooks registers, hook dma. Almost Everything can be done here. | ||
<br>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"). | <br>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"). | ||
<br> [[PS2_PS4_LUA|Examples ]] | |||
<br>'''Known functions: | <br>'''Known functions: | ||
''' | ''' | ||
Line 1,814: | Line 1,818: | ||
==== Official PS2 configuration examples ==== | ==== Official PS2 configuration examples ==== | ||
*You can find the rest of the PS2 configurations in [https://www.psdevwiki.com/ps4/ | *You can find the rest of the PS2 configurations in the [https://www.psdevwiki.com/ps4/Talk:PS2_Classics_Emulator_Compatibility_List#Official_PS2emu_Configuration_Files Talk page]. | ||
<br>Canis Canem Edit | <br>Canis Canem Edit |