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.
    • F
      Folly @DTEAM
      last edited by

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

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

      Now you can install :

      lr-mess/mame <-- make sure you do this first, otherwise you can't add systems !
      lr-mess/mame systems
      the handhelds by @DTEAM

      Hi Folly, in your first post, maybe you could add a link to my gamelist for handhelds. It's my second post here.

      Done

      1 Reply Last reply Reply Quote 1
      • F
        Folly
        last edited by Folly

        I cleaned up my repository by moving many old files to the backup directories.

        Now about the updates.

        To prevent breaking things I left these files untouched :

        • generate-systems-lr-mess_mame-2v1.sh (basic script)
        • generate-systems-lr-mess_mame-2v1-ext.sh (basic script to generate in the ext directory)
        • add-mamedev-systems-test6_temp.sh (front-end)
        • add-mamedev-systems-test6-ext_temp.sh (front-end to generate in the ext directory)

        As I was thinking it's better to move to newer versions.
        So I made new versions based on 2v1 with adding the new stuff to it :

        • generate-systems-lr-mess_mame-2v2.sh
        • generate-systems-lr-mess_mame-2v2-ext.sh

        I added the updates thoroughly and expect no issues ,at least I hope so.

        I still have to do the front-end though, as I want to move to version 7 with the front-end, so be patient.

        Here is the commit of the basic scripts :
        link_to_commit

        Multiple improvements to the basic scripts :

        • add translation "ai" lines to retroarch.cfg when installing a module-script
          • Using hotkey "t" will translate the picture and pause the screen and translate
          • Press "t" again to resume the game
          • You might want to make a save-state before translating, if you experience a crash while translating
        • add cheats to the correct mame.ini when installing a module-script
          • version 2v1 added this in the wrong mame.ini
          • version 2v2 should be ok now
        • add game-specific-config runcommand lines in the emulators.cfg when installing a module-script
          • if you load a game with the line containing "game-specific" then game-unique sub-directories are made with mame/lr-mess config files
          • now it's possible to change the input per game in the mame-UI or lr-mess-UI
          • to prevent conflicts between mame and lr-mess don't use the same config files, they get their own sub-directory
          • config files for mame are save in /opt/retropie/configs/<RETROPIE-SYSTEM>/mame/<GAME>/<MAME-SYSTEM>.cfg
          • config files for lr-mess are save in /opt/retropie/configs/<RETROPIE-SYSTEM>/lr-mess/<GAME>/<MAME-SYSTEM>.cfg
        • add sorting the emulators.cfg when installing a module-script
          • implemented this because it can get a mess if there are more than 10 lines in the emulators.cfg file
          • if a "default line" is present it always goes to the last line

        I also added the first post as a readme file into the repository :
        link_to_readme
        This way we always have a backup and we can keep track of the changes done in the first post :
        link_to_changes

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

          @dteam @JimmyFromTheBay @dmmarti @RussellB @valerino

          I added the new front-ends version 7 with the generator script 2v2 inside.
          It should work OBB.
          I only tested the front-end menu structure as ok.
          I am confident the generator script will work ok as I tested that before seperately.

          Here you can find what is new :
          link_to_commit

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

            @dteam

            We can add a new "handheld".
            I am trying out the Atari Portfolio.
            (system = pofo)

            This brings back some memories as I still have 2 originals in my storage boxes.

            Never knew that mame could emulate this.
            So I found the correct bios files and it worked although there is no sound yet.
            It seems, in a mame forum, that this computer has been improved upon in mame0233.

            Now the trouble was how to add games, this was a difficult one !
            Normally you had to connect a dos or an atari-st computer to the portfolio and connect them with a parallel port.
            Well, trouble, haha, how on earth can we get games to this computer.
            Looked for virtual parallel port things and looked into mame on how to use ports with the outside world.
            No real solution here.


            Edit: With the information gathered in this post I made a script for it :
            https://github.com/FollyMaddy/create_atari-portfolio_roms


            I found that you can add a ram card as a slot-device.
            Now I could format this ram device and save a file to it.
            But where is it saved ?
            With mame it is saved here :
            /home/pi/RetroPie/roms/mame/nvram/pofo/ccma_ram/ccma_ram
            How to load it as a -memc ?
            Well, I was thinking, perhaps the ram card file structure is the same as the rom file structure then I can make a .rom file of it.
            That worked, and it's off-course read_only as it is loaded as a rom now.

            Now I still had to find a way to add games to the .rom file.
            After a long search and peeking into the ram/rom file with hexedit if found that it could be some sort of a disk or hd image.
            Later I found that it seemed to be a FAT12 image, using this linux tool it will display that it's a FAT12 structure (this is how you install):

            sudo apt install disktype
            

            I just didn't believe it at first, but you can just mount the image in linux.

            • mount the image in /mnt/ if you renamed your rom/ram file to fat12.img link_how_to_mount
            sudo mount -o loop fat12.img /mnt/
            
            • Open the filemanager as "root" to add files to /mnt/
              (we can only do this, if we are in a desktop enviroment)
            sudo pcmanfm
            

            (If not using a desktop enviroment we can use the command cp or extract zip files to the mount )

            • Add an autoexec.bat to /mnt/, so the rom will boot automatically from the drive "A:" , containing :
            @echo off
            <filename_to_run>
            
            • Unmount the image link_how_to_unmount
            sudo umount /mnt/
            
            • Then rename fat12.img to folidash.rom for use with mame

            This is the result with Folidash :
            2021-07-22-181122_800x600_scrot.png

            2021-07-22-181156_800x600_scrot.png

            2021-07-22-181207_800x600_scrot.png

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

              @dteam

              Are you able to make artwork for the Atari Portfolio ?
              For example only the screen.

              DTEAMD 2 Replies Last reply Reply Quote 0
              • DTEAMD
                DTEAM @Folly
                last edited by DTEAM

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

                Are you able to make artwork for the Atari Portfolio ?
                For example only the screen.

                To do that, I must be able to run it first. I'll try it this week. I'll add a system to my theme first.

                I saw you have used pofo, I also see this "portfolio_rom_card" . What is the connection between these two?

                F 3 Replies Last reply Reply Quote 0
                • F
                  Folly @DTEAM
                  last edited by Folly

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

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

                  Are you able to make artwork for the Atari Portfolio ?
                  For example only the screen.

                  To do that, I must be able to run it first. I'll try it this week. I'll add a system to my theme first.

                  You will find it in "mame-0.231-merged".
                  Just make a dummy.rom file and it wil run into DOS.

                  I saw you have used pofo, I also see this "portfolio_rom_card" . What is the connection between these two?

                  The media that can be loaded is a portfolio_rom_card.
                  Never had one, but they look like this ( although this is a ram card ) :
                  2021-07-22-214206_1600x900_scrot.png

                  Btw.
                  lr-mess works but the rom images do not as lr-mess is still an older version of mame, I think that's the reason that it fails to load.
                  2021-07-22-215221_800x600_scrot.png

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

                    @dteam
                    This is the game Phoenix :
                    2021-07-22-215143_800x600_scrot.png

                    DTEAMD 1 Reply Last reply Reply Quote 1
                    • DTEAMD
                      DTEAM @Folly
                      last edited by DTEAM

                      @folly
                      thumbnail_IMG_3956.jpg

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

                        @dteam

                        Totally awesome !
                        I will update immediately ;-)

                        DTEAMD 1 Reply Last reply Reply Quote 0
                        • DTEAMD
                          DTEAM @Folly
                          last edited by DTEAM

                          @folly
                          Hi Folly. I need help to set games. Could you give me an example step by step with a game like tetris. My zip file is tetris.zip. Inside I have TETRIS.EXE and TETRIS.SCO .
                          Do I have to cut and paste your lines above in "putty" and everything will work.

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

                            @dteam

                            Hi,

                            I made a script for it.
                            I have to improve some things as it is not perfect yet,
                            but it should works for most games.

                            I am going to make a repository for it, asap.
                            I will let you know when it's online.

                            Paste your .zip game files into the same directory as the script.
                            Use the terminal.
                            Go to that script directory.
                            Be sure the script is executable with chmod u+x 123-pofo-roms.sh
                            Run it with sudo ./123-pofo-roms.sh
                            Now it will create .rom files from all .zip files.
                            Copy these .rom to the roms/pofo directory.

                            Edit :
                            This is the repository :
                            https://github.com/FollyMaddy/create_atari-portfolio_roms

                            Fixed the issue of adding a .com or .exe to the autoexec.bat:

                            • If 1 executable is found, then this file will be added to the autoexec.bat .
                            • if more executable's are found, then you will be asked to type an executable which is added to the autoexec.bat .
                            DTEAMD 1 Reply Last reply Reply Quote 1
                            • DTEAMD
                              DTEAM @Folly
                              last edited by DTEAM

                              @folly
                              Your script works !!!! great job. Now I have a loading issue :

                              hd61830.bin NOT FOUND (tried in hd61830 pofo)
                              Fatal error: Required files are missing, the machine cannot be run.
                              sdl_kill: closing audio
                              Enter sdlwindow_exit
                              Leave sdlwindow_exit
                              

                              My Bios is pofo.7z from MAME 0.233

                              NEW EDIT: It loads and it works . I added this Bios hd61830.7z
                              thumbnail_IMG_3960.jpg

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

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

                                @folly
                                Your script works !!!! great job.

                                Perfect ;-)

                                NEW EDIT: It loads and it works . I added this Bios hd61830.7z

                                My setup works also, as you have noticed.
                                But I saw in the mame log (/dev/shm/runcommand.log) that the "hd61830.bin ROM NEEDS REDUMP".
                                Can you tell me, do you have the same in your log or do you now have a good dump of hd61830.bin ?

                                DTEAMD 1 Reply Last reply Reply Quote 0
                                • DTEAMD
                                  DTEAM @Folly
                                  last edited by

                                  @folly
                                  It looks fine on my side

                                  Starting Software List ':cart_list'
                                  Starting RAM ':ram'
                                  Starting NVRAM ':nvram'
                                  Starting Portfolio ':'
                                    (missing dependencies; rescheduling)
                                  Starting Video Screen ':screen'
                                  Starting Hitachi HD61830B LCD Controller ':hd61830'
                                  Starting Speaker ':mono'
                                  Starting Portfolio ':'
                                  un7z: opened archive file /home/pi/RetroPie/roms/mame/cheat/cheat.7z
                                  un7z: closing archive file /home/pi/RetroPie/roms/mame/cheat/cheat.7z and sending to cache
                                  Loading cheats file from /home/pi/RetroPie/roms/mame/cheat/cheat/pofo.xml
                                  Attempting to parse: default.cfg
                                  Attempting to parse: pofo.cfg
                                  Starting Portfolio
                                  hiscore: config found
                                  

                                  I got it from MAME 0.233

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

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

                                    @folly
                                    It looks fine on my side

                                    I think you may have overlooked it in the log.

                                    What is the sha1sum of your hd61830.bin ?

                                    This is my output of mame0233 saying also that hd61830.bin is still a bad dump with sha1sum included (mine is the same):

                                    pi@raspberrypi:~/RetroPie/BIOS/mame $ p7zip -k -d hd61830.7z
                                    .
                                    Extracting archive: hd61830.7z
                                    .
                                    pi@raspberrypi:~/RetroPie/BIOS/mame $ /opt/retropie/emulators/mame/mame -listroms pofo
                                    ROMs required for driver "pofo".
                                    Name                                   Size Checksum
                                    c101782-007.u4                       131072 CRC(c9852766) SHA1(c74430281bc717bd36fd9b5baec1cc0f4489fe82)
                                    c101781-007.u3                       131072 CRC(b8fb730d) SHA1(1b9d82b824cab830256d34912a643a7d048cd401)
                                    c101783-001a-01.u3                    32768 CRC(61fdaff1) SHA1(5eb99e7a19af7b8d77ea8a2f1f554e6e3d382fa2)
                                    hd61830.bin                            1472 BAD CRC(06a934da) SHA1(bf3f074db5dc92e6f530cb18d6c013563099a87d) BAD_DUMP
                                    pi@raspberrypi:~/RetroPie/BIOS/mame $ sha1sum hd61830.bin
                                    bf3f074db5dc92e6f530cb18d6c013563099a87d  hd61830.bin
                                    
                                    

                                    It seems no way around that, for now.

                                    Btw :
                                    I added "Atari Portfolio" to our database selection for the front-end script.
                                    And I added it in the animated gif for the theme cygnus-blue-flames.

                                    DTEAMD 1 Reply Last reply Reply Quote 0
                                    • DTEAMD
                                      DTEAM @Folly
                                      last edited by DTEAM

                                      @folly
                                      I don't see a baddump message in my .log, but I have the same file. So I suppose I also have a Baddump. Try to open the chess game to compare your log with me.

                                      My hd61830.bin SHA1 : bf3f074db5dc92e6f530cb18d6c013563099a87d

                                      F 3 Replies Last reply Reply Quote 0
                                      • F
                                        Folly @DTEAM
                                        last edited by Folly

                                        @dteam

                                        It is what it is, we should not spend too much time on it.

                                        I checked with guichess.rom, I think the same version.

                                        Part of my log looks like this (third line) :

                                        un7z: opened archive file /home/pi/RetroPie/BIOS/mame/hd61830.7z
                                        un7z: closing archive file /home/pi/RetroPie/BIOS/mame/hd61830.7z and sending to cache
                                        hd61830.bin ROM NEEDS REDUMP
                                        WARNING: the machine might not run correctly.
                                        Optional memory region ':screen' not found
                                        Optional memory region ':nvram' not found
                                        Starting Portfolio ':'
                                          (missing dependencies; rescheduling)
                                        Starting Intel 8088 ':u1'
                                        Starting Video Screen ':screen'
                                          (missing dependencies; rescheduling)
                                        Starting palette ':palette'
                                        Starting gfxdecode ':gfxdecode'
                                        Starting Hitachi HD61830B LCD Controller ':hd61830'
                                          (missing dependencies; rescheduling)
                                        Starting Atari Portfolio keyboard ':keyboard'
                                        Starting Speaker ':mono'
                                          (missing dependencies; rescheduling)
                                        Starting PCD3311 ':pcd3311t'
                                        Starting Atari Portfolio memory card port ':ccma'
                                        Starting Atari Portfolio ROM card ':ccma:rom'
                                        Starting Atari Portfolio expansion port ':exp'
                                        Starting Timer ':counter'
                                        Starting Timer ':tick'
                                        Starting Software List ':cart_list'
                                        Starting RAM ':ram'
                                        Starting NVRAM ':nvram'
                                        Starting Portfolio ':'
                                          (missing dependencies; rescheduling)
                                        Starting Video Screen ':screen'
                                        Starting Hitachi HD61830B LCD Controller ':hd61830'
                                        etc.......
                                        
                                        1 Reply Last reply Reply Quote 0
                                        • F
                                          Folly @DTEAM
                                          last edited by

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

                                          I saw you have used pofo, I also see this "portfolio_rom_card" . What is the connection between these two?

                                          I was again busy in understanding how the slot devices are structured.
                                          It's a real pain in the ass.
                                          Like, for instance nes datach, it can't be listed with the normal -listslots option.
                                          I can only detect it with the -listfull option.

                                          So I did the same with pofo here I found the option you mentioned and more :

                                          portfolio_ccm_slot "Atari Portfolio memory card port"
                                          portfolio_expansion_slot "Atari Portfolio expansion port"
                                          pofo_hpc101       "Atari Portfolio HPC-101"
                                          pofo_hpc102       "Atari Portfolio HPC-102"
                                          pofo_hpc104       "Atari Portfolio HPC-104"
                                          pofo_hpc104_2     "Atari Portfolio HPC-104 (Unit 2)"
                                          portfolio_ram_card "Atari Portfolio RAM card"
                                          portfolio_rom_card "Atari Portfolio ROM card"
                                          

                                          Just like with nes it's not real obvious how to load these.

                                          Replied just for the record, as I hope to get an idea on how we can implement these slots into the script.

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

                                            @dteam

                                            Trying to find the structure here on how we can use the extended options the correct way so it can be added in the script.
                                            And above all how do we find these options.

                                            In doing so, I searched with :
                                            /opt/retropie/emulators/mame/mame -listsoftware nes | grep slot

                                            Just like datach(a nes_slot but not listed with mame -listslots nes) I found here also disksys(a nes_slot but not listed with mame -listslots nes) and ofcourse this is also available for famicom (a nes_slot but not listed with mame -listslots famicom) .

                                            In the MAME_0.202_Software_List_ROMs_merged there is also famicom_flop(software_list) just something like nes_datach(software_list) .

                                            So I tried running this manual and it worked with :

                                            /opt/retropie/emulators/mame/mame famicom disksys -flop "/home/pi/RetroPie/roms/famicom/famicom_flop/aliens - alien 2 (japan) (proto) [b].fds"
                                            

                                            It looks like this :
                                            2021-07-25-181826_1600x900_scrot-resized.png 2021-07-25-181531_1600x900_scrot-resized.png 2021-07-25-181551_1600x900_scrot-resized.png 2021-07-25-181602_1600x900_scrot-resized.png

                                            1 Reply Last reply Reply Quote 1
                                            • 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.