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.42k stars 2.19k forks source link

Invisible video playback for certain games in PPSSPP since revision v0.7.6-1392-g22a2a03 (updated) #2290

Closed solarmystic closed 11 years ago

solarmystic commented 11 years ago

May be related to https://github.com/hrydgard/ppsspp/issues/2287 but I thought I'd make a new issues page since it is more than just Persona 3 Portable that is affected.

(Update 1: https://github.com/hrydgard/ppsspp/commit/afdaa1e299ef3fd5157b46b57e840299cfde595e seems to be the responsible commit which was merged into master in v0.7.6-1390-g861d776 https://github.com/hrydgard/ppsspp/commit/861d77665c42dc71aebac7bbbf78a792566db72c. Thanks to @hrydgard and @unknownbrackets for the verification.)

The issue has been present since the aforementioned git revision v0.7.6-1392-g22a2a03 https://github.com/hrydgard/ppsspp/commit/22a2a03a9d4dd99b46f658550b8884e157184af2 for video playback in certain games.

No video can be seen during playback, only the audio can be heard in all instances.

Games affected include Persona 3 Portable, Monster Hunter Freedom games (1, 2, and Unite tested) and Hatsune Miku Project Diva 2. Also seems to affect Dj Max Portable as per https://github.com/hrydgard/ppsspp/issues/2294

Last unaffected and testable build for the issue mentioned above is v0.7.6-1388-g3d4ffb7,which means there are two possible suspects, either

v0.7.6-1390-g861d776 https://github.com/hrydgard/ppsspp/commit/861d77665c42dc71aebac7bbbf78a792566db72c (Merge pull request #2279 from unknownbrackets/mpeg-fixWrite video images with zeroed alpha)

or

v0.7.6-1392-g22a2a03 https://github.com/hrydgard/ppsspp/commit/22a2a03a9d4dd99b46f658550b8884e157184af2 (Merge pull request #2280 from oioitff/mpeg-fixBug fix for scepsmf.)

Youtube example of the issue:-

Monster Hunter Freedom Unite

v0.7.6-1392-g22a2a03:-

https://www.youtube.com/watch?v=8g_mTWAwyPc

Compare and contrast with v0.7.6-1388-g3d4ffb7:-

http://www.youtube.com/watch?v=Y2v7_dZ7RfM

hrydgard commented 11 years ago

The culprit in Monster Hunter Unite is this: afdaa1e299ef3fd5157b46b57e840299cfde595e

unknownbrackets commented 11 years ago

Darn, so it's more complicated, maybe even based on something in the video?

I wonder if it's the Csc functions or something.

-[Unknown]

unknownbrackets commented 11 years ago

Same commit in Persona 3 Portable, darn: afdaa1e299ef.

-[Unknown]

nekotipcat commented 11 years ago

Disgaea 2 Dark Hero Days Have the same issue with invisible video with audio Log Waited past the invisible Video til the main menu of the game With 1397 http://pastebin.com/jDg57Hn7 Stopped working on 1392 Works on 1388

unknownbrackets commented 11 years ago

Okay, think I found it, in DrawPixels. I wonder if that can safely be RGB?

-[Unknown]

unknownbrackets commented 11 years ago

Probably should just revert the change, I guess. It's going through CopyDisplayToOutput() to DrawPixels() with mode=3 (8888), so I suppose transparent is right.

It's not calling any csc or anything.

-[Unknown]

unknownbrackets commented 11 years ago

I did the same thing as Persona 3 Portable is doing. Top pixel does NOT have alpha set (0x00b1b1b1, etc.)

With that buffer, I just did the following:

memcpy((void *)0x04000000, vbuffer, 512 * 272 * 4);
sceDisplaySetFrameBuf((void *)0x04000000, 512, 3, 0);

And the video was visible.

This implies that the framebuffer ignores alpha?

-[Unknown]

solarmystic commented 11 years ago

Issues with the aforementioned games have been fixed as of v0.7.6-1403-gf99caad

Thanks @hrydgard and @unknownbrackets for the fix.