Editing POPS
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: | ||
POPS is Playstation 1 emulator for PSP. | |||
==Overwiew== | ==Overwiew== | ||
POPS is | POPS emulator is bundled with PSP firmware since 3.00 release. Currently (6.61) there are 7 different versions bundled with every firmware. This weird approach is not uncommon on psp, and many other modules come with 7 different versions (impose, power, loadexec, etc.). 6.61 bundle pops for 7 PSP generations: 01g(PSP-1000), 02g(PSP-2000), 03g/04g/07g/09g(PSP-3000), 11g(PSP-E1000 known as PSP Street), but like master Yoda like to say, "there is another". Firmware for PSP Go bundle POPS for fifth generation 05g which is of course PSP Go (N1000). Differences are unknown, but changes in strictly emulation code are unlikely, compatibility should be the same. | ||
==Compatibility Flags Values== | ==Compatibility Flags Values== | ||
Line 45: | Line 12: | ||
bit: | bit: | ||
0 = Used in GP0(E3-E4h) handler. | 0 = Used in GP0(E3-E4h) handler. | ||
2 = Used in GP0(A0h) handler. | 2 = Used in GP0(A0h) handler. | ||
3 = | 3 = Used in vblank related function. | ||
4 = Used in gpu dma related function. | 4 = Used in gpu dma related function. | ||
5 = Used in GP0(2x-3xh) commands handler. | 5 = Used in GP0(2x-3xh) commands handler. | ||
6 = Skip GP0(80h) / GP0(A0h) commands (if cmd != 0x80000000) or (if cmd != 0xA0000000). | 6 = Skip GP0(80h) / GP0(A0h) commands (if cmd != 0x80000000) or (if cmd != 0xA0000000). | ||
Probably game accidentally send trash data, and that activate VRAM2VRAM copy. Real PS2 use something similar for Final Fantasy Tactics with 80h cmd. | Probably game accidentally send trash data, and that activate VRAM2VRAM copy. Real PS2 use something similar for Final Fantasy Tactics with 80h cmd. | ||
7 = Spu | 7 = Spu related setting. | ||
8 = Spu | 8 = Spu related setting. | ||
9 = Spu dma related setting | 9 = Spu dma related setting. | ||
10 = Cdrom | 10 = Cdrom related, when enabled seems to update msf/lba more frequently. | ||
12 = | 12 = Counters/timers related setting. | ||
13 = Cdrom related setting. When enabled max_disc_lba_without_lead_out is used instead of second_track_lba in one function. | 13 = Cdrom related setting. When enabled max_disc_lba_without_lead_out is used instead of second_track_lba in one function. | ||
16 = Skip some additional checks for Pause/ReadS/ReadN/GetTN/Setmode cmds during cdrom command processing. | 16 = Skip some additional checks for Pause/ReadS/ReadN/GetTN/Setmode cmds during cdrom command processing. | ||
17 = Used in MDEC related functions | 17 = Used in MDEC related functions. | ||
20 = Use second nBuf in sceCtrlPeekBufferNegative instead of first one. | |||
20 = Use second nBuf in sceCtrlPeekBufferNegative instead of first one | |||
23 = Allows discs to be swapped at any time, regardless of game prompting to or not. | 23 = Allows discs to be swapped at any time, regardless of game prompting to or not. | ||
24 = In GP0(02h) - Fill Rectangle in VRAM command. Top Left Corner X position & 0x3F0, without command Top Left Corner X position & 0x3FF. | 24 = In GP0(02h) - Fill Rectangle in VRAM command. Top Left Corner X position & 0x3F0, without command Top Left Corner X position & 0x3FF. | ||
25 = Used GP0(<=67h) handler. | 25 = Used GP0(<=67h) handler. | ||
27 = Used in function which is handling reading GPUSTAT. | 27 = Used in function which is handling reading GPUSTAT. | ||
29 = Used in vblank related function. | 29 = Used in vblank related function. | ||
|- | |- | ||
| 0x00 || Yes || | | 0x00 || Yes || Only bits 0-1 seems to be used | ||
|- | |- | ||
| 0x01 || No || | | 0x01 || No || | ||
|- | |- | ||
| 0x02 || | | 0x02 || Unk || | ||
|- | |- | ||
| 0x03 || | | 0x03 || Unk || | ||
|- | |- | ||
| 0x04 || Yes || This config is multi-command for cdrom behavior. Value is bitfield, but not usual one. This config default value is 0xFFFFFFFF, to "enable" bits we need to really disable them. Windows programmer mode calculator in dword mode should shed some light here. To see enabled bits just use NOT operator. | | 0x04 || Yes || This config is multi-command for cdrom behavior. Value is bitfield, but not usual one. This config default value is 0xFFFFFFFF, to "enable" bits we need to really disable them. Windows programmer mode calculator in dword mode should shed some light here. To see enabled bits just use NOT operator. | ||
|- | |- | ||
| 0x05 || No || | | 0x05 || No || | ||
|- | |- | ||
| 0x06 || No || Import memory card from existing game installation. Used for example to unlock additional content in Arc The Lad games [[https://arcthelad.fandom.com/wiki/Save_Transfers#List_of_transfer_rewards]]. Value is pointer to emulator memory which value holds | | 0x06 || No || Import memory card from existing game installation. Used for example to unlock additional content in Arc The Lad games [[https://arcthelad.fandom.com/wiki/Save_Transfers#List_of_transfer_rewards]]. Value is pointer to emulator memory which value holds different DISC ID. Possibly bugged for NTSC-U Arc The Lad III because checks for NTSC-J Arc The Lad II save version. JPN releases should be fine. | ||
|- | |- | ||
| 0x07 || No || | | 0x07 || No || When value is not -1, then run some additional code. | ||
|- | |- | ||
| 0x08 || No || Alternative GE Dither Matrix settings. Valid values are 0 or 1, when one of them is detected display list is patched directly before sending to GE. More info about mentioned settings [[https://hitmen.c02.at/files/yapspd/psp_doc/chap11.html#sec11.5.185]] | | 0x08 || No || Alternative GE Dither Matrix settings. Valid values are 0 or 1, when one of them is detected display list is patched directly before sending to GE. More info about mentioned settings [[https://hitmen.c02.at/files/yapspd/psp_doc/chap11.html#sec11.5.185]] | ||
Line 136: | Line 60: | ||
| 0x0A || No || | | 0x0A || No || | ||
|- | |- | ||
| 0x0B || No || | | 0x0B || No || Value is used as an Divider at some point, only u16 is used. | ||
|- | |- | ||
| 0x0C || No || Value is | | 0x0C || No || Value is r3000 memory address. In known configs command is always used in conjunction with 0x0D command using the same address. | ||
|- | |- | ||
| 0x0D || No || Value is | | 0x0D || No || Value is r3000 memory address. In known configs command is always used in conjunction with 0x0C command using the same address. | ||
|- | |- | ||
| 0x0E || Unk || | | 0x0E || Unk || | ||
Line 153: | Line 72: | ||
| 0x10 || No || Cdrom GetlocP/GetlocL related. | | 0x10 || No || Cdrom GetlocP/GetlocL related. | ||
|- | |- | ||
| 0x11 || No || Value is | | 0x11 || No || Value is r3000 memory address. This command performs additional check if (address & 1 != 0), and use different code path depending on result. | ||
|- | |- | ||
| 0x12 || No || When value is 0 or higher substrat 2 from it, and store on addr. | | 0x12 || No || When value is 0 or higher substrat 2 from it, and store on addr. | ||
Line 159: | Line 78: | ||
| 0x13 || No || When value is 0 or higher, store it on addr. Only u8 seems to be used. | | 0x13 || No || When value is 0 or higher, store it on addr. Only u8 seems to be used. | ||
|- | |- | ||
| 0x14 || | | 0x14 || No || SPU emulation related command. | ||
|- | |- | ||
| 0x15 || No || | | 0x15 || No || Cdrom related. | ||
|- | |- | ||
| 0x16 || No || When value is not less than 0, run some additional code related to vblank (seems to be scheduling some event). | | 0x16 || No || When value is not less than 0, run some additional code related to vblank (seems to be scheduling some event). | ||
Line 180: | Line 94: | ||
| 0x1B || No || Initialize PSX scratchpad memory to given value + 1. Similar setting is found in ps1_netemu on PS3. Only one game seems to rely on it. | | 0x1B || No || Initialize PSX scratchpad memory to given value + 1. Similar setting is found in ps1_netemu on PS3. Only one game seems to rely on it. | ||
|- | |- | ||
| 0x1C || Unk || | | 0x1C || Unk || Seems to be unused. | ||
|- | |- | ||
| 0x1D || Unk || | | 0x1D || Unk || Seems to be unused. | ||
|- | |- | ||
| 0x1E || | | 0x1E || Unk || Seems to be unused. | ||
|- | |- | ||
| 0x1F || Unk || | | 0x1F || Unk || Seems to be unused. | ||
|- | |- | ||
|} | |} | ||
== Internal Compatibility Flags == | ==Internal Compatibility Flags== | ||
Emulator is not perfect. To fix games that not behave correctly Sony decided to implement compatibility settings. Solution well known from other Sony platforms, yet implemented differently again. | |||
To fix games that | ===Commands used internally 6.61 POPS=== | ||
=== Commands used internally | |||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|- | |- | ||
! | ! Hash !! ID !! Name [Lang] !! Commands Count !! Data (command + value) | ||
|- | |- | ||
| 0x4B41C042 || SCPS-18011 || UM JAMMER LAMMY [J] ||0x00000005 || | | 0x4B41C042 || SCPS-18011 || UM JAMMER LAMMY [J] ||0x00000005 || | ||
Line 6,296: | Line 6,191: | ||
|} | |} | ||
=== | === Hash generator === | ||
Simple algorithm used to generate hash from Disc ID. Code expects format SLES12345 to be supplied, no underscore, no dot, etc. | |||
def checksum(string): | def checksum(string): | ||
x = string[0:4].encode('ascii').hex() | x = string[0:4].encode('ascii').hex() | ||
Line 6,315: | Line 6,207: | ||
checksum("SLPS01986") | checksum("SLPS01986") | ||
==External Compatibility Flags== | ==External Compatibility Flags== | ||
Line 6,325: | Line 6,216: | ||
*Offset 0x428 is parameter for first config command. That one is special and in official table is referred as command -1 (0xFFFFFFFF) | *Offset 0x428 is parameter for first config command. That one is special and in official table is referred as command -1 (0xFFFFFFFF) | ||
*Offset 0x42C is parameter for config command number 0x00, next 0x430 is parameter for 0x01, etc. up to 0x1F on offset 0x4A8 | *Offset 0x42C is parameter for config command number 0x00, next 0x430 is parameter for 0x01, etc. up to 0x1F on offset 0x4A8 | ||
*This repeats again starting from command 0xFFFFFFFF up to 0x1F in next bytes (0x4AC for -1 up to 0x52C for 0x1F). This part seems to be | *This repeats again starting from command 0xFFFFFFFF up to 0x1F in next bytes (0x4AC for -1 up to 0x52C for 0x1F). This part seems to be unused, but is better to keep it like original eboots do. | ||
*For unused configs value 0xFFFFFFFF need to be set, except cfgs: -0x01, 0x10, 0x17, 0x18, 0x1D, 0x1E (0x428, 0x46C, 0x488, 0x48C, 0x4A0, 0x4A4) which should be set to 0x00000000 for unused config | *For unused configs value 0xFFFFFFFF need to be set, except cfgs: -0x01, 0x10, 0x17, 0x18, 0x1D, 0x1E (0x428, 0x46C, 0x488, 0x48C, 0x4A0, 0x4A4) which should be set to 0x00000000 for unused config | ||
*Command 6 is not really unsupported. Because parameter for this command is emulator memory offset with hardcoded data. | *Command 6 is not really unsupported. Because parameter for this command is emulator memory offset with hardcoded data. | ||
*There is some special handling if TITLE ID is set to PSRM, but that just set predefined values, we shouldn't care too much about it. | *There is some special handling if TITLE ID is set to PSRM, but that just set predefined values, we shouldn't care too much about it. | ||
Line 6,357: | Line 6,247: | ||
==Embed PS1 BIOS== | ==Embed PS1 BIOS== | ||
Embed PS1 bios version "System ROM Version 4.5 05/25/00 J" ("CEX-3000/1001/1002 by K.S."). POPS don't patch region character like PS1 on PS3 emu does, which suggest internal patch for "region free" was applied to it. POPS apply heavy 90400 bytes patch to bios if 3rd character of TITLE ID is "P" (Mostly JPN region games, but also PBPX demos...). Patch is applied to raw offset 0x18000, for now is unknown what it does. | Embed PS1 bios version "System ROM Version 4.5 05/25/00 J" ("CEX-3000/1001/1002 by K.S."). POPS don't patch region character like PS1 on PS3 emu does, which suggest internal patch for "region free" was applied to it. POPS apply heavy 90400 bytes patch to bios if 3rd character of TITLE ID is "P" (Mostly JPN region games, but also PBPX demos...). Patch is applied to raw offset 0x18000, for now is unknown what it does. | ||