lr-duckstation - Experimental new PlayStation 1 emulator
-
@stoo While I haven't been able to replicate the weird performance problem I was getting before, I see why OpenGL is failing intermittently.
Seemingly at random when switching AA values, a shader fails to compile. It doesn't happen every time, but maybe 50% of the time?
[libretro INFO] [LibretroHostInterface] Hardware context reset, type = 5 [INFO] [Environ]: GET_SAVE_DIRECTORY. [libretro INFO] [LibretroHostInterface] Shader cache directory: '/home/pi/RetroPie/roms/psx//duckstation_cache/' [libretro INFO] [GPUBackend] GPU thread stopped. [libretro INFO] [GPU_HW_OpenGL] Max texture size: 4096x4096 [libretro INFO] [GPU_HW_OpenGL] Per-sample shading: not supported [libretro INFO] [GPU_HW_OpenGL] Max multisamples: 4 [libretro INFO] [GPU_HW_OpenGL] Uniform buffer offset alignment: 256 [libretro WARN] [SetCapabilities] GL_EXT/OES_copy_image missing, this may affect performance. [libretro INFO] [GPU_HW_OpenGL] Max fragment shader storage blocks: 16 [libretro INFO] [GPU_HW_OpenGL] Max shader storage buffer size: 134217728 [libretro INFO] [GPU_HW_OpenGL] Using shader storage buffers for VRAM writes. [libretro INFO] [GPUBackend] GPU thread started. [libretro INFO] [GPU_HW] Resolution Scale: 1 (1024x512), maximum 4 [libretro INFO] [GPU_HW] Multisampling: 4x [libretro INFO] [GPU_HW] Dithering: Disabled [libretro INFO] [GPU_HW] Texture Filtering: Nearest-Neighbor [libretro INFO] [GPU_HW] Dual-source blending: Not supported [libretro INFO] [GPU_HW] Using UV limits: NO [libretro INFO] [GPU_HW] Depth buffer: NO [libretro INFO] [GPU_HW] Downsampling: Disabled [libretro INFO] [GPU_HW] Using software renderer for readbacks: YES [INFO] [Environ]: GET_SAVE_DIRECTORY. [libretro INFO] [LibretroHostInterface] Shader cache directory: '/home/pi/RetroPie/roms/psx//duckstation_cache/' [libretro INFO] [GL::ShaderCache] 0 program binary formats supported by driver [libretro WARN] [Open] Your GL driver does not support program binaries. Hopefully it has a built-in cache, otherwise startup will be slow due to compiling shaders. [libretro INFO] [HostInterface] Loading: Compiling Shaders 81 of 0-156 [libretro ERROR] [CompileShader] Shader failed to compile: 0:105(68): error: `gl_SampleID' undeclared 0:105(63): error: cannot construct `uint' from a non-numeric data type 0:105(59): error: cannot construct `int' from a non-numeric data type 0:105(17): error: no matching function for call to `texelFetch(sampler2DMS, ivec2, error)'; candidates are: 0:105(17): error: vec4 texelFetch(sampler1D, int, int) 0:105(17): error: ivec4 texelFetch(isampler1D, int, int) 0:105(17): error: uvec4 texelFetch(usampler1D, int, int) 0:105(17): error: vec4 texelFetch(sampler2D, ivec2, int) 0:105(17): error: ivec4 texelFetch(isampler2D, ivec2, int) 0:105(17): error: uvec4 texelFetch(usampler2D, ivec2, int) 0:105(17): error: vec4 texelFetch(sampler3D, ivec3, int) 0:105(17): error: ivec4 texelFetch(isampler3D, ivec3, int) 0:105(17): error: uvec4 texelFetch(usampler3D, ivec3, int) 0:105(17): error: vec4 texelFetch(sampler2DRect, ivec2) 0:105(17): error: ivec4 texelFetch(isampler2DRect, ivec2) 0:105(17): error: uvec4 texelFetch(usampler2DRect, ivec2) 0:105(17): error: vec4 texelFetch(sampler1DArray, ivec2, int) 0:105(17): error: ivec4 texelFetch(isampler1DArray, ivec2, int) 0:105(17): error: uvec4 texelFetch(usampler1DArray, ivec2, int) 0:105(17): error: vec4 texelFetch(sampler2DArray, ivec3, int) 0:105(17): error: ivec4 texelFetch(isampler2DArray, ivec3, int) 0:105(17): error: uvec4 texelFetch(usampler2DArray, ivec3, int) 0:105(17): error: vec4 texelFetch(sampler2DMS, ivec2, int) 0:105(17): error: ivec4 texelFetch(isampler2DMS, ivec2, int) 0:105(17): error: uvec4 texelFetch(usampler2DMS, ivec2, int) 0:105(17): error: type mismatch [libretro ERROR] [Initialize] Failed to compile programs [libretro ERROR] [CreateGPU] Failed to initialize OpenGL renderer, falling back to software renderer [INFO] [Environ]: SET_MESSAGE: Failed to initialize OpenGL renderer, falling back to software renderer. [libretro INFO] [GPUBackend] GPU thread stopped. [libretro INFO] [GPUBackend] GPU thread started.
When this happens, it says it's falling back to Software rendering, but a black screen appears instead. The game is still running, audio is playing but no display. You can switch internal resolutions up or down to force it to initialize the OpenGL renderer again and it usually comes back.
No idea if this is a bug in duckstation, Retroarch or a GL driver bug. I'm using glcore.
-
@stoo said in lr-duckstation - Experimental new PlayStation 1 emulator:
No idea if this is a bug in duckstation, Retroarch or a GL driver bug. I'm using glcore.
why glcore? aren't you on pi4? should be gl i think
i would also remove any overclocks as they could have an affect on gl stability.
-
Switched to "gl" driver. Problem persists.
Dropped clocks to default. Problem persists.
Simply start switching IR and AA options (e.g. enable 2xIR and 2xMSAA, switch to 3xIR, disable AA, switch to 1xIR) and it'll fail very quickly. Fallback to software renderer never works either.
I don't think I can get it to occur without changing AA settings. Simply changing IR alone doesn't seem to trigger it. It's almost certainly a software bug.
Doesn't matter if I'm using PGXP or not, or using software readbacks or not, or disabling interlacing or not.
-
@stoo yup, i can recreate also. can i ask that you please log it here ?
for others, please don't log issues on this github without confirming them here first - as with most things in emulation, this is a volunteer project and we don't want to spam the (lone) developer with work without doing some due-diligence first :)
-
@dankcushions Yep, that's why I waited until someone else confirmed it :)
Issue added to duckstation GH.
-
@nemo93 said in lr-duckstation - Experimental new PlayStation 1 emulator:
Game specific issues w/o fixes
- Captain Commando (JP)
=> sprites glitches (same on PCSX-ReARMed). Seen on the very 1st boss:
Confirmed on standalone Duckstation on Win 10. Stenzek is aware of it. CD timing-related.
- Gekioh (JP)
=> menu background not being cleared up when starting a game (whatever the mode). Not sure it's a bug as videos on YT show similar behavior.
Not a bug. Same on real hardware.
- ISS Pro 98 (US/PAL)
=> game stuck after main menu when creating data on Memory Card (PAL). On US version it goes through but still can't see any Memory Card available in the option screen.
Confirmed on standalone Duckstation on Win 10. I can't get past that screen on either US or PAL versions. Ticket opened.
Edit: Did more testing; works in Execution Mode: Interpreter (slowest). Fails in cached interpreter and recompiler.
Edit 2: Already reported under Japanese title. Executes code out of uncached ROM, needs recompiler icache. (Compatibility Settings -> Force Recompiler ICache)
Edit 3: Recompiler ICache now forced on ISS Pro 98 by default, which fixes the problem.
- Captain Commando (JP)
-
Anyone got negcon emulation working? It works fine with pcsx_rearmed but with duckstation there seem to be missing mappings or something (like the I button, the equivalent of X)
-
@fcibx6r1un Updated to latest version. Ridge Racer Revolution only registers the triggers when you go into the game settings and change the negcon range to its largest (if that makes sense).
-
@dankcushions said:
do you have any particular examples which slowdown with the default hardware (OpenGL) renderer on pi4? ideally with a way i can quickly verify them.
=> Ape Escape appears to run fullspeed but as soon as you press Start in-game the Options menu will cause slowdown. Gran Turismo 2 (Arcade) will slowdown as soon as you enter a race. Spyro 3 also suffers from slowdown.
in lieu of vulkan i can be tempted to make software the default renderer for pi4 (and pi2 and 3?), but i haven't seen any performance issues in my (limited) testing of the default hardware renderer - open to ideas!
=> All the above were tested with hardware (OpenGL) renderer, default PGXP settings, 1x resolution (2x is slowing down everything) and either Nearest-Neighbour/Bilinear or Jinc2 antialiasing (xBR is super slow). I definitely second @stoo's post above.
i note that a few of the PGXP enhancements are on by default - i'm not sure if they are applicable to software mode, but if they're not i would be tempted to turn those off by default if i can provide full performance.
=> same as @stoo here. PGXP and other image quality refinements are available only with the Hardware renderer.
On a stock pi4 I still recommend to stick with renderer on "Software", "alsathread" to be enabled (sorted as per your PR) and Apply Compatibility settings to be switched "ON". For max compatibility the Crop setting should be set on "none" then up to the users to decide what's best for their setup. I've found out setting Crop to "All borders" will work 95% of the time. The remaining 5% are usually 2D games, FMVs or still images (loading screens) that will flicker. Last I've set Log level to "none" instead of the default.
@stoo thanks a lot for confirming and further testing. I've updated my very first post thanks to your findings! Much appreciated.
@dankcushions my testing is now over and I've got nothing else to add at that point.
lr-duckstation
is simply the best PSX emulator available on pi4 for now. Apart from Captain Commando all games are running fine on first launch without fiddling with the settings. For obvious reasons I'm unable to test nearly ~600 games in full extent hence I can't comment on the accuracy/compatibility with games like FF7/8/9 etc and on the long-run. But from what I saw I'm more than pleased! Last note: not a single crash to report, this emu is rock-solid. -
@dankcushions not sure if this is the right place for a feature request, and no hurry on it, but I do miss the the rumble from pcsxRearmed.
-
@lostless IIRC there is rumble... Maybe you have to select the right controller in the Retroarch input settings: analogue (dualshock)?
-
@nemo93 said in lr-duckstation - Experimental new PlayStation 1 emulator:
=> Ape Escape appears to run fullspeed but as soon as you press Start in-game the Options menu will cause slowdown. Gran Turismo 2 (Arcade) will slowdown as soon as you enter a race. Spyro 3 also suffers from slowdown.
interestingly, i am unable to recreate slowdown in these two scenarios on my pi4 + aarch64 + kms + latest mesa drivers setup
on my stock (albeit updated) pi4 + arm32 setup i couldn't recreate slowdown in ape escape's menu (only tried the tutorial level, though), but i could get it in GT2 (just X'd through the menus to get to the first race).
i tried fkms (ie, retropie/raspi pi os's default) on my aarch64 setup: still no slowdown. i don't think aarch64 should make a difference since this a GPU bottleneck. it could be the latest mesa drivers (which allegedly have some performance improvements).
anyway, i will default it on software for now but this might be something we can review when raspi os is updated.
-
@dankcushions FYI I'm about to finish Castlevania SOTN (190%) and I've not got a single issue during gameplay (roughly 20h). The emulation is flawless and super stable on pi4.
-
I don't seem to find any resolution options but some have mentioed them in this thread, how do i enable or find them?
-
@crush said in lr-duckstation - Experimental new PlayStation 1 emulator:
I don't seem to find any resolution options but some have mentioed them in this thread, how do i enable or find them?
i'm not entirely sure what options you're referring to but all upscaling options are available via https://retropie.org.uk/docs/RetroArch-Core-Options/
-
@ecto said in lr-duckstation - Experimental new PlayStation 1 emulator:
I also tried some lightgun games, but sadly there is still no crosshair for now.>
You can't imagine how much I would like to use an AIRMOUSE in Point Blank / Time Crisis Psx games as I do now in Mame or lr-Flycast
-
@dankcushions thanks but i'm refering to rendered resolution, like the enhanced resolution option in lr-psx-rearmed.
Right now my psx games look like mud in duckstation, so it's not really a viable replacement for psx-r for me pesonally. -
@crush said in lr-duckstation - Experimental new PlayStation 1 emulator:
@dankcushions thanks but i'm refering to rendered resolution, like the enhanced resolution option in lr-psx-rearmed.
so am i :) those options are available in core options, as per my link. in duckstation the option is called 'internal resolution scale'. note that you'll have to switch the renderer option to 'hardware (auto)' (with the caveat in the my first post in this thread), and restart the core for it to appear.
that said, i just tested it and it appears to cause quite a bit of slowdown on my test game (tekken 2) at 2x resolution, but other games might be fine. you may also get better performance disabling all the PGXP enhancements.
-
@dankcushions ooooh for some reason i completely misunderstood, thanks i've got it sorted now :-)
time to try some games again ^_^ -
@dankcushions said in lr-duckstation - Experimental new PlayStation 1 emulator:
that said, i just tested it and it appears to cause quite a bit of slowdown on my test game (tekken 2) at 2x resolution, but other games might be fine. you may also get better performance disabling all the PGXP enhancements.
yes t does seem to struggle with hardware rendering, but it does seem to work well with some games that run in lower resolution like Midnight Run Road Fighter 2.
Games that already render in 480p don't really require it.
This emulator certainly has allot of potential, but needs some optimisation first.
And it is nice to have the widescreen available at least for the games that already look decent in software mode.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.