Editing Talk:PS1 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 178: | Line 178: | ||
</pre> | </pre> | ||
== | == Commands Info == | ||
=== External Configs === | === External Configs === | ||
Loading external commands is be possible in ps1_netemu. From this we can also figure out that sony call those configs "ad hoc params" | Loading external commands is be possible in ps1_netemu. From this we can also figure out that sony call those configs "ad hoc params"n be little bit misleading. Emulator seems to expect them inside PSIMG file. Function that search for configs look like this: | ||
case 9: | case 9: | ||
if ( *(&0x161FD80) ) 1570FA0(base) + AEDE0(offset in ISO.BIN.DAT or PSISOIMG? ) = 161FD80 in 4.86 ps1_netemu | if ( *(&0x161FD80) ) 1570FA0(base) + AEDE0(offset in ISO.BIN.DAT or PSISOIMG? ) = 161FD80 in 4.86 ps1_netemu | ||
Line 233: | Line 192: | ||
if ( decimal_16 ) | if ( decimal_16 ) | ||
{ | { | ||
low_rev = cfg_rev < db_rev; | low_rev = cfg_rev < db_rev; // Check seems to be opposite to netemu. | ||
// | // Config need to be higher version than emu database. | ||
for ( i = 0; i < decimal_16; i += 2 ) // up to 8 configs supported (8 commands + 8 values) | for ( i = 0; i < decimal_16; i += 2 ) // up to 8 configs supported (8 commands + 8 values) | ||
{ | { | ||
Line 241: | Line 200: | ||
if ( cfg_command - 1 <= 0x3B ) // max cfg nr 0x3C | if ( cfg_command - 1 <= 0x3B ) // max cfg nr 0x3C | ||
{ | { | ||
v245 = cfg_command >> 28; // | v245 = cfg_command >> 28; // Weird. Maybe leftover from 0xX0000000 commands or something. | ||
if ( low_rev || v245 || cfg_command == 2 )// cfg 2 unsupported (replaced in later PSIMG rev with subchannel data), or old config rev, or v245. | if ( low_rev || v245 || cfg_command == 2 )// cfg 2 unsupported (replaced in later PSIMG rev with subchannel data), or old config rev, or v245. | ||
{ | { | ||
Line 256: | Line 215: | ||
} | } | ||
} | } | ||
=== Command IDs mapping === | === Command IDs mapping === | ||
Line 267: | Line 227: | ||
**0 = ? (used by SCPS-18011 Um Jammer Lammy, and SLPS-01818 Langrisser IV & V Final Edition [Disc1of2]) | **0 = ? (used by SCPS-18011 Um Jammer Lammy, and SLPS-01818 Langrisser IV & V Final Edition [Disc1of2]) | ||
In Um Jammer Lammy is used together with command 0x13, so it was a bit doubtful if it was a mistake. But Langrisser IV & V Final Edition [Disc1of2] uses it too and is the only command used by this disc, so it "should" do something. Um Jammer Lammy in netemu 3.40 was fixed only with command 0x0/0x0 (id/data) | In Um Jammer Lammy is used together with command 0x13, so it was a bit doubtful if it was a mistake. But Langrisser IV & V Final Edition [Disc1of2] uses it too and is the only command used by this disc, so it "should" do something. Um Jammer Lammy in netemu 3.40 was fixed only with command 0x0/0x0 (id/data) | ||
=== Command 0x01 (netemu 3.40 up to 4.88) === | === Command 0x01 (netemu 3.40 up to 4.88) === | ||
Line 636: | Line 595: | ||
Value is integer that is later converted to double float using fcfid, and truncated to single precision by frsp.<br> | Value is integer that is later converted to double float using fcfid, and truncated to single precision by frsp.<br> | ||
I'm not familiar with CELL floating point unit quirks, but value could be just single precision float from the start, why complicate that so much?<br> | I'm not familiar with CELL floating point unit quirks, but value could be just single precision float from the start, why complicate that so much?<br> | ||
_xcdrom_thread related. | |||
=== Command 0x04 (netemu 3.40 up to 4.88) === | === Command 0x04 (netemu 3.40 up to 4.88) === | ||
*Valid values found: 0x4, 0x7, 0x14 (20d), 0x46 (70d), 0x64 (100d), 0xC8 (200d), 0xFFFFFF38 ( | *Valid values found: 0x4, 0x7, 0x14 (20d), 0x46 (70d), 0x64 (100d), 0xC8 (200d), 0xFFFFFF38 (????????) | ||
*Default value: 0 | *Default value: 0 | ||
*_xcdrom_thread related. | *_xcdrom_thread related. | ||
=== Command 0x05 (netemu 3.40 up to 4.88) === | === Command 0x05 (netemu 3.40 up to 4.88) === | ||
Line 657: | Line 610: | ||
*Default value: 0 | *Default value: 0 | ||
*_xcdrom_thread related. | *_xcdrom_thread related. | ||
=== Command 0x07 (netemu 4.83 up to 4.88) === | === Command 0x07 (netemu 4.83 up to 4.88) === | ||
*Default value: 0 | *Default value: 0 | ||
*_xcdrom_thread related. | *_xcdrom_thread related. | ||
=== Command 0x08 (netemu 3.40 up to 4.88) === | === Command 0x08 (netemu 3.40 up to 4.88) === | ||
Line 697: | Line 645: | ||
=== Command 0x12 (netemu 4.83 up to 4.88) === | === Command 0x12 (netemu 4.83 up to 4.88) === | ||
*Or command 0x10 (netemu 3.40) | *Or command 0x10 (netemu 3.40) | ||
=== Command 0x13 (netemu 4.83 up to 4.88) === | === Command 0x13 (netemu 4.83 up to 4.88) === | ||
*Default value: 0 | *Default value: 0 | ||
=== Command 0x14 (netemu 4.83 up to 4.88) === | === Command 0x14 (netemu 4.83 up to 4.88) === | ||
Line 715: | Line 657: | ||
=== Command 0x16 (netemu 4.83 up to 4.88) === | === Command 0x16 (netemu 4.83 up to 4.88) === | ||
*Default value: 0 | *Default value: 0 | ||
=== Command 0x17 (netemu 4.83 up to 4.88) === | === Command 0x17 (netemu 4.83 up to 4.88) === | ||
Line 731: | Line 669: | ||
When value is not zero is returned by emulator when game try to read cop0r3 (BPC) register. When value is 0 (default), emulator return real BPC content. | When value is not zero is returned by emulator when game try to read cop0r3 (BPC) register. When value is 0 (default), emulator return real BPC content. | ||
This command can be successfully used for 90% of libcrypt games. More importantly address where magic word is stored is known, so payloads like cobra should be able to just write value there on emulator init. List of magic words is already known, and can be included in cobra source, or as external txt for game managers like webman. | |||
Runtime which read it can be patched directly (example from ps1_netemu 4.86): | |||
<pre> | |||
seg003:00106570 read_cop0r3___BPC: | |||
seg003:00106570 li r3, 0x17 # jumptable 0000000000106538 case 0 | |||
seg003:00106574 bl ReadInternalConfigValue <---------- can be replaced with li r3, magic_word | |||
seg003:00106578 nop | |||
seg003:0010657C cmpdi r3, 0 | |||
seg003:00106580 beq def_106538 # jumptable 0000000000106538 default case, cases 1,2,4,6-8 | |||
seg003:00106584 mr r29, r3 | |||
</pre> | |||
* It seems there is a problem with LC games using the third scheme mentioned [https://problemkaputt.de/psx-spx.htm#cdromprotectionlibcrypt here]. After reading the data contents of subchannel Q, the CRC-16 value is not read at all, but calculated on its own by the driver instead. It does break LC games using this particular scheme (web-found confirmed issues with Ape Escape and Final Fantasy VIII). All three games that are meant to work with this command does use these LC sectors. I think this command was meant to resolve this issue, just a guess.--[[User:Agrippa|Agrippa]] ([[User talk:Agrippa|talk]]) 20:06, 12 June 2022 (UTC) | * It seems there is a problem with LC games using the third scheme mentioned [https://problemkaputt.de/psx-spx.htm#cdromprotectionlibcrypt here]. After reading the data contents of subchannel Q, the CRC-16 value is not read at all, but calculated on its own by the driver instead. It does break LC games using this particular scheme (web-found confirmed issues with Ape Escape and Final Fantasy VIII). All three games that are meant to work with this command does use these LC sectors. I think this command was meant to resolve this issue, just a guess.--[[User:Agrippa|Agrippa]] ([[User talk:Agrippa|talk]]) 20:06, 12 June 2022 (UTC) | ||
=== Command 0x18 (netemu 4.83 up to 4.88) === | === Command 0x18 (netemu 4.83 up to 4.88) === | ||
*Default value: 0 | *Default value: 0 | ||
=== Command 0x19 (netemu 4.83 up to 4.88) === | === Command 0x19 (netemu 4.83 up to 4.88) === | ||
Line 757: | Line 704: | ||
*Or command 0x18 (netemu 3.40) | *Or command 0x18 (netemu 3.40) | ||
*Or command 0x1A (netemu 3.55 ?) | *Or command 0x1A (netemu 3.55 ?) | ||
*Or command 0x02 (netemu 1.70) - | *Or command 0x02 (netemu 1.70) | ||
Destruction Derby (SCUS-94302) was fixed in netemu 1.70 by using 0x02/0x02 (id/data), and in netemu 4.88 with 0x38/0x02 (id/data). Netemu 1.70 command 0x02 was remapped to netemu 4.88 command 0x1C but are 2 different commands. What happened is sony decided to change the old command by the new command 0x32 (didnt existed in netemu 1.70) at some intermediate revision. The interesting detail of this story is this change in the destruction derby config seems to indicate netemu 4.88 command ids 0x1C and 0x38 with data value 0x2 can be used to solve the same problem. Netemu 4.88 command 0x38 reloads the game with ps1_newemu.self 4.88 that contains another config with the command 0x3/0x2 (id/data)<br> | |||
Old command 0x02 is related to new 0x1C. But it seems that sony decided to split/extend that little bit. Instead of 0x02 there is now 0x1C, 0x1D, 0x1E, so config is now more flexible. All that is "JOY" PSX HW IO related, but "JOY" handle also memory card, so this is no 100% clear which one it helps without more reversing. --kozarovv. | |||
=== Command 0x1E (netemu 4.83 up to 4.88) === | === Command 0x1E (netemu 4.83 up to 4.88) === | ||
*Default value: 0x7D0 | *Default value: 0x7D0 | ||
*xPadThread related. | *xPadThread related. | ||
=== Command 0x21 (netemu 4.83 up to 4.88) === | === Command 0x21 (netemu 4.83 up to 4.88) === | ||
Line 790: | Line 719: | ||
*Default value: 0x3E8 | *Default value: 0x3E8 | ||
*PS1 GPU related. | *PS1 GPU related. | ||
=== Command 0x23 (netemu 4.83 up to 4.88) === | === Command 0x23 (netemu 4.83 up to 4.88) === | ||
Line 819: | Line 747: | ||
*Default value: 0 | *Default value: 0 | ||
*PS1 GPU related. | *PS1 GPU related. | ||
=== Command 0x32 (netemu 4.83 up to 4.88) === | === Command 0x32 (netemu 4.83 up to 4.88) === | ||
Line 852: | Line 774: | ||
*Or command 0x2C in ps1_netemu.self 3.40 | *Or command 0x2C in ps1_netemu.self 3.40 | ||
*Or command 0x2E in ps1_netemu.self 3.55 ? | *Or command 0x2E in ps1_netemu.self 3.55 ? | ||
*Or command 0x15 in ps1_emu.self 4.88 ? | |||
*Valid values found: | *Valid values found: | ||
** | **1 = relaunch the game with ps1_emu.self | ||
**2 = relaunch the game with ps1_newemu.self | |||
**3 = relaunch the game with ps1_netemu.self (value 3 found inside ps1_emu.self) | |||
If the value is different than 0 relaunch the game with a different emu. | |||
This command doesn't seem to work with the current Cobra version with the latest WebMAN MOD, as well as with IRISMAN's payload. Gaia Seed: Project Seed Trap (SLPS-00624) and Um Jammer Lammy (SCUS-94448) boot in netemu instead of newemu while the PS one Classics versions boot into newemu. Is there any known reason this happens? --[[User:Mrjaredbeta|Mrjaredbeta]] ([[User talk:Mrjaredbeta|talk]]) 18:59, 29 May 2022 (UTC) | |||
=== | === Orphan commands info === | ||
* 0xE param is divider for 0x204CC00 (psx cpu speed), result is stored on fixed address and used by many functions. <!-- we need to move this note to the new page sections and delete this one originally named "Known ps1emu.self commands" --> | |||
* | |||
== Known bugs == | == Known bugs == |