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

Development of module-script generator for lr-mess, lr-mame and mame standalone

Scheduled Pinned Locked Moved Ideas and Development
developmentlr-messmamelr-mamescripts
2.2k Posts 35 Posters 6.1m 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.
  • J
    jamrom2 @Folly
    last edited by 5 Nov 2021, 14:17

    @folly

    Ok, sounds good. Looking forward to it.

    F 1 Reply Last reply 5 Nov 2021, 15:17 Reply Quote 0
    • F
      Folly @jamrom2
      last edited by Folly 11 May 2021, 16:24 5 Nov 2021, 15:17

      @jamrom2

      You can test.

      Took me a bit longer as I had a crash.
      Above that, coco3 did not accept extra ram when the floppy controller is used.
      It seems it's only possible to add one device in the slot.
      But the dos os-9 autoboot works !

      J 1 Reply Last reply 5 Nov 2021, 18:12 Reply Quote 0
      • J
        jamrom2 @Folly
        last edited by 5 Nov 2021, 18:12

        @folly happy to. Where is the script? same as above?

        F 1 Reply Last reply 5 Nov 2021, 20:41 Reply Quote 0
        • F
          Folly @jamrom2
          last edited by 5 Nov 2021, 20:41

          @jamrom2

          Yes this one :

          https://github.com/FollyMaddy/RetroPie-Share/blob/fe7efedc915c509feaa32a9bf530b5811d37e2ff/00-workdir-00/add-mamedev-systems-0237.sh

          J 1 Reply Last reply 6 Nov 2021, 13:11 Reply Quote 1
          • J
            jamrom2 @Folly
            last edited by 6 Nov 2021, 13:11

            @folly

            Just finished testing a bunch of different .Coco 2 cass and .ccc games. Works perfectly! Everything is in one list, and all that needs to be done is to select the correct version of the emulator to run the game.

            The auto feature is perfect. Aside from the fact that "RUN" needs to be entered for BASIC built games. There is no input required. Very good! That's exactly what a gamer using Retropie wants... one click of a button and the game comes up.

            You just game the Tandy and Dragon systems a whole new life!

            F 1 Reply Last reply 6 Nov 2021, 18:40 Reply Quote 1
            • F
              Folly @jamrom2
              last edited by 6 Nov 2021, 18:40

              @jamrom2 @DTEAM

              Yes, some improvements, we did it again.

              Yesterday I discovered some nice stuff.
              With the next update it's possible to add, somewhat, multiple commands in the "comma separate menu lines".
              That way it should be possible to add small multi command script lines within the menu lines without having to make separate functions.
              Hopefully it will be useful ;-)

              J 1 Reply Last reply 7 Nov 2021, 00:42 Reply Quote 0
              • J
                jamrom2 @Folly
                last edited by 7 Nov 2021, 00:42

                @folly I'm looking forward to what masterful scripting you come up with next!

                F 2 Replies Last reply 8 Nov 2021, 11:14 Reply Quote 0
                • J jamrom2 referenced this topic on 8 Nov 2021, 00:38
                • F
                  Folly @jamrom2
                  last edited by Folly 11 Aug 2021, 12:11 8 Nov 2021, 11:14

                  @DTEAM @jamrom2

                  I have found neath way to push special characters trough the whole system so they will end up in the emulators.cfg as ascii hex-code and are accepted to be executed.

                  As explained earlier, some special characters can't be added the normal way with escaping the char with multiple \ .
                  This is because the csv lines are quoted with " and the delimiter , is used to separate the "cells", also an extra * delimiter is used within "cells" to create a virtual 3D "worksheet".
                  Above that, runcommand.sh has also a problem with " .
                  That is why some of these characters aren't accepted the normal way.

                  My solution enables us to add autoboot lines that contain * or " or , or other characters that are problematic.
                  Adding specials characters is possible using ascii hex-code, see examples :
                  " => \'\\\x22\'
                  * => \'\\\x2a\'
                  , => \'\\\x2c\'
                  (link to more codes : https://www.cyberciti.biz/faq/unix-linux-sed-ascii-control-codes-nonprintable/)

                  I think and hope it's a very stable solution.

                  So now we can work on adding some more working autoboot lines ;-)

                  J 1 Reply Last reply 9 Nov 2021, 00:48 Reply Quote 1
                  • F
                    Folly @jamrom2
                    last edited by Folly 11 Sept 2021, 09:06 8 Nov 2021, 12:52

                    @jamrom2

                    I updated the script with a few autoboot lines to test.
                    https://github.com/FollyMaddy/RetroPie-Share/blob/347031e45496394e547e53435f86ec3f9c9892ab/00-workdir-00/add-mamedev-systems-0237.sh

                    I added some that use special charachters :

                    • 2 for electron
                    • 1 for coco2
                    • 1 for coco3
                    • 1 for dragon32

                    The coco2/coco3/dragon32 lines are for -flop1 and do an autoboot with :
                    load"%BASENAME%",r or run"%BASENAME%"

                    Take for example pacman.zip the %BASENAME% generated in the runcommand loading process becomes pacman.
                    So initially I wanted to add .bas to that will create this load command :
                    load"pacman.bas",r
                    (with this file it worked OOB for me)
                    But working with dragon32 I saw that you can also run .bin files with the run command.
                    To make it more flexible and universal the best way, I think, is to add the full .bas or .bin filename to the .zip file.

                    Example (used with coco3/dragon32 and -flop1) :

                    • filename is called : pacman.zip
                    • filename on the disk : pacman.bas
                    • rename pacman.zip to pacman.bas.zip
                    • then the basename is : pacman.bas
                    • the basename is then used in the autoboot command

                    So now we are very flexible as we can run .bas,.ldr or .bin or whatever runs with the command used for -flop1 :
                    run"%BASENAME%"
                    or
                    load""%BASENAME%",r

                    If the filename is compatible with above loading commands then we just have to check what filename is on the disk and rename the filename, that we are running with emulationstation.

                    Hope you understand how it works.

                    Happy testing :-)

                    Btw.
                    The names in the emulators.cfg still contain the ascii hex-code, for now there is no way around this.
                    and ...
                    I forgot this testline show konamih array !!! (I remove it later)
                    If entered, it loads the database and then waits for a user input. ( no crash, although you would think so !!!)
                    Typing, for example, @konamih , @tigerh (or something else) will output all the konmaih or all tigerh one by one and then return to the menu again.

                    1 Reply Last reply Reply Quote 0
                    • J
                      jamrom2 @Folly
                      last edited by 9 Nov 2021, 00:48

                      @folly that's actually a really good idea as long as it's read that way by runcommand.sh.

                      Do you have to add any additional coding to the run command.sh file or does it just accept the ASCII code?

                      F 2 Replies Last reply 9 Nov 2021, 08:16 Reply Quote 0
                      • F
                        Folly @jamrom2
                        last edited by Folly 11 Sept 2021, 08:58 9 Nov 2021, 08:16

                        @jamrom2

                        It accepts it.
                        It just works out of the box.

                        What I just found is even better.
                        We are able to use symbolic links.
                        Here is an example for dragon32 :
                        Here I use the file balldozr.zip (from dragon_flop).
                        Running it in dragon32 and using "DIR" we see that we have to make sure we run balldoze.bin .
                        In order to get it working we could rename balldozr.zip to balldoze.bin.zip .
                        But we can also make a symbolic link to balldozr.zip, which is called balldoze.bin.zip .
                        That is perhaps even better as :

                        • we keep the original file
                        • we can make more links to one file if it contains more games on the disk
                        • symbolic links don't use a lot of space
                        • if we have gamelists with media we still can see this if we hover above the original file in emulationstation
                        • we could just make a sub-directory just next to the original game that contain the symbolic links so it will be displayed, in emulationstation, just above each other.

                        You can make symbolic links quite easy in the terminal.
                        With this example the symbolic link comes in the same directory as the original file.

                        #go the directory where balldozr.zip is
                        cd /home/pi/RetroPie/roms/dragon32/dragon_flop
                        #make a symbolic link with the name balldoze.bin.zip
                        #the full path of the original file is necessary, that way we create a soft-link with full link information
                        #this link can then be copied to a sub-directory
                        ln -s ~/RetroPie/roms/dragon32/dragon_flop/balldozr.zip balldoze.bin.zip

                        Now you just run balldoze.bin.zip with the installed run"%BASENAME%" autobootline of dragon32.

                        1 Reply Last reply Reply Quote 0
                        • F
                          Folly @jamrom2
                          last edited by Folly 11 Sept 2021, 10:39 9 Nov 2021, 08:45

                          @jamrom2

                          I made a sub-directory balldozr-auto-run and copied the link to that directory.

                          pi@raspberrypi:~/RetroPie/roms/dragon32/dragon_flop $ find -name "ball*"
                          ./balldozr-auto-run
                          ./balldozr-auto-run/balldoze.bin.zip
                          ./balldozr.zip
                          
                          

                          In emulationstation it will look like this (original file is bright, sub directory is normally gray and now highlighted):
                          2021-11-09-095256_1600x900_scrot.png 2021-11-09-092147_1600x900_scrot.png
                          2021-11-09-100345_800x600_scrot_resized.png 2021-11-09-100257_800x600_scrot_resized.png

                          Perhaps it goes to far for you but we can even automate it a bit, creating the sub-directories for all original files containing the symbolic links with the original filename, so we don't have to do it all manually.

                          pi@raspberrypi:~/RetroPie/roms/dragon32/dragon_flop $ cd /home/pi/RetroPie/roms/dragon32/dragon_flop
                          pi@raspberrypi:~/RetroPie/roms/dragon32/dragon_flop $ for zip in *.zip;do mkdir -p "$(basename $zip .zip)-auto-run";ln -s "$(pwd)/$zip" "$(pwd)/$(basename $zip .zip)-auto-run/$zip" ;done
                          

                          After that we can run one by one and rename the soft-links one by one.

                          If we have done that, then we have data and it would also be possible to automate the whole process.

                          J 1 Reply Last reply 9 Nov 2021, 13:09 Reply Quote 0
                          • J
                            jamrom2 @Folly
                            last edited by 9 Nov 2021, 13:09

                            @folly ok... I haven't loaded this yet, but reading all this over a few times I think we can organize it much like the DOS games are.

                            Have you tried DOSbox_Staging? It's similar to what you are doing with this. What happenes is you put your actal games in another folder (I called mine DOS) and then all the config files in another that have an [autoexec] section in them that tells DosBox where to find the game file and how to run the game.

                            Maybe this can be the case with these as well. Is there a way to have a file sitting in the Dragon32 rom folder acting as a pointer. Much like you did with this, but not the actual game file. Maybe an *.sh file that MESS can read as the starting point. It then tells MESS where the game is to run and the command needed to run it.

                            I say this because it will be confusing to many to have to specifically name each game and to have subdirectories in the ROM folder.

                            Originally DosBox ran this way untl it was figured out that all that was needed was just a config file. ES then sees only the .cfg files and you can build your game list with graphics on that... keeping it clean and organized. Meanwhile... the game itself is in a completely hidden folder ES never sees.

                            J F 2 Replies Last reply 9 Nov 2021, 13:12 Reply Quote 0
                            • J
                              jamrom2 @jamrom2
                              last edited by 9 Nov 2021, 13:12

                              So the "balldozer.bin.zip" would be in the main Dragon32 ROM folder as a link only. Pressing on that will point to the game that would be in a completely separate rom folder named "Dragon32game" or something like that... so the two are separated and ES will only use the link folder as the pointer.

                              J F 2 Replies Last reply 9 Nov 2021, 13:21 Reply Quote 0
                              • J
                                jamrom2 @jamrom2
                                last edited by 9 Nov 2021, 13:21

                                /home/pi/RetroPie/roms/dragon_flop

                                Would be perfect for storing the actual games. ES does not have that as a theme folder and it's basically hidden from it.

                                Then the link can still be created from there, but placed in /home/pi/RetroPie/roms/dragon32. es_systems.cfg would not need to be adjusted either as it will read the .zip file... or whatever format we can use.

                                F 1 Reply Last reply 9 Nov 2021, 14:11 Reply Quote 0
                                • F
                                  Folly @jamrom2
                                  last edited by Folly 11 Sept 2021, 14:24 9 Nov 2021, 14:07

                                  @jamrom2 said in Development of module-script generator for lr-mess and mame standalone:

                                  @folly ok... I haven't loaded this yet, but reading all this over a few times I think we can organize it much like the DOS games are.

                                  Have you tried DOSbox_Staging? It's similar to what you are doing with this. What happenes is you put your actal games in another folder (I called mine DOS) and then all the config files in another that have an [autoexec] section in them that tells DosBox where to find the game file and how to run the game.

                                  Maybe this can be the case with these as well. Is there a way to have a file sitting in the Dragon32 rom folder acting as a pointer. Much like you did with this, but not the actual game file. Maybe an *.sh file that MESS can read as the starting point. It then tells MESS where the game is to run and the command needed to run it.

                                  I say this because it will be confusing to many to have to specifically name each game and to have subdirectories in the ROM folder.

                                  I have used other DOSbox emulators, and I know you can make .conf files.
                                  And indeed you push your original files outside the normal rom directory so emulationstation will not see them.
                                  I had eXoDos which worked somewhat the same.

                                  Well, the original file doesn't have to be in the normal rom folder.
                                  As long as the link is ok and in the normal rom folder then it will be no problem.

                                  Sub-directories aren't necessary too, but it helps to see where the .bas or .bin files belong to.
                                  Otherwise it's getting a "mess".

                                  With this, I think, it's not possible to make config files and it's not ideal to make .sh files either.
                                  This is because we always have to run the game before we know what .bas or .bin we have to run.
                                  Making a config file or .sh file will not change anything because always have to look first into the "disk" in order to know which file has to be run.

                                  EDIT:
                                  You have to remember, there are many other systems that can benefit from the autoboot option.
                                  But not all game files are in the same format.
                                  So theoretically, if we could make a script that would extract the filenames then it's for every system different making such a project so huge that it is impossible to make, I think.

                                  1 Reply Last reply Reply Quote 0
                                  • F
                                    Folly @jamrom2
                                    last edited by 9 Nov 2021, 14:09

                                    @jamrom2 said in Development of module-script generator for lr-mess and mame standalone:

                                    So the "balldozer.bin.zip" would be in the main Dragon32 ROM folder as a link only. Pressing on that will point to the game that would be in a completely separate rom folder named "Dragon32game" or something like that... so the two are separated and ES will only use the link folder as the pointer.

                                    Should work.

                                    1 Reply Last reply Reply Quote 0
                                    • F
                                      Folly @jamrom2
                                      last edited by Folly 11 Sept 2021, 16:01 9 Nov 2021, 14:11

                                      @jamrom2 said in Development of module-script generator for lr-mess and mame standalone:

                                      /home/pi/RetroPie/roms/dragon_flop

                                      Would be perfect for storing the actual games. ES does not have that as a theme folder and it's basically hidden from it.

                                      Then the link can still be created from there, but placed in /home/pi/RetroPie/roms/dragon32. es_systems.cfg would not need to be adjusted either as it will read the .zip file... or whatever format we can use.

                                      You can store the original files in /home/pi/RetroPie/roms/dragon_flop if you want, should be no problem if the links are correct and in the normal rom directory.

                                      There is no need to adjust es_systems.cfg. because it will see the link with .bas.zip or .bin.zip just as a .zip file.

                                      I tested this and it should work OOB.

                                      EDIT:
                                      Remember you first have to place your original files in your desired folder.
                                      After that you have to make the links.
                                      After that you can't move your original files otherwise you get broken links.

                                      J 1 Reply Last reply 9 Nov 2021, 16:11 Reply Quote 0
                                      • J
                                        jamrom2 @Folly
                                        last edited by 9 Nov 2021, 16:11

                                        @folly

                                        Ok. Got it working for Dungeon Raid. I did the same as you, created the link in the \dragon32 folder to point at a separate folder in roms called \roms\dragon_flop.

                                        It's a little tricky to figure out at first, but once the link is created, it's easy just to keep making them. Like you said, you need to first do a DIR to see exactly what the game name the the system actually sees. Has nothing to do with what the file is named in the zip folder.

                                        It worked great with the new naming/runcommand option.

                                        Odd thing I did notice... there is no artifiacting active in these games. I noticed it on a few of them even .cas based. I pulled up the MESS menu and artificating in active... but not displayed.

                                        F 1 Reply Last reply 9 Nov 2021, 17:13 Reply Quote 0
                                        • F
                                          Folly @jamrom2
                                          last edited by Folly 11 Sept 2021, 19:02 9 Nov 2021, 17:13

                                          @jamrom2

                                          Seems we are on the right track !

                                          I don't know what artifacting is.
                                          Never used it, I think.
                                          I will have a look.

                                          Edit :
                                          I tried mame and lr-mess with and without autoboot runcommand and with and without links and original files.
                                          I always can select artifact :

                                          • off
                                          • standard
                                          • reverse

                                          Don't see any difference though ;-)
                                          I don't think it has something to do with my script.

                                          Do you have experience with "artifacting", and how it should affect the display ?

                                          1 Reply Last reply Reply Quote 0
                                          870 out of 2234
                                          • First post
                                            870/2234
                                            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.

                                            This community forum collects and processes your personal information.
                                            consent.not_received