Little help with my Playlist

Hi, I’ve been working on creating a list of my MAME games and for some reason, it work fine in Windows RA but not in Lakka, this is how Lakka version looks, can someone help me ? I can see the list, but when I run the rom it goes back to the RA menu… Im not very good on Linux, but I think this should work, right ? It’s almost exactly the same that FBA created based on the same roms and that one works.

/storage/roms/MAME (TOP Bests)/1941.zip 1941 /tmp/cores/mame2014_libretro.so DETECT DETECT My Mame List.lpl

Any ideas ? Thanks.

My guess is that it doesn’t like the directory name. Parentheses and spaces do weird things on linux filesystems.

But I use the same roms in the same path for FBA (The only difference is that you can scan FBA roms, but you have to build your own for MAME)… so i cannot be the path, or don’t think so…

I think we’ll need a log to know exactly what’s going on but you say MAME and FBA both launch the same ROMs? and it works fine in Windows? I ask because MAME and FBA typically need separate ROMsets.

Yes, not all games work because I have currently MAME 0.150 set, but some of them do work on FBA, so if at least 1 of them work, I supposed it’s not the ROM. Also, using Load Content with my 1942.zip ROM and selecting MAME 2014 works fine, but launching it with my created list doesn’t (1942 is only an example, I think that game doesn’t work cause it’s an old ROM, but have many cases that work, Double Dragon for example). So, if I can manually load MAME core and the ROM, is something on the playlist, but not sure what. How do I check those logs ?

Hi, I hope this does the job for you, so you won’t have to do everything manually :slight_smile: This is my merger script, that I use atm, which puts roms from these two directories /mame /arcade into a single playlist with the correct core (mame or fba)

Basically my script fetches the proper names of arcade roms from a local mame dat file (database.xml)

You can download the database from here MAME Dats 0.172 http://www.progettosnaps.net/dats/ I just renamed the dat file to database.xml… the getName() function fetches the name from the database

#!/bin/bash
getName () {
  sed -n '/<machine name="'$1'"/,/<\/description>/p' database.xml > test.txt
  local name=$(sed -n 's:.*<description>\(.*\)</description>.*:\1:p' test.txt)
  echo $name
}


scanmame () {
for fullpath in $1; do
    echo $fullpath
    filename=$(basename "$fullpath")
    gamename=$(getName ${filename%.*})
    echo $gamename
    if [ -z "$gamename" ]; then
        echo "Not in db" >&2
    else
        echo $2
        echo $3
        echo "DETECT"
        echo $4
    fi    
done
}

scanmame "/storage/roms/arcade/*.zip" "/tmp/cores/fba_libretro.so" "Arcade (FB Alpha - SVN)" "FB Alpha - Arcade Games.lpl" > "/storage/playlists/FB Alpha - Arcade Games.lpl"
scanmame "/storage/roms/mame/*.zip" "/tmp/cores/mame_libretro.so" "MAME" "FB Alpha - Arcade Games.lpl" >> "/storage/playlists/FB Alpha - Arcade Games.lpl"


To install and execute it

Just put it in e.g the config dir

login via ssh user:root pass:root

cd .config chmod +x scanner.sh ./ scanner.sh


If some roms are not working for you, check if you have the right romset for you mame version and if you have the parent roms for your rom. Some roms need other images to get them to work. The mamedb is a good place to check if you need a parent rom

To check logs…you can manually launch a core from the commandline over ssh and load a certain rom killall retroarch then

retroarch -L /tmp/cores/mame_libretro.so /roms/mame/something.zip

mame will print you the logs and also if you are missing a parent rom

@fluffymadness That sounds like a handy script! Thanks for sharing it :slight_smile:

Thanks ! I’ll give the script a try. Because check logs launching manually makes no sense, cause if I run the ROM using Load and Detect Core from the menu works perfectly fine, so it’s not a problem with the core, or Rom at all, it’s just something about the playlist I’m not being able to see…

Will try the script tomorrow and see if that works for me and reply. Thanks everyone.

I had a similar problem with playlists not working and the reason was that the file was not in UTF8 encoding and that line breaks where instead of only . You have to make sure that the text editor you’re using lets you save the file like that (most text editors on linux do)