Recalbox API not starting - RecalboxOS 4.0.1
-
@thehive /me knows definitely nothing to nodejs, npm, PM2 and such stuff ... And to tell you the truth, I'd rather get rid of PM2 and start the api with the nodejs bin (that's how recalbox-manager2 works, see /etc/init.d/S94manager)
I guess you do need the API ?
Concerning Daphne, have you made a package ? the recalbox-configgen part ? are you willing to contribute to the project ?
-
Anyway, some commands of the API are broken, so don't have regrets.
For example, if you planned to launch games through the API, forget it: if I remember well, ES is not re-launched when exiting a game. -
@Substring I've modified 2 or three configgen scripts, yes. It's quite a hack at the moment as there's no way of providing the many parameters that you can supply to Daphne - I just pass a set that suit me - so some hard coding sadly.
I would certainly be willing to help get this implemented properly, yes.Regarding the API, this is for something else I was working on. I was hoping I could get it working in 4.1 and you might know of a quick(ish) fix, but if not I suppose I could drop back to 4.0.1.
-
@thehive I pinged the api dev, no answer today, I'll try again tomorrow.
Regarding Daphne, i never tried to compile it. I see it uses SDL1, which saddens me quite much, but ok
Regarding configgen : most part of it is to setup controllers, eventually tweak some config file, but that's all. It's a real pain when config files are not documented, as it's some try'n'die progression to find out.
But I'd be glad to give you a hand for a "proper" integration, Buildroot is quite of a monster, we don't get that many contributors
-
@Substring I will gather together what the information regarding what I've changed and we can discuss. I didn't take notes as I went along so I'll need to work backwards. I don't actually think I changed too much though.
As an aside, I took a look at S94manager and I see that it also uses the API in some instances (for example launching a ROM), so some of those things are also broken in 4.1.
I've being playing around with the API node module and it runs on 4.1 directly as a node process with just a few minor fixes to to the solfegejs node module.
I am going to patch S95api to start this process without PM2. If you'd like me to share the changes I'm happy to do so. -
@thehive I'd be very glad to review your PR
@thehive said in Recalbox API not starting - RecalboxOS 4.0.1:
As an aside, I took a look at S94manager and I see that it also uses the API in some instances (for example launching a ROM), so some of those things are also broken in 4.1
I'm not sure to understand what you mean ... The new manager (v2) can't launch roms, that feature has been disable as far as I remember (@DjLeChuck can you confirm ?). Because launching roms is a little more complex than that (need to launch them with configgen, make sure ES is not running as so far i haven't been able to externally put ES to hibernate while the emulator is running)
-
I'm not sure to understand what you mean ... The new manager (v2) can't launch roms, that feature has been disable as far as I remember (@DjLeChuck can you confirm ?).
No, it's definitely not disabled, it's just broken, because the API is broken.
Now I've got the API working in 4.1 it will launch ROMS from within the V2 manager, but as @kjbstar pointed out, it fails to relaunch ES after the ROM is quit. I'm going to have a stab at fixing the way that the API handles ROM launching, because, as you point out, at the moment it's not performed by configgen. -
@thehive said in Recalbox API not starting - RecalboxOS 4.0.1:
I'm going to have a stab at fixing the way that the API handles ROM launching, because, as you point out, at the moment it's not performed by configgen.
Hmm, yes it is : https://github.com/recalbox/recalbox-api/blob/3aee79e43f60b59912a43b186f2d05afdad93085/config/config.js#L11
(or it's something else ?)The complex stuff is about ES. Did not found neither how to handle it properly.
-
@kjbstar to be honnest, the real deal is to make ES launch the rom for sooooo many reasons. The main one being that es knows how to launch properly configgen. I would dream of a dbus interface to tell es to launch a game, but that's sime complicated duty for my very lacking skills in C++.
The other trick i tried was linux signal handles to tell es to "hibernate" the same way it does when starting an emulator. Despite the "sleep" signal was working great, the wakeup was very painful, as es lost quite some textures. It would even crash after several launches.
Someone contacted me telle ng me he succeeded in adding a socket server in es to launch roms and it worked very good. He doesn't want to push his.commits because his code looks more like a proof of concept, but I do hope he'll contribute "soon"
-
@Substring said in Recalbox API not starting - RecalboxOS 4.0.1:
@kjbstar to be honnest, the real deal is to make ES launch the rom for sooooo many reasons. The main one being that es knows how to launch properly configgen. I would dream of a dbus interface to tell es to launch a game, but that's sime complicated duty for my very lacking skills in C++.
Yes that would be nice (and so logical finally).
The other trick i tried was linux signal handles to tell es to "hibernate" the same way it does when starting an emulator. Despite the "sleep" signal was working great, the wakeup was very painful, as es lost quite some textures. It would even crash after several launches.
Nice trick, I can imagine the disappointement during your tests...
On my side I ended up to brutally kill it, then re-launch it (and not even with S31emulationstation... I had a weird bug - reminder: my project is external and in php ahah).Someone contacted me telle ng me he succeeded in adding a socket server in es to launch roms and it worked very good. He doesn't want to push his.commits because his code looks more like a proof of concept, but I do hope he'll contribute "soon"
That would be great yes. Can't wait to test this
-
A few tries : using
kill -STOP <pid>
andkill -CONT <pid>
does stop/resume ES. But it still gets inputs from joypads. But that's something i should be able to manage by patching ES. But using this method has drawbacks : the image is still displayed (so i guess it will conflict with emulators ... Maybe we can get around withchvt
oropenvt
). I hope to have good news soonEdit: grrrrr .... SDL on pi doesn't use framebuffer, but GLES straight away; so playing with ttyX has no meaning ... I'm so disappointed ... But I still have ideas to try to make ES launch a rom (but i must admit it's more of some tricks than some pro programming)
-
Big thanks to @sevenx who gave me his code to add a socket server to ES and launch games through it. Looks like it runs rather fine after a few hours spent on it to improve and fix bugs. Once finished, i hope to have it accepted by his holyness DigitalLumberjack so that everyone can enjoy it.
Now I'm dead tired, need some sleep
-
Glory to @sevenx and @Substring \o/
4.1 will be awesome