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.17k stars 2.17k forks source link

OutRun 2006 - Coast 2 Coast (USA) missing water #11928

Closed benderscruffy01 closed 2 years ago

benderscruffy01 commented 5 years ago

happens in both opengl and dx11 backend and have tried it with simulate block transfers effects both on and off outrun DUMP.ZIP

EDIT: This appears to be the same problem as https://github.com/hrydgard/ppsspp/issues/13012 (Dirt 2 water).

unknownbrackets commented 5 years ago

In one of the dumps, it seems like the water is drawn by 703/1355 from 0x041c45e0 (64x64). For me, it only works in the software renderer.

There are a few suspicious things, but the direct problem is a stencil test (& FF == FF) not passing. It's a 5551 buffer, but the stencil is zero in the hardware backends.

The stencil value is established by the 0x040d4000 (64x64) texture being drawn at 701/1355. The texture looks radically different in the software renderer.

040d4000 is rendered to using 5551 several times in the beginning of the frame, but at 198/1355 it's drawn again using 5650. However, as a texture it's indicated as 4444 (which makes the colors very vibrant, heh.)

The 701 draw uses an ALWAYS FF stencil test, so that's our one. The alpha test is (a & 0xE0 == 0x20), in other words checking that the 0xC0 bits are not set. From the original 5650, that's checking part of blue.

We're also not even binding the framebuffer because we're worried it might be a video or some other texture with a different format in RAM. So currently, we're treating it as RAM instead... changing that could have unexpected (good or bad) effects in other games.

But that's not all. It also uses RGB masking to draw this little helper texture, which is how it figures out the correct areas for water, etc. And also various logic ops too (draws 198 through 202.)

-[Unknown]

theboy181 commented 5 years ago

I noticed that when its working you can change the resolution multiplier, and it will break immediately. Its such a great looking game so I do hope it gets fixed soon.

_S ULES-00262
Date: 9-2-2019
_G OUTRUN 2006: COAST 2 COAST [Public Version 1.1]
_C1 Enhanced GFX v1.0
_L 0x200BCA84 0x1000000F // Car Level of Detail Max
_L 0x203034D4 0xC47A0000 // Max Draw Distance
Panderner commented 4 years ago

Screenshot_2020-04-02-10-40-30-42_2f85358b2198d26f8aca533d68bee793 The water is no longer black but the water is incorrect on lastest version GE Dump: recording.ppdmp.zip

shervinmathieu commented 4 years ago

About what the previous comment said, the water is completely missing in both the latest PC and Android builds. Maybe the picture was taken in a different stage where the water does not disappear?

hrydgard commented 3 years ago

Seems the water works in some stages but not others.

Panderner commented 3 years ago

PPSSPP: Screenshot_2020-11-17-19-10-34-41_2f85358b2198d26f8aca533d68bee793 Software Renderer: Screenshot_2020-11-17-19-03-05-96_2f85358b2198d26f8aca533d68bee793

it seems the water has graphical glitches.

inukaze commented 2 years ago

001

Importing the GFX Hack Activating : 002

Restart the game and test : 003

Panderner commented 2 years ago

Outrun 2006 and Dirt 2 are using same engine that does not render water properly in hardware renderers as mentioned in https://github.com/hrydgard/ppsspp/issues/13012

Screenshots from software renderer: Screenshot (2) Screenshot (4)

GE dumps: ULUS10471.zip ULUS10064.zip

inukaze commented 2 years ago

Hi there, well sorry but in the PAL version [ ULES00262 ] of OutRun 2006 the issue persist :

Well i can't use any another thing except « OpenGL » PPSSPP-v1123-PAL-OutRun2006-001

The Water still render : PPSSPP-v1123-PAL-OutRun2006-002

PPSSPP-v1123-PAL-OutRun2006-003

On the « Desert Stage » near entrance in the right side, the water looks completly in blank

Dunno : Is not possible make the PPSSPP emulator print the Game Serial on the title window like for example : PPSSPP v.1.12.3 ( ULES00262 ) ?

Panderner commented 2 years ago

Well i can't use any another thing except « OpenGL »

@inukaze what device are you using?

hrydgard commented 2 years ago

Not gonna matter right now which device you're using, there's something still going fundamentally wrong here, even now after fixing all the framebuffer reinterpret stuff. I will look into this again soon.

unknownbrackets commented 2 years ago

I should've read this one again, I noticed it used logic ops here, years ago. It's pretty clear this is the same underlying issue as #13012 at this point.

-[Unknown]

hrydgard commented 2 years ago

Note: Not yet fully fixed on all platforms. D3D11 and OpenGL ES coming up. Keeping closed, since the mystery is solved.

inukaze commented 2 years ago

Well i can't use any another thing except « OpenGL »

@inukaze what device are you using?

Device : P.C

OS : GNU , Kernel : Linux 4.4.301 , Architecture : x86_64

GPU : Nvidia GeForce GT 620, 2GB VRAM, Driver : nvidia Driver Version : 390.151, OpenGL : 4.6.0, PCI ID : 10de:0f01