RetroArch Kodi add-on for CoreELEC

Just started using a cheap S905X3 box, and I’ve been struggling to find a ready-to-go RetroArch add-on for Kodi. Best shot was EmuELEC addon, but it seems to be not maintained anymore, so I thought better make one myself.

For anyone who may be interested, script to build the new add-on and relevant instructions are available here:
retroarch-kodi-addon-CoreELEC

Latest build ready to be installed in Kodi is available here:
retroarch-kodi-addon-CoreELEC/releases

I made it for my personal use, but feel free to suggest improvements and report bugs.

Main features:

  • Latest version of RetroArch and Lakka list cores included
  • Tested on CoreELEC 19 & 20
  • Boot to RetroArch mode
  • Auto-update capability
  • Setting to turn off Xbox360 wireless controllers when exiting Retroarch
  • Setting to use remote location (e.g. SMB) as roms folder
  • Setting to use TV remote controller (CEC) to navigate RetroArch menu.
  • Setting for independent refresh rate in RetroArch
  • Setting to sync audio settings with Kodi
  • Pulseaudio support
9 Likes

Nice.

EMUElec is still maintained but I think that it is by only one person.

Perhaps, with your skills, you could contribute towards further development.

EmuELEC

My understanding is that EmuELEC is maintained as a standalone fork of CoreELEC only, not anymore as a CoreELEC add-on.
However my goal here was just to have a simple and slim RetroArch Kodi addon for CoreELEC with few settings to improve user experience. No additional frontends or emulators.
Just sharing the results in case someone was looking for same thing…

I use Zach Morris addon which adds the Internet Archive Game Launcher.
Then you don’t need to find ROMs because archive.org has a whole library.
You can find Zach repository here zach-morris (Zach Morris) · GitHub

1 Like

Good to know, but again intent is slightly different as described above…

v1.1.0 link available in OP, bugfix mainly:

Fixed:

  • mali_fbdev screen freezing
  • CEC remote controller unintended double tapping
  • build script patches handling improvement
  • various minor fixes

v1.2.0 link available in OP.
Fixed a long standing bug for RetroArch with mali_fbdev, that was the big performance drop with low fps after launching any game from UI, which needed as workaround the “threaded video” setting to be enabled in RetroArch (with lower quality achievable). More details about this issue are given here (this was affecting also EmuELEC, I will submit a specific patch for it shortly).

Now it seems to work flawlessly, feedbacks are welcome.

It’s rather a smart idea to have RetroArch as a plugin! Great work.

Did test it a bit, N64(paraLLEI) runs Mario64 just fine. How compiled cores are selected? For example, there is N64, but no GBA. Also, sound for me is not working, unfortunately. Should I try some settings?

Tested on “vontar x3”( 4/32 s905x3 )

In previous versions I’ve selected just a bunch of cores for testing purpose (the ones I was mainly using).
With new v1.3.0 (link in OP) I’ve included the entire standard Lakka core list, which includes the following:

*Cores included in v1.3.0*

2048 (ok)
81 (ok)
atari800 (ok)
beetle-bsnes (skipped - not found)
beetle-lynx (ok)
beetle-ngp (ok)
beetle-pce (ok)
beetle-pce-fast (ok)
beetle-pcfx (ok)
beetle-psx (ok)
beetle-saturn (skipped - not found)
beetle-supafaust (ok)
beetle-supergrafx (ok)
beetle-vb (ok)
beetle-wswan (ok)
bluemsx (ok)
bsnes (ok)
bsnes-mercury (skipped - not found)
bsnes2014 (ok)
bsnes_hd (ok)
cannonball (ok)
cap32 (ok)
chailove (ok)
citra (skipped - not found)
crocods (ok)
daphne (ok)
desmume (ok)
desmume-2015 (ok)
dinothawr (ok)
dolphin (skipped - not found)
dosbox (ok)
dosbox-pure (ok)
dosbox-svn (ok)
duckstation (ok)
ecwolf (ok)
emux-sms (ok)
easyrpg (ok)
fbneo (ok)
fceumm (ok)
flycast (ok)
freeintv (ok)
fuse-libretro (ok)
gambatte (ok)
genesis-plus-gx (ok)
genesis_plus_gx_wide (ok)
gearboy (ok)
gearsystem (ok)
gme (ok)
gpsp (ok)
gw-libretro (ok)
handy (ok)
hatari (ok)
higan-sfc (ok)
higan-sfc-balanced (ok)
kronos (ok)
lowres-nx (ok)
lutro (ok)
mame2003-plus (ok)
mame2010 (ok)
mame2015 (ok)
meowpc98 (ok)
mesen (ok)
mesen-s (ok)
mgba (ok)
mrboom (ok)
mu (ok)
mupen64plus_next (ok)
neocd (ok)
nestopia (ok)
np2kai (ok)
nxengine (ok)
o2em (ok)
openlara (ok)
opera (ok)
parallel-n64 (ok)
pcsx2 (skipped - not found)
pcsx_rearmed (ok)
picodrive (ok)
play (ok)
pocketcdg (ok)
pokemini (ok)
ppsspp (ok)
prboom (ok)
prosystem (ok)
puae (ok)
px68k (ok)
reminiscence (ok)
sameboy (ok)
scummvm (ok)
snes9x (ok)
snes9x2002 (ok)
snes9x2005 (ok)
snes9x2005_plus (ok)
snes9x2010 (ok)
stella (ok)
stella2014 (ok)
swanstation (ok)
tgbdual (ok)
theodore (ok)
tic80 (ok)
tyrquake (ok)
uae4arm (ok)
uzem (ok)
vbam (ok)
vecx (ok)
vice (ok)
virtualjaguar (ok)
xrick (ok)
yabasanshiro (ok)
yabause (ok)

Cores skipped are the ones not available for armhf.
In future revisions unneeded or not working cores may be excluded if any, to reduce addon size.

Regarding the sound issue I tried same test as yours and sound seems to be fine.
Which audio driver are you using? (Settings > Drivers) alsathread should work.
Otherwise you may activate verbose logging from addon or RA settnigs and share.

v1.4.0 link available in OP.
Various bug fixes, and added aarch64_to_arm_userspace option to build a aarch64 standalone package able to run on CoreELEC 32bit userspace, e.g. to try cores available for 64bit systems only (e.g. dolphin).

First of all, thank you @spleen1981 for this great addon. Hope the project becomes better known and you and others develop and maintain it for a long time.

I have the same sound problem like @eggnot. And no matter which sound driver I use, there is no sound there. I use a Tanix TX3 Box (S905X3) with CoreElec [19.4-Matrix_rc3].
I would like to provide a log. When i activate the Log in RA, where can i find it then?

You should find it here /storage/retroarch.log.
Make sure verbose log is enabled.

https://share.anoxinon.de/f.php?h=1PO0xf2wWkzObMx8SPi8F9&d=1
@spleen1981 hope this the right log.
I have activated both settings in the addon settings: Logging and verbose logging.

@beffi99 it may be an issue with VSync, though I’m not able to reproduce it (tried with Snes9x and same rom, both with alsathread and alsa). Don’t see any other strange thing in the log.

  • what is the output of cat /sys/class/display/mode?

  • try setting refresh rate to 50hz in Settings > Video > Output and see if it works

  • try disabling VSync in Settings > Video > Audio Sync and see if it works

  • try enabling Threaded Video in Settings > Video and see if it works

If none of the above works, you may share /storage/.config/retroarch/retroarch.cfg and /storage/dmesg.log , that you can create with dmesg > dmesg.log after the issue occurs.

v1.4.2 link available in OP.

  • Current refresh rate is now reported correctly in RA based on current video mode (before was always shown 60hz)

  • Added setting to have separate refresh rate for RA, regardless from settings in Kodi UI (before same refresh rate set in Kodi was used).

@spleen1981 nothing you mentioned works.
Output of cat /sys/class/display/mode is 1080p60hz when the new setting for separate refresh ist deactivated.
When its activated with 50hz the ouput is 1080p50hz. But it doesn’t matter it didn’t work.
Here are the dmesg.log and the retroarch config:
https://share.anoxinon.de/f.php?h=0Zv8tG8uQA4aGQdbNcWrEf&d=1

Try to select explicitly a device in Settings > Audio > Output (going right/left on the setting), one by one. See if with one of them is working
Theoretically the same device currently selected in Kodi is supposed to work.
You may also share your current /storage/.kodi/userdata/guisettings.xml (and advancedsettings.xml if any and if any specific audio setting is there).
Also you may try restoring Kodi audio settings to default if anything specific was changed.

Yeah, it works :partying_face:
I had to set hdmi:CARD=AMLAUGESOUND,DEV=0 as a audio device.

Nice to ear. I will consider to add an option to automatically set in RA the same audio device currently selected in Kodi (which is supposed to be the one to be used). Thanks for the feedbacks.

v1.4.3 link available in OP:

  • added support for pulseaudio
  • added option to sync retroarch audio settings with kodi (assumed to be the device actually in use)
  • fixed alsa bug which caused random freeze on quick menu game resume
  • retroarch updated to 1.10.1
2 Likes