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 298: | Line 298: | ||
0LL); // unk | 0LL); // unk | ||
} | } | ||
===ps2_netemu command 0x12=== | ===ps2_netemu command 0x12=== | ||
Line 514: | Line 511: | ||
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 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 1,973: | Line 1,988: | ||
== Random ps2_netemu notes == | == Random ps2_netemu notes == | ||
* Some members of pcsx2 team think that emulator is heavily based on early pcsx2. After some reversing this seems to be far away from true. But COP2 and VU0 (and only that for now) really are familiar here and there. To the point where i was able to use pcsx2 code to find names/usage of some variables (mVUbranch for example). But VU0/COP2 is for now only part that have obvious pcsx2 similarities. For example | * Some members of pcsx2 team think that emulator is heavily based on early pcsx2. After some reversing this seems to be far away from true. But COP2 and VU0 (and only that for now) really are familiar here and there. To the point where i was able to use pcsx2 code to find names/usage of some variables (mVUbranch for example). But VU0/COP2 is for now only part that have obvious pcsx2 similarities. For example VU1 is different story, and don't even share code with VU0 part of emulator as far as i see. | ||
* Emulator not only patch SPU programs on init, but also patch own PPU code. Which is hard to understand when you can just make changes in source code... eg. 0x1F128 - 0x1F134 in latest emu. | * Emulator not only patch SPU programs on init, but also patch own PPU code. Which is hard to understand when you can just make changes in source code... eg. 0x1F128 - 0x1F134 in latest emu. | ||
* GUI seems to be tied to GIF/GS emulation. That research was inspired by Dolphin progress report, and it seems to be correct. Fe/be (frontend/backend) spus are involved here. Which explain some UI slowdowns on GIF intensive games. | * GUI seems to be tied to GIF/GS emulation. That research was inspired by Dolphin progress report, and it seems to be correct. Fe/be (frontend/backend) spus are involved here. Which explain some UI slowdowns on GIF intensive games. | ||
* Emulator is full of unused functions. Everything that is compiled inline its also there as separate unreachable function. | * Emulator is full of unused functions. Everything that is compiled inline its also there as separate unreachable function. | ||
===Registers=== | ===Registers=== | ||
It seems that emulator try to keep lower 64 bits of some r5900 registers in specific ppc registers. At least at the time when recompiler is running, also when 0x01 command run. | It seems that emulator try to keep lower 64 bits of some r5900 registers in specific ppc registers. At least at the time when recompiler is running, also when 0x01 command run. | ||
Line 2,195: | Line 2,208: | ||
* '''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,539: | Line 2,550: | ||
4000 = SPC_PUINT_MB | 4000 = SPC_PUINT_MB | ||
5000 = SPC_CSR1 | 5000 = SPC_CSR1 | ||
|| | |||
|- | |- | ||
| SPC_CSR | | SPC_CSR | ||
Line 2,560: | Line 2,572: | ||
4000 = SPC_PUINT_MB | 4000 = SPC_PUINT_MB | ||
5000 = SPC_CSR1 | 5000 = SPC_CSR1 | ||
|| | |||
|- | |- | ||
| SPC_CSR | | SPC_CSR | ||
Line 2,951: | Line 2,964: | ||
|| | || | ||
|- | |- | ||
| | | ? | ||
|| 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,261: | Line 3,274: | ||
===Emu=== | ===Emu=== | ||
Ps2emu have available 14 fragment shaders, and 8 vertex shaders. All of them don't give any hint about name or usage. | Ps2emu have available 14 fragment shaders, and 8 vertex shaders. All of them don't give any hint about name or usage. | ||