RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Docs for developers

    Scheduled Pinned Locked Moved Ideas and Development
    retropie-setupdocumentationdocs
    8 Posts 3 Posters 3.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • meleuM
      meleu
      last edited by meleu

      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 in runcommand.sh (start/stop_joy2key) and copied. But actually I don't know what these crazy "1b5b44 1b5b43 1b5b41 1b5b42 0a 09" things do.

      • Useful topics
      • joystick-selection tool
      • rpie-art tool
      • achievements I made
      1 Reply Last reply Reply Quote 1
      • BuZzB
        BuZz administrators
        last edited by

        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"

        To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

        meleuM 1 Reply Last reply Reply Quote 1
        • meleuM
          meleu @BuZz
          last edited by

          @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. ;-)

          • Useful topics
          • joystick-selection tool
          • rpie-art tool
          • achievements I made
          1 Reply Last reply Reply Quote 0
          • W
            wetriner
            last edited by wetriner

            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.

            meleuM 1 Reply Last reply Reply Quote 1
            • meleuM
              meleu @wetriner
              last edited by meleu

              @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!

              • Useful topics
              • joystick-selection tool
              • rpie-art tool
              • achievements I made
              1 Reply Last reply Reply Quote 0
              • meleuM
                meleu
                last edited by

                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 have rp_module_something at the beginning.

                The rp_module_id and rp_module_descis easy to deduce. But the rp_module_menus and rp_module_flags isn't really clear.

                Well... My question is: what a script must have in its code to be in "Setup / Configuration" section?

                • Useful topics
                • joystick-selection tool
                • rpie-art tool
                • achievements I made
                1 Reply Last reply Reply Quote 0
                • BuZzB
                  BuZz administrators
                  last edited by BuZz

                  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)

                  To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                  meleuM 1 Reply Last reply Reply Quote 1
                  • meleuM
                    meleu @BuZz
                    last edited by

                    @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... :-)

                    • Useful topics
                    • joystick-selection tool
                    • rpie-art tool
                    • achievements I made
                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post

                    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.