Docs for developers
-
EDIT: docs for developers can be found here: https://retropie.org.uk/api/
This isn't exactly a feature request for final users, but for the folk who wants to contribute with development.
I think there is a lack of documentation for developers. I'm not talking about wikipages, some useful comments in the sources is enough.
For example: I was trying to add joystick capabilities to my script, I realized that it is made with
joy2key.py
, but I don't know how to read python code (yet! :-) ) and didn't find any documentation on how to use joy2key. Fortunately I found some good functions inruncommand.sh
(start/stop_joy2key) and copied. But actually I don't know what these crazy "1b5b44 1b5b43 1b5b41 1b5b42 0a 09" things do. -
I never wrote joy2key with the intention for it to be used by others. Although I do intend to document the module functions a bit more in the future, it isn't a priority now, as if I am doing that I am not improving the software, and right now there are a lot of internal changes going on.
if you look at the sourcecode you should be able to work it out. Also google it and you will find some more info as others have used it in the past. Basically the parameters are ascii output chars for "up down left right button0 button1 etc"
-
@BuZz said in Docs for developers:
I never wrote joy2key with the intention for it to be used by others.
How can you say it about something so useful?!?!?! :-D
if you look at the sourcecode you should be able to work it out. Also google it and you will find some more info as others have used it in the past.
Yeah! This is what I did. ;-)
-
I wrote a bit of code that dealt with joy2key in the wikiview script. Basically it just kills the existing joy2key process and restarts it with different keys for lynx, then repeats the process to get back to default for the menu. As noted when it was merged, it's not the ideal way to accomplish something like that, but it does work. There's likely a much simpler elegant solution to it that I didn't think of.
The pages I found that had what I needed then were here and here. A better search could probably bring up a more univeral document, but I was searching without any reference as to what I was looking for, and pretty much took what I could find.
-
@wetriner said in Docs for developers:
I wrote a bit of code that dealt with joy2key in the wikiview script.
Yeah, I saw it.
And I saw in
runcommand.sh
an elegant approach. The use of functions for start and stop joy2key. Maybe you like to take a look at it.It was very useful in my RetroPie input selection.
The pages I found that had what I needed then were here and here.
Thanks for that references!
-
As I have not found a better place, I'll ask a question about development here. If the @administrators think it's better, I'll start a new thread at "Help and Support" category (I'm not sure if mix user related questions with development questions is a good idea).
Let's say I want to code something to add to the "Setup / Configuration" section of retropie_setup. I saw the scripts in
RetroPie-Setup/scriptmodules/supplementary
, and they all haverp_module_something
at the beginning.The
rp_module_id
andrp_module_desc
is easy to deduce. But therp_module_menus
andrp_module_flags
isn't really clear.Well... My question is: what a script must have in its code to be in "Setup / Configuration" section?
-
Can ignore flags (this is for excluding modules from certain platforms etc and other things), menus should be "3+function" to show it in menu 3 (it will call function_moduleid) when selected
Note I won't accept any PR for new stuff currently, as I'm in the middle of a major rewrite of various parts (eg rp_module_menus is gone)
-
@BuZz
OK. I'll wait. I was intending to read the current code to understand how stuff works and contribute in some way. But if it is being rewriten, I think it's better to wait a little longer. Hope to see a little more commented code... :-)
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.