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 338: | Line 302: | ||
seg017:00000000001984C0 bgt cr6, next_value | seg017:00000000001984C0 bgt cr6, next_value | ||
</pre> | </pre> | ||
====type 2==== | ====type 2==== | ||
Line 479: | Line 441: | ||
* Radiata does not crash. English patch for FFXII IZJS does crash though (0x21 fixes stuttering in turbo mode).--[[User:Agrippa|Agrippa]] ([[User talk:Agrippa|talk]]) 20:33, 22 May 2023 (CEST) | * Radiata does not crash. English patch for FFXII IZJS does crash though (0x21 fixes stuttering in turbo mode).--[[User:Agrippa|Agrippa]] ([[User talk:Agrippa|talk]]) 20:33, 22 May 2023 (CEST) | ||
** Whoops, my bad. Fixed. :P --[[User:Kozarovv|Kozarovv]] ([[User talk:Kozarovv|talk]]) 09:44, 23 May 2023 (CEST) | ** Whoops, my bad. Fixed. :P --[[User:Kozarovv|Kozarovv]] ([[User talk:Kozarovv|talk]]) 09:44, 23 May 2023 (CEST) | ||
===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 504: | ||
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=== | |||
Ok, i don't get that config. Here is what happen in assembly: | |||
0xD820 ilhu r19, 0x7FFF | |||
0xD824 lqr r20, Q_cfg_0x4D ; 0x3F800000 in wild arms | |||
0xD82C iohl r19, 0xFFFF | |||
0xD834 and r17, r80, r19 ; r17 = Q & 0x7FFFFFFF mask | |||
0xD840 ceqi r15, r17, 0 ; r15 = r17 (shortcut to move 0 or value if exist to r15) | |||
0xD844 lqr r10, ST_Q | |||
0xD84C cwd r9, 0x30+var_30+8(sp) | |||
0xD850 rotqbyi r16, r20, 4 ; load mask from config to r16 | |||
0xD858 and r12, r15, r16 ; tempQ & 0x3F800000 (r15 and with mask from cfg 0x3F800000) | |||
0xD860 or r5, r80, r12 ; or r80(Q) with r12(Q masked with 0x3F800000) | |||
0xD868 shufb r7, r5, r10, r9 ; Prepare correct write for Q (r5 stored to r10 + 8) | |||
0xD870 stqr r7, ST_Q ; write result as Q value in STQ | |||
I removed irrelevant code that setup RGBA for readability, its not affecting Q. So my point is that all that masked Q is finally ored with r80. So with whole untouched Q value. Doen't that make all those operations irrelevant, or i made some mistake here?<br> | |||
This config can be quite important because it should help to fix issues like Galerians Ash without dirty static patches. More games affected: [[https://github.com/PCSX2/pcsx2/issues/5137 | List]] | |||
* I tested the 0x3F800000 and 0x71500000 values with Galerians Ash and it did not work at all.--[[User:Agrippa|Agrippa]] ([[User talk:Agrippa|talk]]) 14:15, 8 March 2022 (UTC) | |||
* This command affects Star Wars: Battlefront II's jedi dash fullscreen blur effect. Without the command, the effect is not emulated properly or just skipped over. With it set to 0x3F800000, the screen is blurred properly on all four sides. With it set to 0x40000000, it seems like only the top 1/4 of the screen is used. With 0x3F000000, the blur effect is duplicated four times equally throughout, like a 2 x 2 matrix of blurs. With 0x3F800000, the effect is most correctly emulated to original hardware. --[[User:Mrjaredbeta|Mrjaredbeta]] ([[User talk:Mrjaredbeta|talk]]) 02:02, 15 January 2023 (UTC) | |||
** Actually, using 0x41000000 (4 in float) seems to properly size the fullscreen effect to fit the entire screen, so this is the value I used in the config. It is most reminiscent of PS2 hardware. I am interested to see if this could affect something like Xenosaga’s black and white filter cutscenes. --[[User:Mrjaredbeta|Mrjaredbeta]] ([[User talk:Mrjaredbeta|talk]]) 16:39, 16 January 2023 (UTC) | |||
***Effect is rendered correctly in PCSX2? In both hardware, and software mode? I mean that SW Battlefront effect. --[[User:Kozarovv|Kozarovv]] ([[User talk:Kozarovv|talk]]) 17:07, 16 January 2023 (UTC) | |||
****Just checked. The effect in both hardware and software are rendered the same way as netemu with command 0x4D set to 0x3F800000. I "tested the limits" by performing Count Dooku's midair R1 attack at the highest point in Mos Eisley's Assault game mode as the screen is gradually blurred from this. The screenshot is of software mode, but hardware is essentially the same: https://www.psdevwiki.com/ps3/File:9k3uBFS.png The discoloration *is* correct and is not an emulation glitch. However, on actual PS2 hardware, the discoloration completely obscures the view instead of there being a viewable window in the center as the effect is rendered on the entire screen. The effect is essentially cut off from the center of the screen (character is not blurred) on PCSX2/netemu at 0x3F800000, while the entire screen is blurred on PS2. --[[User:Mrjaredbeta|Mrjaredbeta]] ([[User talk:Mrjaredbeta|talk]]) 00:40, 17 January 2023 (UTC) | |||
===ps2_gxemu command 0x19=== | ===ps2_gxemu command 0x19=== | ||
Line 522: | Line 542: | ||
Command is auto applied to titles listed here (duplicates are really there in emu too): | Command is auto applied to titles listed here (duplicates are really there in emu too): | ||
Hash | Hash ID Name | ||
0x0CD1298155 | 0x0CD1298155 SLES_540.13 World Snooker Championship 2007 | ||
0x12C93199A5 | 0x12C93199A5 SLES_518.40 NHL Hitz Pro | ||
0x15C93199AD | 0x15C93199AD SLES_549.13 Pro Evolution Soccer 2008 | ||
0x24D92589A5 | 0x24D92589A5 SLUS_211.86 NBA Ballers - Phenom | ||
0x2CD12D8125 | 0x2CD12D8125 SLUS_212.35 MLB 2K6 | ||
0x34C9359935 | 0x34C9359935 SLUS_211.38 X-Men Legends II - Rise of Apocalypse | ||
0x34C93599E5 | 0x34C93599E5 SLUS_211.28 Blitz - The League | ||
0x34C93599E5 | 0x34C93599E5 SLUS_211.28 Blitz - The League | ||
0x449961C9E5 | 0x449961C9E5 SLES_542.10 NBA 2K7 | ||
0x4C9169C1CD | 0x4C9169C1CD SLES_542.46 FIFA '07 | ||
0x4C9169C1D5 | 0x4C9169C1D5 SLES_542.45 NHL '07 | ||
0x4C9169C1DD | 0x4C9169C1DD SLES_542.44 FIFA '07 | ||
0x4C9169C1E5 | 0x4C9169C1E5 SLES_542.43 FIFA '07 | ||
0x4C9169C1F5 | 0x4C9169C1F5 SLES_542.41 FIFA '07 | ||
0x4C9169C1FD | 0x4C9169C1FD SLES_542.40 FIFA '07 | ||
0x4CB14DE12D | 0x4CB14DE12D SLUS_213.74 Marvel - Ultimate Alliance | ||
0x54A955F915 | 0x54A955F915 SLUS_212.74 Outrun 2006 - Coast 2 Coas | ||
0x5CA15DF165 | 0x5CA15DF165 SLUS_213.01 World Series of Poker | ||
0x5CA15DF1FD | 0x5CA15DF1FD SLUS_212.86 WWE SmackDown! vs RAW 2006 | ||
0x5CA15DF1FD | 0x5CA15DF1FD SLUS_212.86 WWE SmackDown! vs RAW 2006 | ||
0x649965C94D | 0x649965C94D SLUS_214.63 Tom Clancy's Ghost Recon 2 | ||
0x649965C955 | 0x649965C955 SLUS_214.60 NBA Live '07 | ||
0x649965C95D | 0x649965C95D SLUS_214.61 NASCAR '07 | ||
0x649965C965 | 0x649965C965 SLUS_214.58 NHL '07 | ||
0x649965C96D | 0x649965C96D SLUS_214.59 NCAA Football '07 | ||
0x6BB149E15D | 0x6BB149E15D SLES_531.04 Tom Clancy's Rainbow Six - Lockdown | ||
0x6C916DC165 | 0x6C916DC165 SLUS_214.91 World Series of Poker - Tournament of Champions | ||
0x6C916DC1A5 | 0x6C916DC1A5 SLUS_214.83 Tiger Woods PGA Tour '07 | ||
0x6C916DC1AD | 0x6C916DC1AD SLUS_214.82 NFL Street 3 | ||
0x6C916DC1B5 | 0x6C916DC1B5 SLUS_214.81 NCAA March Madness '07 | ||
0x6C916DC1D5 | 0x6C916DC1D5 SLUS_214.77 Madden NFL '07 [Hall of Fame Edition] | ||
0x6C916DC1DD | 0x6C916DC1DD SLUS_214.76 Madden NFL '07 | ||
0x748975D9DD | 0x748975D9DD SLUS_213.83 Fight Night - Round 3 | ||
0x7C817DD125 | 0x7C817DD125 SLUS_214.33 FIFA Soccer '07 | ||
0x7C817DD165 | 0x7C817DD165 SLUS_214.25 NHL 2K7 | ||
0x7C817DD16D | 0x7C817DD16D SLUS_214.24 NBA 2K7 | ||
0x7C817DD175 | 0x7C817DD175 SLUS_214.27 WWE SmackDown! vs RAW 2007 | ||
0x7C817DD1CD | 0x7C817DD1CD SLUS_214.12 World Championship Poker featuring Howard Lederer - All-In | ||
0x84798529BD | 0x84798529BD SLUS_205.65 Champions of Norrath | ||
0x8559A109AD | 0x8559A109AD uuunnnnnkkk | ||
0x8579852915 | 0x8579852915 SLUS_215.68 Arena Football - Road to Glory | ||
0x8579852965 | 0x8579852965 SLUS_215.82 MVP '07 - NCAA Baseball | ||
0x8D51A90145 | 0x8D51A90145 SLES_545.11 UEFA Champions League | ||
0x8D51A901B5 | 0x8D51A901B5 SLES_545.13 UEFA Champions League | ||
0x8D51A901BD | 0x8D51A901BD SLES_545.12 UEFA Champions League | ||
0x8D718D21BD | 0x8D718D21BD SLUS_216.20 NCAA Football '08 | ||
0x9C619D31E5 | 0x9C619D31E5 SLUS_205.41 NBA Ballers | ||
0x9D41B911AD | 0x9D41B911AD SLES_544.48 World Series of Poker - Tournament of Champions | ||
0x9D619D31C5 | 0x9D619D31C5 SLUS_215.61 Major League Baseball 2K7 | ||
0x9F29357805 | 0x9F29357805 SCUS_975.44 NBA '07 featuring The Life Vol.2 | ||
0x9F293578E5 | 0x9F293578E5 SCUS_975.56 MLB '07 - The Show | ||
0xB549B51915 | 0xB549B51915 SLUS_216.38 Madden NFL '0 | ||
0xB549B51925 | 0xB549B51925 SLUS_216.32 NHL 2K8 | ||
0xB549B5195D | 0xB549B5195D SLUS_216.47 NHL '08 | ||
0xB549B519A5 | 0xB549B519A5 SLUS_216.48 FIFA Soccer '08 | ||
0xB549B519AD | 0xB549B519AD SLUS_216.49 NBA Live '08 | ||
0xBC61793025 | 0xBC61793025 SCES_532.85 Ratchet - Gladiator | ||
0xBD41BD1105 | 0xBD41BD1105 SLUS_216.69 NBA 2K8 | ||
0xC439C569F5 | 0xC439C569F5 SLUS_208.20 Tom Clancy's Ghost Recon - Jungle Storm | ||
0xC7716D20D5 | 0xC7716D20D5 SCUS_974.01 Hot Shots Golf FORE! | ||
0xC7716D20D5 | 0xC7716D20D5 SCUS_974.01 Hot Shots Golf FORE! | ||
0xCA11E941F5 | 0xCA11E941F5 SLES_516.97 SSX 3 | ||
0xCF7965285D | 0xCF7965285D SCUS_973.53 Ratchet and Clank - Up Your Arsenal | ||
0xCF7965285D | 0xCF7965285D SCUS_973.53 Ratchet and Clank - Up Your Arsenal | ||
0xD20911582D | 0xD20911582D SCES_515.93 Hardware Online Arena [Beta, Promo & Full Release] | ||
0xD7617D308D | 0xD7617D308D SCUS_973.28 Gran Turismo 4 | ||
0xE339C1695D | 0xE339C1695D SLES_525.45 Star Wars Battlefront | ||
0xE794CCB06D | 0xE794CCB06D PCPX_980.42 Minna no Tennis | ||
0xEA3129608D | 0xEA3129608D SCES_515.78 Network Access Disc [Original, v4.02 & v4.03] | ||
0xEC11ED4115 | 0xEC11ED4115 SLUS_209.73 Champions - Return to Arms | ||
0xEF594508D5 | 0xEF594508D5 SCUS_975.00 MLB '06 - The Show | ||
0xF409F559AD | 0xF409F559AD SLUS_208.89 MLB Slugfest - Loaded | ||
0xF7415D10E5 | 0xF7415D10E5 SCUS_974.65 Ratchet - Deadlocked | ||
0xF7415D10E5 | 0xF7415D10E5 SCUS_974.65 Ratchet - Deadlocked | ||
==XMB messages related with PS2 Emulation== | ==XMB messages related with PS2 Emulation== | ||
Line 904: | Line 923: | ||
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,864: | Line 1,882: | ||
== Emu Patches == | == Emu Patches == | ||
===Display current PC/RA values for r5900=== | ===Display current PC/RA values for r5900=== | ||
Line 1,970: | Line 1,975: | ||
B452CCB51348127DAF8A931B621E5E39 | B452CCB51348127DAF8A931B621E5E39 | ||
DL: https://www.mediafire.com/file/kpno5mubyy7q9p0/gx_cfg_ext.ppf/file | DL: https://www.mediafire.com/file/kpno5mubyy7q9p0/gx_cfg_ext.ppf/file | ||
== SPE programs dumper == | == SPE programs dumper == | ||
Line 1,986: | Line 1,984: | ||
== 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 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,030: | Line 2,027: | ||
Register that handle ACC is taken from different pool (same pool as all vfXX regs when in COP2 mode) with param 32 as reg nr (not real reg, probably part of one of vXX regs). | Register that handle ACC is taken from different pool (same pool as all vfXX regs when in COP2 mode) with param 32 as reg nr (not real reg, probably part of one of vXX regs). | ||
Most likely those regs are flushed to memory when COP2 opcode is running, for sure they are flushed when VU0 microprogram is running. | Most likely those regs are flushed to memory when COP2 opcode is running, for sure they are flushed when VU0 microprogram is running. | ||
== RSX workload on the netemu == | == RSX workload on the netemu == | ||
Line 2,066: | Line 2,033: | ||
* 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,094: | Line 2,060: | ||
ld r4, 0x3008(r0) # load to r4 from address 0x3008, no matter what r0 actually is at the moment. | ld r4, 0x3008(r0) # load to r4 from address 0x3008, no matter what r0 actually is at the moment. | ||
== | == ps2_gxemu external bios/rom loading. == | ||
Emulator can load external bios file. File need to be 4 bytes aligned, and 4MB or less size. File name need to be rom.bin (lower case), and probably need to have patched out RDRAM module to success RD check. At least that check is patched in current ps2_gxemu.self rom, maybe is not really needed. | |||
To | To load bios we need to set emulator status flag bit 2 to true. I'm not sure that is already set, because i don't have memory dump, only elf file. In case is not, we can probably just ignore that check by patch. Emulator read file using lv1_read_remote_file with type 1, and path "rom.bin". So it seems to be relative to emulator self file (dev_flash/ps2emu)? All code is there and is valid, so external bios loading is fully implemented. Only two things required to do that is second bit of status flag set to true, and rom.bin file in correct path. | ||
Note: This code don't exist in ps2_netemu. | |||
== Shin Sangoku Musou config == | |||
== Shin Sangoku Musou config == | |||
This config does something with sceGsSyncPath by storing 0x4 to INTC_STAT before jumping to it (from one of the main function, so only a specific jump to sceGsSyncPath). I am thinking it fixes this: WhECT9RGZ0k (YouTube link) | This config does something with sceGsSyncPath by storing 0x4 to INTC_STAT before jumping to it (from one of the main function, so only a specific jump to sceGsSyncPath). I am thinking it fixes this: WhECT9RGZ0k (YouTube link) | ||
Line 2,263: | Line 2,194: | ||
Assuming the game programming is right, the underlying issues are data transfer related, probably. | Assuming the game programming is right, the underlying issues are data transfer related, probably. | ||
== Stuntman/Driv3r research == | == Stuntman/Driv3r research == | ||
Line 2,354: | Line 2,274: | ||
* 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,383: | Line 2,302: | ||
Cycles are count in function located at 0x17C9D0 (latest netemu). Emitter with addi to r13 register is what we are looking for. Since pcsx2 use different "unit", lets just call cycles here a... unit. | Cycles are count in function located at 0x17C9D0 (latest netemu). Emitter with addi to r13 register is what we are looking for. Since pcsx2 use different "unit", lets just call cycles here a... unit. | ||
________________________________________________ | |||
| Opcode type | | | Opcode type | Netemu/Gxemu | PCSX2 | | ||
|----------------| | |----------------|-----------------|-------------| | ||
| Default opcode | 1 unit | | Default opcode | 1 unit | 9 units | | ||
| Load/Store | 2 units | | Load/Store | 2 units | 14 units | | ||
| Multiply | 4 units | | Multiply | 4 units | 16 units | | ||
| Divide | 37 units | | Divide | 37 units | 112 units | | ||
| COP 0 | 1 unit | | COP 0 | 1 unit | 7 units | | ||
| COP 1 | 1 unit(some 2) | | COP 1 | 1 unit(some 2) | 7 units | | ||
| COP 2 | 1 unit | | COP 2 | 1 unit | 7 untis | | ||
-------------------------------------------------- | |||
Additionally pcsx2 use different cycles for many other opcodes that ps3 emus just count as one. | Additionally pcsx2 use different cycles for many other opcodes that ps3 emus just count as one. | ||
Line 2,403: | Line 2,321: | ||
At the second hand gx/net emu do some weird shenigans with cycles based on... Opcode number, this is still small unknown here. Yeah... | At the second hand gx/net emu do some weird shenigans with cycles based on... Opcode number, this is still small unknown here. Yeah... | ||
Underclocking/Overclocking could be done by modifying opcodes at 0x17CEB0, 0x17CFF8, 0x17D4C8. | Underclocking/Overclocking could be done by modifying opcodes at 0x17CEB0, 0x17CFF8, 0x17D4C8. | ||
Line 2,479: | Line 2,383: | ||
Need even more work... | Need even more work... | ||