Editing Talk: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 8: | Line 8: | ||
0x18E1F0, sub_4670C (4.70) | 0x18E1F0, sub_4670C (4.70) | ||
0x348EC8, sub_44338 (4.70) | 0x348EC8, sub_44338 (4.70) | ||
in id0x01, function id 0x18 | |||
condition: [ 0x20183F04 (+200000000 base) ] == 0x0C060F2C | |||
setting: | |||
stores 0 in address 0x20183F04, 0x20183F34, 0x20183F3C - with 200000000 base | |||
0x183F0C, sub_46334 (4.70) | |||
0x183F3C, sub_45DA4 (4.70) | |||
0x183D74, sub_47B50 (4.70) | |||
====Function Mapping==== | ====Function Mapping==== | ||
Line 202: | Line 210: | ||
| 0x3B || {{no}} || {{no}} || {{no}} || 0x43FAC || || | | 0x3B || {{no}} || {{no}} || {{no}} || 0x43FAC || || | ||
|}{{clear}} | |}{{clear}} | ||
===ps2_netemu command 0x5=== | ===ps2_netemu command 0x5=== | ||
This command seems to be disabled in netemu, but is used in gxemu with ID 0x4 | |||
*There are several games that uses it in his config data hardcoded inside ps2_gxemu.self such: | |||
* | **SLES-51823 | 1 | cmd: 0x4 Hunter: The Reckoning Wayward | ||
** | **SLES-54135 | 1 | cmd: 0x4 Grand Theft Auto: Liberty City Stories | ||
**SLES-54136 | 1 | cmd: 0x4 Grand Theft Auto: Liberty City Stories | |||
**SLES-54622 | 1 | cmd: 0x4 Grand Theft Auto: Vice City Stories | |||
**SLES-54623 | 1 | cmd: 0x4 Grand Theft Auto: Vice City Stories | |||
**SLPM-65340 | 1 | cmd: 0x4 Shinseiki Evangelion: Ayanami Ikusei Keikaku with Asuka Hokan Keikaku | |||
**SLPM-66275 | 1 | cmd: 0x4 Onimusha : Dawn of Dreams | |||
**SLUS-20001 | 1 | cmd: 0x4 Tekken Tag Tournament | |||
**SLUS-21423 | 1 | cmd: 0x4 Grand Theft Auto: Liberty City Stories | |||
**SLUS-21590 | 1 | cmd: 0x4 Grand Theft Auto: Vice City Stories | |||
===ps2_netemu command 0x0B=== | ===ps2_netemu command 0x0B=== | ||
There is a lot of misunderstanding about that command. | |||
Offset seems to be dependent on read mode, is not about what media we use. This is dependent how game read data, more precisely how game read that one sector we want to patch. | |||
PCSX2 "CDVD reads" logs can help here: | |||
'''CDRead requested block size (CD disc):''' | |||
* | *2048 = Offset + 0x18 (skip 12 sync bytes, 4 of header, and 8 of subheader) | ||
* | *2328 = Offset + 0x18 (skip 12 sync bytes, 4 of header, and 8 of subheader) | ||
* | *2340 = Offset + 0x0C (skip only 12 bytes of sync data) | ||
'''DVDRead requested block size (DVD Disc):''' | |||
*2064 = Offset match, but only until the 349th sector. Otherwise is offset - 0x0C because that read mode see data as ID DATA (4) + ID DATA EDC (2) + Reserved bytes (6) + 2048 data + EDC (4). Why there is some weirdness that about first sectors, no idea. Maybe it is something common for DVD discs that i'm not aware off. | |||
"Offset + XX" for CD assume that you use Isobuster RAW mode. "Offset + XX" for DVD assume that you use Isobuster NON RAW mode (ISO can't store all data, so is missing ID/Resv bytes too.<br> | |||
Keep in mind there is a bug in pcsx2 where fastboot "force" 2048 CD read on DVD disc for executable. That one will match 2064 read for us. | |||
I | * You are very right. I was not aware about different read modes you can specify in the sceCdRead command. That makes sense and that explains that Freekstyle issue. Regarding the whole offset misunderstanding, I know it could be confusing sometimes when you open the mounted file system through the HxD for example (only data bytes are seen). It is important to load the image file in the hex editor directly (or use the "Load image file" in HxD), or check the RAW box in the Isobuster's sector viewer.<br> When it comes to the DVD discs, I know the offset correction is somehow related to the DVD RAW 2064 bytes per sector mode. But I am not sure if it is not applied until the 349th sector precisely - it is what I noticed by looking into the Psychonauts and Street Racing Syndicate configs. The latter has got the patch data applied to the 349th sector without the 0xC correction at all. It is the farthest example I have found.--[[User:Agrippa|Agrippa]] ([[User talk:Agrippa|talk]]) 14:47, 20 February 2022 (UTC) | ||
===ps2_netemu command 0x12=== | ===ps2_netemu command 0x12=== | ||
Line 338: | Line 282: | ||
seg017:00000000001984C0 bgt cr6, next_value | seg017:00000000001984C0 bgt cr6, next_value | ||
</pre> | </pre> | ||
====type 2==== | ====type 2==== | ||
Fix | Fix on Interpretation? | ||
<pre> | <pre> | ||
Line 369: | Line 311: | ||
*0x21C | ptr to 3rd value *0x2AC (0x367) | *0x21C | ptr to 3rd value *0x2AC (0x367) | ||
</pre> | </pre> | ||
Line 404: | Line 338: | ||
stw r9, 0x1238(r31) save count>>1 | stw r9, 0x1238(r31) save count>>1 | ||
std r11, 0x1240(r31) save ptr to table values start | std r11, 0x1240(r31) save ptr to table values start | ||
---big handler, different register settings?--- | |||
===ps2_netemu command 0x15=== | |||
Patch SPE 0 (IOP) program in local memory. Command search for absolute branches in LS 0x3A2C0 - 0x3A6C0 and patch them to '''bi r127'''. | |||
This command take partially unused value. Value 0,1 do nothing, values above 2 run command. Doesn't matter is 2,4, or 10. Nothing will change in command behavior. | |||
===ps2_netemu command 0x1A - 0x1B=== | |||
0x1A and 0x1B set offset 0x350, and 0x360 to 1 in SPE 6 (IPU) LS. | |||
0x1A make code store 0 on 0xE0, and 0xF0: | |||
LOAD:00032184 il r115, 0 | |||
LOAD:00032188 lqa r2, xmmword_350 | |||
LOAD:0003218C brz r2, loc_320F4 | |||
LOAD:00032190 stqa r115, xmmword_E0 | |||
LOAD:00032194 stqa r115, xmmword_F0 | |||
LOAD:00032198 bra loc_320F4 | |||
0x1B make code perform check of offset 0xE0, and if that one is not 0 write value from r115 into 0xF0 offset. | |||
LOAD:000321C8 lqa r125, xmmword_360 | |||
LOAD:000321CC brz r125, loc_321DC | |||
LOAD:000321D0 lqa r125, xmmword_E0 | |||
LOAD:000321D4 brz r125, loc_321DC | |||
LOAD:000321D8 stqa r115, xmmword_F0 | |||
==XMB messages related with PS2 Emulation== | |||
{{Boxcode|title=explore_category_sysconf.rco\Text\English.xml|code=<syntaxhighlight lang="xml"> | |||
<Text name="msg_ps_ps2_upconvert">PS/PS2 - Upscaler</Text> | |||
<Text name="msg_ps_upconvert">PS - Upscaler</Text> | |||
<Text name="msg_ps_ps2_smoothing">PS/PS2 - Smoothing</Text> | |||
<Text name="msg_ps_smoothing">PS - Smoothing</Text> | |||
<Text name="msg_ps_ps2_smoothing_explanation">Reduces the roughness of the displayed image.</Text> | |||
==XMB messages related with PS2 Emulation== | |||
{{Boxcode|title=explore_category_sysconf.rco\Text\English.xml|code=<syntaxhighlight lang="xml"> | |||
<Text name="msg_ps_ps2_upconvert">PS/PS2 - Upscaler</Text> | |||
<Text name="msg_ps_upconvert">PS - Upscaler</Text> | |||
<Text name="msg_ps_ps2_smoothing">PS/PS2 - Smoothing</Text> | |||
<Text name="msg_ps_smoothing">PS - Smoothing</Text> | |||
<Text name="msg_ps_ps2_smoothing_explanation">Reduces the roughness of the displayed image.</Text> | |||
</syntaxhighlight>}} | </syntaxhighlight>}} | ||
Line 689: | Line 452: | ||
* Without Factory Service Mode : gives "Incompatible Data" when inserting PS2 disc | * Without Factory Service Mode : gives "Incompatible Data" when inserting PS2 disc | ||
* When enabling [ | * When enabling [http://www.ps3devwiki.com/files/devtools/lv2-v9-pkg/ LV2Patcher] without factory service mode (patch4 set as http://pastie.org/private/jp8zhvuocjz95cfrjm0uzg) : no changes in XMB:Game (still only PS upscaler/smoothing, no PS2 mention at all) | ||
* When enabling [ | * When enabling [http://www.ps3devwiki.com/files/devtools/lv2-v9-pkg/ LV2Patcher] without factory service mode (patch4 set as http://pastie.org/4355919) : gives XMB:Game PS2 smoothing/upscaling options, it also make an inserted disk to be seen as PS2 format. Still same problem of ¨incompatible title¨ and loss of BT/settings. Also after returning to XMB, it no longer sees the disc as PS2 format but as incompatible data (which suggests the lv2 patch is undone, as lv2 is reloaded when returning from the ps2 lpar) | ||
* Using [ | * Using [http://www.ps3devwiki.com/files/OtherOSplusplus/misc/boot_ps2.pkg boot_ps2.pkg] without factory service mode : no resetting of date/time/displayoutput (still output on mainscreen), but all connection to any bound bluetooth device is lost, even when connected via USB (need PS button reactivation), and after a long while comes up with the message that the title is not compatible and that the ps3 needs to be updated (Basic nag screen that is on BC PS3s when inserting a noncompatible title). | ||
* With Factory Service Mode enabled (there are no Xmb options to combinetest with [ | * With Factory Service Mode enabled (there are no Xmb options to combinetest with [http://www.ps3devwiki.com/files/devtools/lv2-v9-pkg/ LV2Patcher] or [http://www.ps3devwiki.com/files/OtherOSplusplus/misc/boot_ps2.pkg boot_ps2.pkg]): gives ´PS2 disc´ detected at disc icon, but starting gives: resetting of date/time/displayoutput (effectively disabling my mainscreen), then all connection to any bound bluetooth device is lost, even when connected via USB (needs multiple PS button reactivation), and after a long while comes up with the message that the title is not compatible and that the ps3 needs to be updated (Basic nag screen that is on BC PS3s when inserting a noncompatible title). | ||
In short: [ | In short: [http://www.ps3devwiki.com/files/OtherOSplusplus/misc/boot_ps2.pkg boot_ps2.pkg] and Factory Service Mode seem to enable simulare (it tries to boot it) while [http://www.ps3devwiki.com/files/OtherOSplusplus/misc/boot_ps2.pkg boot_ps2.pkg] gives you more options e.g. using [http://www.ps3devwiki.com/files/devtools/lv2-v9-pkg/ LV2Patcher]. | ||
Perhaps hardswapping out all the dev_flash ps2 emu files for the same software only emulator would circumvent the 'incompatible title' message. | Perhaps hardswapping out all the dev_flash ps2 emu files for the same software only emulator would circumvent the 'incompatible title' message. | ||
==== Second test: FW 2.70/3.15 ==== | ==== Second test: FW 2.70/3.15 ==== | ||
Silent Hill : gives disk icon "unsupported data" and error message like "This model of the PS3 system is not compatible with Playstation2 format software" when run via disc icon. Using [ | Silent Hill : gives disk icon "unsupported data" and error message like "This model of the PS3 system is not compatible with Playstation2 format software" when run via disc icon. Using [http://www.ps3devwiki.com/files/OtherOSplusplus/misc/boot_ps2.pkg boot_ps2.pkg] gives title not supported error message like "This title is not currently compatible with the PS3 system". | ||
==== Third test: FW 3.55 OtherOS++22GB (with SS Patches) ==== | ==== Third test: FW 3.55 OtherOS++22GB (with SS Patches) ==== | ||
Silent Hill : gives disk icon "unsupported data" and error message like "This model of the PS3 system is not compatible with Playstation2 format software" when run via disc icon. Using [ | Silent Hill : gives disk icon "unsupported data" and error message like "This model of the PS3 system is not compatible with Playstation2 format software" when run via disc icon. Using [http://www.ps3devwiki.com/files/OtherOSplusplus/misc/boot_ps2.pkg boot_ps2.pkg] gives blackscreen lockup, not reacting on PS button, or powerbutton, requiring removing powercord. | ||
Line 904: | Line 667: | ||
ID match US release of Crazy Taxi. This id is kinda special, because Swap Magic CD version, and some other Datel products like Action Replay use Crazy Taxi TOC in their retail discs. | ID match US release of Crazy Taxi. This id is kinda special, because Swap Magic CD version, and some other Datel products like Action Replay use Crazy Taxi TOC in their retail discs. | ||
Is known that they literally ripped part of disc (with key/logo, and TOC), and frankesteined it with own products. | Is known that they literally ripped part of disc (with key/logo, and TOC), and frankesteined it with own products. | ||
So mentioned check first compare hash, and if that match, then run function that perform another check at disc sector 267559 (0x41527), so exactly where main executable is. | So mentioned check first compare hash, and if that match, then run function that perform another check at disc sector 267559 (0x41527), so exactly where main executable is. | ||
I didn't figured out what next, but this is probably anti AR/Datel/SM check. What's weird, there seems to be nothing for TimeSplitters2 which if i recall correctly was used for DVD version of Swap Magic | I didn't figured out what next, but this is probably anti AR/Datel/SM check. What's weird, there seems to be nothing for TimeSplitters2 which if i recall correctly was used for DVD version of Swap Magic. | ||
==CDVD Commands== | ==CDVD Commands== | ||
Line 1,088: | Line 850: | ||
Every "mechacon_auth" command return zeroed result with different size. Only exception here is 0x81 which return 1. | Every "mechacon_auth" command return zeroed result with different size. Only exception here is 0x81 which return 1. | ||
</pre> | </pre> | ||
==EE I/O Handlers list== | ==EE I/O Handlers list== | ||
Line 1,678: | Line 1,369: | ||
|- | |- | ||
|} | |} | ||
1000F800 to 1000F8B0 seems to be some fake regs for testing purposes. Probably not existing on real PS2. | 1000F800 to 1000F8B0 seems to be some fake regs for testing purposes. Probably not existing on real PS2. | ||
* 1000F820 return "DrJock TV Quiz P" | |||
* 1000F830 return "hD bags few lynx" | |||
* 1000F820 return "DrJock TV Quiz P" | |||
* 1000F830 return "hD bags few lynx" | |||
That make string "DrJock TV Quiz PhD bags few lynx" - This is perfect summary of Sony work. Since correct pangram should use "MrJock". So even here they made mistake. | That make string "DrJock TV Quiz PhD bags few lynx" - This is perfect summary of Sony work. Since correct pangram should use "MrJock". So even here they made mistake. | ||
* | * 1F00F880 return hardcoded value of 0x4457, which match emu revision i'm working on. Can be just coincidence. | ||
==PS2 masterlist with ps2 emu hashes== | ==PS2 masterlist with ps2 emu hashes== | ||
*See: [[PS2_Emulation/PS2_Games_Masterlist]] | *See: [[PS2_Emulation/PS2_Games_Masterlist]] | ||