libretro / beetle-pce-libretro

Standalone hard fork of Mednafen PCE to libretro
GNU General Public License v2.0
27 stars 28 forks source link

Odd behavior with Rastan Saga II #78

Closed kwyxz closed 3 weeks ago

kwyxz commented 3 months ago

Hello maintainers,

I am using the latest commit of mediafen_pce (372184b402852f9b3a3f1663ea676ffa910f6e48) and seeing a rather odd behavior when running Rastan Saga II (No-Intro e998693ab9d694eebe66e5942fd5137e Rastan Saga II (Japan).pce)

The game starts properly, but after skipping through the start screen and the intro text, it attempts to switch the screen geometry multiple times. Here's the log I see on the retroarch command line :

~ » retroarch -v -L /usr/local/lib/libretro/mednafen_pce_libretro.so ~/Rastan\ Saga\ II\ \(Japan\).pce                                      kwyxz@ollie
[INFO] [Config]: Looking for config in: "/home/kwyxz/.config/retroarch/retroarch.cfg".
[INFO] RetroArch 1.19.1 (Git eada7985f5)
[INFO] === Build =======================================
[INFO] CPU Model Name: 13th Gen Intel(R) Core(TM) i5-13400F
[INFO] Capabilities: MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE42 AES AVX AVX2 
[INFO] Version: 1.19.1
[INFO] Git: eada7985f5
[INFO] Built: Jul 23 2024
[INFO] =================================================
[INFO] [Input]: Found input driver: "x".
[ERROR] Couldn't find any cloud sync driver named ""
[INFO] Available cloud sync drivers are:
[INFO]  webdav
[INFO]  null
[WARN] Going to default to first cloud sync driver...
[INFO] [Core]: Loading dynamic libretro core from: "/usr/local/lib/libretro/mednafen_pce_libretro.so"
[INFO] [Overrides]: Redirecting save file to "/home/kwyxz/.config/retroarch/saves/Beetle PCE/Rastan Saga II (Japan).srm".
[INFO] [Overrides]: Redirecting save state to "/home/kwyxz/.config/retroarch/states/Beetle PCE/Rastan Saga II (Japan).state".
[INFO] [Environ]: GET_CORE_OPTIONS_VERSION.
[INFO] [Environ]: GET_LANGUAGE: "0".
[INFO] [Environ]: RETRO_ENVIRONMENT_SET_CORE_OPTIONS_V2_INTL.
[INFO] [Environ]: SET_CONTROLLER_INFO.
[INFO] [Environ]: RETRO_ENVIRONMENT_SET_CONTENT_INFO_OVERRIDE.
[INFO] [Content Override]: File Extension: 'pce' - need_fullpath: FALSE, persistent_data: FALSE
[INFO] [Content Override]: File Extension: 'sgx' - need_fullpath: FALSE, persistent_data: FALSE
[INFO] [Environ]: GET_VFS_INTERFACE. Core requested version >= V2, providing V3.
[INFO] [Environ]: GET_LED_INTERFACE.
[INFO] [Environ]: GET_LOG_INTERFACE.
[INFO] [Environ]: SYSTEM_DIRECTORY: "/home/kwyxz/.config/retroarch/system".
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[INFO] [Environ]: GET_PERF_INTERFACE.
[INFO] [Environ]: SET_SUPPORT_ACHIEVEMENTS: yes.
[INFO] [Environ]: PERFORMANCE_LEVEL: 5.
[INFO] [Content]: Loading content file: "/home/kwyxz/Rastan Saga II (Japan).pce".
[INFO] [Environ]: RETRO_ENVIRONMENT_GET_GAME_INFO_EXT.
[INFO] [Environ]: SET_INPUT_DESCRIPTORS:
[INFO] [SRAM]: Skipping SRAM load.
[INFO] [Core]: Version of libretro API: 1, Compiled against API: 1
[INFO] [Core]: Geometry: 256x224, Aspect: 1.200, FPS: 59.83, Sample rate: 44100.00 Hz.
[INFO] [Audio]: Set audio input rate to: 44228.18 Hz.
[INFO] [Video]: Set video size to: 807x672.
[ERROR] [Wayland]: Failed to connect to Wayland server.
[INFO] [GLX]: GLX_EXT_swap_control_tear supported.
[INFO] [GL]: Found GL context: "x".
[INFO] [GL]: Detecting screen resolution: 2560x1440.
[INFO] [GLX]: X = 0, Y = 0, W = 807, H = 672.
[INFO] [GLX]: Found swap function: glXSwapIntervalEXT.
[INFO] [GL]: Vendor: NVIDIA Corporation, Renderer: NVIDIA GeForce GTX 1080/PCIe/SSE2.
[INFO] [GL]: Version: 4.6.0 NVIDIA 535.183.01.
[INFO] [GL]: Using resolution 807x672.
[INFO] [GL]: Default shader backend found: glsl.
[INFO] [Shader driver]: Using GLSL shader backend.
[INFO] [GLSL]: Checking GLSL shader support ...
[WARN] [GL]: Stock GLSL shaders will be used.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GL]: Using 4 textures.
[INFO] [GL]: Loaded 1 program(s).
[INFO] [GL]: Using GL_RGB565 for texture uploads.
[INFO] [udev]: Pad #0 (/dev/input/event4) supports force feedback.
[INFO] [udev]: Pad #0 (/dev/input/event4) supports 16 force feedback effects.
[INFO] [Autoconf]: Xbox 360 Controller configured in port 1.
[INFO] [Joypad]: Found joypad driver: "udev".
[INFO] [Video]: Found display server: "x11".
[INFO] [PulseAudio]: Requested 24576 bytes buffer, got 18432.
[INFO] [Audio]: Started synchronous audio driver.
[INFO] [ALSA] Using ALSA version 1.2.8
[INFO] [Microphone]: Initialized microphone driver.
[INFO] [Display]: Found display driver: "gl".
[INFO] [Playlist]: Loading history file: "/home/kwyxz/.config/retroarch/content_history.lpl".
[INFO] [Playlist]: Loading history file: "/home/kwyxz/.config/retroarch/content_music_history.lpl".
[INFO] [Playlist]: Loading history file: "/home/kwyxz/.config/retroarch/content_image_history.lpl".
[INFO] [Playlist]: Loading favorites file: "/home/kwyxz/.config/retroarch/content_favorites.lpl".
[INFO] [Playlist]: Written to playlist file: "/home/kwyxz/.config/retroarch/content_history.lpl".
[INFO] [Environ]: SET_GEOMETRY: 256x240, Aspect: 1.219.
[INFO] [Environ]: SET_GEOMETRY: 1024x1, Aspect: 292.571.
[INFO] [Environ]: SET_GEOMETRY: 240x240, Aspect: 0.286.
[INFO] [Environ]: SET_GEOMETRY: 256x240, Aspect: 1.219.
[INFO] [Environ]: SET_GEOMETRY: 1024x1, Aspect: 292.571.
[INFO] [Environ]: SET_GEOMETRY: 240x240, Aspect: 0.286.
[INFO] [Environ]: SET_GEOMETRY: 256x240, Aspect: 1.219.
[INFO] [Environ]: SET_GEOMETRY: 1024x1, Aspect: 292.571.
[INFO] [Environ]: SET_GEOMETRY: 240x240, Aspect: 0.286.
[INFO] [Environ]: SET_GEOMETRY: 256x240, Aspect: 1.219.
[INFO] [Environ]: SET_GEOMETRY: 1024x1, Aspect: 292.571.
[INFO] [Environ]: SET_GEOMETRY: 240x240, Aspect: 0.286.
[INFO] [Environ]: SET_GEOMETRY: 256x240, Aspect: 1.219.
[INFO] [Environ]: SET_GEOMETRY: 1024x1, Aspect: 292.571.
[INFO] [Environ]: SET_GEOMETRY: 240x240, Aspect: 0.286.
[INFO] [Environ]: SET_GEOMETRY: 256x240, Aspect: 1.219.
[INFO] [Environ]: SET_GEOMETRY: 1024x1, Aspect: 292.571.
[INFO] [Environ]: SET_GEOMETRY: 240x240, Aspect: 0.286.
[INFO] [Environ]: SET_GEOMETRY: 256x240, Aspect: 1.219.
[INFO] [Environ]: SET_GEOMETRY: 1024x1, Aspect: 292.571.
[INFO] [Environ]: SET_GEOMETRY: 240x240, Aspect: 0.286.
[INFO] [Environ]: SET_GEOMETRY: 256x240, Aspect: 1.219.
[INFO] [Config]: Saved new config to "/home/kwyxz/.config/retroarch/retroarch.cfg".
[INFO] [SRAM]: Saving RAM type #0 to "/home/kwyxz/.config/retroarch/saves/Beetle PCE/Rastan Saga II (Japan).srm".
[INFO] [SRAM]: Saved successfully to "/home/kwyxz/.config/retroarch/saves/Beetle PCE/Rastan Saga II (Japan).srm".
[INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 15 seconds.
[INFO] [Runtime]: Saving runtime log file: "/home/kwyxz/.config/retroarch/playlists/logs/Beetle PCE/Rastan Saga II (Japan).lrtl".
[INFO] [Core]: Unloading game..
[INFO] [PulseAudio]: Pausing.
[INFO] [Core]: Unloading core..
[INFO] [Core]: Unloading core symbols..
[INFO] [Core]: Saved core options file to "/home/kwyxz/.config/retroarch/config/Beetle PCE/Beetle PCE.opt".
[INFO] [XINERAMA]: Xinerama version: 1.1.
[INFO] [XINERAMA]: Xinerama screens: 1.
[INFO] [XINERAMA]: Saved monitor #0.

See those multiple "SET_GEOMETRY"? When those happen some visual glitches appear as Retroarch attempts the multiple geometry switches. Afterwards, the game runs fine on a Linux PC.

However, this causes various unexpected behaviors on handheld systems:

Interestingly enough, no such behavior happens with mednafen_pce_fast on any of the three platforms :

~ » retroarch -v -L /usr/local/lib/libretro/mednafen_pce_fast_libretro.so ~/Rastan\ Saga\ II\ \(Japan\).pce                                 kwyxz@ollie
[INFO] [Config]: Looking for config in: "/home/kwyxz/.config/retroarch/retroarch.cfg".
[INFO] RetroArch 1.19.1 (Git eada7985f5)
[INFO] === Build =======================================
[INFO] CPU Model Name: 13th Gen Intel(R) Core(TM) i5-13400F
[INFO] Capabilities: MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE42 AES AVX AVX2 
[INFO] Version: 1.19.1
[INFO] Git: eada7985f5
[INFO] Built: Jul 23 2024
[INFO] =================================================
[INFO] [Input]: Found input driver: "x".
[ERROR] Couldn't find any cloud sync driver named ""
[INFO] Available cloud sync drivers are:
[INFO]  webdav
[INFO]  null
[WARN] Going to default to first cloud sync driver...
[INFO] [Core]: Loading dynamic libretro core from: "/usr/local/lib/libretro/mednafen_pce_fast_libretro.so"
[INFO] [Overrides]: Redirecting save file to "/home/kwyxz/.config/retroarch/saves/Beetle PCE Fast/Rastan Saga II (Japan).srm".
[INFO] [Overrides]: Redirecting save state to "/home/kwyxz/.config/retroarch/states/Beetle PCE Fast/Rastan Saga II (Japan).state".
[INFO] [Environ]: GET_CORE_OPTIONS_VERSION.
[INFO] [Environ]: GET_LANGUAGE: "0".
[INFO] [Environ]: RETRO_ENVIRONMENT_SET_CORE_OPTIONS_V2_INTL.
[INFO] [Environ]: SET_CONTROLLER_INFO.
[INFO] [Environ]: RETRO_ENVIRONMENT_SET_CONTENT_INFO_OVERRIDE.
[INFO] [Content Override]: File Extension: 'pce' - need_fullpath: FALSE, persistent_data: FALSE
[INFO] [Environ]: GET_VFS_INTERFACE. Core requested version >= V1, providing V3.
[INFO] [Environ]: GET_LOG_INTERFACE.
[INFO] [Environ]: SYSTEM_DIRECTORY: "/home/kwyxz/.config/retroarch/system".
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[libretro INFO] Frontend supports RGB565 - will use that instead of XRGB1555.
[INFO] [Environ]: GET_PERF_INTERFACE.
[INFO] [Environ]: SET_SUPPORT_ACHIEVEMENTS: yes.
[INFO] [Environ]: PERFORMANCE_LEVEL: 5.
[INFO] [Content]: Loading content file: "/home/kwyxz/Rastan Saga II (Japan).pce".
[INFO] [Environ]: RETRO_ENVIRONMENT_GET_GAME_INFO_EXT.
[INFO] [Environ]: SET_INPUT_DESCRIPTORS:
[INFO] [Environ]: SET_AUDIO_BUFFER_STATUS_CALLBACK.
[libretro INFO] PCE CD Audio settings changed.
[INFO] [Environ]: SET_MEMORY_MAPS.
[INFO] [SRAM]: Skipping SRAM load.
[INFO] [Core]: Version of libretro API: 1, Compiled against API: 1
[INFO] [Core]: Geometry: 256x243, Aspect: 1.200, FPS: 59.82, Sample rate: 44100.00 Hz.
[INFO] [Audio]: Set audio input rate to: 44232.70 Hz.
[INFO] [Video]: Set video size to: 876x729.
[ERROR] [Wayland]: Failed to connect to Wayland server.
[INFO] [GLX]: GLX_EXT_swap_control_tear supported.
[INFO] [GL]: Found GL context: "x".
[INFO] [GL]: Detecting screen resolution: 2560x1440.
[INFO] [GLX]: X = 0, Y = 0, W = 876, H = 729.
[INFO] [GLX]: Found swap function: glXSwapIntervalEXT.
[INFO] [GL]: Vendor: NVIDIA Corporation, Renderer: NVIDIA GeForce GTX 1080/PCIe/SSE2.
[INFO] [GL]: Version: 4.6.0 NVIDIA 535.183.01.
[INFO] [GL]: Using resolution 876x729.
[INFO] [GL]: Default shader backend found: glsl.
[INFO] [Shader driver]: Using GLSL shader backend.
[INFO] [GLSL]: Checking GLSL shader support ...
[WARN] [GL]: Stock GLSL shaders will be used.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GL]: Using 4 textures.
[INFO] [GL]: Loaded 1 program(s).
[INFO] [GL]: Using GL_RGB565 for texture uploads.
[INFO] [udev]: Pad #0 (/dev/input/event4) supports force feedback.
[INFO] [udev]: Pad #0 (/dev/input/event4) supports 16 force feedback effects.
[INFO] [Autoconf]: Xbox 360 Controller configured in port 1.
[INFO] [Joypad]: Found joypad driver: "udev".
[INFO] [Video]: Found display server: "x11".
[INFO] [PulseAudio]: Requested 24576 bytes buffer, got 18432.
[INFO] [Audio]: Started synchronous audio driver.
[INFO] [ALSA] Using ALSA version 1.2.8
[INFO] [Microphone]: Initialized microphone driver.
[INFO] [Display]: Found display driver: "gl".
[INFO] [Playlist]: Loading history file: "/home/kwyxz/.config/retroarch/content_history.lpl".
[INFO] [Playlist]: Loading history file: "/home/kwyxz/.config/retroarch/content_music_history.lpl".
[INFO] [Playlist]: Loading history file: "/home/kwyxz/.config/retroarch/content_image_history.lpl".
[INFO] [Playlist]: Loading favorites file: "/home/kwyxz/.config/retroarch/content_favorites.lpl".
[INFO] [Playlist]: Written to playlist file: "/home/kwyxz/.config/retroarch/content_history.lpl".
[INFO] [Environ]: RETRO_ENVIRONMENT_SET_MINIMUM_AUDIO_LATENCY.
[INFO] [Environ]: SET_GEOMETRY: 256x240, Aspect: 1.215.
[INFO] [Config]: Saved new config to "/home/kwyxz/.config/retroarch/retroarch.cfg".
[INFO] [SRAM]: Saving RAM type #0 to "/home/kwyxz/.config/retroarch/saves/Beetle PCE Fast/Rastan Saga II (Japan).srm".
[INFO] [SRAM]: Saved successfully to "/home/kwyxz/.config/retroarch/saves/Beetle PCE Fast/Rastan Saga II (Japan).srm".
[INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 13 seconds.
[INFO] [Runtime]: Saving runtime log file: "/home/kwyxz/.config/retroarch/playlists/logs/Beetle PCE Fast/Rastan Saga II (Japan).lrtl".
[INFO] [Core]: Unloading game..
[INFO] [PulseAudio]: Pausing.
[INFO] [Core]: Unloading core..
[libretro INFO] [Beetle PCE Fast]: Samples / Frame: 734.32913
[libretro INFO] [Beetle PCE Fast]: Estimated FPS: 60.05481
[INFO] [Core]: Unloading core symbols..
[INFO] [Core]: Saved core options file to "/home/kwyxz/.config/retroarch/config/Beetle PCE Fast/Beetle PCE Fast.opt".
[INFO] [XINERAMA]: Xinerama version: 1.1.
[INFO] [XINERAMA]: Xinerama screens: 1.
[INFO] [XINERAMA]: Saved monitor #0.

I can provide more details as necessary. Thanks for your help!

negativeExponent commented 3 weeks ago

invalid resolution (in this case assigns 1 to vertical line count) should be fixed in latest commit. the game still switches resolution though in this intro. see if this at least fixes the issue

negativeExponent commented 3 weeks ago

Pushed a commit that fixes this excessive calls to SET_GEOMETRY

@LibretroAdmin