hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
11.32k stars 2.18k forks source link

Test Drive Unlimited glitchy map #12786

Open Panderner opened 4 years ago

Panderner commented 4 years ago

When I zoom out to see a entire map. The map is glitched Screenshot_2020-04-02-19-14-40-20_2f85358b2198d26f8aca533d68bee793 GE Dump here: recording.zip

hrydgard commented 4 years ago

Just wondering, are you using any cheats to make the game playable (remove that effect that slows everything down?)

Panderner commented 4 years ago

Just wondering, are you using any cheats to make the game playable (remove that effect that slows everything down?)

Even I disabled the lag workaround cheat and it happened

hrydgard commented 4 years ago

Ok, thanks for replying!

unknownbrackets commented 4 years ago

It's using bezier curves to draw this, plus tex gen. I wonder if something funny is going on there?

It happens in the software emulator too. Interesting.

I don't see why it's NOT rendering (though I didn't look super closely at the verts), but the PSP rendering seems to agree: ULUS10249_#12786_test_drive_map (there's something odd happening at the bottom there, though...)

Do we know that the game actually draws this as expected when zoomed out on a real PSP?

-[Unknown]

Panderner commented 4 years ago

I don't have a real PSP but someone reported this issue On real PSP?

ppmeis commented 3 years ago

Tested in latest Windows build. Same map issue: image

Back2Life888 commented 3 years ago

I dont experience this.. I only experience somekind of upscaling issue which made the map even more ruined..

hrydgard commented 3 years ago

@Back2Life888 can you post a screenshot of that?

Back2Life888 commented 3 years ago

I can't.. The game is too messed up for me to play.. I also experience a glitch where the 1 and GO on a race is way to quick.. And the landscape of grass is very weird..

hrydgard commented 3 years ago

okay, could you record a video of that, then?

Back2Life888 commented 3 years ago

https://user-images.githubusercontent.com/76780043/112634538-aece3700-8e75-11eb-91f2-fc4ffbf63170.mp4

Here is the 1 and GO bug.. I also notice that if you pause, traffic would move.. The traffic should pause also if you pause the game.. You can also notice the weird grass.. Here is the map bug, I got a blue screen of death by just trying to take a screenshot but I got it working.. I also had some cheats where it enables 60 FPS and removes some kind of "Ugly Effect"..

Map

hrydgard commented 3 years ago

If you turn off the cheats, does it work? in that case the problem is with the cheats, not PPSSPP.

Back2Life888 commented 3 years ago

The only thing that is fixed is the 1 and GO bug with all the cheats disabled.. The rest of the bugs still not fixed

LunaMoo commented 3 years ago

The weird grass & new map issue should probably be reported separately seems to be a regression, it was working fine in the past, don't remember when I last tested this game, but for sure it was looking normally back in 2019 ~ https://github.com/hrydgard/ppsspp/issues/12010#issuecomment-489232906 the game might simply caught covid.;3

As for cheats, the one to remove ugly effects would be mine, but as far as I understand it's no longer needed(unless the glitches are caused by the the compat hacks I guess or more performance is needed as removing the effect might still be faster than what compat hacks do, probably not much through). 60 fps patch is not mine, but most of them are ruining gameplay, physics, animations or all of the above, bugs when using them should be expected and yeah bug reports should never be made when using any kind of cheats in general as many even seemingly harmless cheats can cause all sorts of weird problems even on real console, my favourite case is "infamous patapon hacker" which was just poorly made cheat that people abused. The only way to clear most cheats is to restart emulation after disabling them and loading the game normally(not using savestate), unfortunately some cheats like that patapon mentioned are glitching savedata forever and only starting from 0 fully restores unglitched state.

LunaMoo commented 3 years ago

Couldn't reproduce any of the "new issues" reported by @Back2Life888 above, at least not with default settings, turns out this game uses curves in some places and ofc hardware tesselation which has slightly worse accuracy is broken in it similar to how it was broken in some other racing games using it causing texture glitches over and around roads(and also on the map).

Maybe that option should be renamed to "hardware curves(less accurate)" to be less appealing to use than "hardware tesselation" which makes people think it's some kind of graphic enhancement(which it really isn't) or works faster(which also only would apply in specific situation of great GPU combined with awful CPU). I'm really not a fan of people turning this ON for no reason whatsoever.

Edit: also just to update, the original issue posted here is still present, here's a dump: ULUS10249_0001.zip (the dump displays extra black bars on the visible portion of the map, which is not present in game)

Back2Life888 commented 3 years ago

Switching to D3D11 fixes both Map and Grass at the cost of performance. This is not an upscaling bug, this is a renderer bug. Upscaling works fine, it's just that Vulkan rendering is bugged for this game.

hrydgard commented 3 years ago

Interesting. That is with hardware tessellation on right? that would mean we have vulkan-specific bugs with hw tesselation, given that D3D11 also supports it....

LunaMoo commented 3 years ago

For me at least hardware tesselation is broken same(Edit: there seems to be a difference in OGL, but also broken) in all backends it's supported with(can't be used in D3D9). I never said anything about upscaling.

Here's how it looks on my system, note that the game fps is crap, but it runs same on PSP.

Vulkan & D3D111 with hardware tesselation: ULUS10249_00005 ULUS10249_00006

OGL with hardware tesselation: ULUS10249_00008

Software curves any backend: ULUS10249_00009

ppmeis commented 1 year ago

Tested in latest Windows build under Vulkan backend. Game now renders just fine. Even map looks better than before. Only when you zoom out map is partially missing:

image

It is also simulating "GPS loading map effect" pretty well: image

During drive world renders fine too: image

You can see same scenario on a real PSP: https://youtu.be/YIlIZ5x-w6Y?t=342

unknownbrackets commented 1 year ago

A fresh frame dump of the map issue might help to reproduce. I really wonder if it actually happens on a real PSP though. Would help if anyone has a real PSP and this game to check.

-[Unknown]

hrydgard commented 1 year ago

I do now, and the excessive clipping issue when you zoom out does not happen on the real PSP.

I'll get a framedump.

unknownbrackets commented 1 year ago

The previous one didn't render on a PSP but there's also some corruption. I'm hoping it's something we've fixed, otherwise maybe I'll try editing the framedump to figure out why it looks corrupt on a PSP.

-[Unknown]

hrydgard commented 1 year ago

Indeed, the framedump is functional but seems to display the wrong image at the end, similarly to some others we've seen. Here it is:

Test Drive issue 12786 ULES00637_0006.zip

By the way, the ground is drawn with bezier patches. Maybe some clipping rule is different for them..

hrydgard commented 1 year ago

Turned on increased depth resolution for this game too, as expected it doesn't affect this issue (but does remove quite a bit of undesirable Z fighting flicker)

Back2Life888 commented 1 year ago

Kinda off topic but looks like someone threw a hissy fit and disliked every single message on this thread XD

hrydgard commented 1 year ago

Yeah, they did that on several threads. Blocked, but no way to get rid of the dislikes..

unknownbrackets commented 1 year ago

Okay, had to edit the framedump because for some reason the ATARI logo was drawn over it. Maybe some bloom detected wrong, might explain the previous one. Here's the frame dump with those later commands simply removed:

#12786_ULES00637_testdriveunlimited_map_edit.zip

And indeed, the map should display just fine: #12786_ULES00637_testdriveunlimited_map_edit

This has a minz test which appears to be failing. If I force minz from 0x0010 to 0x0000, we get this in the software renderer: Full map visible

Which looks pretty good. Returning to 4/642, we're using s16 positions (only) in a bezier 7x34. The z values are this pattern simply repeated:

a001 / -0.74996948242 9aac / -0.79162597656 9557 / -0.8332824707 9001 / -0.87496948242 8aac / -0.91662597656 8557 / -0.9582824707 8001 / -0.99996948242

So the patches simply go left to right, it seems, and presumably go from that range. For the first values, Y is -0.19784545898.

Matrices look like this:

world_z = model_y 4303 + model_z 13370.75 - 62133.0 view_z = world_z proj_z = view_z -1.000061 - 4.000122 projected_z = proj_z / -view_z screen_z = projected_z -16375.500000 + 16391.500000

Which works out to a range (from the above values) of:

world_z = [-73011.9834671, -76354.6709671] projected_z = [1.0000062128, 1.0000086113] screen_z = [15.8982622936, 15.8589856569]

Our minz value is 16. So this turns out to be very similar to https://github.com/hrydgard/ppsspp/issues/16131#issuecomment-1486938466, where a depth value should round up but isn't.

-[Unknown]