Editing PSP 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 1: | Line 1: | ||
=='''PSPHD'''== | =='''PSPHD'''== | ||
The new ps plus psp emulator has a lot of undiscovered functionalities. It even allows patches directly to the emulated Allegrex cpu. | |||
The | Sadly sony has not made it easy for users to use CLI commands. Since sony mostly uses lua patches for the psp releases, not many cli commands were added. Very few commands have a description to their usage inside of the eboot.bin. Everything else is just guesswork from the scene. The psp emulator has not gained the same popularity as the ps2 emulator because currently, there is an unofficial PPSSPP core in the unofficial retroarch port for the ps4. and as far as the compatibility and performance goes, the retroarch core is second to no one. This emulator may still hold potential, though sadly it does not seem to have support for gamedata installation. and that has led to many games becoming currently unusable. with an official retroarch release coming into ps4's way it seems delving deeper into the PSPHD emulator and the PS1's new psplus emulator is pretty useless. | ||
== Commands == | == Commands == | ||
'''Known functions:''' Require cleanup. | '''Known functions:''' Require cleanup. | ||
<br>The rest of the cli and lua commands can all be found inside of an emu's decrypted '''eboot.bin'''. | |||
<br>The rest of the | === config-emu-ps4.txt commands === | ||
''General purpose CLI commands, or unknown usage'' | |||
=== | |||
{| cellspacing="0" cellpadding="2" border="1" class="wikitable" style="text-align: center;" | {| cellspacing="0" cellpadding="2" border="1" class="wikitable" style="text-align: center;" | ||
! Command !! Values !! Notes !! Usage | ! Command !! Values !! Notes !! Usage | ||
Line 74: | Line 16: | ||
|- | |- | ||
| --notrophies || || Enable/disable trophies|| | | --notrophies || || Enable/disable trophies|| | ||
|- | |- | ||
| --locale || || || | | --locale || || || | ||
Line 85: | Line 25: | ||
| --addon || || || | | --addon || || || | ||
|- | |- | ||
| --host || Sets host directory || --host="/hostapp/" | | --host || || Sets host directory || --host="/hostapp/" | ||
|- | |- | ||
| --loglevel || none, all, warn, info, error, debug, trace || debug logging | | --loglevel || none, all, warn, info, error, debug, trace || debug logging | ||
|- | |- | ||
| --xobuttonmode || oenter, ocancel || Switcher between x and circle button, made specifically for japanese gamers | | --xobuttonmode || oenter, ocancel || Switcher between x and circle button, made specifically for japanese gamers | ||
|- | |- | ||
| --lang || Including but not limited to "en" "jp" "fr" "it" || Language selector || --lang="en" | | --lang || Including but not limited to "en" "jp" "fr" "it" || Language selector || --lang="en" | ||
Line 100: | Line 40: | ||
|- | |- | ||
| --samplesave || ? || ? || | | --samplesave || ? || ? || | ||
|- | |||
| --vramcopyback || 0, 10000000 || for games that download data from GPU to Allegrex || --vramcopyback=45 | |||
|- | |||
| --msxxadhoc || true?, false? || ad hoc support ? || | |||
|-style="background-color:#ff99c2" | |-style="background-color:#ff99c2" | ||
| || Graphical fixes || || | | || Graphical fixes || || | ||
|- | |||
| --parappareplacecolor || The command expects 8 Hex values || (rgb?) || | |||
|- | |- | ||
| --antialias || off, MSAA4x, SSAA4x|| Anti-aliasing options || --antialias=off | | --antialias || off, MSAA4x, SSAA4x|| Anti-aliasing options || --antialias=off | ||
|- | |||
| --clamp-line-thickness-min || ? || ? || | |||
|- | |||
| --clamp-line-thickness-max || ? || ? || | |||
|- | |- | ||
| --texcachemode || patchworkheroes drawbounds, drawboundsloco, patchworkheroes, locoroco2, rondo, full || for issues with texture cache (modes lower than full possibly read some textures directly without cache). || --texcachemode=patchworkheroes | | --texcachemode || patchworkheroes drawbounds, drawboundsloco, patchworkheroes, locoroco2, rondo, full || for issues with texture cache (modes lower than full possibly read some textures directly without cache). || --texcachemode=patchworkheroes | ||
Line 113: | Line 63: | ||
| --depthscalehack || true?, false? || ||--depthscalehack=true | | --depthscalehack || true?, false? || ||--depthscalehack=true | ||
|- | |- | ||
| -- | | --texloadcores || 0, 100 || textures to load || texloadcores=2 | ||
|- | |- | ||
| -- | | --smoothlevel || 0, 100 || Mesh smoothing level? || --smoothlevel=0 | ||
|- | |- | ||
| -- | | --anisolevel || 0, 100 || Anisotropic filtering level?? || | ||
|- | |- | ||
| -- | | --parappajapanesefonthack || true?, false? || Enables Support For Japanese Fonts ??|| --parappajapanesefonthack=true | ||
|- | |- | ||
| -- | | --depthscalehack || true?, false? || ||--depthscalehack=true | ||
|- | |- | ||
| -- | | --locorocomeshsmooth || true, false || Custom mesh smoothing for loco roco games|| --locorocomeshsmooth=true | ||
|- | |- | ||
| -- | | --locorocomeshsmoothnonindexed || true, false || Non-indexed mesh smoothing ||--locorocomeshsmoothnonindexed=true | ||
|- | |- | ||
| -- | | --forcenobilinear || true, false || Turn bilinear filtering on/off, setting it to True will fix many graphical glitches in games that use 2D Images ||--forcenobilinear=true | ||
|-style="background-color:#D7EF54" | |||
| || Game fixes || || | |||
|- | |||
| | |||
|- | |- | ||
| -- | | --umddelay || ? || Seems to be I/O timing method, Some games need a delay to work properly. [https://github.com/hrydgard/ppsspp/issues/7647 More here] || | ||
|- | |- | ||
| -- | | --godofwarhack || true?, false? || Seems specifically made for god of war, unknown effect || --godofwarhack=true | ||
|- | |- | ||
| --parappaalphahack || true?, false? || || --parappaalphahack=true | |||
|-style="background-color:#7698FF" | |-style="background-color:#7698FF" | ||
| || Speedhacks | | || Speedhacks || || | ||
|- | |- | ||
| --antialias || off || Turning Anti-Alias Off Improves Performance||--antialias=off | | --antialias || off || Turning Anti-Alias Off Improves Performance||--antialias=off | ||
Line 166: | Line 103: | ||
| --anisolevel || 0, 100 || Anisotropic filtering level?? || | | --anisolevel || 0, 100 || Anisotropic filtering level?? || | ||
|- | |- | ||
| --present || vblankstart, setframebuf, drawsync|| set when frame is presented. Sync issues, flickering screen, tearing, input lag, etc | | --present || vblankstart, setframebuf, drawsync|| set when frame is presented. Sync issues, flickering screen, tearing, input lag, etc. ||--present=setframebuf | ||
|- | |- | ||
| --texrecent || true || Optimize texture hashes ||--texrecent=true | | --texrecent || true || Optimize texture hashes ||--texrecent=true | ||
|} | |} | ||
==== | |||
====Texture replacement==== | |||
{| cellspacing="0" cellpadding="2" border="1" class="wikitable" style="text-align: center;" | {| cellspacing="0" cellpadding="2" border="1" class="wikitable" style="text-align: center;" | ||
! Command !! Values !! Notes !! Usage | ! Command !! Values !! Notes !! Usage | ||
|- | |- | ||
| -- | | --texswitch||true, false|| Enables Texture replacement || --texswitch=true | ||
|- | |- | ||
| -- | | --texsave || || || | ||
|- | |- | ||
| -- | | --texmissingsave || || || | ||
|- | |- | ||
| -- | | --autoresampler || true, false|| Turns on the auto-resampler. Assumes textures in texreplace are at 8x resolution and resamples them at load, May only work on new LocoRoco Midnight Carnival emu || --autoresampler=true | ||
|- | |- | ||
| --texreplace || Directory || Set directory of texture replacement folder || --texreplace="host0:texreplace" | |||
| --texreplace || Directory || Set directory of texture replacement folder || --texreplace="host0:texreplace" | |||
|- | |- | ||
| --replacementfilter || true, false || This forces alpha blending to on for replaced textures. || --replacementfilter=true | | --replacementfilter || true, false || This forces alpha blending to on for replaced textures. || --replacementfilter=true | ||
Line 225: | Line 129: | ||
===XXXXYYYYY_patches.lua=== | ===XXXXYYYYY_patches.lua=== | ||
Your lua can be placed as '''scripts\XXXXYYYYY_patches.lua''' | |||
<br>'''Requires Cleanup'''. | |||
====Emulator commands==== | ====Emulator commands==== | ||
Line 259: | Line 164: | ||
| SaveState ||emuObj.SaveState()|| | | SaveState ||emuObj.SaveState()|| | ||
|- | |- | ||
| SetFDExtraDelay ||emuObj.SetFDExtraDelay()|| | | SetFDExtraDelay ||emuObj.SetFDExtraDelay()|| | ||
|- | |- | ||
| MeshSmooth ||emuObj.MeshSmooth()|| | | MeshSmooth ||emuObj.MeshSmooth()|| | ||
Line 347: | Line 252: | ||
|- | |- | ||
|PadRead || emuObj.PadRead() || | |PadRead || emuObj.PadRead() || | ||
|- | |- | ||
|PadReadPitch || emuObj.PadReadPitch() || | |PadReadPitch || emuObj.PadReadPitch() || | ||
Line 371: | Line 259: | ||
|PadRegisterSamples || emuObj.PadRegisterSamples()|| | |PadRegisterSamples || emuObj.PadRegisterSamples()|| | ||
|- | |- | ||
| PadSetButtonsMode || emuObj.PadSetButtonsMode() || | | PadSetButtonsMode || emuObj.PadSetButtonsMode() || emuObj.PadSetButtonsMode(pad.BUTTONS_MODE_OPTION_IS_SELECT) | ||
|- | |- | ||
| PadVibrate|| emuObj.PadVibrate() || emuObj.PadVibrate(5,180,180) | | PadVibrate|| emuObj.PadVibrate() || emuObj.PadVibrate(5,180,180) | ||
Line 424: | Line 309: | ||
|GetReg||axObj.GetReg()|| | |GetReg||axObj.GetReg()|| | ||
|-style="background-color:#D7EF54" | |-style="background-color:#D7EF54" | ||
| Memory editing || || Do note that the offsets on PPSSPP are | | Memory editing || || Do note that the offsets on PPSSPP are different than the ones on the PS4 | ||
|- | |- | ||
| ReadMem32 || axObj.ReadMem32() || Read 4 bytes from offset | | ReadMem32 || axObj.ReadMem32() || Read 4 bytes from offset | ||
Line 460: | Line 345: | ||
|} | |} | ||
==== | ====Examples==== | ||
<br>''' | <br>'''''LUA example:''''' | ||
<br>"NPEZ00164" | <br> | ||
<br>Coconut Dodge "NPEZ00164" | |||
<pre> | <pre> | ||
local axObj = getAXObject() | local axObj = getAXObject() | ||
Line 469: | Line 355: | ||
local patcher = function() | local patcher = function() | ||
--Infinite lives | --Infinite lives | ||
axObj.WriteMem32(0x8ACA1A4, 0x3) | axObj.WriteMem32(0x8ACA1A4, 0x3) | ||
end | end | ||
emuObj.AddVsyncHook(patcher) | emuObj.AddVsyncHook(patcher) | ||
</pre> | </pre> | ||
=====Patches.lua===== | |||
'''An official lua created by sony for Patapon 2''' | |||
<pre> | <pre> | ||
-- Lua 5.3 | |||
-- Title: Patapon 2 PSP - UCUS-98732 (USA) | |||
-- Lua 5.3 | |||
-- Title: | |||
-- | |||
apiRequest(1.0) -- request version 1.0 API. Calling apiRequest() is mandatory. | apiRequest(1.0) -- request version 1.0 API. Calling apiRequest() is mandatory. | ||
local emuObj = getEmuObject() | local gpr = require( "ax-gpr-alias" ) -- you can access Allegrex GPR by alias (gpr.a0 / gpr["a0"]) | ||
local | local emuObj = getEmuObject() -- emulator | ||
local axObj = getAXObject() -- allegrex | |||
local pad = require("pad") | |||
-- | -- Hook memcpy to catch framebuffer effects | ||
axFuncReplace(0x881D194, "patapon_memcpy") | |||
-- Accelerate some functions | |||
axFuncReplace(0x8804670, "__ptmf_scall") | |||
axFuncReplace(0x8892230, "Renderer__makeWorldMatrix__4psysFv") | |||
-- Accelerate some functions | |||
axFuncReplace(0x8804670, "__ptmf_scall") | |||
axFuncReplace(0x8892230, "Renderer__makeWorldMatrix__4psysFv") | |||
axFuncReplace(0x88209A8, "patapon_strcmp") | axFuncReplace(0x88209A8, "patapon_strcmp") | ||
axFuncReplace(0x8815130, "sceGupSetStatus") | axFuncReplace(0x8815130, "sceGupSetStatus") | ||
Line 969: | Line 768: | ||
== Emulators == | == Emulators == | ||
<pre>Every emulator is programmed in a | <pre>Every emulator is programmed in a different way, sometimes choosing the right emulator is the only possible way to fix a game. Emulators are not provided pre-installed on the ps4, they have to be unpacked from a backup that's downloaded from the ps store from that specific game. this list includes The typical usage of some of The emulators.</pre> | ||
{| cellspacing="0" cellpadding="2" border="1" class="wikitable" style="text-align: center;" | {| cellspacing="0" cellpadding="2" border="1" class="wikitable" style="text-align: center;" | ||
! Emulator !! Usage !! API Version !! Similar emulators ( | ! Emulator !! Usage !! API Version !! Similar emulators (Usage) | ||
|- | |- | ||
| Echochrome || The default psp emulator for PSPFPKG tool at the time of writing and the best in terms of compatibility. || ? || ? | | Echochrome || The default psp emulator for PSPFPKG tool at the time of writing and the best in terms of compatibility. || ? || ? | ||
Line 986: | Line 785: | ||
|- | |- | ||
| PaRappa the Rapper || An unofficial emulator developed by sony with very bad compatibility || ? || ? | | PaRappa the Rapper || An unofficial emulator developed by sony with very bad compatibility || ? || ? | ||
|- | |- | ||
|} | |} | ||
==Memory mapping== | ==Memory mapping== | ||
{| cellspacing="0" cellpadding="2" border="1" class="wikitable" style="text-align: center;" | {| cellspacing="0" cellpadding="2" border="1" class="wikitable" style="text-align: center;" | ||
! | ! Offset From !! Offset To !! Name | ||
|- | |- | ||
| || | | 0x1008000000 || 0x10887FFFFF || Allegrex memory(?) | ||
|- | |- | ||
| | |} | ||
==Register map== | |||
{| cellspacing="0" cellpadding="2" border="1" class="wikitable" style="text-align: center;" | |||
! Register !! Offset | |||
|- | |- | ||
| | | PC?? || 0x20B89FAE8 | ||
|- | |- | ||
| | |} | ||
= Known issues = | |||
{| cellspacing="0" cellpadding="2" border="1" class="wikitable" style="text-align: center;" | |||
| | ! Issue !! Games affected !! Solution !! Description | ||
|- | |- | ||
| | | - || || || | ||
|- | |- | ||
|} | |} | ||
=LUA include files= | |||
<br>Files that need to be placed in the '''/lua_include/''' folder | |||
=LUA include files= | |||
<br>Files that need to be placed in the '''/lua_include/''' folder | |||
'''ax-gpr-alias.lua''' | '''ax-gpr-alias.lua''' | ||
Line 1,376: | Line 859: | ||
</pre> | </pre> | ||
multiapp.lua | |||
<pre> | <pre> | ||
-- Recommended method to import this module: | -- Recommended method to import this module: | ||
Line 1,593: | Line 1,076: | ||
│ ├── ax-gpr-alias.lua | │ ├── ax-gpr-alias.lua | ||
│ ├── multiapp.lua | │ ├── multiapp.lua | ||
│ └── pad.lua | │ └── pad.lua | ||
├── scripts | ├── scripts | ||
Line 2,225: | Line 1,705: | ||
* https://forums.ppsspp.org/showthread.php?tid=11961 | * https://forums.ppsspp.org/showthread.php?tid=11961 | ||
* https://github.com/LunaMoo/PPSSPP_workarounds/blob/master/cheat.db | * https://github.com/LunaMoo/PPSSPP_workarounds/blob/master/cheat.db | ||
===More Information:=== | ===More Information:=== |