PCSX2 / pcsx2_patches

Patches for Widescreen, No Interlace etc go in here, syncs with the main repo
159 stars 75 forks source link

Need for Speed Underground 2 (SLUS-21065) various patches #422

Open Userbots opened 4 days ago

Userbots commented 4 days ago

That's quite an omission this hasn't been added yet, so I'm filling the gap.

NFSU2 (NTSC-U, SLUS-21065). Just tested thoroughly on v2.1.174. Requires EE 180% OC, otherwise frames dip down in the city center area. There is only one non-gamebreaking curiosity: whenever the player's car is being parked into a shop/the garage, the in-game driving-in animation is sped up; this has no other side effects, in fact, quite amusingly feels like a QoL. I don't know whether this insignificant glitch would be considered for a pull decline or not.

So far, this has not been breaking any game physics at 60 FPS, although on the PC port it gets wonky at 120.

pgert commented 3 days ago

Try out this pnach and add what you will.

gametitle=Need for Speed: Underground 2 NTSC-U SLUS-21065 * F5C7B45F

[Aspect Ratio and Icons fixes] author=PsxFan107 description=Corrects native 4:3 & 16:9. patch=1,EE,001CCAF4,word,0C0ED18B patch=1,EE,003B462C,word,3C03004C patch=1,EE,003B4630,word,E474D848 patch=1,EE,003B4634,word,03E00008 patch=1,EE,003B4638,word,2404001A patch=1,EE,0056FB44,word,3F5B8D14 // Corrected 4:3 aspect patch=1,EE,0056FB48,word,3F24A9CF // Corrected 16:9 aspect patch=1,EE,0056FBF4,word,3F154000 // Corrected 4:3 rendering patch=1,EE,0056FBF8,word,3F470000 // Corrected 16:9 rendering

[Widescreen 16:10] gsaspectratio=Stretch author=PsxFan107 & pgert description=Alters native Widescreen to 16:10. comment=Might need support from 'Aspect Ratio and Icons fixes'. patch=1,EE,0056FB48,word,3F36F590 patch=1,EE,0056FBF8,word,3F331999

[Widescreen 15:10] gsaspectratio=Stretch author=PsxFan107 & pgert description=Alters native Widescreen to 15:10. comment=Might need support from 'Aspect Ratio and Icons fixes'. patch=1,EE,0056FB48,word,3F432811 patch=1,EE,0056FBF8,word,3F27E800

[Widescreen 20:9] gsaspectratio=Stretch author=PsxFan107 & pgert description=Alters native Widescreen to 20:9. comment=Might need support from 'Aspect Ratio and Icons fixes'. patch=1,EE,0056FB48,word,3F03BB0C patch=1,EE,0056FBF8,word,3F78C000

[Widescreen 21:9] gsaspectratio=Stretch author=PsxFan107 & pgert description=Alters native Widescreen to 21:9. comment=Might need support from 'Aspect Ratio and Icons fixes'. patch=1,EE,0056FB48,word,3E968CA0 patch=1,EE,0056FBF8,word,3F829800

[Debug Cameras] author=xan1242/Xanvier patch=1,EE,0057235C,word,00000001

[60 FPS] author=asasega // - Whenever the player's car is being parked into a shop/the garage, // the in-game driving-in animation is sped up. // - Internal Resolution: Native & Blending Accuracy: High comment=Might need EE overclocking to be stable (180%). patch=1,EE,201D7ED4,word,2C420001

Userbots commented 3 days ago

I've been testing these new codes @pgert provided (thank you!) for the entire day, and came up with a batch of additional codes by a fellow member of the PCSX2 forums, kozarovv. https://forums.pcsx2.net/Thread-Post-your-PCSX2-cheats-patches-here?pid=617162#pid617162 Since you mentioned it, we can do more than the FPS hack.

"Aspect Ratio and Icons fixes" is absolutely outstanding, it resolves the problem with weirdness that happens with aspect ratios, and I believe this fix has really got the importance of being elevated to essential native PCSX2 widescreen patch, if that's even possible. https://imgsli.com/MzAxMTIw https://imgsli.com/MzAxMTIy

Unfortunately, due to the lack of such monitors and ability to set up resolutions in question, I was unable to test anything but 4:3 and 16:9. Other widescreen patches seem to move sprites and reflections where they supposed to be at, though. Can anyone chime in and test 21:9 etc, and the need to apply "Aspect Ratio and Icons fixes"?

Disable Screen Filter Is essentially the screenspace shader they had used for the PS2 version. By disabling it, you'd revert the look to PC port's original without "enhanced contrast" tweak. I specifically included motion blur removal because otherwise there's massive screen glitching when used with Nitro/NOS. This one also removes obnoxious smearing on cars in various menus. This patch can be replicated by skipdraw=1 in PCSX2. https://imgsli.com/MzAxMTI1 https://imgsli.com/MzAxMTI3

Disable Fog Self-explanatory. Same option exists on the PC port, hidden on PS2.

Disable Motion Blur Effect Removed the annoying motion blur, and can be used in conjuction with the screen filter mentioned above.

Less/More Rain Unfortunately, the game does not render rain as a screenspace shader, instead it's a bounding box in front of the player's car with particle emitter inside of it. So, only intensity can be changed here.

Better Car Brightness No idea why, it's a pointer to the shader(?) that controls how bright it reflects light? It's a handy one, nonetheless.

Lower Flares Is simply doing what it says: makes lights in game less blindening. At a glance, scales down those sprites.

I did omit DepthOfField and DepthIntoAlpha codes from the forum post. There is absolutely no perceivable DoF effects in the game that I know (are there?), and latter code simply disables many transparency depth buffer effects (fog as an example), and I'm totally unsure it wouldn't break anything.

Debug Cameras should be used as a cheat. This code enables you to use the second PS2 controller to access hidden and broken(!) free camera modes, half-baked "ICE" replay UI interface, and worst of all: you can teleport your car. So this is cheating, hence I did not include this.

Taken the liberty to edit description and patch names for upmost consistency. Please feel free to correct the changes.

pgert commented 3 days ago

To test 21:9, you can set the dimensions of the gaming window to a 21:9 value, for example 1867 * 800, and run the game in windowed mode.

For 16:10, it's 1280 800. For 15:10. it's 1200 800. For 20:9, it's 1778 * 800.

Userbots commented 2 days ago

@pgert, Thank you, I have tested the window resolutions you provided with the corresponding ratio codes and, technically, all of them "work" (more on that below) and shrink the viewport: dimensions look correct, and sprites snap to positions where such should be at. These are 16:10, 15:10, 20:9.

21:9 is straight out broken. It messes up sprites and completely demolishes aspect ratio in menus:

asd

1867*800, 21:9

Now, I'd like to emphasize on several observations, and why I do believe none of these non-orthodoxial aspect ratios (anything other than 4:3 and 16:9) should be included in the patch list. First off, while these do fix the 3D scene, UI is being unaffected, including certain in-game sprites like event markers. In fact, I strongly suggest that, unless a pointer(s) to the UI elements layer is found (so we can shrink/stretch UI accordingly), we exclude any of such codes. For now, until: 1) the UI aspect ratio can be adjusted, 2) someone can find particular values for the additional "markers" code.

The "markers" code is meant by this excerpt, as provided by PsxFan107 in their "Aspect Ratio and Icons fixes" snippet.

patch=1,EE,001CCAF4,word,0C0ED18B
patch=1,EE,003B462C,word,3C03004C
patch=1,EE,003B4630,word,E474D848
patch=1,EE,003B4634,word,03E00008
patch=1,EE,003B4638,word,2404001A

image An instance of one of such "marker" sprites

As I came to the realization that these pointers direct to one/double axis scaling of the sprites, someone has to find correct values for 16:10/15:10/20:9 ratios.

image Note the shrunk UI, 3D is alright. This is a recurring problem.

So, to be brief, the 16:10/15:10/20:9 codes need a rework. 3D is fine both in-world and menus, UI is scaled improperly, the "markers" (while used with icons fixes) still appear oval (not circular). Of course, neither of these issues are game-breaking, but it appears to me as incomplete widescreen patches.

The last word isn't mine in the matter, however, I encourage to share your opinions.

pgert commented 1 day ago

16:9 hacks converted into 20:9 or higher can be ugly with no HUD fix (and/or with no render fix), but 16:10 & 15:10 usually work fine (or at least better) since they are almost as 16:9.

Userbots commented 1 day ago

I've done another pass of testing and updated the pnach.

15:10, 1200*800 https://imgsli.com/MzAxNzM2 Notice tail lights sprites corrected their position (along with plethora of other stuff). However, that introduced black bars on the sides.

16:10, 1280*800 https://imgsli.com/MzAxNzM3

20:9, 1778*800 https://imgsli.com/MzAxNzM5 This patch is finicky. If applied during gameplay on world map it appears broken. Changing maps world>menu or vice versa fixes it. Works correctly when preapplied before booting. No big deal as you obviously wouldn't end up in the world map from the get-go unless loaded from a savestate.

21:9 remains out of question: it breaks both in-game and menu ratios. Be aware that "icons fix" code snippets were included in every widescreen patch, as evidently it works fine in all of the cases present.

The whole set is pretty much done and I'm satisfied with the test results. Tell me if any corrections have to be done, and I push PR back from draft. One minor issue I was minding: should we append "use only one (patch)" to the widescreen descriptions? Kinda obvious, but the patches rewrite each other and mess things up, should one enable multiples.

pgert commented 22 hours ago

I usually don't point out that enabling several types of aspect ratio hacks may cause problems. The user can figure that out, if any problems arises. But if you wish, add for example "comment=Combining with other Aspect Ratio hacks may cause problems." after "description=".