EmuELEC: Retro Emulation Kodi Addon for CoreELEC!

This is my controls.ini information

[ControlMapping]
Up = 1-19,10-19
Down = 1-20,10-20
Left = 1-21,10-21
Right = 1-22,10-22
Circle = 1-52,10-190
Cross = 1-54,10-189
Square = 1-29,10-191
Triangle = 1-47,10-188
Start = 1-62,10-197
Select = 1-66,10-196
L = 1-45,10-194
R = 1-51,10-192
An.Up = 1-37,10-4003
An.Down = 1-39,10-4002
An.Left = 1-38,10-4001
An.Right = 1-40,10-4000
Analog limiter = 1-60
RapidFire = 1-59
Unthrottle = 1-61
SpeedToggle = 1-68
Pause = 1-111,10-4
Rewind = 1-67

the fisrt time I start the script.sx05re.launcher everything works great, but after I poweroff the tvbox or restart the system the controller does not work anymore, I need to open the script.sx05re.launcher again so I can play with my ps3 controller psp, everything elso works great, just having problems with the psp controller setup, witch log do you need? to find it and sent it to you, thanks

Not sure I follow, you need to open the launcher every time you want to play PSP, or how else are you running the PSP emulator?

You mention the first time you run it it works, without any config? and the second time it won’t work?

I’m using a ps3 clone (shanwan) controller with my tvbox s905x without a problem, I follow the first step of this lakka tutorial

Enabling bluetooth

Enable and start bluetooth service

touch /storage/.cache/services/bluez.conf
systemctl enable bluetooth
systemctl start bluetooth

after that I only plugged the controller to the tvbox for a few seconds, unplug an then the controller was pair with my device, then I use the configuration input from ES and works great, I hope this help you with your ps3 controllers

Yes, psp emulator works fine, just having problem with the controllers setup for the psp emulator, the first time I setup the controller then I backup the file controls.ini from the /storage/.config/ppsspp/PSP/SYSTEM and then replace the same file that is at the /storage/.kodi/addons/script.sx05re.launcher/config/ppsspp/PSP/SYSTEM, I did the same thing with the ppsspp.ini , but some how the configuration file controls.ini only work the first time, If I reboot the system does not work anymore, I need to reopen the script launcher so I can use the controller again without anyproblem, I hope you understan what I try to mean, sorry for my bad english

I tested it and it works fine, no configuration needed. but I am not going to include it just yet, maybe I will make a script to download it later, as I don’t have permission to include the binary

Here is a quick (untested) script to install drastic

edit: new version https://gist.github.com/shantigilbert/f95c44628321f0f4cce4f542a2577950

so, drastic is starting from SSH…
but no controller is working, an some pictures error…

don’t know how to stop kodi.

You keep saying this

I am not sure what you mean, every time you want to run a PSP game (or any other game) you NEED to open the script launcher (aka Sx05RE Add-on).

as I understand right now you don’t seem to be running the script launcher every time, how are you running the PSP emulator?

BTW your English is fine, English is not my first language either :slight_smile:

Stop kodi by typing this

systemctl stop kodi

or try my script, then run the Sx05RE add-on

mhh now have in emustation the NDS
but when i start a game just got blackscreen.

if i start from ssh i got a some pictures error liek vertikal black lines… :confused:

hmm try this

log in using ssh while in Kodi, then run

systemctl stop kodi
cd /storage/.emulationstation/scripts/drastic
./drastic /storage/roms/nds/[romfile].nds

and paste the result

Ok, will try it tomorrow :slight_smile:

This is the log file,

Sx05RE Run Log
1st parameter: PSP
2nd Parameter: /storage/roms/psp/Metal Slug XX.iso
3rd Parameter:
4th Parameter:
Run Command is:
/usr/bin/ppsspp.sh /storage/roms/psp/Metal Slug XX.iso
Emulator Output is:
sh: setterm: command not found
12:58:661 Core/Config.cpp:1083 I[LOADER]: Loading controller config: /storage/.config/ppsspp/PSP/SYSTEM/controls.ini
12:58:718 Core/Config.cpp:1169 I[LOADER]: Config saved: ‘/storage/.config/ppsspp/PSP/SYSTEM/ppsspp.ini’
12:58:721 Core/Config.cpp:1182 I[LOADER]: Controller config saved: /storage/.config/ppsspp/PSP/SYSTEM/controls.ini
Vulkan is not available.
I: Config.cpp:491: Longest display side: -1 pixels. Choosing scale 1
I: NativeApp.cpp:571: Boot filename found in args: ‘/storage/roms/psp/Metal Slug XX.iso’
Pixels: 1920 x 1080
Virtual pixels: 1920 x 1080
I: gpu_features.cpp:171: GPU Vendor : ARM ; renderer: Mali-450 MP version str: OpenGL ES 2.0 ; GLSL version str: OpenGL ES GLSL ES 1.00
loading control pad mappings from gamecontrollerdb.txt: SUCCESS!
Control pad device 0 not supported by SDL game controller database, attempting to create default mapping…
Added default mapping ok
found control pad: Sony PLAYSTATION®3 Controller, loading mapping: SUCCESS, mapping is:
050000004c0500006802000000000000,Sony PLAYSTATION®3 Controller,x:b3,a:b0,b:b1,y:b2,back:b8,guide:b10,start:b9,dpleft:b15,dpdown:b14,dpright:b16,dpup:b13,leftshoulder:b4,lefttrigger:a2,rightshoulder:b6,rightshoulder:b5,righttrigger:a5,leftstick:b7,leftstick:b11,rightstick:b12,leftx:a0,lefty:a1,rightx:a3,righty:a4
found control pad: DragonRise Inc. Generic USB Joystick , loading mapping: SUCCESS, mapping is:
03000000790000000600000010010000,DragonRise Inc. Generic USB Joystick ,platform:Linux,x:b3,a:b2,b:b1,y:b0,back:b8,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a3,righty:a4,
pad 1 has been assigned to control pad: Sony PLAYSTATION®3 Controller
I: NativeApp.cpp:772: NativeInitGraphics
found control pad: DragonRise Inc. Generic USB Joystick , loading mapping: SUCCESS, mapping is:
03000000790000000600000010010000,DragonRise Inc. Generic USB Joystick ,platform:Linux,x:b3,a:b2,b:b1,y:b0,back:b8,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a3,righty:a4,
12:58:890 UI/DiscordIntegration.cpp:55 I[SYSTEM]: Discord connection initialized
12:59:169 Core/Config.cpp:1412 I[LOADER]: Failed to read /storage/.config/ppsspp/PSP/SYSTEM/ULUS10495_ppsspp.ini. No game-specific settings found, using global defaults.
12:59:170 Core/System.cpp:337 I[BOOT]: PPSSPP v1.7.5-490-gc28bbde05
12:59:176 Core/MemMap.cpp:292 I[MEMMAP]: Memory system initialized. Base at 0xdda62000 (RAM at @ 0xe5a62000, uncached @ 0xe5a62000)
12:59:177 ARM/ArmJit.cpp:114 I[JIT]: ARM JIT initialized: 15 MB of code space
12:59:178 Core/PSPLoaders.cpp:197 I[LOADER]: ULUS10495 : METAL SLUG XX
12:59:178 Core/Config.cpp:1412 I[LOADER]: Failed to read /storage/.config/ppsspp/PSP/SYSTEM/ULUS10495_ppsspp.ini. No game-specific settings found, using global defaults.
12:59:179 Core/PSPLoaders.cpp:257 I[LOADER]: Loading disc0:/PSP_GAME/SYSDIR/EBOOT.BIN…
12:59:179 HLE/sceKernelMemory.cpp:434 I[SCEKERNEL]: Kernel and user memory pools initialized
12:59:346 HLE/sceKernel.cpp:154 I[SCEKERNEL]: Kernel initialized.
12:59:427 Core/Config.cpp:1169 I[LOADER]: Config saved: ‘/storage/.config/ppsspp/PSP/SYSTEM/ppsspp.ini’
12:59:434 Core/Config.cpp:1182 I[LOADER]: Controller config saved: /storage/.config/ppsspp/PSP/SYSTEM/controls.ini
12:59:532 Util/BlockAllocator.cpp:392 I[SCEKERNEL]: -----------
12:59:532 Util/BlockAllocator.cpp:396 I[SCEKERNEL]: Block: 08800000 - 08804000 size 00004000 taken=1 tag=usersystemlib
12:59:532 Util/BlockAllocator.cpp:396 I[SCEKERNEL]: Block: 08804000 - 08d8a400 size 00586400 taken=1 tag=ELF/simple
12:59:532 Util/BlockAllocator.cpp:396 I[SCEKERNEL]: Block: 08d8a400 - 0a000000 size 01275c00 taken=0 tag=(untitled)
12:59:533 Util/BlockAllocator.cpp:398 I[SCEKERNEL]: -----------
12:59:533 HLE/sceKernelModule.cpp:1255 I[LOADER]: Module simple: 088df2d0 08881890 088818a8
12:59:606 HLE/ReplaceTables.cpp:1435 I[HLE]: Replaced memcpy at 0880d2fc with hash 9e6ce11f9d49f954
12:59:606 HLE/ReplaceTables.cpp:1435 I[HLE]: Replaced memmove at 0880d420 with hash d019b067b58cf6c3
12:59:607 HLE/ReplaceTables.cpp:1435 I[HLE]: Replaced memset at 0880d6dc with hash fe5dd338ab862291
12:59:609 HLE/ReplaceTables.cpp:1435 I[HLE]: Replaced memcpy at 08849c2c with hash 9e2941c4a5c5e847
12:59:610 HLE/sceKernelModule.cpp:1348 I[LOADER]: Exporting ent 0 named simple, 2 funcs, 4 vars, resident 08881aac
12:59:612 HLE/sceKernelModule.cpp:1658 I[LOADER]: Module entry: 08804000
12:59:622 root N[BOOT]: UI/EmuScreen.cpp:293 Loading /storage/roms/psp/Metal Slug XX.iso…
12:59:639 root I[SCEKERNEL]: HLE/sceKernelThread.cpp:1995 276=sceKernelCreateThread(user_main, 08804114, 00000020, 262144, 80004000, 00000000)
12:59:642 root I[SCEKERNEL]: HLE/sceKernelThread.cpp:2084 0=sceKernelStartThread(276, 33, 09fffed0)
12:59:643 root I[SCEKERNEL]: HLE/sceKernelThread.cpp:2123 __KernelReturnFromThread: 0
12:59:653 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: TotalFreeMemSize 19028992
12:59:655 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: MaxFreeMemSize 19024896
12:59:655 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout:
12:59:656 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout:
12:59:658 user_main I[SCEUTIL]: HLE/sceUtility.cpp:313 0=sceUtilityLoadModule(00000100)
12:59:678 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: Load Module: SCE_UTILITY_MODULE_NET_COMMON
12:59:679 user_main I[SCEUTIL]: HLE/sceUtility.cpp:313 0=sceUtilityLoadModule(00000101)
12:59:711 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: Load Module: SCE_UTILITY_MODULE_NET_ADHOC
12:59:712 user_main I[SCEUTIL]: HLE/sceUtility.cpp:313 0=sceUtilityLoadModule(00000300)
12:59:727 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: Load Module: SCE_UTILITY_MODULE_AV_AVCODEC
12:59:729 user_main I[SCEUTIL]: HLE/sceUtility.cpp:313 0=sceUtilityLoadModule(00000302)
12:59:761 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: Load Module: SCE_UTILITY_MODULE_AV_LIBATRAC3PLUS
12:59:761 user_main I[SCEUTIL]: HLE/sceUtility.cpp:313 0=sceUtilityLoadModule(00000500)
12:59:778 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: Load Module: SCE_UTILITY_MODULE_NPDRM
12:59:780 user_main I[SCEMODULE]: HLE/sceKernelModule.cpp:1074 ~SCE module, skipping header
12:59:780 user_main I[SCEMODULE]: HLE/sceKernelModule.cpp:1088 Loading module sceFont_Library with version 0101, devkit 05000010
12:59:781 user_main I[LOADER]: ELF/PrxDecrypter.cpp:309 Missing key 5B, cannot decrypt module
12:59:782 user_main I[SCEMODULE]: HLE/sceKernelModule.cpp:1883 279=sceKernelLoadModule(name=disc0:/PSP_GAME/USRDIR/MODULE/LIBFONT.PRX,flag=00000000,(…))
12:59:783 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: Load Module: LIBFONT.PRX
12:59:784 user_main I[SCEMODULE]: HLE/sceKernelModule.cpp:1915 sceKernelStartModule(279,asize=00000000,aptr=00000000,retptr=00000000,00000000): faked (undecryptable module)
12:59:785 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: Start Module: LIBFONT.PRX
12:59:788 user_main I[SCEKERNEL]: HLE/sceKernelThread.cpp:1995 282=sceKernelCreateThread(SceWaveMain, 08846430, 00000010, 512, 00000000, 00000000)
12:59:789 user_main I[SCEKERNEL]: HLE/sceKernelThread.cpp:2084 0=sceKernelStartThread(282, 12, 0893da48)
12:59:794 user_main W[SCENET]: HLE/sceNet.cpp:116 sceNetInit(poolsize=327680, calloutpri=18, calloutstack=0, netintrpri=18, netintrstack=0) at 0886454c
12:59:795 user_main I[SCENET]: HLE/sceNetAdhoc.cpp:164 sceNetAdhocInit() at 08864574
12:59:796 user_main I[SCEKERNEL]: HLE/sceKernelThread.cpp:1995 283=sceNetAdhocInit()
12:59:797 user_main I[SCENET]: HLE/sceNetAdhoc.cpp:190 sceNetAdhocctlInit(19456, 20, 08af469c) at 088645d8
12:59:798 user_main W[SCENET]: HLE/sceNetAdhoc.cpp:1029 UNTESTED sceNetAdhocctlAddHandler(8864444, 0): added handler 0
12:59:799 user_main W[SCENET]: HLE/sceNetAdhoc.cpp:2567 sceNetAdhocMatchingInit(65536) at 08864640
12:59:802 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: state change: [TOP] >>> [TOP]
12:59:807 user_main I[SCEKERNEL]: HLE/sceKernelThread.cpp:1995 284=sceKernelCreateThread(CRI ADX Audio, 08826aa0, 00000016, 32768, 00000000, 00000000)
12:59:809 user_main I[SCEKERNEL]: HLE/sceKernelThread.cpp:2084 0=sceKernelStartThread(284, 0, 00000000)
12:59:810 user_main I[SCEKERNEL]: HLE/sceKernelThread.cpp:1995 285=sceKernelCreateThread(CRI ADX File, 08826b18, 00000018, 16384, 00000000, 00000000)
12:59:811 user_main I[SCEKERNEL]: HLE/sceKernelThread.cpp:2084 0=sceKernelStartThread(285, 0, 00000000)
12:59:815 user_main I[SCEKERNEL]: HLE/sceKernelThread.cpp:1995 286=sceKernelCreateThread(CRI Wave out, 0883f2e8, 00000010, 16384, 00000000, 00000000)
12:59:820 user_main I[SCEKERNEL]: HLE/sceKernelThread.cpp:2084 0=sceKernelStartThread(286, 0, 00000000)
12:59:835 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: PSPCI: “disc0:/PSP_GAME/USRDIR/BGM.BIN” Opened.(sceIoOpen fd = 4 size = 31502336)
12:59:835 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: PSPCI: “disc0:/PSP_GAME/USRDIR/DATA.BIN” Opened.(sceIoOpen fd = 5 size = 319940608)
12:59:836 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: PSPCI: Total 2 files.
12:59:877 user_main I[SCEKERNEL]: HLE/sceKernelThread.cpp:1995 292=sceKernelCreateThread(CRI ADXATR Waveout Thread1, 0884947c, 00000010, 16384, 00000000, 00000000)
12:59:895 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout:
12:59:896 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: CreateHeap Before
12:59:898 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: TotalFreeMemSize 18663168
12:59:899 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: MaxFreeMemSize 18659584
12:59:901 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: Create New Heap, Size = 18462976
12:59:903 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout:
12:59:903 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: CreateHeap After
12:59:904 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: TotalFreeMemSize 200192
12:59:905 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: MaxFreeMemSize 196608
12:59:906 user_main I[HLE]: HLE/scePspNpDrm_user.cpp:9 call sceNpDrmSetLicenseeKey(08888ffc)
12:59:909 user_main E[FILESYS]: FileSystems/DirectoryFileSystem.cpp:61 DirectoryFileSystem::OpenFile: FAILED, 2 - access = 1
12:59:909 user_main E[SCEIO]: HLE/sceIo.cpp:1393 80010002=sceIoOpen(ms0:/PSP/GAME/ULUS10495/MSXXLEONA.EDAT, 40000001, 00000000)
12:59:912 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: EDATA file : open error 0x80010002
12:59:913 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: leona disable
12:59:921 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout:
12:59:922 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: AlvionMain run start
12:59:965 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: PSPHeapAlloc size = 10760192, addr = 0x9537be0
12:59:976 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: taskInit {
12:59:977 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: PSPHeapAlloc size = 90144, addr = 0x9521bb8
12:59:979 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: rsvInit : 0x09521bb8 : 0x00016020
12:59:980 user_main I[SCEIO]: HLE/sceIo.cpp:1031 stdout: }

I think I know what’s the problem now, my ps3 controller is not in the gamecontrollerdb.txt file, so I need to add it to the controllers data base so the controller work fine, because if it isnt in the data base get a wrong configuration and replace the good configuration,

ahh let me know if it fixes your problem

try this new version of the script

make sure you remove the drastic entry from es_systems.cfg before

I think’s that the problem but I can’t acces to the file gamecontrollerdb.txt because it’s on /usr/bin/assets/ and i’ts read only file system so I can’t edit or delete the file, so I don’t know how to add my controller to the data base , can you help me with that?

oh, are you not running the add-on version over CoreELEC?? now I understand more.

It should not be in /usr/bin unless you are running the Sx05RE standalone version

it should be in

/storage/.kodi/addons/script.sx05re.launcher/bin/assets/

Yes, I’m using your add-on version, I download your image file then after the first boot it I add the zip file through kodi and install the addon, I can access the file and change the file at /storage/.kodi/addons/script.sx05re.launcher/bin/assets/ when I open the script trough the kodi addons, works great, but if I reboot or poweroff the tvbox when emulationstation start again the system take again the default configuration from the /usr/bin/assets, only work the first time when I run the emulationstation addon from kodi otherwise use the default configuration from /usr/bin/assets , how can I fix that ? thanks for your patience with me and this problem

Here is the thing, and I am sorry it might have been my fault for not explaining it better.

There are 2 versions, Sx05RE Add-on version and Sx05RE stand alone version.

The add-on version is meant to be installed on top of CoreELEC
The standalone does NOT need the add-on as everything is already installed there.

If I understand correctly you are installing the add-on version on top of the standalone version, which now makes sense why you kept saying that you had to run the script.

And now you will be able to edit the file in /storage/.kodi/addons/script.sx05re.launcher/bin/assets/

I am sorry for the confusion