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.01k stars 2.14k forks source link

Black screen when starting up LittleGPTracker #15139

Open hrydgard opened 2 years ago

hrydgard commented 2 years ago

LittleGPTracker is a homebrew music app for the PSP and a few other platforms. https://littlegptracker.com/

Got a report on Discord that you only get a black screen when starting it, until you switch out of PPSSPP and back in again. This indicates it's some issue with framebuffer management and should be looked into.

anr2me commented 2 years ago

I always wondered why prx files built from PSPSDK's sample files always shows a black screen on PPSSPP, while it shows some text on JPCSP's screen, might be having similar issue to this?

hrydgard commented 2 years ago

Most of those, and likely LittleGPTracker, will work if you enable the software renderer. A lot of homebrew will draw directly to VRAM using the CPU, which game generally don't do. When hardware rendering is active, PPSSPP makes the assumption that if you've once rendered to a framebuffer with the GPU, that framebuffer will not be written to by the CPU, and can thus be kept in host GPU vram.

So the maybe-not-so-hypothetical case of a homebrew app that first uses the PSP GPU to clear the screen, and then pokes pixels with the CPU, is gonna have issues like this as it is, unfortunately...

ghost commented 2 years ago

Similar to https://github.com/hrydgard/ppsspp/issues/11940

anr2me commented 2 years ago

In the case of LittleGPTracker, the screen will be normal after you resize the window, while prx from PSPSDK's sample will still shows blackscreen, so i guess they have a different issue.

PS: during black screen the FPS was 0/0 (100%), but after resizing the window and the screen became normal the FPS became 60/60 (100%)

INFU-AV commented 2 years ago

Just wanted to add that no matter what rendering Backend/mode (OpenGL / Vulkan) or Performance settings I turn on/off, the app will always start in black screen (Tested only on Mobile PPSSPP)

ghost commented 2 years ago

In the case of LittleGPTracker, the screen will be normal after you resize the window, while prx from PSPSDK's sample will still shows blackscreen, so i guess they have a different issue.

No, they are the same issue https://github.com/hrydgard/ppsspp/issues/11940#issuecomment-599818468

anr2me commented 2 years ago

Just wanted to add that no matter what rendering Backend/mode (OpenGL / Vulkan) or Performance settings I turn on/off, the app will always start in black screen (Tested only on Mobile PPSSPP)

in the case of LittleGPTracker, it only worked properly with Software Rendering (slow).

While prx from pspsdk's sample will still shows black screen even with software rendering, i wonder why JPCSP can shows the text outputted from checkpoint("some text here");, may be something not being implemented on PPSSPP yet?

LunaMoo commented 2 years ago

What PRX samples? Some homebrew run in kernel mode, those will not work on PPSSPP. Some also make use of MediaEngine which emulation still is buggy and might not work.

PPSSPP by design is a high level emulator ment to run and enhance commercial games with tons of features surrounding that, not to provide PSP experience which frankly dated very poorly. JPCSP on the other hand always provided very poor gaming experience due to java and all the performance and stability issues related, but as a project at least in some ways tries to be closer to actual PSP.

unknownbrackets commented 2 years ago

While prx from pspsdk's sample will still shows black screen even with software rendering, i wonder why JPCSP can shows the text outputted from checkpoint("some text here");, may be something not being implemented on PPSSPP yet?

That's just because the tests literally detect that and route to a special output instead of printing on screen. b592e91 probably changes that. The way the tests detect an emulator, iirc, is not supported (at least not the same way) by JPCSP. It's a special hook we use to make comparing test execution and validation easier.

-[Unknown]

mackemint commented 2 years ago

My solution to this issue is to change the resolution settings (settings, graphics, display resolution). This will show the graphics again. At this point, save state. Load state next time you wanna go piggin'!

djdiskmachine commented 4 days ago

I'd like to fix this issue in LittleGPTracker since a lot of people use PPSSPP to run it. Not quite sure I understand what the actual issue is though, LGPT draws to VRAM which is not ideal for PPSSPP?

hrydgard commented 4 days ago

The likely issue is that it mixes drawing using the GPU and the CPU, I haven't gotten around to looking at this but I'd guess you're clearing the screen with the hardware once, and after that using the CPU to draw. PPSSPP will think there's a framebuffer used for hardware rendering there and display that, instead of the VRAM you're drawing to using the CPU.

djdiskmachine commented 4 days ago

You seem to be correct in your assumption, I'll have a look at it. :)