Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Userbots
Copy link

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
Copy link
Contributor

pgert commented Sep 29, 2024

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

Expanded patch list.
@Userbots
Copy link
Author

Userbots commented Sep 30, 2024

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.

@Userbots Userbots changed the title Need for Speed Underground 2 (SLUS-21065) 60FPS patch Need for Speed Underground 2 (SLUS-21065) various patches Sep 30, 2024
@pgert
Copy link
Contributor

pgert commented Sep 30, 2024

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
Copy link
Author

Userbots commented Oct 1, 2024

@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.

@Userbots Userbots marked this pull request as draft October 1, 2024 02:49
@pgert
Copy link
Contributor

pgert commented Oct 1, 2024

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
Copy link
Author

Userbots commented Oct 2, 2024

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
Copy link
Contributor

pgert commented Oct 2, 2024

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=".

@Userbots
Copy link
Author

Userbots commented Oct 4, 2024

@pgert, thank you for the suggestion.
I must have been oblivious and not noticed all the in-game cutscenes were sped up along with the FPS unlock, not just the garage thing, but it's nothing game-breaking. As I mentioned, it is a surprising QoL, if anything. No major glitches observed.

Revised the pnach and this is the definitive edit, pushing back to review. So far went through Stage 1 campaign and it's been a breeze with the fixes.

@Userbots Userbots marked this pull request as ready for review October 4, 2024 05:07
@PeterDelta
Copy link
Contributor

If they can cause problems, it is best not to include them in this repository, in my humble opinion and I would say that 98% of players only use the 16:9 aspect ratio.
On the other hand, the 16:9 patch must necessarily have the following title for it to be automatically detected:

[Widescreen 16:9]
gsaspectratio=16:9

@Userbots
Copy link
Author

Userbots commented Oct 5, 2024

@PeterDelta, I assume by automatically detected you referring to the "Apply Widescreen Patches" option in the emulator? I'm not particularly familiar with the underlayings in the functionality.

Either way, I've put a lot of effort to test these patches before including each and every to the pnach. So I can confirm there are no issues, with confidence.

If 16:9 necessitates this particular syntax, I can easily split 16:9 and 4:3 codes into respective brackets.
16:9 would be:

[Widescreen 16:9]
gsaspectratio=16:9
...
patch=1,EE,0056FB48,word,3F24A9CF // Corrected 16:9 aspect
patch=1,EE,0056FBF8,word,3F470000 // Corrected 16:9 rendering
...

The question is where do I put the 4:3 one (it's still one of two native aspect ratios in game and people may be interested in using it). Something akin to:

[Native 4:3 Aspect Ratio fix]
...

Must "gsaspectratio=4:3" be included in the code above?

Other than that, the codes work flawlessly.

@PeterDelta
Copy link
Contributor

Yes, that's what I mean. In this case, it would not be necessary to include a specific 4:3 patch because changing the video options to 4:3 in the game fixes it with the patch activated, right? As you rightly describe.

@Userbots
Copy link
Author

Userbots commented Oct 5, 2024

@PeterDelta, yes, right now activating the combined 16:9/4:3 fixes both. You can choose either one in the in-game settings menu, and both are facilitated with the fix.

@PeterDelta
Copy link
Contributor

Perfect! Just change the name so that pcsx2 automatically recognizes it and that's it :)

@Userbots
Copy link
Author

Userbots commented Oct 6, 2024

Pnach updated according to PeterDelta's suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants