libretro / mame2003-plus-libretro

Updated 2018 version of MAME (0.78) for libretro. with added game support plus many fixes and improvements
Other
196 stars 110 forks source link

Generating a DAT creates very weird results #105

Closed ghost closed 6 years ago

ghost commented 6 years ago

When creating a DAT in the MAME menu on the latest build the DAT is not created correctly ? It's asking to rename -

1943,1943j,1943kai,1943mii > exedexes 2020bb > 2020bbn 4in1 > batman2 8ball > cvs

etc.

ghost commented 6 years ago

@markwkidd Configuring 'lr-mame2003-plus' : Arcade emu - updated MAME 0.78 port for libretro with added game support = = = = = = = = = = = = = = = = = = = = =

cp: cannot stat ‘/opt/retropie/libretrocores/lr-mame2003-plus/metadata/.nv’: No such file or directory chown: cannot access ‘arcade/mame2003-plus//.’: No such file or directory cp: cannot stat ‘/opt/retropie/libretrocores/lr-mame2003-plus/metadata/.nv’: No such file or directory chown: cannot access ‘mame-libretro/mame2003-plus//.’: No such file or directory

ghost commented 6 years ago

i am on the latest setup script mark its probably realated to the above is why i posted here

Wilstorm commented 6 years ago

I was going to rebuild from source today. Should we hold off for a bit?

markwkidd commented 6 years ago

@grant2258 can you try to build mame2003-libretro from source vie RetroPie-Setup and see if you get the same error?

lord I hope I don't have to submit another PR to RetroPie-Setup... it's been five or six now already. Embarrassing how often I break that script.

ghost commented 6 years ago

i did build from the souce the build is fine its the configure thats going wrong its pasting bad here though

Wilstorm commented 6 years ago

I updated RetroPie and built from source about a half hour ago.

= = = = = = = = = = = = = = = = = = = = =
Configuring 'lr-mame2003-plus' : Arcade emu - updated MAME 0.78 port for libretro with added game support
= = = = = = = = = = = = = = = = = = = = =

Copying new default configuration to /opt/retropie/configs/arcade/retroarch.cfg.rp-dist
cp: cannot stat ‘/opt/retropie/libretrocores/lr-mame2003-plus/metadata/*.nv’: No such file or directory
chown: cannot access ‘arcade/mame2003-plus//*.*’: No such file or directory
cp: cannot stat ‘/opt/retropie/libretrocores/lr-mame2003-plus/metadata/*.nv’: No such file or directory
chown: cannot access ‘mame-libretro/mame2003-plus//*.*’: No such file or directory
/home/pi

Log ended at: Wed Apr 18 11:54:39 CDT 2018
Total running time: 0 hours, 20 mins, 1 secs
ghost commented 6 years ago

why doesnt mine paste like that! them cocktail dip switch do seem to be missing Wilstorm i just checked

markwkidd commented 6 years ago

The RetroPie script should be (and has been in the past) looking in metadata/nvram for *.nv* but instead it's looking in metadata and failing. That's how I interpret it. It must be the edit I made to update the CHANGELOG and LICENSE filenames, somehow.

Wilstorm commented 6 years ago

Put 3 back quote marks ( ` above TAB key) before the block and 3 after (on their own line).

Wilstorm commented 6 years ago

@markwkidd - Normally game.nv files were creating to /home/pi/RetroPie/roms/mame-liberetro/mame2003-plus/nvram

root is the owner of /opt/retropie/liberetrocores/lr-mame2003/metadata so that's an issue for sure.

I am not sure what does the double forward slash mean arcade/mame2003-plus//*.*?

ghost commented 6 years ago

no its not mark its the way retropie works you have to run it as su then i loads all the scrips it needs

Wilstorm commented 6 years ago

Ok.

Found this on double forward slashes even though you guys probably know this:

Actually it means nothing and is ignored.

This often happens when output from multiple places is combined and it isn't clear who's job it is to add the slashes, so both parties do it and you end up with two of them. Semantically in the case of a directory path is has no meaning and will be ignored by most programs.

There are other situations in the unix world where they have meaning. Sometimes at the start of a path they could trigger a search for a samba path instead of a local file system path, or after a protocol in nfs they can indicate a hostname, however particularly in the case of a trailing slash like you gave as an example, it shouldn't matter much.

For the sake of your sanity as an administrator or programmer you should still avoid these cases wherever possible. You never know when something will be parsed incorrectly, but if one comes your way don't worry about it.

markwkidd commented 6 years ago

The problem is almost certainly somewhere in this function: https://github.com/RetroPie/RetroPie-Setup/blob/master/scriptmodules/libretrocores/lr-mame2003.sh#L45

ghost commented 6 years ago

want me to try fix it up and sent you the script ?

markwkidd commented 6 years ago

@ZappaUtopia if you update again, that particular error in the DAT file should be gone. it was essentially a copy paste error on my part.

I didn't notice any more like that, but I made dozens and dozens of similar copy/paste/cleanup operations in that file so your feedback would be useful. I don't have more than a handful of roms with me right now for testing, so it's not practical for me to process them in clrmamepro myself at the moment.

markwkidd commented 6 years ago

@grant2258 if you can spot the error with the retropie configure function that would be very fine with me

markwkidd commented 6 years ago

do you have a retropie setup at hand? it would be particularly good if someone was creating these PRs who could test the scripts. I have to work blind in that code... not a good practice really

ghost commented 6 years ago

naw ill just look at it and fix it should be simple enough

Wilstorm commented 6 years ago

How is this not an issue due to root is the owner of /opt/retropie/liberetrocores/lr-mame2003/metadata/nvram and root owns the *.nv files. Should pi be the owner as user rights out files?

Also is that the new location instead of the roms directory?

Wilstorm commented 6 years ago

Normally nvram files go here /home/pi/RetroPie/roms/mame-liberetro/mame2003-plus/nvram (same location as lr-mame2003 for folders arcade or mame-libretro) and pi is the owner. That way when playing a game pi writes the new nvram, cfg, hi, etc.

markwkidd commented 6 years ago

That should be the nvram folder, a subfolder inside mame2003 (or mame2003-plus when it loads this core).

If you follow the link you will see that when the script is working correctly, the user takes ownership of the copied files. Among whatever else is happening with the misisng nvram folder path it probably is causing permissions problems.

Wilstorm commented 6 years ago

@grant2258 - Ok, I will wait for the fix and update from source when completed for testing.

markwkidd commented 6 years ago

Exactly -- somehow I bungled the script and it's not pointing to the right pair of folders any more.

RetroPie Setup is intended to download all nvram patches from inside this repository's metadata/nvram folder, copy them to the corresponding locations in RetroPie, and take ownership of them as the user. That way when those games are loaded, the nvram patches are in the right place to allow the user to skip past places where they might get stalled.

markwkidd commented 6 years ago

folks with an actual retropie setup :small_airplane: could make the edit to their local copy of lr-mame2003.sh and make sure that the change works before submitting to the RetroPie team

Wilstorm commented 6 years ago

@markwkidd - Damn dude we need to get you a Pi, you have a donation page or no interest in the platform right now?

ghost commented 6 years ago

gawd i hate pico lol

Wilstorm commented 6 years ago

Pico?

markwkidd commented 6 years ago

I'm a big fan user and fan of Lakka, which is admittedly pretty different but does give a nice interface for playing the same emulators as retropie on a whole variety of low power devices and vintage devices.

Something about having to buy or build a case for the board might be holding me back. If some folks wanted to buy a pi setup for me, I would want to think about it for a bit but I would probably agree to install RetroPie to be better able to support folks.

But then again that might obligate me to stick around the forums and help with support, which I like doing already, but I have my freedom! Volunteering has its perks.

ghost commented 6 years ago

= = = = = = = = = = = = = = = = = = = = Configuring 'lr-mame2003' : Arcade emu - MAME 0.78 port for libretro = = = = = = = = = = = = = = = = = = = = =

cp /opt/retropie/libretrocores/lr-mame2003/metadata/.nv arcade/mame2003/ chown pi:pi arcade/mame2003//. cp /opt/retropie/libretrocores/lr-mame2003/metadata/.nv mame-libretro/mame2003/ chown pi:pi mame-libretro/mame2003//. mkUserDir /home/pi/RetroPie/BIOS/mame2003 mkUserDir /home/pi/RetroPie/BIOS/mame2003/samples cp /opt/retropie/libretrocores/lr-mame2003/metadata/hiscore.dat /opt/retropie/libretrocores/lr-mame2003/metadata/cheat.dat /home/pi/RetroPie/BIOS/mame2003/ chown pi:pi /home/pi/RetroPie/BIOS/mame2003/hiscore.dat /home/pi/RetroPie/BIOS/mame2003/cheat.dat /home/pi/RetroPie-Setup

markwkidd commented 6 years ago

Ok thanks that was helpful. I've found my dumb error, give me a sec

markwkidd commented 6 years ago

Can someone try replacing the configure function in lr-mame2003.sh with what's below?


function configure_lr-mame2003() {
    local name="$(_get_name_lr-mame2003)"

    local mame_dir
    local mame_sub_dir

    # create subfolders to prepopulate - mame2003 now generates other folders when needed
    for mame_dir in arcade mame-libretro; do
        mkRomDir "$mame_dir"
        mkRomDir "$mame_dir/$name"
        ensureSystemretroconfig "$mame_dir"

        # currently nvram is the only folder to repopulate
        for mame_sub_dir in nvram; do
            mkRomDir "$mame_dir/$name/$mame_sub_dir"
        done

        # prepopulate nvram patches
        cp "$md_inst/metadata/nvram/*.nv" "$mame_dir/$name/$nvram"
        chown $user:$user "$mame_dir/$name/$nvram/*.*"
    done

    mkUserDir "$biosdir/$name"
    mkUserDir "$biosdir/$name/samples"

    # prepopulate hiscore.dat and cheat.dat
    cp "$md_inst/metadata/"{hiscore.dat,cheat.dat} "$biosdir/$name/"
    chown $user:$user "$biosdir/$name/"{hiscore.dat,cheat.dat}

    # Set core options
    setRetroArchCoreOption "${name}-skip_disclaimer" "enabled"
    setRetroArchCoreOption "${name}-dcs-speedhack" "enabled"
    setRetroArchCoreOption "${name}-samples" "enabled"

    addEmulator 0 "$md_id" "arcade" "$md_inst/${name}_libretro.so"
    addEmulator 1 "$md_id" "mame-libretro" "$md_inst/${name}_libretro.so"
    addSystem "arcade"
    addSystem "mame-libretro"
}
markwkidd commented 6 years ago

If this works, what do I have to bribe one of you with in order to submit the PR to RetroPie Setup? I don't know if I can face them again about this script

ghost commented 6 years ago

cp: cannot stat ‘/opt/retropie/libretrocores/lr-mame2003/metadata/nvram/.nv’: No such file or directory chown: cannot access ‘arcade/mame2003//.’: No such file or directory cp: cannot stat ‘/opt/retropie/libretrocores/lr-mame2003/metadata/nvram/.nv’: No such file or directory chown: cannot access ‘mame-libretro/mame2003//.’: No such file or directory /home/pi/RetroPie-Setup

Wilstorm commented 6 years ago

I have no issue pitching in for that cause and to be quite frank you, Grant and Arcadez have put in plenty of time as far as I am concerned so any obligation you may feel has already been met/exceeded by my expectations but on the other hand it can be a bit like socialism as in a whole community is looking to the small core group of guys for a majority of their game additions/updates. It seems like I see 5 or 6 of the same names mainly over and over. Aaron Giles is always in my thoughts when I think of MAME. The "politics" but I am pretty much a straight shooter out of the Midwest. The people in this area are fairly honest and hard working folks. Anyway give it some thought at least.

To be honest I have never ventured outside of RetroPie but should poke my head up once in a while just to see what's out there.

ghost commented 6 years ago

we need to copy them files on install mark thats the problem

markwkidd commented 6 years ago

Agreed @grant2258 I think that's what my script update will do. It somehow got messed up to not have nvram in the source directory that's going to cp

ghost commented 6 years ago

Could not successfully install Arcade emu - MAME 0.78 port for libretro (/home/pi/RetroPie-Setup/tmp/build/lr-mame2003/CHANGELOG.md not found).

has this changed?

ghost commented 6 years ago

maybe add one to mame2003

ghost commented 6 years ago

even an empty file

ghost commented 6 years ago

ok fixed it

we need to add that file to the repo though

= = = = = = = = = = = = = = = = = = = = = Installing 'lr-mame2003' : Arcade emu - MAME 0.78 port for libretro = = = = = = = = = = = = = = = = = = = = =

‘/home/pi/RetroPie-Setup/tmp/build/lr-mame2003/mame2003_libretro.so’ -> ‘/opt/retropie/libretrocores/lr-mame2003/mame2003_libretro.so’ ‘/home/pi/RetroPie-Setup/tmp/build/lr-mame2003/README.md’ -> ‘/opt/retropie/libretrocores/lr-mame2003/README.md’ ‘/home/pi/RetroPie-Setup/tmp/build/lr-mame2003/CHANGELOG.md’ -> ‘/opt/retropie/libretrocores/lr-mame2003/CHANGELOG.md’ ‘/home/pi/RetroPie-Setup/tmp/build/lr-mame2003/metadata’ -> ‘/opt/retropie/libretrocores/lr-mame2003/metadata’ ‘/home/pi/RetroPie-Setup/tmp/build/lr-mame2003/metadata/MAME 0.78 XML.dat’ -> ‘/opt/retropie/libretrocores/lr-mame2003/metadata/MAME 0.78 XML.dat’ ‘/home/pi/RetroPie-Setup/tmp/build/lr-mame2003/metadata/catver.ini’ -> ‘/opt/retropie/libretrocores/lr-mame2003/metadata/catver.ini’ ‘/home/pi/RetroPie-Setup/tmp/build/lr-mame2003/metadata/cheat.dat’ -> ‘/opt/retropie/libretrocores/lr-mame2003/metadata/cheat.dat’ ‘/home/pi/RetroPie-Setup/tmp/build/lr-mame2003/metadata/hiscore.dat’ -> ‘/opt/retropie/libretrocores/lr-mame2003/metadata/hiscore.dat’ ‘/home/pi/RetroPie-Setup/tmp/build/lr-mame2003/metadata/nvram’ -> ‘/opt/retropie/libretrocores/lr-mame2003/metadata/nvram’ ‘/home/pi/RetroPie-Setup/tmp/build/lr-mame2003/metadata/nvram/rungun.nv’ -> ‘/opt/retropie/libretrocores/lr-mame2003/metadata/nvram/rungun.nv’ ‘/home/pi/RetroPie-Setup/tmp/build/lr-mame2003/metadata/nvram’ -> ‘/opt/retropie/libretrocores/lr-mame2003/nvram’ ‘/home/pi/RetroPie-Setup/tmp/build/lr-mame2003/metadata/nvram/rungun.nv’ -> ‘/opt/retropie/libretrocores/lr-mame2003/nvram/rungun.nv’ /home/pi/RetroPie-Setup

ghost commented 6 years ago

cp: cannot stat ‘/opt/retropie/libretrocores/lr-mame2003/metadata/nvram/.nv’: No such file or directory chown: cannot access ‘arcade/mame2003//.’: No such file or directory cp: cannot stat ‘/opt/retropie/libretrocores/lr-mame2003/metadata/nvram/.nv’: No such file or directory chown: cannot access ‘mame-libretro/mame2003//.’: No such file or directory

markwkidd commented 6 years ago

@wilstrom give lakka a shot sometime. Lakka is carefully tested to always run well rpi and has a live mode -- you might be able to just run it off of a usb drive. definitely you could pop in another sdcard to your rpi with lakka on it and give it a test run that way, assuming you have a spare sd card laying around.

I've worked on the docs for Lakka as well (although they won't turn me loose on their docs as much as the RetroPie folks do!) Glad to hear what you think.

As a self-employed consulting artist and writer, and media professional, I would love to earn some money for the work I do on emulation docs, support, bugfixes, and raising bounties. If I could just dedicate 10-20 hours per month on the clock for this -- and/or have that money to hire out for specific fixes, like I do with projects I manage in my professional life -- a lot could happen.

But that's true for a lot of open source volunteers. We would all probably get more done if we had budgets for ourselves and to sub out smaller projects.

ghost commented 6 years ago

@markwkidd the install takes care of the copy no need to worry about that

markwkidd commented 6 years ago

The nvram files are getting copied out of the temp folder, but they are not getting copied from /opt/retropie/libretrocores/lr-mame2003/nvram to /opt/retropie/libretrocores/lr-mame2003/metadata/nvram/ and the retropie arcade folder equivalent.

ghost commented 6 years ago

it it just teh nvram you want to copy ok no problems it be /home/pi/Retropie

Wilstorm commented 6 years ago

I definitely spy an entrepreneur and you definitely have the skill set. You just need a solid business model and run with it! ;) I remember reading a book years and years ago when PC gaming was in the beginning. The writer said something to the effect of "There's about 50,000,000,000 [more like infinite] possibilities for games and you should never run out of ideas. Oh, and watch Real Genius about 100 times." A classic Val Kilmer movie that has some really crazy ideas to promote creativity. Out of the whole book that was one of the few motivational/philosophical paragraph pieces I remember to this day.

I will give Lakka a try. I do have a few extra SD cards of varying sizes.

markwkidd commented 6 years ago

Well I do enjoy Real Genius as a guilty pleasure, and have my own copy. I suggest coding while listening to New Wave music to get in the vibe.

ghost commented 6 years ago

@markwkidd last one to fix is this the right dir

test3 cp /opt/retropie/libretrocores/lr-mame2003/metadata/hiscore.dat /opt/retropie/libretrocores/lr-mame2003/metadata/cheat.dat /home/pi/RetroPie/BIOS/mame2003/ test4 chown pi:pi /home/pi/RetroPie/BIOS/mame2003/hiscore.dat /home/pi/RetroPie/BIOS/mame2003/cheat.dat

guess that would be system on retroach

markwkidd commented 6 years ago

Yes the hiscore.dat and cheat.dat are supposed to go directly in to the retoarch system directory, so that part looks like it's working right

ghost commented 6 years ago

ok let me delete the nvram from both folders and make sure it goes in arcade and lrmame