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

    Need advice on a programming language and compiler for Raspiban

    Scheduled Pinned Locked Moved General Discussion and Gaming
    programming l
    6 Posts 3 Posters 188 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.
    • R
      r3dstar
      last edited by r3dstar

      Hi all,

      I want to write a programme that will run before emulationstation starts up, that can read an xls spreadsheet (can be another format), open and read binary files, and be able to create a text doc, specifically an xml file.

      I'm a Windows person with little Linux knowledge, can programme in C, C#, to be honest any language with Google alongside me.

      What I have working in excel at the moment is a VBA script that reads data on my games, and creates a gamelist.xml file for each system, with a custom description that contains the high score table for certain games. These come from the .hi files (these are the binary files) created by fbneo and mame, read from my Windows machine, through a shared folder. My VBA then kicks out each systems gamelist, and in emulationstation, I use the favourites system by default so every game is on one screen.

      However, the script has to be set off manually, so this is why I want to create a native Linux programme,to run this before emulationstation loads, so that each time it's turned on, the highscorss in the ES selection screen are viewable.

      Bit complex, but hope someone can help.

      Some images to show what the end result looks like.20220508_185043.jpg 20220508_185035.jpg 20220508_184943.jpg
      An example of the spreadsheet
      afc7be3c-d5d0-42ca-b38b-370916a35918-image.png
      An example of the VBA that reads the hiscore files.
      3536dbe5-e5a5-45bc-9387-80b831fd8ef5-image.png
      A snippet of the gamelist.xml
      14e1373e-c300-48e9-bf7e-98ec4906bd44-image.png

      1 Reply Last reply Reply Quote 0
      • SuperFromNDS
        SuperFromND
        last edited by

        I don't have much programming experience myself, but most Linux distros come with the GCC C/C++ compilers pre-installed, so one of those two languages is probably your best bet.

        Python is also very common (I think even RetroPie itself uses it here and there), but I've never used the language before, so I'm not sure of its capabilities.

        ▲▼▲▼▲▼▲▼▲▼
        IKEMEN Go
        SRB2Kart
        ▼▲▼▲▼▲▼▲▼▲

        1 Reply Last reply Reply Quote 2
        • mituM
          mitu Global Moderator
          last edited by

          For a scripting language, python is a good candidate, though the indentation based syntax can be off-putting at first. It's easy to get around and has native XML support. Plus, you can use it on Windows so it's easier to start prototyping on your PC then move to Linux.

          R 1 Reply Last reply Reply Quote 1
          • R
            r3dstar @mitu
            last edited by

            @mitu Thanks, I've done a bit of Python with Picos to drive a 331 RGB LED hex display and yes, the indentation wound me up, but I know I can adapt to it.
            As a newb to Linux, do you know how I would go about altering the loading of Raspbian so that my script would run before emulationStation starts so that the new gamelists are created before ES reads them?

            I'm going to write up the issues I've come across with hiscore data as I'm finding it interesting how different programmers deal with memory allocations as almost no game stores it in the same way. I am finding some consistencies which enables some games to use one script, but some games require their own custom scripts, character sets which is taking some time to figure out.

            mituM 1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator @r3dstar
              last edited by mitu

              @r3dstar said in Need advice on a programming language and compiler for Raspiban:

              As a newb to Linux, do you know how I would go about altering the loading of Raspbian so that my script would run before emulationStation starts so that the new gamelists are created before ES reads them?

              RetroPie uses the /opt/retropie/configs/all/autostart.sh file to start EmulationStation, you can use the same file to call your script before the front-end is started.

              R 1 Reply Last reply Reply Quote 1
              • R
                r3dstar @mitu
                last edited by

                @mitu Super smashing great!

                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.