batocera-linux / batocera.linux

batocera.linux
https://batocera.org
Other
1.96k stars 512 forks source link

When putting files into /usr/share/scummvm (extras folder), they are deleted on next boot #6967

Closed StephanRoemer closed 9 months ago

StephanRoemer commented 2 years ago

Issue: when trying to copy files like the MT-32 into /usr/share/scummvm, they get deleted upon next boot.

This isn't an issue when using the standalone scummVM version by pressing F1, because we can change the extras folder manually and it persists. BUT when using the one from Emulation Station (scummVM not libretto), then the "extras" path gets reset to /usr/share/scummvm. This results in games either not launching or not launching correctly, because the MT-32 files cannot be found.

StephanRoemer commented 2 years ago

I just checked: setting the extras folder per game also resets back to /usr/share/scummvm

lbrpdx commented 2 years ago

When you put files in /usr/share/scummvm (or anywhere outside /userdata/) you need to log into the Batocera system and run the command batocera-save-overlay to make them persistent upon reboot. See https://wiki.batocera.org/modify_the_system_while_it_s_running#creating_a_batocera_filesystem_overlay

dmanlfc commented 2 years ago

i guess the question is, what are these extra files & what do they do @StephanRoemer ? should we not have a 'extras' path in userdata for scummvm @lbrpdx ? ideally we don't want modifications which get wiped out with batocera upgrades after time

StephanRoemer commented 2 years ago

i guess the question is, what are these extra files & what do they do @StephanRoemer ? should we not have a 'extras' path in userdata for scummvm @lbrpdx ? ideally we don't want modifications which get wiped out with batocera upgrades after time

In the case of the MT-32 files: these are the ROM files of the MT-32, that are needed by scummVM in order to make use of the MT-32 emulation. These files are expected in the extra path. Game path is also possible, but that would create tons of copies of the same file. I agree that it would be great to have a way to keep those edits with a new update regarding the overly-solution. https://docs.scummvm.org/en/latest/advanced_topics/understand_audio.html#mt-32-device-emulation

Place these ROMs in the game directory, in your extrapath, or in the directory where your ScummVM executable resides. ScummVM also looks for CM32L_PCM.ROM and CM32L_CONTROL.ROM—the ROMs from the CM-32L device—and uses these instead of the MT32 ROMs if they are available.

dmanlfc commented 2 years ago

@StephanRoemer so create a folder like - /userdata/system/configs/scummvm/extras Then via F1 - use the scummvm-config to point the extra path to the above folder Should work if your synth ROMs are in there.

dmanlfc commented 2 years ago

Please confirm then close - thanks

StephanRoemer commented 2 years ago

That's actually what I tried first, but when starting scummvm from Emulation Station, the extras folder reverts to /usr/share/scummvm/ I guess this is due to the fact that there are important *.DAT files in that folder that scummvm needs for several games.

The extras folder and the save game folder always revert to their defaults. The entries are then colored red.

dmanlfc commented 2 years ago

ahhh i see the problem, try this build...

https://drive.google.com/drive/folders/1SO6Mwu-UY3-n00dTSClu0i9JkIAtZZUc?usp=sharing

instructions to manually upgrade are in the readme file. put your MT-32 ROM files in /userdata/system/configs/scummvm/extras

test it out & let me know.

StephanRoemer commented 2 years ago

Well, looks like I wrecked my Batocera install. The device definitely had 16 GB free on the SD card. Not sure where this issues came from.

Bildschirmfoto 2022-09-04 um 22 04 27
StephanRoemer commented 2 years ago

Can I just extract the batocera.update and copy it over to /boot ?

dmanlfc commented 2 years ago

Are you x86?

dmanlfc commented 2 years ago

Can I just extract the batocera.update and copy it over to /boot ?

Yes, but what system have you got?

StephanRoemer commented 2 years ago

I’m on a Rasp Pi 4. For now, I managed to get my old system back working by copying the Pi 4 boot files 🥳

dmanlfc commented 2 years ago

I'm away with work but this is the file that changed. Grab that and replace it then use batocera-save-overlay to make it permanent.

https://github.com/batocera-linux/batocera.linux/blob/bf802cfeb42b02f37e795c672f4b92e85b0abb47/package/batocera/core/batocera-configgen/configgen/configgen/generators/scummvm/scummvmGenerator.py

Use find / -name scummvmGen* to find the location of the file to replace

StephanRoemer commented 2 years ago

Hey Daniel, thanks so much for your efforts despite the fact that you are away with work. I could get it working, but there is still something I don't understand.

Could it be that there are different configs for scummvm standalone (opened via F1) and scummvm standalone (opened via Emulation Station)?

scummvm via F1, settings are pointing to the SHARE folder: IMG_2786

scummvm via ES, settings are pointing to userdata/config and cannot be changed (settings revert) IMG_2785

dmanlfc commented 2 years ago

That's correct we want to set the directory. What's happens when you add your midi ROMs there?

dmanlfc commented 2 years ago

Note: F1 is for extreme config changes

StephanRoemer commented 2 years ago

Yes, yes, yes, heureka! Putting it into /userdata/configs/scummvm worked! Thanks! Now the only question is, if the DAT files should also be moved in there, since we can only have one extra folder, if I'm understanding this correctly?

EDIT: want me to close the issue?

dmanlfc commented 2 years ago

Anything that is extra should go in there I assume

StephanRoemer commented 1 year ago

Has this been merged with the latest beta?

n2qz commented 11 months ago

Path for these MT-32 files in current release (v38) is /userdata/bios/scummvm/extra I believe this issue can be closed out.