Editing PSP Emulator

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

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 571: Line 571:


==Compatibility Settings==
==Compatibility Settings==
Emulator file stores compatibility settings for 898 Title IDs (as of 3.65 firmware). Additionally, settings can be supplied by title_specific.bin files. Title IDs are hidden under simple hash, which Sony borrowed from PSP POPS. That's not only similarity between two compatibility systems. Same like on POPS single config entry have 4 bytes ID and 4 bytes value, also here Sony decided to start count from -1, so config ID are in range of -1 - 0x1F. Which gives 33 possible settings per game.<br><br>
Emulator file stores compatibility settings for 898 Title IDs (as of 3.65 firmware). Additionally, settings can be supplied by __sce_menuinfo or title_specific.bin files. Title IDs are hidden under simple hash, which Sony borrowed from PSP POPS. That's not only similarity between two compatibility systems. Same like on POPS single config entry have 4 bytes ID and 4 bytes value, also here Sony decided to start count from -1, so config ID are in range of -1 - 0x1F. Which gives 33 possible settings per game.<br><br>
'''Warning!''' Current version of Vita Adrenaline break internal table settings and use own values in ScePspemuInitTitleSpecificInfoPatched. This is probably reasoning why some games run better outside of Adrenaline (in ARK for example). This is because adrenaline hook's function responsible for reading internal and external config table and use own code that totally skips ScePspemuInitTitleSpecificInfo. This can be fixed by removing "info" patches from titleinfo.c. But new workaround needs to be found for __sce_menu_info ID patch.
'''Warning!''' Current version of Vita Adrenaline seems to break internal table settings and use own values in ScePspemuInitTitleSpecificInfoPatched. This is probably reasoning why some games run better outside of Adrenaline (in ARK for example). This is because adrenaline hook's function responsible for reading config table and use own code that totally skips internal table. This can be easily fixed, just remove ScePspemuInitTitleSpecificInfoRef hooks.  


===Title ID Hash generator===
===Title ID Hash generator===
Line 597: Line 597:
| 0xFFFFFFFF  || Yes || Multi command
| 0xFFFFFFFF  || Yes || Multi command
  bit:
  bit:
    2 = When enabled sceCompatInitEx is called with 0 as a param, when disabled then with 1 as a param.
     20 = Alternative setting for ScePspemuIoCacheBuffer. Seems to be mem permissions related.
    4 = This bit needs to be enabled to make vshSblAimgrIsVITA result not 0.
     31 = PocketStation saves related.
        Keep in mind if vshSblAimgrIsVITA really return zero, this setting doesn't apply (still return 0).
    18 = Force title is not Minis (Minis detection is based on NPEX/NPEZ/NPUX/NPUZ Title ID)
     20 = Alternative setting for ScePspemuIoCacheBuffer memory. Use SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_RW instead SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_NC_RW.
    24 = In one of ScePspemuIoCache related function force use of Memcpy instead of sceDmacMemcpy. Regardless of size or other conditions.
     31 = Enable adhoc for PocketStation titles.
|-
|-
| 0x00 || Unk ||  
| 0x00 || Unk ||  
|-
|-
| 0x01 || No || Some kind of delay. Value is multiplied by 1000 before used.
| 0x01 || Unk ||  
|-
|-
| 0x02 || Unk ||
| 0x02 || Unk ||
Line 617: Line 612:
| 0x05 || Unk ||
| 0x05 || Unk ||
|-
|-
| 0x06 || No || Delay used in ScePspemuRemoteAudioIn. When not set, default value 500 (0x1F4) is used.
| 0x06 || Unk ||
|-
|-
| 0x07 || Unk ||
| 0x07 || Unk ||
Line 623: Line 618:
| 0x08 || Unk ||
| 0x08 || Unk ||
|-
|-
| 0x09 || Unk || Lseek for Msfs related. Game specific as it tests against requested offset. When enabled and offset match, 0x40 is ored to value when sceCompatWriteShared32 is called with id 0x82. 
| 0x09 || Unk ||
|-
|-
| 0x0A || Unk || Some kind of delay. Value is multiplied by 1000 before used.
| 0x0A || Unk ||
|-
|-
| 0x0B || No || Predefined Allegrex memory patches for selected games.
| 0x0B || No || Predefined setting for selected games. Many of them use different comp flags under the hood.
  0x01: UCUS98687 Twisted Metal: Head-On
  0x01: UCUS98687 Twisted Metal: Head-On
  0x02: UCES00018 Twisted Metal: Head-On
  0x02: UCES00018 Twisted Metal: Head-On
Line 655: Line 650:
| 0x0F || Unk ||
| 0x0F || Unk ||
|-
|-
| 0x10 || No || Size for MD5 memory check. Tested memory starts at entrypoint 0x8804000 ends at 0x8804000 + value from config. Require 0x11 command to be active too.
| 0x10 || Unk ||
|-
|-
| 0x11 || No || Expected MD5 memory check result. Value is first 4 bytes of expected MD5 in little endian. Require 0x10 command to be active too, if 0x10 or 0x11 are not active ScePspemuMemoryCheck is skipped.
| 0x11 || Unk ||
|-
|-
| 0x12 || Unk ||
| 0x12 || Unk ||
Line 671: Line 666:
| 0x17 || No || Some kind of delay, used only by PachiPara Slot: Pachi-Slot Super Umi Monogatari. Value is multiplier.  
| 0x17 || No || Some kind of delay, used only by PachiPara Slot: Pachi-Slot Super Umi Monogatari. Value is multiplier.  
|-
|-
| 0x18 || Yes ||  
| 0x18 || Unk ||
|-
|-
| 0x19 || Unk ||
| 0x19 || Unk ||
Line 5,505: Line 5,500:
|-
|-
|}
|}
===External Compatibility Flags===
Beside what is in internal table we can supply our own settings by '''ur0:emu_list/title_specific.bin''' file.
This file if valid, is parsed before internal table and if config for current game is found, internal table is not used. Luckily file is plain bin without any encryption or obfuscation layer. Unluckily emulator try to download new file when vita is online. This gonna need patch or plugin to disable download/overwrite, eventually we can redirect it to our own online database.
Emulator perform few checks to ensure that file is valid:
*File size need to be multiply of 0x88 + 0x10 header.
*File revision need to be 0x0A (for 3.65 emu)
*File magic need to be PSPC
New games can be added by appending entry to current file, 0x21350 is file size limit. ID Hash can be generated using [[PSP_Emulator#Title_ID_Hash_generator|Title ID Hash generator script]]
<br><br>'''Example:'''
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F                  Everything in 4 bytes units. Little endian. Example shows default cfg values.
                                                           
00000000  50 53 50 43 0A 00 00 00 13 1A 00 00 00 00 00 00  PSPC............ magic (PSP Compat), file revision, version (only for print), padding
00000010  78 56 34 12 00 00 00 00 FF FF FF FF FF FF FF FF  ÉŇÄP....˙˙˙˙˙˙˙˙ cfg hash, cfg 0xFFFFFFFF, cfg 0x00, cfg 0x01
00000020  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  A...˙˙˙˙˙˙˙˙˙˙˙˙ cfg 0x02, cfg 0x03, cfg 0x04, cfg 0x05
00000030  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ cfg 0x06, cfg 0x07, cfg 0x08, cfg 0x09
00000040  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ˙˙˙˙˙˙˙˙˙˙˙˙č... cfg 0x0A, cfg 0x0B, cfg 0x0C, cfg 0x0D
00000050  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ cfg 0x0E, cfg 0x0F, cfg 0x10, cfg 0x11
00000060  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ cfg 0x12, cfg 0x13, cfg 0x14, cfg 0x15
00000070  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ cfg 0x16, cfg 0x17, cfg 0x18, cfg 0x19
00000080  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ cfg 0x1A, cfg 0x1B, cfg 0x1C, cfg 0x1D
00000090  FF FF FF FF FF FF FF FF 78 56 34 12 00 00 00 00  ˙˙˙˙˙˙˙˙G!]P..Ŕ† cfg 0x1E, cfg 0x1F, cfg2 hash, cfg2 0xFFFFFFFF
000000A0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ cfg2 0x00, cfg2 0x01, cfg2 0x02, cfg2 0x03
000000B0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ cfg2 0x04, cfg2 0x05, cfg2 0x06, cfg2 0x07
000000C0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ cfg2 0x08, cfg2 0x09, cfg2 0x0A, cfg2 0x0B
000000D0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ cfg2 0x0C, cfg2 0x0D, cfg2 0x0E, cfg2 0x0F
000000E0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ cfg2 0x10, cfg2 0x11, cfg2 0x12, cfg2 0x13
000000F0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ cfg2 0x14, cfg2 0x15, cfg2 0x16, cfg2 0x17
00000100  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ cfg2 0x18, cfg2 0x19, cfg2 0x1A, cfg2 0x1B
00000110  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF  ˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙ cfg2 0x1C, cfg2 0x1D, cfg2 0x1E, cfg2 0x1F
Etc for cfg 3,4,5 and next...


[[Category:Devices]]
[[Category:Devices]]
Please note that all contributions to Vita Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see Vita Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)