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

Black screen on Raspberry Pi 3B #15469

Closed cmitu closed 2 years ago

cmitu commented 2 years ago

Game or games this happens in

None

What area of the game / PPSSPP

Starting a game, there's nothing displayed on the screen and the rendering isn't initialised.

A few RetroPie users reported an issue on the RPI 3B model [1], using Raspbian Buster and the (old/legacy) Broadcom Videocore GLES drivers. The issue (black screen/freeze and emulator not starting) happens with both the standalone PPSSPP emulator or the libretro core.

Tried a git bisect, which indicated ce2995f95273d06c913526553489ac8d203752d7 is the culprit.

[1] https://retropie.org.uk/forum/topic/32423

What should happen

PPSSPP should start.

Logs

Verbose log from the libretro core with ce2995f95273d06c913526553489ac8d203752d7:

V3D_GL_ERROR_ASSIST=1 /opt/retropie/emulators/retroarch/bin/retroarch -L ./lib/ppsspp_libretro.so -c /opt/retropie/configs/psp/retroarch.cfg -v ~/roms/psp/Knight\ Fortix\ 2\ \(minis\)\ \(PSN\)\ \[NPEZ00425\].iso
[INFO] [Config]: Loading config from: "/opt/retropie/configs/psp/retroarch.cfg".
[WARN] [GameMode]: GameMode cannot be enabled on this system ("dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory.") https://github.com/FeralInteractive/gamemode needs to be installed.
[WARN] [Config]: GameMode unsupported - disabling...
[INFO] RetroArch 1.10.0 (Git e9e85f3)
[INFO] === Build =======================================
[INFO] Capabilities:  NEON VFPv3 VFPv4
[INFO] Built: Jan 30 2022
[INFO] Version: 1.10.0
[INFO] Git: e9e85f3
[INFO] =================================================
[INFO] [Input]: Found input driver: "udev".
[INFO] [Core]: Loading dynamic libretro core from: "./lib/ppsspp_libretro.so"
[INFO] [Overrides]: No core-specific overrides found at "/home/pi/.config/retroarch/config/PPSSPP/PPSSPP.cfg".
[INFO] [Overrides]: No content-dir-specific overrides found at "/home/pi/.config/retroarch/config/PPSSPP/psp.cfg".
[INFO] [Overrides]: No game-specific overrides found at "/home/pi/.config/retroarch/config/PPSSPP/Knight Fortix 2 (minis) (PSN) [NPEZ00425].cfg".
[INFO] [Environ]: SET_VARIABLES.
[INFO] [Remaps]: Remap directory: "/opt/retropie/configs/psp/".
[INFO] [Overrides]: Redirecting save file to "/home/pi/.config/ppsspp/Knight Fortix 2 (minis) (PSN) [NPEZ00425].srm".
[INFO] [Overrides]: Redirecting save state to "/home/pi/roms/psp/Knight Fortix 2 (minis) (PSN) [NPEZ00425].state".
ThreadManager::Init(compute threads: 4, all: 8)
[INFO] [Environ]: SET_INPUT_DESCRIPTORS:
[INFO]    RetroPad, Port 1, Button "B (bottom)" => "Cross"
[INFO]    RetroPad, Port 1, Button "Y (left)" => "Square"
[INFO]    RetroPad, Port 1, Button "Select" => "Select"
[INFO]    RetroPad, Port 1, Button "Start" => "Start"
[INFO]    RetroPad, Port 1, Button "D-Pad Up" => "D-Pad Up"
[INFO]    RetroPad, Port 1, Button "D-Pad Down" => "D-Pad Down"
[INFO]    RetroPad, Port 1, Button "D-Pad Left" => "D-Pad Left"
[INFO]    RetroPad, Port 1, Button "D-Pad Right" => "D-Pad Right"
[INFO]    RetroPad, Port 1, Button "A (right)" => "Circle"
[INFO]    RetroPad, Port 1, Button "X (up)" => "Triangle"
[INFO]    RetroPad, Port 1, Button "L" => "L"
[INFO]    RetroPad, Port 1, Button "R" => "R"
[INFO] [Environ]: GET_LOG_INTERFACE.
[libretro ERROR] [IO] Missing filesystem for lang/.ini
[libretro INFO] [G3D] Longest display side: -1 pixels. Choosing scale 1
[libretro ERROR] [IO] Missing filesystem for 'langregion.ini'
[libretro ERROR] [LOADER] Failed to read /controls.ini. Setting controller config to default.
[INFO] [Environ]: GET_USERNAME: "".
[INFO] [Environ]: SYSTEM_DIRECTORY: "/home/pi/RetroPie/BIOS".
[INFO] [Environ]: GET_SAVE_DIRECTORY.
[INFO] [Content]: Content loading skipped. Implementation will load it on its own.
[INFO] [Environ]: SET_PIXEL_FORMAT: XRGB8888.
[INFO] [Environ]: GET_PREFERRED_HW_RENDER, video driver name: gl.
[INFO] [Environ]: GET_PREFERRED_HW_RENDER - Context callback set to RETRO_HW_CONTEXT_OPENGL.
[INFO] [Environ]: SET_HW_RENDER, context type: gl.
[INFO] Requesting OpenGLES2 context.
[INFO] Reached end of SET_HW_RENDER.
[INFO] [Environ]: GET_VARIABLE: ppsspp_button_preference = "Cross"
[INFO] [Environ]: GET_VARIABLE: ppsspp_fast_memory = "enabled"
[INFO] [Environ]: GET_VARIABLE: ppsspp_vertex_cache = "disabled"
[INFO] [Environ]: GET_VARIABLE: ppsspp_gpu_hardware_transform = "enabled"
[INFO] [Environ]: GET_VARIABLE: ppsspp_frameskip = "Off"
[INFO] [Environ]: GET_VARIABLE: ppsspp_frameskiptype = "Number of frames"
[INFO] [Environ]: GET_VARIABLE: ppsspp_auto_frameskip = "disabled"
[INFO] [Environ]: GET_VARIABLE: ppsspp_block_transfer_gpu = "enabled"
[INFO] [Environ]: GET_VARIABLE: ppsspp_texture_filtering = "Auto"
[INFO] [Environ]: GET_VARIABLE: ppsspp_texture_anisotropic_filtering = "2x"
[INFO] [Environ]: GET_VARIABLE: ppsspp_texture_deposterize = "disabled"
[INFO] [Environ]: GET_VARIABLE: ppsspp_texture_replacement = "disabled"
[INFO] [Environ]: GET_VARIABLE: ppsspp_cheats = "disabled"
[INFO] [Environ]: GET_VARIABLE: ppsspp_locked_cpu_speed = "off"
[INFO] [Environ]: GET_VARIABLE: ppsspp_rendering_mode = "Buffered"
[INFO] [Environ]: GET_VARIABLE: ppsspp_cpu_core = "JIT"
[INFO] [Environ]: GET_VARIABLE: ppsspp_io_timing_method = "Fast"
[INFO] [Environ]: GET_VARIABLE: ppsspp_lower_resolution_for_effects = "Off"
[INFO] [Environ]: GET_VARIABLE: ppsspp_software_skinning = "enabled"
[INFO] [Environ]: GET_VARIABLE: ppsspp_ignore_bad_memory_access = "enabled"
[INFO] [Environ]: GET_VARIABLE: ppsspp_lazy_texture_caching = "disabled"
[INFO] [Environ]: GET_VARIABLE: ppsspp_retain_changed_textures = "disabled"
[INFO] [Environ]: GET_VARIABLE: ppsspp_force_lag_sync = "disabled"
[INFO] [Environ]: GET_VARIABLE: ppsspp_spline_quality = "Low"
[INFO] [Environ]: GET_VARIABLE: ppsspp_disable_slow_framebuffer_effects = "disabled"
[INFO] [Environ]: GET_VARIABLE: ppsspp_inflight_frames = "Up to 2"
[INFO] [Environ]: GET_VARIABLE: ppsspp_texture_scaling_type = "xbrz"
[INFO] [Environ]: GET_VARIABLE: ppsspp_texture_scaling_level = "Off"
[INFO] [Environ]: GET_VARIABLE: ppsspp_texture_shader = "Off"
[INFO] [Environ]: GET_VARIABLE: ppsspp_language = "Automatic"
[INFO] [Environ]: GET_LANGUAGE: "0".
[INFO] [Environ]: GET_VARIABLE: ppsspp_internal_resolution = "480x272"
[INFO] [SRAM]: Skipping SRAM load.
[INFO] [Core]: Version of libretro API: 1, Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 44144.10 Hz.
[INFO] [Video]: Set video size to: 1440x816.
[INFO] [Video]: Using HW render, OpenGL driver forced.
[INFO] [Video]: Using configured "gl" driver for GL HW render.
[INFO] [EGL] Falling back to eglGetDisplay
[INFO] [EGL]: EGL version: 1.4
[INFO] [EGL]: Current context: 0x1.
[INFO] [GL]: Found GL context: "egl_videocore".
[INFO] [GL]: Detecting screen resolution: 1920x1080.
[INFO] [GL]: Vendor: Broadcom, Renderer: VideoCore IV HW.
[INFO] [GL]: Version: OpenGL ES 2.0.
[INFO] [GL]: Using resolution 1920x1080.
[INFO] [GL]: Default shader backend found: glsl.
[INFO] [Shader driver]: Using GLSL shader backend.
[WARN] [GL]: Stock GLSL shaders will be used.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] Shader log: Compiled
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] Shader log: Compiled
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] Shader log: Compiled
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] Shader log: Compiled
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] Shader log: Compiled
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] Shader log: Compiled
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GL]: Using 1 textures.
[INFO] [GL]: Loaded 1 program(s).
[INFO] [GL]: Initializing HW render (512x512).
[INFO] [GL]: Max texture size: 2048 px, renderbuffer size: 2048 px.
[INFO] [GL]: Supports FBO (render-to-texture).
[INFO] [Font]: Using font rendering backend: "stb-unicode".
[INFO] [Video]: Graphics driver did not initialize an input driver. Attempting to pick a suitable driver.
[WARN] [udev]: Couldn't open any keyboard, mouse or touchpad. Are permissions set correctly for /dev/input/event*?
[WARN] [udev]: Full-screen pointer won't be available.
[INFO] [udev]: Pad #0 (/dev/input/event0) supports 0 force feedback effects.
[INFO] [Joypad]: Found joypad driver: "udev".
[INFO] [Video]: Found display server: "null".
glGetError 0x500
[INFO] ALSA: Using floating point format.
[INFO] ALSA: Period size: 480 frames
[INFO] ALSA: Buffer size: 1536 frames
[INFO] [Display]: Found display driver: "gl".
[INFO] [Playlist]: Loading history file: "/opt/retropie/configs/psp/content_history.lpl".
[INFO] [Playlist]: Loading history file: "/opt/retropie/configs/psp/content_music_history.lpl".
[INFO] [Playlist]: Loading history file: "/opt/retropie/configs/psp/content_video_history.lpl".
[INFO] [Playlist]: Loading history file: "/opt/retropie/configs/psp/content_image_history.lpl".
[INFO] [Playlist]: Loading favorites file: "/opt/retropie/configs/psp/content_favorites.lpl".

### CTRL + C pressed here to terminate
^C^Cterminate called without an active exception

Platform

Raspberry Pi

Mobile phone model or graphics card

Raspberry Pi 3B, using a Broadcom VideoCore IV (VC4)

PPSSPP version affected

v1.12.3-947-gce2995f95 (commit ce2995f95273d)

Last working version

Commit e88ddbb42a8a8a869991

Graphics backend (3D API)

OpenGL / GLES

Checklist

hrydgard commented 2 years ago

Oh no, I really thought that change would be compatible enough, it worked on the lowliest of Android devices...

Would have expected some clearer error in the log though.. Might need to fix some error reporting there.

What does it look like from the standalone build?

cmitu commented 2 years ago

Doesn't show much, to be honest. Here's a log from the standalone emulator on ce2995f95273d06c913526553489ac8d203752d7:

'Bad' log ``` $ [v1.12.3-959-gce2995f9] ./PPSSPPSDL ~/roms/psp/Knight\ Fortix\ 2\ \(minis\)\ \(PSN\)\ \[NPEZ00425\].iso VulkanMayBeAvailable: Device allowed ('SDL:Linux') VulkanMayBeAvailable: Library loaded ('libvulkan.so') VulkanMayBeAvailable: Enumerating instance extensions VulkanMayBeAvailable: Instance extension count: 2 VulkanMaybeAvailable: Instance extension found: VK_EXT_debug_report (00000009) VulkanMaybeAvailable: Instance extension found: VK_EXT_debug_utils (00000001) Surface extension not found DEBUG: Vulkan is not available, not using Vulkan. Info: We compiled against SDL version 2.0.20 and we are linking against SDL version 2.0.20. :) ThreadManager::Init(compute threads: 4, all: 8) Registered VFS for prefix : /usr/local/share/ppsspp/assets Registered VFS for prefix : /media/usb0/src/ppsspp/assets Registered VFS for prefix : /media/usb0/src/ppsspp Registered VFS for prefix : /usr/local/share/ppsspp/assets Registered VFS for prefix : /usr/local/share/games/ppsspp/assets Registered VFS for prefix : /usr/share/ppsspp/assets Registered VFS for prefix : /usr/share/games/ppsspp/assets Registered VFS for prefix : assets Registered VFS for prefix : /home/pi 32:29:288 Core/Config.cpp:629 I[G3D]: Longest display side: -1 pixels. Choosing scale 1 32:29:336 Core/Config.cpp:1385 I[LOADER]: Loading controller config: /home/pi/.config/ppsspp/PSP/SYSTEM/controls.ini 32:29:352 Core/Config.cpp:1653 I[SYSTEM]: CleanRecent took 0.00 32:29:352 Core/Config.cpp:1428 I[LOADER]: Config loaded: '/home/pi/.config/ppsspp/PSP/SYSTEM/ppsspp.ini' 32:29:352 UI/NativeApp.cpp:700 I[SYSTEM]: Boot filename found in args: '/home/pi/roms/psp/Knight Fortix 2 (minis) (PSN) [NPEZ00425].iso' 32:29:391 UI/NativeApp.cpp:829 D[SYSTEM]: ScreenManager! 32:29:395 UI/NativeApp.cpp:388 N[LOADER]: Not checking for failed graphics backends in debug mode Pixels: 1920 x 1080 Virtual pixels: 1920 x 1080 32:29:507 OpenGL/GLFeatures.cpp:195 I[G3D]: GPU Vendor : Broadcom ; renderer: VideoCore IV HW version str: OpenGL ES 2.0 ; GLSL version str: OpenGL ES GLSL ES 1.00 glGetError 0x500 32:29:509 OpenGL/GLFeatures.cpp:108 D[G3D]: Checking for GL driver bugs... vendor=7 model='VideoCore IV HW' 32:29:518 OpenGL/thin3d_gl.cpp:215 D[G3D]: Shader module created (0x28202a0) 32:29:518 OpenGL/thin3d_gl.cpp:215 D[G3D]: Shader module created (0x2824b20) 32:29:518 OpenGL/thin3d_gl.cpp:215 D[G3D]: Shader module created (0x28405b8) 32:29:518 OpenGL/thin3d_gl.cpp:215 D[G3D]: Shader module created (0x2822950) 32:29:518 OpenGL/thin3d_gl.cpp:215 D[G3D]: Shader module created (0x286ba68) 32:29:538 SDL/SDLMain.cpp:118 I[AUDIO]: SDL: Trying a different audio device loading control pad mappings from gamecontrollerdb.txt: SUCCESS! found control pad: iBuffalo USB 2-axis 8-button Gamepad, loading mapping: SUCCESS, mapping is: 03000000830500006020000010010000,iBuffalo USB 2-axis 8-button Gamepad,a:b1,b:b0,x:b3,y:b2,back:b6,start:b7,leftshoulder:b4,rightshoulder:b5,leftx:a0,lefty:a1,platform:Linux, pad 1 has been assigned to control pad: iBuffalo USB 2-axis 8-button Gamepad 32:29:631 UI/NativeApp.cpp:896 I[SYSTEM]: NativeInitGraphics 32:29:636 OpenGL/GLRenderManager.cpp:134 I[G3D]: Updating inflight frames to 3 found control pad: iBuffalo USB 2-axis 8-button Gamepad, loading mapping: SUCCESS, mapping is: 03000000830500006020000010010000,iBuffalo USB 2-axis 8-button Gamepad,a:b1,b:b0,x:b3,y:b2,back:b6,start:b7,leftshoulder:b4,rightshoulder:b5,leftx:a0,lefty:a1,platform:Linux, 32:29:689 UI/NativeApp.cpp:962 I[SYSTEM]: NativeInitGraphics completed 32:30:358 OpenGL/GLRenderManager.cpp:237 I[G3D]: Running first frame (0) 32:30:366 Core/Config.cpp:1779 D[LOADER]: No game-specific settings found in /home/pi/.config/ppsspp/PSP/SYSTEM/NPEZ00425_ppsspp.ini. Using global defaults. 32:30:367 Core/System.cpp:419 I[BOOT]: PPSSPP v1.12.3-959-gce2995f9 32:30:377 Common/MemArenaPosix.cpp:65 I[MEMMAP]: Got shm file: /ppsspp_0.ram 32:30:380 Core/MemMap.cpp:300 I[MEMMAP]: Memory system initialized. Base at 0x5b2fc000 (RAM at @ 0x13bd564, uncached @ 0x13bd570) 32:30:394 ARM/ArmAsm.cpp:130 D[JIT]: Base: 5b2fc000 32:30:394 ARM/ArmJit.cpp:116 I[JIT]: ARM JIT initialized: 15 MB of code space 32:30:408 Core/PSPLoaders.cpp:250 I[LOADER]: NPEZ00425 : Knight Fortix 2 32:30:412 Core/Config.cpp:1779 D[LOADER]: No game-specific settings found in /home/pi/.config/ppsspp/PSP/SYSTEM/NPEZ00425_ppsspp.ini. Using global defaults. 32:30:412 Core/PSPLoaders.cpp:310 I[LOADER]: Loading disc0:/PSP_GAME/SYSDIR/EBOOT.BIN... 32:30:413 HLE/sceKernel.cpp:111 I[SCEKERNEL]: Initializing kernel... 32:30:413 Common/ExceptionHandlerSetup.cpp:286 I[SYSTEM]: Installed exception handler 32:30:471 HLE/sceKernelMemory.cpp:437 I[SCEKERNEL]: Kernel and user memory pools initialized 32:30:472 File/FileUtil.cpp:527 D[COMMON]: CreateFullPath: path exists /home/pi/.config/ppsspp 32:30:492 HLE/sceNet.cpp:213 I[SCENET]: LocalHost IP will be 127.0.0.1 [00:f3:da:fb:1a:cb] 32:30:492 Util/PortManager.cpp:458 I[SCENET]: UPnPService: Begin of UPnPService Thread 32:30:493 File/FileUtil.cpp:527 D[COMMON]: CreateFullPath: path exists /home/pi/.config/ppsspp/PSP/PPSSPP_STATE 32:30:551 SDL/SDLGLGraphicsContext.cpp:433 I[G3D]: SDL SwapInterval: 0 32:30:658 Core/Config.cpp:1653 I[SYSTEM]: CleanRecent took 0.00 32:30:726 Core/Config.cpp:1510 I[LOADER]: Config saved (clearFailedGPUBackends): '/home/pi/.config/ppsspp/PSP/SYSTEM/ppsspp.ini' 32:30:730 Core/Config.cpp:1523 I[LOADER]: Controller config saved: /home/pi/.config/ppsspp/PSP/SYSTEM/controls.ini 32:31:058 Util/PPGeDraw.cpp:301 I[SCEGE]: PPGe drawing library initialized. DL: 08000400 Data: 08010400 Atlas: 08020d00 (2097152) Args: 08020400 32:31:059 HLE/sceKernel.cpp:163 I[SCEKERNEL]: Kernel initialized. 32:31:200 HLE/sceKernelModule.cpp:1163 D[SCEMODULE]: Decrypting ~PSP file 32:31:202 ELF/PrxDecrypter.cpp:701 I[LOADER]: Decrypting tag D9160BF0 32:31:202 ELF/PrxDecrypter.cpp:755 I[LOADER]: Decrypting tag D9160BF0 32:31:203 ELF/PrxDecrypter.cpp:810 I[LOADER]: Decrypting tag D9160BF0 32:32:029 ELF/ElfReader.cpp:384 D[LOADER]: String section: 47 32:32:029 ELF/ElfReader.cpp:473 D[LOADER]: Relocatable module 32:32:029 ELF/ElfReader.cpp:480 D[LOADER]: 3 segments: 32:32:029 ELF/ElfReader.cpp:488 D[LOADER]: Type: 00000001 Vaddr: 00000000 Filesz: 00202300 Memsz: 00202300 32:32:033 ELF/ElfReader.cpp:509 D[LOADER]: Loadable Segment Copied to 08804000, size 00202300 32:32:034 ELF/ElfReader.cpp:488 D[LOADER]: Type: 00000001 Vaddr: 00202300 Filesz: 0000e334 Memsz: 00057344 32:32:034 ELF/ElfReader.cpp:509 D[LOADER]: Loadable Segment Copied to 08a06300, size 00057344 32:32:035 ELF/ElfReader.cpp:488 D[LOADER]: Type: 700000a0 Vaddr: 00000000 Filesz: 0008df40 Memsz: 00000000 32:32:035 Util/BlockAllocator.cpp:396 D[SCEKERNEL]: ----------- 32:32:035 Util/BlockAllocator.cpp:400 D[SCEKERNEL]: Block: 08800000 - 08804000 size 00004000 taken=1 tag=usersystemlib 32:32:035 Util/BlockAllocator.cpp:400 D[SCEKERNEL]: Block: 08804000 - 08a5d700 size 00259700 taken=1 tag=ELF/Nemesys 32:32:035 Util/BlockAllocator.cpp:400 D[SCEKERNEL]: Block: 08a5d700 - 0a000000 size 015a2900 taken=0 tag=(untitled) 32:32:035 Util/BlockAllocator.cpp:402 D[SCEKERNEL]: ----------- 32:32:035 ELF/ElfReader.cpp:514 D[LOADER]: 48 sections: 32:32:035 ELF/ElfReader.cpp:533 D[LOADER]: NonData Section found: (null) Ignoring (size=00000000) (flags=00000000) 32:32:036 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .text Sitting at 08804000, size 001be704 32:32:036 ELF/ElfReader.cpp:533 D[LOADER]: NonData Section found: .rel.text Ignoring (size=000719e8) (flags=00000000) 32:32:036 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .sceStub.text.sceGe_user Sitting at 089c2704, size 00000058 32:32:036 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .sceStub.text.sceAac Sitting at 089c275c, size 00000040 32:32:036 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .sceStub.text.sceDisplay Sitting at 089c279c, size 00000018 32:32:036 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .sceStub.text.sceVaudio Sitting at 089c27b4, size 00000018 32:32:037 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .sceStub.text.sceAudio Sitting at 089c27cc, size 00000048 32:32:037 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .sceStub.text.sceRtc Sitting at 089c2814, size 00000008 32:32:037 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .sceStub.text.sceUmdUser Sitting at 089c281c, size 00000020 32:32:037 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .sceStub.text.sceUtility Sitting at 089c283c, size 00000070 32:32:037 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .sceStub.text.sceImpose Sitting at 089c28ac, size 00000008 32:32:037 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .sceStub.text.sceCtrl Sitting at 089c28b4, size 00000020 32:32:037 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .sceStub.text.UtilsForUser Sitting at 089c28d4, size 00000020 32:32:037 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .sceStub.text.ThreadManForUser Sitting at 089c28f4, size 000000a0 32:32:037 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .sceStub.text.SysMemUserForUser Sitting at 089c2994, size 00000030 32:32:037 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .sceStub.text.StdioForUser Sitting at 089c29c4, size 00000018 32:32:038 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .sceStub.text.ModuleMgrForUser Sitting at 089c29dc, size 00000028 32:32:038 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .sceStub.text.LoadExecForUser Sitting at 089c2a04, size 00000010 32:32:038 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .sceStub.text.Kernel_Library Sitting at 089c2a14, size 00000028 32:32:038 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .sceStub.text.IoFileMgrForUser Sitting at 089c2a3c, size 00000058 32:32:038 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .lib.ent.top Sitting at 089c2a94, size 00000004 32:32:038 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .lib.ent Sitting at 089c2a98, size 00000010 32:32:038 ELF/ElfReader.cpp:533 D[LOADER]: NonData Section found: .rel.lib.ent Ignoring (size=00000008) (flags=00000000) 32:32:038 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .lib.ent.btm Sitting at 089c2aa8, size 00000004 32:32:038 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .lib.stub.top Sitting at 089c2aac, size 00000004 32:32:038 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .lib.stub Sitting at 089c2ab0, size 00000168 32:32:039 ELF/ElfReader.cpp:533 D[LOADER]: NonData Section found: .rel.lib.stub Ignoring (size=000001b0) (flags=00000000) 32:32:039 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .lib.stub.btm Sitting at 089c2c18, size 00000004 32:32:039 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .rodata.sceModuleInfo Sitting at 089c2c1c, size 00000034 32:32:039 ELF/ElfReader.cpp:533 D[LOADER]: NonData Section found: .rel.rodata.sceModuleInfo Ignoring (size=00000020) (flags=00000000) 32:32:039 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .rodata.sceResident Sitting at 089c2c50, size 00000174 32:32:039 ELF/ElfReader.cpp:533 D[LOADER]: NonData Section found: .rel.rodata.sceResident Ignoring (size=00000030) (flags=00000000) 32:32:039 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .rodata.sceNid Sitting at 089c2dc4, size 000001c8 32:32:039 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .rodata Sitting at 089c2fc0, size 00034f24 32:32:039 ELF/ElfReader.cpp:533 D[LOADER]: NonData Section found: .rel.rodata Ignoring (size=00002d98) (flags=00000000) 32:32:039 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .data Sitting at 089f7ef0, size 0000e350 32:32:039 ELF/ElfReader.cpp:533 D[LOADER]: NonData Section found: .rel.data Ignoring (size=0000c470) (flags=00000000) 32:32:039 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .eh_frame Sitting at 08a06240, size 000000b0 32:32:039 ELF/ElfReader.cpp:533 D[LOADER]: NonData Section found: .rel.eh_frame Ignoring (size=00000018) (flags=00000000) 32:32:039 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .ctors Sitting at 08a062f0, size 00000008 32:32:039 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .dtors Sitting at 08a062f8, size 00000008 32:32:039 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .cplinit Sitting at 08a06300, size 00000010 32:32:039 ELF/ElfReader.cpp:533 D[LOADER]: NonData Section found: .rel.cplinit Ignoring (size=00000008) (flags=00000000) 32:32:040 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .linkonce.d Sitting at 08a06310, size 0000e324 32:32:040 ELF/ElfReader.cpp:533 D[LOADER]: NonData Section found: .rel.linkonce.d Ignoring (size=0000d128) (flags=00000000) 32:32:040 ELF/ElfReader.cpp:529 D[LOADER]: Data Section found: .bss Sitting at 08a14640, size 00049004 32:32:040 ELF/ElfReader.cpp:533 D[LOADER]: NonData Section found: .shstrtab Ignoring (size=00000344) (flags=00000000) 32:32:040 ELF/ElfReader.cpp:537 D[LOADER]: Relocations: 32:32:040 ELF/ElfReader.cpp:561 D[LOADER]: .rel.text: Performing 58173 relocations on .text : offset = 00210700 32:32:041 ELF/ElfReader.cpp:66 D[LOADER]: Loading 58173 relocations... 32:32:068 ELF/ElfReader.cpp:561 D[LOADER]: .rel.lib.ent: Performing 1 relocations on .lib.ent : offset = 002820e8 32:32:068 ELF/ElfReader.cpp:66 D[LOADER]: Loading 1 relocations... 32:32:068 ELF/ElfReader.cpp:561 D[LOADER]: .rel.lib.stub: Performing 54 relocations on .lib.stub : offset = 002820f0 32:32:068 ELF/ElfReader.cpp:66 D[LOADER]: Loading 54 relocations... 32:32:068 ELF/ElfReader.cpp:561 D[LOADER]: .rel.rodata.sceModuleInfo: Performing 4 relocations on .rodata.sceModuleInfo : offset = 002822a0 32:32:068 ELF/ElfReader.cpp:66 D[LOADER]: Loading 4 relocations... 32:32:068 ELF/ElfReader.cpp:561 D[LOADER]: .rel.rodata.sceResident: Performing 6 relocations on .rodata.sceResident : offset = 002822c0 32:32:068 ELF/ElfReader.cpp:66 D[LOADER]: Loading 6 relocations... 32:32:068 ELF/ElfReader.cpp:561 D[LOADER]: .rel.rodata: Performing 1459 relocations on .rodata : offset = 002822f0 32:32:069 ELF/ElfReader.cpp:66 D[LOADER]: Loading 1459 relocations... 32:32:070 ELF/ElfReader.cpp:561 D[LOADER]: .rel.data: Performing 6286 relocations on .data : offset = 00285088 32:32:070 ELF/ElfReader.cpp:66 D[LOADER]: Loading 6286 relocations... 32:32:072 ELF/ElfReader.cpp:561 D[LOADER]: .rel.eh_frame: Performing 3 relocations on .eh_frame : offset = 002914f8 32:32:072 ELF/ElfReader.cpp:66 D[LOADER]: Loading 3 relocations... 32:32:073 ELF/ElfReader.cpp:561 D[LOADER]: .rel.cplinit: Performing 1 relocations on .cplinit : offset = 00291510 32:32:073 ELF/ElfReader.cpp:66 D[LOADER]: Loading 1 relocations... 32:32:073 ELF/ElfReader.cpp:561 D[LOADER]: .rel.linkonce.d: Performing 6693 relocations on .linkonce.d : offset = 00291518 32:32:073 ELF/ElfReader.cpp:66 D[LOADER]: Loading 6693 relocations... 32:32:075 HLE/sceKernelModule.cpp:1349 I[LOADER]: Module Nemesys: 00000000 089c2a98 089c2ab0 32:32:075 HLE/sceKernelModule.cpp:1350 D[LOADER]: =================================================== 32:32:076 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module IoFileMgrForUser, stubs at 089c2a3c 32:32:076 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceIoWrite : 089c2a3c 32:32:076 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceIoDevctl : 089c2a44 32:32:076 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceIoRead : 089c2a4c 32:32:076 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceIoRename : 089c2a54 32:32:076 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceIoClose : 089c2a5c 32:32:076 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceIoReadAsync : 089c2a64 32:32:076 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceIoGetstat : 089c2a6c 32:32:076 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceIoWaitAsync : 089c2a74 32:32:076 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceIoOpen : 089c2a7c 32:32:076 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceIoLseek : 089c2a84 32:32:076 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceIoPollAsync : 089c2a8c 32:32:077 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:077 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module Kernel_Library, stubs at 089c2a14 32:32:077 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelCpuSuspendIntr : 089c2a14 32:32:077 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelMemcpy : 089c2a1c 32:32:077 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelGetThreadId : 089c2a24 32:32:077 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelCpuResumeIntr : 089c2a2c 32:32:077 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelMemset : 089c2a34 32:32:077 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:077 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module LoadExecForUser, stubs at 089c2a04 32:32:078 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelExitGame : 089c2a04 32:32:078 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelRegisterExitCallback : 089c2a0c 32:32:078 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:078 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module ModuleMgrForUser, stubs at 089c29dc 32:32:078 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelUnloadModule : 089c29dc 32:32:078 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelStopModule : 089c29e4 32:32:078 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelGetModuleIdByAddress : 089c29ec 32:32:078 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelGetModuleId : 089c29f4 32:32:078 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelStopUnloadSelfModuleWithStatus : 089c29fc 32:32:078 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:078 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module StdioForUser, stubs at 089c29c4 32:32:078 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelStdin : 089c29c4 32:32:078 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelStdout : 089c29cc 32:32:079 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelStderr : 089c29d4 32:32:079 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:079 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module SysMemUserForUser, stubs at 089c2994 32:32:079 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelPrintf : 089c2994 32:32:079 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelSetCompilerVersion : 089c299c 32:32:079 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelSetCompiledSdkVersion603_605 : 089c29a4 32:32:079 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelAllocPartitionMemory : 089c29ac 32:32:079 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelGetBlockHeadAddr : 089c29b4 32:32:079 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelFreePartitionMemory : 089c29bc 32:32:079 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:079 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module ThreadManForUser, stubs at 089c28f4 32:32:079 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelCreateCallback : 089c28f4 32:32:079 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelStartThread : 089c28fc 32:32:079 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelDeleteMutex : 089c2904 32:32:080 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelGetSystemTimeLow : 089c290c 32:32:080 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelCreateThread : 089c2914 32:32:080 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelUnlockMutex : 089c291c 32:32:080 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelExitDeleteThread : 089c2924 32:32:080 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelGetSystemTimeWide : 089c292c 32:32:080 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelExitThread : 089c2934 32:32:080 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelLockMutex : 089c293c 32:32:080 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelCreateMutex : 089c2944 32:32:080 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelDelayThread : 089c294c 32:32:080 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelSetEventFlag : 089c2954 32:32:081 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelDeleteEventFlag : 089c295c 32:32:081 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelWaitThreadEnd : 089c2964 32:32:081 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelPollEventFlag : 089c296c 32:32:081 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelWaitEventFlag : 089c2974 32:32:081 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelCreateEventFlag : 089c297c 32:32:081 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelClearEventFlag : 089c2984 32:32:081 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelDeleteThread : 089c298c 32:32:081 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:081 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module UtilsForUser, stubs at 089c28d4 32:32:081 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelLibcGettimeofday : 089c28d4 32:32:081 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelLibcClock : 089c28dc 32:32:081 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelLibcTime : 089c28e4 32:32:082 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceKernelDcacheWritebackRange : 089c28ec 32:32:082 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:082 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module sceCtrl, stubs at 089c28b4 32:32:082 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceCtrlSetSamplingMode : 089c28b4 32:32:082 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceCtrlReadBufferPositive : 089c28bc 32:32:082 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceCtrlSetSamplingCycle : 089c28c4 32:32:082 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceCtrlSetIdleCancelThreshold : 089c28cc 32:32:082 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:082 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module sceImpose, stubs at 089c28ac 32:32:082 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceImposeSetLanguageMode : 089c28ac 32:32:082 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:082 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module sceUtility, stubs at 089c283c 32:32:083 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceUtilitySavedataInitStart : 089c283c 32:32:083 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceUtilitySavedataGetStatus : 089c2844 32:32:083 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceUtilitySavedataShutdownStart : 089c284c 32:32:083 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceUtilitySavedataUpdate : 089c2854 32:32:083 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceUtilityLoadModule : 089c285c 32:32:083 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceUtilityMsgDialogInitStart : 089c2864 32:32:083 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceUtilityOskShutdownStart : 089c286c 32:32:083 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceUtilityOskUpdate : 089c2874 32:32:083 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceUtilityMsgDialogShutdownStart : 089c287c 32:32:084 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceUtilityMsgDialogUpdate : 089c2884 32:32:084 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceUtilityMsgDialogGetStatus : 089c288c 32:32:084 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceUtilityUnloadModule : 089c2894 32:32:084 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceUtilityOskGetStatus : 089c289c 32:32:084 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceUtilityOskInitStart : 089c28a4 32:32:084 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:084 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module sceUmdUser, stubs at 089c281c 32:32:084 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceUmdCheckMedium : 089c281c 32:32:084 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceUmdCancelWaitDriveStat : 089c2824 32:32:084 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceUmdWaitDriveStat : 089c282c 32:32:084 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceUmdActivate : 089c2834 32:32:085 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:085 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module sceRtc, stubs at 089c2814 32:32:085 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceRtcGetWin32FileTime : 089c2814 32:32:085 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:085 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module sceAudio, stubs at 089c27cc 32:32:085 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAudioOutputBlocking : 089c27cc 32:32:086 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:086 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module sceVaudio, stubs at 089c27b4 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceVaudioChReserve : 089c27b4 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceVaudioChRelease : 089c27bc 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceVaudioOutputBlocking : 089c27c4 32:32:086 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:086 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module sceDisplay, stubs at 089c279c 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceDisplaySetMode : 089c279c 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceDisplaySetFrameBuf : 089c27a4 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceDisplayWaitVblankStartCB : 089c27ac 32:32:086 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:086 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module sceAac, stubs at 089c275c 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacGetInfoToAddStreamData : 089c275c 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacTermResource : 089c2764 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacExit : 089c276c 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacInitResource : 089c2774 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacDecode : 089c277c 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacNotifyAddStreamData : 089c2784 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacCheckStreamDataNeeded : 089c278c 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacInit : 089c2794 32:32:087 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:087 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module sceGe_user, stubs at 089c2704 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeListSync : 089c2704 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeUnsetCallback : 089c270c 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeListEnQueueHead : 089c2714 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeEdramGetSize : 089c271c 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeContinue : 089c2724 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeSetCallback : 089c272c 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeListEnQueue : 089c2734 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeDrawSync : 089c273c 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeBreak : 089c2744 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeListUpdateStallAddr : 089c274c 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeEdramGetAddr : 089c2754 32:32:088 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:791 HLE/ReplaceTables.cpp:1534 I[HLE]: Replaced memset_jak at 088055a0 with hash eabb9c1b4f83d2b4 32:32:791 HLE/ReplaceTables.cpp:1534 I[HLE]: Replaced memcpy_jak at 08806c1c with hash 0ffa5db8396d4274 32:32:800 HLE/ReplaceTables.cpp:1534 I[HLE]: Replaced memmove at 08969668 with hash 3c421a9265f37ebc 32:32:804 HLE/sceKernelModule.cpp:1464 I[LOADER]: Exporting ent 0 named Nemesys, 2 funcs, 4 vars, resident 089c2d94 32:32:804 HLE/sceKernelModule.cpp:1558 D[LOADER]: Module SDK: 06030010 32:32:805 HLE/sceKernelModule.cpp:1815 I[LOADER]: Module entry: 088046f0 32:32:086 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:086 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module sceVaudio, stubs at 089c27b4 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceVaudioChReserve : 089c27b4 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceVaudioChRelease : 089c27bc 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceVaudioOutputBlocking : 089c27c4 32:32:086 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:086 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module sceDisplay, stubs at 089c279c 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceDisplaySetMode : 089c279c 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceDisplaySetFrameBuf : 089c27a4 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceDisplayWaitVblankStartCB : 089c27ac 32:32:086 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:086 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module sceAac, stubs at 089c275c 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacGetInfoToAddStreamData : 089c275c 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacTermResource : 089c2764 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacExit : 089c276c 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacInitResource : 089c2774 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacDecode : 089c277c 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacNotifyAddStreamData : 089c2784 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacCheckStreamDataNeeded : 089c278c 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacInit : 089c2794 32:32:087 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:087 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module sceGe_user, stubs at 089c2704 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeListSync : 089c2704 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeUnsetCallback : 089c270c 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeListEnQueueHead : 089c2714 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeEdramGetSize : 089c271c 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeContinue : 089c2724 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeSetCallback : 089c272c 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeListEnQueue : 089c2734 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeDrawSync : 089c273c 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeBreak : 089c2744 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeListUpdateStallAddr : 089c274c 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeEdramGetAddr : 089c2754 32:32:088 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:791 HLE/ReplaceTables.cpp:1534 I[HLE]: Replaced memset_jak at 088055a0 with hash eabb9c1b4f83d2b4 32:32:791 HLE/ReplaceTables.cpp:1534 I[HLE]: Replaced memcpy_jak at 08806c1c with hash 0ffa5db8396d4274 32:32:800 HLE/ReplaceTables.cpp:1534 I[HLE]: Replaced memmove at 08969668 with hash 3c421a9265f37ebc 32:32:804 HLE/sceKernelModule.cpp:1464 I[LOADER]: Exporting ent 0 named Nemesys, 2 funcs, 4 vars, resident 089c2d94 32:32:804 HLE/sceKernelModule.cpp:1558 D[LOADER]: Module SDK: 06030010 32:32:805 HLE/sceKernelModule.cpp:1815 I[LOADER]: Module entry: 088046f0 32:32:086 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:086 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module sceVaudio, stubs at 089c27b4 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceVaudioChReserve : 089c27b4 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceVaudioChRelease : 089c27bc 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceVaudioOutputBlocking : 089c27c4 32:32:086 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:086 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module sceDisplay, stubs at 089c279c 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceDisplaySetMode : 089c279c 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceDisplaySetFrameBuf : 089c27a4 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceDisplayWaitVblankStartCB : 089c27ac 32:32:086 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:086 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module sceAac, stubs at 089c275c 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacGetInfoToAddStreamData : 089c275c 32:32:086 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacTermResource : 089c2764 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacExit : 089c276c 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacInitResource : 089c2774 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacDecode : 089c277c 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacNotifyAddStreamData : 089c2784 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacCheckStreamDataNeeded : 089c278c 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceAacInit : 089c2794 32:32:087 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:087 HLE/sceKernelModule.cpp:1010 D[LOADER]: Importing Module sceGe_user, stubs at 089c2704 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeListSync : 089c2704 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeUnsetCallback : 089c270c 32:32:087 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeListEnQueueHead : 089c2714 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeEdramGetSize : 089c271c 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeContinue : 089c2724 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeSetCallback : 089c272c 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeListEnQueue : 089c2734 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeDrawSync : 089c273c 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeBreak : 089c2744 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeListUpdateStallAddr : 089c274c 32:32:088 HLE/sceKernelModule.cpp:381 D[LOADER]: Importing sceGeEdramGetAddr : 089c2754 32:32:088 HLE/sceKernelModule.cpp:1088 D[LOADER]: ------------------------------------------------------------- 32:32:791 HLE/ReplaceTables.cpp:1534 I[HLE]: Replaced memset_jak at 088055a0 with hash eabb9c1b4f83d2b4 32:32:791 HLE/ReplaceTables.cpp:1534 I[HLE]: Replaced memcpy_jak at 08806c1c with hash 0ffa5db8396d4274 32:32:800 HLE/ReplaceTables.cpp:1534 I[HLE]: Replaced memmove at 08969668 with hash 3c421a9265f37ebc 32:32:804 HLE/sceKernelModule.cpp:1464 I[LOADER]: Exporting ent 0 named Nemesys, 2 funcs, 4 vars, resident 089c2d94 32:32:804 HLE/sceKernelModule.cpp:1558 D[LOADER]: Module SDK: 06030010 32:32:805 HLE/sceKernelModule.cpp:1815 I[LOADER]: Module entry: 088046f0 ```
hrydgard commented 2 years ago

It doesn't appear to be a shader compilation error then - I just tried to break the syntax of the shader and we do report lots of errors in that case.

We are using values that are larger than 1.0 in the rgb2hsv/hsv2rgb functions, maybe it has very limited color precision in the fragment shader, or something...

cmitu commented 2 years ago

I think it's a driver bug (or something in the Broadcom GLES implementation) that's broken.

The application hangs, it can still be stopped via Ctrl + C or kill, but any subsequent start of an application (ppsspp or other app) that calls the GLES stack will also hang - only a reboot 'clears' the GPU state.

There's not much visibility into the driver (since it's closed source), but if I look into the allocated GPU memory with sudo vcdbg reloc, I can see the shader related storage is still present after the application is forcibly stopped, so something on the GPU side is crashing/breaking and ppsspp just hangs waiting for the GPU calls to return.

unknownbrackets commented 2 years ago

Sigh. This is why we can't have nice things.

If you reverse just this part of that commit: https://github.com/hrydgard/ppsspp/commit/ce2995f95273d06c913526553489ac8d203752d7#diff-45024aa56af7d1759a7126a2d809fad122fe5c86c71fe358b93081df8b969364R285-R421

Does it work? If yes, undo, and we'll focus on this section: https://github.com/hrydgard/ppsspp/commit/ce2995f95273d06c913526553489ac8d203752d7#diff-45024aa56af7d1759a7126a2d809fad122fe5c86c71fe358b93081df8b969364R287-R319

Try replacing these lines:

void main() {
    gl_Position = WorldViewProj * vec4(Position, 1.0);
    vec3 hsv = rgb2hsv(Color0.xyz);
    hsv.x += TintSaturation.x;
    hsv.y *= TintSaturation.y;
    oColor0 = vec4(hsv2rgb(hsv), Color0.w);
    oTexCoord0 = TexCoord0;
})",

With:

void main() {
    gl_Position = WorldViewProj * vec4(Position, 1.0);
    oColor0 = Color0;
    oTexCoord0 = TexCoord0;
})",

This will also still undo the change, but it keeps the (now unused) functions. If that avoids the crash, then we've narrowed it down to the functions being used, not just parsed/compiled.

Next would be to try replacing that same part with:

void main() {
    gl_Position = WorldViewProj * vec4(Position, 1.0);
    vec3 hsv = rgb2hsv(Color0.xyz);
    hsv.x += TintSaturation.x;
    hsv.y *= TintSaturation.y;
    oColor0 = vec4(hsv.xyz, Color0.w);
    oTexCoord0 = TexCoord0;
})",

This will either also crash, or it will look kinda weird and discolored. The latter is a positive result, and possibly narrows it down to hsv2rgb(). Either way, the next thing to try is:

void main() {
    gl_Position = WorldViewProj * vec4(Position, 1.0);
    vec3 hsv = Color0.xyz;
    hsv.x += TintSaturation.x;
    hsv.y *= TintSaturation.y;
    oColor0 = vec4(hsv2rgb(hsv), Color0.w);
    oTexCoord0 = TexCoord0;
})",

This should also be discolored if it doesn't crash, but in a different way.

Knowing which (or both or none) of the above cases crash would narrow it down to specific lines and help get this fixed.

-[Unknown]

cmitu commented 2 years ago

If you reverse just this part of that commit: ce2995f#diff-45024aa56af7d1759a7126a2d809fad122fe5c86c71fe358b93081df8b969364R285-R421

Does it work?

Yes, reverting to the previous version of the shader works.

Try replacing these lines:

void main() {
  gl_Position = WorldViewProj * vec4(Position, 1.0);
  vec3 hsv = rgb2hsv(Color0.xyz);
  hsv.x += TintSaturation.x;
  hsv.y *= TintSaturation.y;
    oColor0 = vec4(hsv2rgb(hsv), Color0.w);
  oTexCoord0 = TexCoord0;
})",

With:

void main() {
  gl_Position = WorldViewProj * vec4(Position, 1.0);
  oColor0 = Color0;
  oTexCoord0 = TexCoord0;
})",

This will also still undo the change, but it keeps the (now unused) functions. If that avoids the crash, then we've narrowed it down to the functions being used, not just parsed/compiled.

This also works. Having the functions defined, but unused works fine.

Next would be to try replacing that same part with:

void main() {
  gl_Position = WorldViewProj * vec4(Position, 1.0);
  vec3 hsv = rgb2hsv(Color0.xyz);
  hsv.x += TintSaturation.x;
  hsv.y *= TintSaturation.y;
  oColor0 = vec4(hsv.xyz, Color0.w);
  oTexCoord0 = TexCoord0;
})",

This will either also crash, or it will look kinda weird and discolored. The latter is a positive result, and possibly narrows it down to hsv2rgb().

This leads to the crash - looks like the culprit may be the rgb2hsv shader function.

iota97 commented 2 years ago

I wonder what line of that function might be causing the issues, could you try to change it to these and see which one crash and which does not (you only need to change the code in the GLSL_1xx shader).

1)

vec3 rgb2hsv(vec3 c) {
    vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
    return K.rgb;
}

2)

vec3 rgb2hsv(vec3 c) {
    vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
    vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
    return p.rgb;
}

3)

vec3 rgb2hsv(vec3 c) {
    vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
    vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
    vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
    float d = q.x - min(q.w, q.y);
    return vec3(d);
}

4)

vec3 rgb2hsv(vec3 c) {
    vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
    vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
    vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
    float d = q.x - min(q.w, q.y);
    float e = 1.0e-10;
    return vec3(e);
}

If 2 is the first one crashing I wonder if this work: 5)

vec3 rgb2hsv(vec3 c) {
    vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
    vec4 p = mix(vec4(c.b, c.g, K.w, K.z), vec4(c.g, c.b, K.x, K.y), step(c.b, c.g));
    vec4 q = mix(vec4(p.x, p.y. p.w, c.r), vec4(c.r, p.y, p.z. p.x), step(p.x, c.r));
    float d = q.x - min(q.w, q.y);
    float e = 1.0e-10;
    return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}

If 4 is the first one crashing try this (maybe even try 0.01): 6)

vec3 rgb2hsv(vec3 c) {
    vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
    vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
    vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
    float d = q.x - min(q.w, q.y);
    float e = 0.0000000001;
    return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}
cmitu commented 2 years ago

@iota97 thank you for pushing me further to test. I've started with 1. (which although didn't produce any image, didn't get the GPU stuck), but quickly got bitten by the original problem with 2. test.

The only extra info I've got from the VC logs is an assert triggered in the firmware driver, but it's completely opaque:

147731.732: assert( *input_detail.op == ~0 ) failed; ../../../../../middleware/khronos/glsl/2708/glsl_allocator_4.c::commit_input_choice line 1384 rev 71bd310
vcdbg_ctx_get_dump_stack: dump_stack failed
----------------

It may be that the shader itself is ok, but there's some issues when it's called multiple times (?).

FWIW I've re-compiled ppsspp on the the current RasPI OS release (bullseye), which deprecated the old/legacy Broadcom firmware based drivers and uses the Mesa VC4 driver (open source). The error is not present there, so only the users of the previous RaspiOS/Raspbian (buster) would be affected.

iota97 commented 2 years ago

Would be great if you could make a few more test:

1) This should be as easy as it gets (if this crash I have no idea tbh)

vec3 rgb2hsv(vec3 c) {
    vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
    vec4 p = vec4(c.b, c.g, K.w, K.z);
    if (c.g >= c.b)
        p = vec4(c.g, c.b, K.x, K.y);

    vec4 q = vec4(p.x, p.y, p.w, c.r);
    if (c.r >= p.x)
        q = vec4(c.r, p.y, p.z, p.x);

    float d = q.x - min(q.w, q.y);
    float e = 1.0e-10;
    return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}

2) Same as before, less ugly (might be a bit slower than main, but could be used in the end).

vec3 rgb2hsv(vec3 c) {
    vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
    vec4 p = (c.g < c.b) ? vec4(c.b, c.g, K.w, K.z) : vec4(c.g, c.b, K.x, K.y);
    vec4 q = (c.r < p.x) ? vec4(p.x, p.y, p.w, c.r) : vec4(c.r, p.y, p.z, p.x);
    float d = q.x - min(q.w, q.y);
    float e = 1.0e-10;
    return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}

3) If this crash the problem is with mix/step, if not is with the vec4 constructions using others vec (I made a silly typo in 5. on previous post, this is a bit different, sorry...)

vec3 rgb2hsv(vec3 c) {
    vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
    vec4 p = mix(vec4(c.b, c.g, K.w, K.z), vec4(c.g, c.b, K.x, K.y), step(c.b, c.g));
    vec4 q = mix(vec4(p.x, p.y, p.w, c.r), vec4(c.r, p.y, p.z, p.x), step(p.x, c.r));
    float d = q.x - min(q.w, q.y);
    float e = 1.0e-10;
    return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}
cmitu commented 2 years ago

Would be great if you could make a few more test:

Unfortunately, none of the 3 variants seems to make a difference - same behavior with ppsspp getting stuck because the GPU stall.

unknownbrackets commented 2 years ago

In the worst case, we could disable this feature when using a Broadcom driver and use shaders without the hue/tint stuff.

What if you use this version? https://github.com/sebastien-lempens/webgl-boxing-gym/blob/3ea075847dcf0de9fcb099931db91e9ca40a52ef/assets/shaders/color/space/rgb2hsv.glsl#L10

Or this version: https://github.com/djulien/FriendsWithGpu-WS281X-DEV/blob/1a0b8396dc49837f306c71ae335ca344148147ba/demos/shared/vertex.glsl#L198-L210 You'll also need these lines above it: https://github.com/djulien/FriendsWithGpu-WS281X-DEV/blob/1a0b8396dc49837f306c71ae335ca344148147ba/demos/shared/shared.glsl#L75 https://github.com/djulien/FriendsWithGpu-WS281X-DEV/blob/1a0b8396dc49837f306c71ae335ca344148147ba/demos/shared/shared.glsl#L102 https://github.com/djulien/FriendsWithGpu-WS281X-DEV/blob/1a0b8396dc49837f306c71ae335ca344148147ba/demos/shared/shared.glsl#L73 https://github.com/djulien/FriendsWithGpu-WS281X-DEV/blob/1a0b8396dc49837f306c71ae335ca344148147ba/demos/shared/shared.glsl#L86

I didn't look at licensing, just theorizing that it'd be pretty weird for us to be the first people to try to convert RGB to HSV within GLSL on a Broadcom GPU.

-[Unknown]

cmitu commented 2 years ago

@unknownbrackets seems like the 2nd version doesn't crash.

First variant is very similar to what is currently used and I think I did try it during the 1st set of tests (the original from http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl doesn't seem to be online anymore, though it's referenced in https://stackoverflow.com/questions/15095909/from-rgb-to-hsv-in-opengl-glsl by its author).

Thanks for going again over this - 'worst' case scenario would have been to just add some info to the next release notes advising users of the old Broacom GLES drivers of the issue. Since the new RaspiOS uses the MESA VC4 drivers, they'd be less and less users using those drivers and thus experiencing this issue.

I guess using a form of the 2nd variant you referenced may help some Pi3 users that are still using RaspiOS/Raspbian Buster and similar Pi Linux distros.

hrydgard commented 2 years ago

@cmitu Got a used rasp 3b on order, to be able to test this. Can you give me some links to an exact RaspiOS version that this will reproduce on?

cmitu commented 2 years ago

Raspbian (Buster) version, from https://downloads.raspberrypi.org/raspios_oldstable_lite_armhf_latest.

hrydgard commented 2 years ago

OK, I struggled getting a desktop up on Lite so installed the full Buster image on an SD card. Then I followed our own instructions to the letter, things build but fail to link with the following, which surprised me:

[100%] Linking CXX executable PPSSPPSDL
/usr/bin/ld: lib/libCommon.a(VulkanRenderManager.cpp.o): in function `VKRGraphicsPipeline::Create(VulkanContext*)':
VulkanRenderManager.cpp:(.text+0x88): undefined reference to `__atomic_store_8'
/usr/bin/ld: VulkanRenderManager.cpp:(.text+0xbc): undefined reference to `__atomic_store_8'
/usr/bin/ld: VulkanRenderManager.cpp:(.text+0x100): undefined reference to `__atomic_store_8'
/usr/bin/ld: lib/libCommon.a(VulkanRenderManager.cpp.o): in function `VKRComputePipeline::Create(VulkanContext*)':
VulkanRenderManager.cpp:(.text+0x194): undefined reference to `__atomic_store_8'
/usr/bin/ld: VulkanRenderManager.cpp:(.text+0x1c8): undefined reference to `__atomic_store_8'
/usr/bin/ld: lib/libCore.a(PipelineManagerVulkan.cpp.o): in function `PipelineManagerVulkan::Clear()':
PipelineManagerVulkan.cpp:(.text+0x6ac): undefined reference to `__atomic_load_8'
/usr/bin/ld: lib/libCore.a(PipelineManagerVulkan.cpp.o): in function `PipelineManagerVulkan::GetOrCreatePipeline(VulkanRenderManager*, unsigned long long, unsigned long long, VulkanPipelineRasterStateKey const&, DecVtxFormat const*, VulkanVertexShader*, VulkanFragmentShader*, bool)':

How did you get past that @cmitu ?

hrydgard commented 2 years ago

OK that was easy, just had to link with -latomic . Will update the CMakeLists.txt.

But, it does work now, albeit slowly. Not able to reproduce the shader error :/

I might make another attempt with your linked image later, but it should be the same, right? How can I check the driver version?

hrydgard commented 2 years ago

Oh haha never mind, turns out I'm using llvmpipe, a software renderer. No wonder it's slow. Now the question is how I get the real OpenGL driver to work...

hrydgard commented 2 years ago

The real OpenGL driver works too. I enabled it by running raspi-config and picking Advanced/GL Driver/G3 GL (Full KMS).

I'm getting some interesting output though, we are picking OpenGL instead of OpenGL ES it seems:

ERROR: EGL Error EGL_BAD_ACCESS detected in file /home/pi/ppsspp/SDL/SDLGLGraphicsContext.cpp at line 269 (0x3002)
EGL ERROR: Unable to make GLES context current.
EGL_Init() failed
OpenGL 2.0 or higher.

So seems we tried GLES but fell "back" to desktop OpenGL.

In tools / System Information in PPSSPP, the driver shows up as:

VENDOR_BROADCOM VC4 V3D 2.1

hrydgard commented 2 years ago

So @cmitu , to debug this, I need exact instructions from you, how you reproduced it using that image I guess. What GPU driver you chose, are you running on a desktop, all the details from an empty image to repro. I'm ready with my raspberry 3b.

Thanks in advance!

cmitu commented 2 years ago

My build steps:

git clone --depth 1 --recursive https://github.com/hrydgard/ppsspp
mkdir -p ppsspp/build && cd ppsspp/build
cmake -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchains/raspberry.armv7.cmake -DARM_NO_VULKAN=ON ..

You'd need to the usual dependencies installed (libsdl2-dev libsnappy-dev libzip-dev zlib1g-dev libraspberrypi-dev). Check that - after building - PPSSPPSDL is linked with the VC4 legacy libs:

$ ldd PPSSPPSDL | grep -i gles

# should output:
libbrcmGLESv2.so => /opt/vc/lib/libbrcmGLESv2.so (0x76d1b000)

A few other things:

I remember I had the same issue during linking (missing the atomic lib ref), but I think I've used LDFLAGS to set it. Building from the latest master doesn't show the error anymore.

hrydgard commented 2 years ago

Thanks for the steps and details! I will try this tomorrow. Yeah, I've fixed the atomic thing.

Oh yeah, I also have a Raspberry Pi 4 setup now, in case there are issues with those :)

hrydgard commented 2 years ago

OK, I tried the above on a fresh non-desktop image. The LDD check passes, but it hangs hard when running, as reported.

And indeed, if I hack out the HSV color shift, things do run, although for some reason text seems to be broken.

Anyway, thanks - that's enough of a repro to get started debugging. Though I somewhat kinda question the value of supporting such backwards drivers in the first place... And super frustrating to test since the raspberry pi just hangs when it doesn't like the shader.

Also not sure where to get the vcdb tool

hrydgard commented 2 years ago

It just gets more and more baffling, the slightest change takes it from running to crashing. And every time it crashes, reboot. Not much pattern in what changes it will accept, either, some complicated stuff is fine but absolutely trivial stuff is not. Maybe some exception during shader execution due to some values, but would be highly unusual.

I'm giving up for today, and I'll probably end up just providing a version of the shader that doesn't support tint for this driver. Very annoying and totally bizarre behavior :(

cmitu commented 2 years ago

Also not sure where to get the vcdb tool

Sorry, that's my fault, the correct command is sudo vcdbg reloc (part of the libraspberrypi-bin package).

I'm giving up for today, and I'll probably end up just providing a version of the shader that doesn't support tint for this driver. Very annoying and totally bizarre behavior :(

I wouldn't mind just documenting this behaviour for the new release and leave the shader as is - the new RaspiOS version doesn't have this bizarre bug and it should work better (GLES-wise) than the old/legacy driver anyway. We could add a patch for old Raspbian Buster users in RetroPie to disable the shader, until we'll migrate to the Bullseye release.

Thank you for the support.

unknownbrackets commented 2 years ago

Are there any statistics or metrics on how many people are running which versions? How easy is it to update?

I'd worry if a bunch of people are unknowingly going to run into this issue when they update PPSSPP and maybe have trouble updating the OS. But if it's easy or people have already started upgrading, then maybe it's a problem that's fixing itself.

-[Unknown]

cmitu commented 2 years ago

I can only speak about how things are work right now in RetroPie.

Are there any statistics or metrics on how many people are running which versions?

We (RetroPie) only support Buster for the time being. We pinned the version we distribute to v1.12.3 now, so users will not be impacted by a new PPSSPP version until we also validate and change the version we distribute. Any upgrade done by users right now will get them v1.12.3, but we don't know which (older) versions users may have.

How easy is it to update?

Speaking about Raspbian/RaspiOS, they don't officially support a rolling upgrade, so users will need to upgrade manually with a new image. Not sure about other RPI supporting distros (Ubuntu/Arch/Manjaro).

For RetroPie (which is built upon the Lite version of RaspiOS), updating PPSSPP is done using the RetroPie menus and from the version we pin, so they should get a compatible/validated version depending on which OS/GPU drivers they use.

HTH

hrydgard commented 2 years ago

OK. Sounds like I'm gonna do the workaround then.

Still this absolutely baffles me, if the shader compiler is that unstable, how are any games running at all..

hrydgard commented 2 years ago

Now it doesn't crash anymore. Targeting further work to the next version, though might end up doing some before anyway.

cmitu commented 2 years ago

Issue is resolved after the commits from #15615.

Apologies for taking so long to close the issue and thank you again for your support.