Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding additional ROM folders #2

Closed
SRC267 opened this issue Dec 27, 2023 · 16 comments
Closed

Adding additional ROM folders #2

SRC267 opened this issue Dec 27, 2023 · 16 comments

Comments

@SRC267
Copy link

SRC267 commented Dec 27, 2023

So I have a separate folder for SNK Neo Geo titles, i don't really want to merge them with Arcade ROMs, because I set it like that for the RetroArch app playlist.

I checked general settings > configure folders, but there's no way to navigate to the location on the SD card, this isn't an issue with PC MAME, you are able to add more folder directories.

It will be nice to add it from the mame4droid settings where it says change ROMs path.

@seleuco
Copy link
Owner

seleuco commented Dec 27, 2023

This version of android has scoped storage implemented. If you choose the option to install on the SD then MAME4droid is using scoped storage that allows the reading of the ROMs safely and that allows it to be published on Google Play with SD support something that Retroarch does not have.

Access using scoped storage is slow and difficult to implement. For it to work minimally well, the ROM directory is read and saved for future readings. Implementing multiple directories for each thing would be crazy to implement and bad for the user experience as you would have to request multiple permissions.

It is for this reason that I decided to have a single roms directory but with the possibility of defining other things such as artworks or samples in subdirectories within the ROMS directory.

Unfortunately I can't define more things (other subdirectories than artwork, samples, software) without modifying the MAME code base which I don't want to do to be able to easily update to new versions.

The only way I can think of is to modify the mame.ini file (conecting to your phone by ADB on PC) so you can define another roms subdirectory within the roms subdirectory (for neogeo) that is already defined on the SD. I have not tried this with ROMS recursion but I have tried it to add icons, snapshots, etc. and it has worked for me.

Example: assumption than your roms are in SD at /storage/emulated/0/MAME4droid) and your installation is /storage/emulated/0/Android/data/com.seleuco.mame4d2024/files

1/ create the mame.ini: Go to general settings and press save settings it will be created at /storage/emulated/0/Android/data/com.seleuco.mame4d2024/files

2/ search for:

CORE SEARCH PATH OPTIONS

homepath .
rompath "/storage/emulated/0/MAME4droid;./roms"

3 / add the new rompath /storage/emulated/0/MAME4droid/neogeo

then rompath wil be:

rompath "/storage/emulated/0/MAME4droid;./roms;/storage/emulated/0/MAME4droid/neogeo"

Tell me if works :)

@seleuco seleuco closed this as completed Dec 27, 2023
@seleuco seleuco pinned this issue Dec 27, 2023
@SRC267
Copy link
Author

SRC267 commented Jan 8, 2024

Just tried it, my rom path is:

/storage/6631-6132/Games/MAME;./roms;/storage/6631-6132/Games/SNK - Neo Geo

The line added > "/storage/6631-6132/Games/SNK - Neo Geo" doesn't seem to show in the mame menu, perhaps it's the folder name "SNK - Neo Geo" that's not making mame read it, maybe needs underscores ?

@seleuco
Copy link
Owner

seleuco commented Jan 10, 2024

any news about it? finally work for you? You can also try as MAME4droid has permission for /storage/6631-6132/Games/MAME refactor to /storage/6631-6132/Games/MAME/mainroms and /storage/6631-6132/Games/MAME/NeoGeoROMs

@SRC267
Copy link
Author

SRC267 commented Jan 11, 2024

No luck, tried different combinations and even tried adding a . between > ;/

@seleuco
Copy link
Owner

seleuco commented Jan 11, 2024 via email

@seleuco seleuco reopened this Jan 11, 2024
@seleuco
Copy link
Owner

seleuco commented Jan 11, 2024

Ok. I realized where the problem was. Its very stupid :). I'm setting the paths in the emulator and that takes precedence over the mame.ini file.

I just deployed a new version 1.6.6 which will be available in a few hours that has a new option on advanced settings that you can enable to disable this behavior and so the mame.ini paths will be read. I have tried it and it has worked correctly for me. I have created a "main" directory and another "others" directory hanging from the original previusly authorized directory in the SD.

When you can download the application and try it, confirm to me that it is solved ;)

@SRC267
Copy link
Author

SRC267 commented Jan 11, 2024

Okay so I updated the app, opened advanced settings and enabled the new mame.ini option for paths.

Here's the full line for rompath in the mame.ini text file: /storage/6631-6132/Games/MAME;./roms;/storage/6631-6132/Games/NeoGeo

It still doesn't show the NeoGeo titles in the menu. Unless I've messed the path up, does it look okay to you? Initially the folder was SNK - Neo Geo, that's my preferred folder title, then changed it to NeoGeo, to see if it helped fix it, but still no luck.

@seleuco
Copy link
Owner

seleuco commented Jan 11, 2024

¿are they showed now in mame ui configure folders? mine yes.

first try something simple ... something like i did:

my original authorized path was /storage/emulated/0/MAME/

i added a new "main" and "others" so my rompath is now is (i dont have others inside main. My roms directories are siblings)

rompath /storage/emulated/0/MAME/main;/storage/emulated/0/MAME/others;./roms

@SRC267
Copy link
Author

SRC267 commented Jan 11, 2024

No, it doesn't work. Tried different ways, and removed data to try again. I have both paths on the SD card. Maybe that's why it's acting up

@seleuco
Copy link
Owner

seleuco commented Jan 11, 2024

I think you are doing something wrong. One thing I think you can get wrong is that you need to have the parent directory authorized. You have to selec it in the change rom path option from Mame4droid the directory that will contain the two siblings directories. the one from the normal mame roms and the other from neogeo. if not, Mame4droid will not see them because the parent directory is not authorized to be read.

/storage/6631-6132/Games/ should be selected in change rom path.

@SRC267
Copy link
Author

SRC267 commented Jan 12, 2024

mame.ini paths

Here's the ini path I've set, I have it ticked in the app, the menu is now blank when I selected change rom paths in general, as the ini should override that.

Menu path settings

@seleuco
Copy link
Owner

seleuco commented Jan 12, 2024

Not. You are confusing "installation path" with "ROMs path". Installation path is were the mame assets are installed. You shouldn't touch that. You should leave it as it was at the beginning. If you don't remember, uninstall the application completely. Touching this option makes the mame.ini file different instead of the one you were originally modifying. Also, if the path is not writable you will have reading problems.

You have to point "general->change ROMS path" to "/storage/6631-6132/Games" selecting "EXTERNAL STORAGE" option.

you have to set in mame ini:

/storage/6631-6132/Games/MAME;/storage/6631-6132/Games/NeoGeo;./roms

where "MAME" has your main mame folder roms and "neogeo" has your neogeo roms.

Ensure you hace enabled"advanced -> use mame.ini fo paths" if you do an uninstall and modifty again mame.ini since it would have been deleted.

Ensure you have the folders setted correctly looking in MAME ui "General settings -> Configure folders -> ROMs"

If you have a lot of files inside "/storage/6631-6132/Games" it will be slow the launch of mame4droid as it has to caching all files inside "Games" and if you have not enouth memory it could hung. In this case, you should use a diferent folder structure aproach like pointing to".... Games/MAME" with "... Games/MAME/main" and "... GAMES/MAME/NeoGeo" in the mame ini moving your main MAME files to new main folder and the same with neogeo. MAME folder only will have the two subfolders main and neogeo.

@SRC267
Copy link
Author

SRC267 commented Jan 12, 2024

This did the trick. Finally. The mistake I made was opening the MAME folder as the path and not the Games one, selecting Games as the main one rectified the issue.

@seleuco
Copy link
Owner

seleuco commented Jan 12, 2024

Yes!!! I'm happy we worked it out :)

@FlykeSpice
Copy link

FlykeSpice commented Feb 16, 2024

I think it would be better, instead of just reserving the user selected folder for roms, the selected folder will be where Mame's root'll be installed (roms, bios, where saves and ini configurations will be located).

Keeping aside mame configurations files & saves in an inacessible internal directory is a bad idea, the user can't transfer the save files and customize the configuration files, it would be better overall making the public folder mame's root.

@seleuco
Copy link
Owner

seleuco commented Feb 16, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants