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.0m 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.
    • jamrom2J
      jamrom2 @jamrom2
      last edited by

      Coco2 works really well. And has the softer look that the Coco1 has. I'm going to use that as well.

      F 1 Reply Last reply Reply Quote 0
      • F
        Folly @jamrom2
        last edited by Folly

        @jamrom2

        Nice to read your test story and great to hear you have it running quite good now.
        I see what you mean looking at the pictures.

        Btw.
        Is that a TV with a real TUBE !!!
        Awesome, very retro ;-)

        I should add the coco2 and coco3 to our forum list.
        (edit : added)

        jamrom2J 1 Reply Last reply Reply Quote 0
        • jamrom2J
          jamrom2 @Folly
          last edited by jamrom2

          @folly

          LOL, not a real TV. I use a set of really high quality backgrounds someone posted a while back, then I add in the highest res pictures I can find (if there are any) of the actual equipment. After that, I play around with the lighting, shading and nostalgic stuff further than the original artist did to try and make it look as real and time correct as possible. As if you're really sitting in front of the actual monitor in your teenage bedroom/den.

          As for the emus... yes. I feel the Coco 2 and 3 are really the best options for the Tandy system. I've been trying to get the TRS-80 12/16 to work, but there really isn't enough to play with to justify using them as actual game systems. For computer guys that want the computer to play around with, its fine.. but not for gaming.

          What would be really useful is to be able to script the run statement to read the rom title and automatically run the emulator in the mode it needs to be in. It was done for lr-atari800. Where the rom name decides what graphics settings and mode to be in. The script reads it then sets the artifacting/graphic mode.

          For Tandy it would be the LOAD Basic or Machine language. Then the run statement to follow. I don't know if that's possible... but you would then name the roms accordingly.

          Example...

          Escape From Tut's Tomb (The Rainbow).zip this is a zipped .dsk file. So it would need the Flop1 or 2 Coco 2/3...and the load statment LOADM with EXEC

          example renamed...

          Escape From Tut's Tomb (The Rainbow) c2 fp1 m e.zip

          A huge undertaking, but it would then be a one button press and go straight into the game by the script reading Coco2 Flop1 LOADM EXEC and loading the game into Coco2 accordingly.

          DosBox if you're familiar with it works like this inside of Retropie as well.

          Just an idea over yet another cup of coffee... LOL.

          F 1 Reply Last reply Reply Quote 0
          • F
            Folly @jamrom2
            last edited by Folly

            @jamrom2

            Good idea, but sadly not feasible.
            I think it would be a huge undertaking, just like you said.

            I can try to make autoboot lines.
            For coco with -cass this could still be an option.
            But still not for autoboot lines if they use " .
            (I explain later, in this post, why it's not possible right now)

            What you can try is to make .cmd files per game.

            About .cmd files, here is some background information on our script and .cmd files.
            If we use runcommandlines from the emulators.cfg for lr-mess containing the media option, then the boot procedure will go through the Valerino run_mess.sh script.
            This run_mess.sh script produces a temporary .cmd file for lr-mess retroarch core, and then boots the .cmd file.
            After exiting the game the run_mess.sh will remove the temporary .cmd file again.

            So we can skip above part and create our own .cmd files.
            But we have to take into account that we don't use the exact name as the game we want to run.
            Because, if we do , then the .cmd file will be removed if we run the normal game file through the Valerino run_mess.sh script.

            So I fooled around with a making a .cmd file with autoboot function.
            I discovered that it only works using lr-mess-cmd (it doesn't for mame-cmd)
            Here is an example used for donkey kong for coco on coco3 with -flop1.
            Make a textfile called dk-autoboot.cmd :

            coco3 -rp /home/pi/RetroPie/BIOS/mame -cfg_directory /opt/retropie/configs/coco3 -autoframeskip -ui_active -autoboot_delay 2 -autoboot_command load"donkey.bas",r\n -flop1 /home/pi/RetroPie/roms/coco3/coco_flop/dk.dsk
            

            Put it in the same folder as your game, and boot the .cmd file with lr-mess-cmd, and you will see that this works.

            To create the .cmd you first have to know what file you have to run.
            If you use a flop then you can check the files with the command DIR first and then use the appropriate file in your .cmd file.

            Optional to read, but important information to look up, if we want to improve the scripts :
            While testing I discovered that the run_mess.sh script normally adds " to some of the command parts like this :

            coco3 -rp /home/pi/RetroPie/BIOS/mame -cfg_directory /opt/retropie/configs/coco3 "-autoframeskip" "-ui_active" "-flop1" "/home/pi/RetroPie/roms/coco3/coco_flop/dk.dsk"
            

            Adding options that have a space in them ,like for example :
            -autoboot_delay 2
            they will not work if quoted like this :
            "-autoboot_delay 2"
            This basically means that if I/we want auto boot options added in the script that use " in them.
            Then, among-st others, I have to change the run_mess.sh script, or find an other way, so it won't add " to these added options.
            I Also have to look on how the " can be passed though the runcommand.sh script.

            Edit : when using our dragon 32 autoboot the run_mess.sh script does this :
            "-autoboot_delay" "2"
            This works, so perhaps we don't have to change that much.

            jamrom2J 1 Reply Last reply Reply Quote 0
            • jamrom2J
              jamrom2 @Folly
              last edited by

              @folly Agreed... it was just an idea.

              I'm loving the new script and the options it gives. Once set up, there are no issues. You just have to be familiar with the LOAD commands in reference to the file types.

              Looks like 1980 all over again. LOL.

              F 2 Replies Last reply Reply Quote 0
              • F
                Folly @jamrom2
                last edited by Folly

                @jamrom2

                Nice to hear, I love it too ;-)

                Sometimes we have to dig deep in order to get some improvements along the way.
                No way around that ;-)

                Btw. yesterday I updated the script :

                • remove cancel button from the forms
                  (cancel button did not work, therefor removed)
                • remove lr-mess check from the generated scripts
                  (because we want to be able to experiment : when using mame only the check prevents the generated scripts from installing, therefor removed)
                • and extra runcommandline in emulators.cfg for mame only is added with "framesip 10"
                  (now the handheld games can be booted directly with mame and with good speed without having to select "frameskip 10" with F9 or a joy button)
                1 Reply Last reply Reply Quote 0
                • F
                  Folly @jamrom2
                  last edited by Folly

                  @jamrom2

                  I discovered that all coco types can have extra 1024 k ram added. (just like dragon 32)
                  Perhaps the coco1 will benefit from that, not having display errors.

                  I will add some lines for coco/coco2/coco3 to test in the section :

                  • systems : with extra options
                  • systems : full/semi autoboot

                  edit : done

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

                  https://github.com/FollyMaddy/RetroPie-Share/commit/fdd150c6cf0106954646b1254ba1fdbc3be8beb0

                  jamrom2J 1 Reply Last reply Reply Quote 0
                  • jamrom2J
                    jamrom2 @Folly
                    last edited by jamrom2

                    @folly OK. Tested both the CLOAD manual RUN and CLOADM auto EXEC for Coco2.

                    Works great! Fine tuning this a little would be to have them all under the same folder coco2, and the options listed in the emulator selection box, so that you don't have to have separate rom folders for each variation.

                    Is that possible? If so, that would be the best way to cover this from a gamer point of view. I press a button, jump into the emulator selection menu. Select my default (lets say CLOADM auto EXEC for all machine based cassettes) and emulator for specific rom (let's say CRT for a cartridge I want to play), and off I go.

                    jamrom2J F 2 Replies Last reply Reply Quote 0
                    • jamrom2J
                      jamrom2 @jamrom2
                      last edited by jamrom2

                      Also... the other variation are the OS/9 based games like Flight Simulator II. Those need to have coco in OS/9 mode which is a simple "DOS" typed command. Once the user does that, the game will auto load and play.

                      So you basically have 5 useable variations as choices for runcommand:
                      1.normal without any auto loading commands if the user actually wants to use the Coco Basic.
                      2. Cassette - CLOAD manual RUN - Basic driven cassette games
                      3. Cassette - CLOADM:EXEC auto EXEC - Machine language driven cassette games with auto exec comand
                      4. Cartridges - CRT just as it is...plays the cart
                      5. OS/9 based games - requires a simple "DOS" command at the prompt - autoloads the game itself

                      Floppy commands - can't be done as, like you pointed out, it uses double quotes. Must be manual input. This is ok as you have to DIR in order to see if its a BAS or BIN file for the correct LOAD command anyway. Old school fun!

                      1 Reply Last reply Reply Quote 0
                      • F
                        Folly @jamrom2
                        last edited by Folly

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

                        @folly OK. Tested both the CLOAD manual RUN and CLOADM auto EXEC for Coco2.

                        Works great! Fine tuning this a little would be to have them all under the same folder coco2, and the options listed in the emulator selection box, so that you don't have to have separate rom folders for each variation.

                        Is that possible? If so, that would be the best way to cover this from a gamer point of view. I press a button, jump into the emulator selection menu. Select my default (lets say CLOADM auto EXEC for all machine based cassettes) and emulator for specific rom (let's say CRT for a cartridge I want to play), and off I go.

                        Thanks for testing !

                        Yes that is possible.
                        I did it so we could copy the compatible games for each option.
                        But, indeed, having all separate rom directories isn't perhaps the best way.
                        It's off-course always possible to separate them inside the normal rom directory.
                        Oh yea, the themes don't match either.

                        Come to think of it, overall, it will be an improvement.
                        Ok, I will change every option to the normal rom directories.

                        Make sure you de-install the module-scripts from within the normal parts of the RetropPie-Setup (manage-packages-experimental-packages).
                        And I advice you to remove the old generated autoboot module-scripts and the old rom directories.

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

                        https://github.com/FollyMaddy/RetroPie-Share/commit/fe7efedc915c509feaa32a9bf530b5811d37e2ff

                        jamrom2J 1 Reply Last reply Reply Quote 0
                        • jamrom2J
                          jamrom2 @Folly
                          last edited by

                          @folly

                          Ok, sounds good. Looking forward to it.

                          F 1 Reply Last reply Reply Quote 0
                          • F
                            Folly @jamrom2
                            last edited by Folly

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

                            jamrom2J 1 Reply Last reply Reply Quote 0
                            • jamrom2J
                              jamrom2 @Folly
                              last edited by

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

                              F 1 Reply Last reply Reply Quote 0
                              • F
                                Folly @jamrom2
                                last edited by

                                @jamrom2

                                Yes this one :

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

                                jamrom2J 1 Reply Last reply Reply Quote 1
                                • jamrom2J
                                  jamrom2 @Folly
                                  last edited by

                                  @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 Reply Quote 1
                                  • F
                                    Folly @jamrom2
                                    last edited by

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

                                    jamrom2J 1 Reply Last reply Reply Quote 0
                                    • jamrom2J
                                      jamrom2 @Folly
                                      last edited by

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

                                      F 2 Replies Last reply Reply Quote 0
                                      • jamrom2J jamrom2 referenced this topic on
                                      • F
                                        Folly @jamrom2
                                        last edited by Folly

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

                                        jamrom2J 1 Reply Last reply Reply Quote 1
                                        • F
                                          Folly @jamrom2
                                          last edited by Folly

                                          @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
                                          • jamrom2J
                                            jamrom2 @Folly
                                            last edited by

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