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 265: | Line 265: | ||
The ingame FMVs with the graphic overlay are still stuttering heavily, though, and I am still unsure why. It seems like the shorter FMVs run fine, and the longer they are they more they have slowdown/stutter. This only applies to the "ingame" FMVs and not the opening ones. | The ingame FMVs with the graphic overlay are still stuttering heavily, though, and I am still unsure why. It seems like the shorter FMVs run fine, and the longer they are they more they have slowdown/stutter. This only applies to the "ingame" FMVs and not the opening ones. | ||
===ps2_netemu command 0x12=== | ===ps2_netemu command 0x12=== | ||
Line 483: | Line 447: | ||
===ps2_netemu command 0x22=== | ===ps2_netemu command 0x22=== | ||
Weird command. Sets something 1 (CDVD/MECHA), but seems to never use it. | Weird command. Sets something 1 (CDVD/MECHA), but seems to never use it. | ||
===ps2_netemu command 0x29=== | |||
===ps2_netemu command | Something related with read time, maybe seek time. First value is meant to be lower than second value, but this is not requirement. | ||
Code that use it seems to delay some read/seek operation by multiply of first, or second value depending which sector is currently read (or maybe which part of disc actually). Here is code from one of fuctions that use values from that command, keep in mind that "mecha" is just fancy name for cdvd in that emu. | |||
if ((75 * cdvd.CrtSecond + 4500 * cdvd.CrtMinute + cdvd.CrtFrame - 150) >= *(mecha.unk_0x60)) | |||
a = *(cmd_0x29_val_2); | |||
else | |||
a = *(cmd_0x29_val_1); | |||
b = 4835703278458516699; // read https://munroesj52.github.io/vec__int64__ppc_8h.html (search on page for that number). | |||
c = (79800000 * a * b) >> 64; // 0x4C1A6C0 (79800000) is value that lv1 repo key be.clock return. | |||
d = c >> 18; // This and 2 above are generally used as a division by multiply. | |||
e = get_timebase_reg(); | |||
if ( e == 0 ) | |||
{ | |||
do | |||
e = get_timebase_reg(); | |||
while ( e == 0 ); | |||
} | |||
f = e - *(mecha.unk_0x24); | |||
if ( f >= d ) | |||
{ | |||
MECHA_update_status(mecha); | |||
result = unlock_sc06(0x8000LL); | |||
} | |||
else | |||
{ | |||
do | |||
e = get_timebase_reg(); | |||
while ( e == 0 ); | |||
*(mecha.unk_20) = d - f + e; | |||
*mecha.unk_00 = 5; | |||
result = unlock_sc06(0x8000LL); | |||
} | |||
===ps2_netemu command 0x2A=== | ===ps2_netemu command 0x2A=== | ||
Line 514: | Line 508: | ||
b end_134844 | b end_134844 | ||
Value from 0x20(r31) is later used in compare. That result in cdvd error, or in setting which seems schedule event to happen after time from timebase pass. This event is netemu syscall 8 (0x200) which is related to all ps2 cdvd reads. Tl;dr is that value give emulator some more time before cdvd error. Weird thing is that PS button fix it.. --[[User:Kozarovv|Kozarovv]] ([[User talk:Kozarovv|talk]]) 07:05, 7 March 2022 (UTC) | Value from 0x20(r31) is later used in compare. That result in cdvd error, or in setting which seems schedule event to happen after time from timebase pass. This event is netemu syscall 8 (0x200) which is related to all ps2 cdvd reads. Tl;dr is that value give emulator some more time before cdvd error. Weird thing is that PS button fix it.. --[[User:Kozarovv|Kozarovv]] ([[User talk:Kozarovv|talk]]) 07:05, 7 March 2022 (UTC) | ||
===ps2_netemu command 0x3D=== | |||
Looks like we misunderstood this command earlier, and probably we don't even need it. | |||
There seems to be no emu code that make use of it beside printing config revision. This need confirmation on real hardware. In case that missing 0x3D will fail, it will be good to test at least that is really version enforcer, because i can't find part of code that is eventually responsible for that. | |||
* Some time ago I tested the config with version 0x3D89 which contained commands supported from the version 0x40DC onwards. The console hung up right after LV2 reset.--[[User:Agrippa|Agrippa]] ([[User talk:Agrippa|talk]]) 10:16, 24 April 2022 (UTC) | |||
** Any chance you can test this again? Config parser don't have any check for revision, when it hit 0x3D is just storing value on address that seems to be related only to UI/Menu stuff. While i can imagine some check for overall config version (still I searched and it seems to be none), i can't imagine some additional per command revision check. Which is what your test suggest here. Emulator have only one config parser, one config buffer, and one check for command number (0x51 and above still don't trigger panic yet, just ignore command). I also tried to find version numbers of 15686, 16604, 16808, 16916, 17041, 17179, 17277, 17495 in code (as hex of course), and only 17495 is found in function that is not really related to any check (described here at the end: [[Talk:PS2_Emulation#Netemu_2]] ). [[User:Kozarovv|Kozarovv]] ([[User talk:Kozarovv|talk]]) 15:06, 24 April 2022 (UTC)-- | |||
*** You are right. There is no revision check and the 0x3D command is not needed at all for the config to work.--[[User:Agrippa|Agrippa]] ([[User talk:Agrippa|talk]]) 18:14, 5 May 2022 (UTC) | |||
**** We figured that out 2000 custom configs too late. :D Anyway, thanks for confirming that. --[[User:Kozarovv|Kozarovv]] ([[User talk:Kozarovv|talk]]) 17:30, 9 May 2022 (UTC) | |||
===ps2_netemu command 0x4D=== | |||
Leaving this here just in case. Fixed comments version. | |||
0xD7F8 RGBAQ_01_and_11: | |||
0xD7F8 | |||
0xD800 move r80, r3 ; move new values to r80 | |||
0xD820 ilhu r19, 0x7FFF | |||
0xD824 lqr r20, Q_val_cfg_plus4 | |||
0xD82C iohl r19, 0xFFFF | |||
0xD834 and r17, r80, r19 ; r17 = Q & 0x7FFFFFFF | |||
0xD840 ceqi r15, r17, 0 ; if r17 == 0, r15 = 0xFFFFFFF, else 0 | |||
0xD844 lqr r10, ST_Q | |||
0xD84C cwd r9, 0x30+var_30+8(sp) ; Prepare correct write | |||
0xD850 rotqbyi r16, r20, 4 ; load cmd value from config to r16 | |||
0xD858 and r12, r15, r16 ; r15 & value_from_cfg | |||
0xD860 or r5, r80, r12 ; r80(Q) | r12(value from cfg or 0) | |||
0xD868 shufb r7, r5, r10, r9 ; select ST bits + new Q | |||
0xD870 stqr r7, ST_Q ; store result as Q value in STQ | |||
===ps2_gxemu command 0x19=== | ===ps2_gxemu command 0x19=== | ||
Line 904: | Line 924: | ||
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 2,038: | Line 2,057: | ||
* Yes, i don't see why not. Assuming that is static patch to elf file, not some cobra style on the fly patch. But don't expect some magic from that. I don't know too much about RSX and not really much about GS. But PS2 emulation is usually limited by CPU power, specially in native resolution. But for example games that need 0x44 cmd, maybe they will work with smoothing now. Maybe some minor slowdowns will be fixed. I still don't know which parts of GS are emulated on RSX, for example softemu used something similar to pcsx2 software render. So there you will get almost nothing from RSX OC. But netemu is different. --[[User:Kozarovv|Kozarovv]] ([[User talk:Kozarovv|talk]]) 04:56, 20 March 2022 (UTC) | * Yes, i don't see why not. Assuming that is static patch to elf file, not some cobra style on the fly patch. But don't expect some magic from that. I don't know too much about RSX and not really much about GS. But PS2 emulation is usually limited by CPU power, specially in native resolution. But for example games that need 0x44 cmd, maybe they will work with smoothing now. Maybe some minor slowdowns will be fixed. I still don't know which parts of GS are emulated on RSX, for example softemu used something similar to pcsx2 software render. So there you will get almost nothing from RSX OC. But netemu is different. --[[User:Kozarovv|Kozarovv]] ([[User talk:Kozarovv|talk]]) 04:56, 20 March 2022 (UTC) | ||
** Tested the 600/750 MHz overclock with a few intensive games (SC3, ToCA3, CMR3, VP2, GT4). Assuming the patches are correctly applied (I have no idea at all), there is no performance boost at all.--[[User:Agrippa|Agrippa]] ([[User talk:Agrippa|talk]]) 15:24, 29 May 2022 (UTC) | ** Tested the 600/750 MHz overclock with a few intensive games (SC3, ToCA3, CMR3, VP2, GT4). Assuming the patches are correctly applied (I have no idea at all), there is no performance boost at all.--[[User:Agrippa|Agrippa]] ([[User talk:Agrippa|talk]]) 15:24, 29 May 2022 (UTC) | ||
== Netemu load/store with r0 register == | == Netemu load/store with r0 register == | ||
Line 2,207: | Line 2,225: | ||
* '''Lord of the Rings: The Return of the King''' | * '''Lord of the Rings: The Return of the King''' | ||
** Top-left corner issue when the mist/fog is rendered. | ** Top-left corner issue when the mist/fog is rendered. | ||
* '''Snowblind Engine 2003+''' | |||
** When the engine does switch to the 60 fps mode back, an old frame is seen for a split second (60 fps interlaced mode is triple buffered). | |||
* '''Dance Summit 2001: Bust-a-Move''' | * '''Dance Summit 2001: Bust-a-Move''' | ||
** Front buffer is not flushed most of the time. Game seems to apply additional effects there, apart from the downsampling. | ** Front buffer is not flushed most of the time. Game seems to apply additional effects there, apart from the downsampling. | ||
== Stuntman/Driv3r research == | == Stuntman/Driv3r research == | ||
Line 2,291: | Line 2,309: | ||
* I believe that real PS2 also need those patches. For OPL, but not only. ROM2 with CH fonts is not existing outside of 3 ps2 models. All of them released only in China, and one of them is still not even dumped (devkit). This ROM2 is even missing in Hong Kong region PS2. Btw. When i implemented ROM2 support in pcsx2, i tested patching game first. Unluckily for netemu, and fortunately for pcsx2. First and only game i tried to patch was Ape Escape 2. :) --[[User:Kozarovv|Kozarovv]] ([[User talk:Kozarovv|talk]]) 12:39, 23 November 2022 (UTC) | * I believe that real PS2 also need those patches. For OPL, but not only. ROM2 with CH fonts is not existing outside of 3 ps2 models. All of them released only in China, and one of them is still not even dumped (devkit). This ROM2 is even missing in Hong Kong region PS2. Btw. When i implemented ROM2 support in pcsx2, i tested patching game first. Unluckily for netemu, and fortunately for pcsx2. First and only game i tried to patch was Ape Escape 2. :) --[[User:Kozarovv|Kozarovv]] ([[User talk:Kozarovv|talk]]) 12:39, 23 November 2022 (UTC) | ||
** Yup, lucky for me I tested Dynasty Warriors 3 first, then Ape Escape 2 was the second if I recall. I was worried but pleasantly surprised by the rest of the results. I assume ROM2 has data for simplified Chinese characters while Hong Kong/Taiwan uses traditional characters, and that’s probably why there is no ROM2 in the HK/TW region. I am not sure why they even included ROM2 in the first place if barely any games utilize it, but oh well. --[[User:Mrjaredbeta|Mrjaredbeta]] ([[User talk:Mrjaredbeta|talk]]) 18:01, 28 November 2022 (UTC) | ** Yup, lucky for me I tested Dynasty Warriors 3 first, then Ape Escape 2 was the second if I recall. I was worried but pleasantly surprised by the rest of the results. I assume ROM2 has data for simplified Chinese characters while Hong Kong/Taiwan uses traditional characters, and that’s probably why there is no ROM2 in the HK/TW region. I am not sure why they even included ROM2 in the first place if barely any games utilize it, but oh well. --[[User:Mrjaredbeta|Mrjaredbeta]] ([[User talk:Mrjaredbeta|talk]]) 18:01, 28 November 2022 (UTC) | ||
== Removing stuff from ps2 emu page == | == Removing stuff from ps2 emu page == | ||
Line 2,553: | Line 2,570: | ||
4000 = SPC_PUINT_MB | 4000 = SPC_PUINT_MB | ||
5000 = SPC_CSR1 | 5000 = SPC_CSR1 | ||
|| | |||
|- | |- | ||
| SPC_CSR | | SPC_CSR | ||
Line 2,574: | Line 2,592: | ||
4000 = SPC_PUINT_MB | 4000 = SPC_PUINT_MB | ||
5000 = SPC_CSR1 | 5000 = SPC_CSR1 | ||
|| | |||
|- | |- | ||
| SPC_CSR | | SPC_CSR | ||
Line 2,965: | Line 2,984: | ||
|| | || | ||
|- | |- | ||
| | | ? | ||
|| 0xAAA700C0000 | || 0xAAA700C0000 | ||
|| 0xAAA70100000 | || 0xAAA70100000 | ||
|| 0x4200030000001 | || 0x4200030000001 | ||
|| | || | ||
|- | |- | ||
| | | ? | ||
|| 0xAAA70100000 | || 0xAAA70100000 | ||
|| 0xAAA70140000 | || 0xAAA70140000 | ||
|| 0x4200040000001 | || 0x4200040000001 | ||
|| | || | ||
|- | |- | ||
| | | ? | ||
|| 0xAAA70140000 | || 0xAAA70140000 | ||
|| 0xAAA70180000 | || 0xAAA70180000 | ||
|| 0x4200050000001 | || 0x4200050000001 | ||
|| | || | ||
|- | |- | ||
| | | ? | ||
|| 0xAAA70180000 | || 0xAAA70180000 | ||
|| 0xAAA701C0000 | || 0xAAA701C0000 | ||
|| 0x4200060000001 | || 0x4200060000001 | ||
|| | || | ||
|- | |- | ||
| | | ? | ||
|| 0xAAA701C0000 | || 0xAAA701C0000 | ||
|| 0xAAA70200000 | || 0xAAA70200000 | ||
|| 0x4200070000001 | || 0x4200070000001 | ||
|| | || | ||
|- | |- | ||
| | | ? | ||
|| 0xAAA70200000 | || 0xAAA70200000 | ||
|| 0xAAA70280000 | || 0xAAA70280000 | ||
|| 0x4200090000001 | || 0x4200090000001 | ||
|| | || | ||
|- | |- | ||
| | | ? | ||
|| 0xAAA70280000 | || 0xAAA70280000 | ||
|| 0xAAA702C0000 | || 0xAAA702C0000 | ||
|| 0x42000A0000001 | || 0x42000A0000001 | ||
|| | || | ||
|- | |||
| ? | |||
|| 0xAAA70080000 | |||
|| 0xAAA700C0000 | |||
|| 0x42000B0000001 | |||
|| | |||
|- | |- | ||
| | | ? | ||
|| 0xAAA702C0000 | || 0xAAA702C0000 | ||
|| 0xAAA70300000 | || 0xAAA70300000 | ||
|| 0x42000B0000001 | || 0x42000B0000001 | ||
|| | || | ||
|- | |||
| ? | |||
|| 0xAAA70000000 | |||
|| 0xAAA70040000 | |||
|| 0x4200000000001 | |||
|| | |||
|- | |||
| ? | |||
|| 0xAAA70040000 | |||
|| 0xAAA70080000 | |||
|| 0x4200010000001 | |||
|| | |||
|- | |- | ||
|} | |} | ||
Line 3,204: | Line 3,223: | ||
0xFFFFFFFFFFFFF0EC = D_STAT full | 0xFFFFFFFFFFFFF0EC = D_STAT full | ||
0xFFFFFFFFFFFFF0F0 = D_STAT upper 16 bits | 0xFFFFFFFFFFFFF0F0 = D_STAT upper 16 bits | ||