Kodi Community Forum

Full Version: Retroplayer + iagl screen buffering/refresh problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all.
I've a raspberry pi4 with kodi-retroplayer and retroarch.
In retroarch i can play games without problems but when I launch a game from IAGL the game loads and for some few seconds graphics are ok but then begans to flicker. Seems a refresh rate problem because the frames are displayed on top of the old frame (i don't know the right word) and the flickering is constant. If I let it go for some seconds more then kodi segfaults.

Kodi it's build fromĀ  garbear's git release 19.1. My pi runs slackware current and has acceleration enabled. Retroarch standalone works as expected, the problem it's only when launching games from IAGL. It affects all the emulators I've checked (mame2003, nestopia and vice). Also Kodi runs smooth and without a problem.

I've been trying 2 days for make it work as expected but I'm out of ideas.
(2021-08-18, 12:22)juanma1980 Wrote: [ -> ]Hi all.
I've a raspberry pi4 with kodi-retroplayer and retroarch.
In retroarch i can play games without problems but when I launch a game from IAGL the game loads and for some few seconds graphics are ok but then begans to flicker. Seems a refresh rate problem because the frames are displayed on top of the old frame (i don't know the right word) and the flickering is constant. If I let it go for some seconds more then kodi segfaults.

Kodi it's build fromĀ  garbear's git release 19.1. My pi runs slackware current and has acceleration enabled. Retroarch standalone works as expected, the problem it's only when launching games from IAGL. It affects all the emulators I've checked (mame2003, nestopia and vice). Also Kodi runs smooth and without a problem.

I've been trying 2 days for make it work as expected but I'm out of ideas.

I don't think this has anything to do with IAGL, and is likely more to do with Kodi / Retroplayer. You can verify that by just launching a game file through the Kodi file manager.

There's not much to do in Kodi to improve performance. My suggestions would be to turn off rewind and autosave in Kodi settings. Also try different cores/game addons (quicknes for example is going to run better than bnes).

If nothing seems to work, I think a debug log would be needed and maybe an issue written for the Retroplayer team to look at that they can reproduce.
I've this setup working before (but with kodi and retroplayer builded each from it's own repositories), but my hd crashed and then I builded directly from garbear's repo. Effectively running games from iagl or file browser doesn't change anything. I've been trying with some frequency adjustments but with no luck. I'll give it a try or two more.

Thanks.
Well, finally I've it working building kodi again from xbmc's repository. For some reason if builded from garbear's retroplayer repository I've that awful sync or-whatever-it-be error.

Thx.
@juanma1980 Thanks for testing my dev branch. Can you try it again after rebasing on the latest `retroplayer-19.1` branch? I reverted the OpenGL shaders feature, which was also causing problems on my macbook.
(2021-08-28, 01:29)garbear Wrote: [ -> ]@juanma1980 Thanks for testing my dev branch. Can you try it again after rebasing on the latest `retroplayer-19.1` branch? I reverted the OpenGL shaders feature, which was also causing problems on my macbook.
Ok. I'll try this night. I remember that for build it I made 2 o 3 changes related to shaders (GL_CLAMP_TO_BORDER and others apparently not sopported by gles), it was the night of a hard day and I only want to see the TV next morning when I wake up so I "trashed" the code to build it.
(2021-08-28, 20:17)juanma1980 Wrote: [ -> ]
(2021-08-28, 01:29)garbear Wrote: [ -> ]@juanma1980 Thanks for testing my dev branch. Can you try it again after rebasing on the latest `retroplayer-19.1` branch? I reverted the OpenGL shaders feature, which was also causing problems on my macbook.
Ok. I'll try this night. I remember that for build it I made 2 o 3 changes related to shaders (GL_CLAMP_TO_BORDER and others apparently not sopported by gles), it was the night of a hard day and I only want to see the TV next morning when I wake up so I "trashed" the code to build it.

Builded ok at 1st attempt but now kodi complains about libretro-compatibility version. It seems I also need to build libretro and at least one emulator for testing.
@garbear after building libretro and libretro-mame2003 addons the problem doen't exists anymore but the games run slowly, almost unplayable (with official kodi they run ok). I can do some testing if you want.

cmake flags (for build both kodi and your kodi retroplayer branch):

cmake ../ -DCMAKE_INSTALL_PREFIX=/usr/ -DAPP_RENDER_SYSTEM=gles -DENABLE_INTERNAL_CROSSGUID=ON -DENABLE_INTERNAL_FLATBUFFERS=ON -DENABLE_INTERNAL_FMT=ON -DCORE_SYSTEM_NAME=linux -DCORE_PLATFORM_NAME=gbm -DWITH_CPU=cortex-a53 -DMARIADBCLIENT_INCLUDE_DIR=/usr/local/mysql/include/ -DCMAKE_C_FLAGS="-march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mvectorize-with-neon-quad -mfloat-abi=hard" -DCMAKE_CXX_FLAGS="-march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mvectorize-with-neon-quad -mfloat-abi=hard"
Thanks for confirming the problem went away. Slow performance with MAME is probably due to the core itself: MAME prizes itself an accuracy and documentation, at the expense of performance. You can try a light-weight core, like Atari2600 or NES or the "performance" profiles of the beetle SNES emulators.

Second, try disabling Rewind: Settings -> Games -> General. Rewind can suck up a lot of resources for cores with large savestates, which MAME probably fits.