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

fix: fix N64 standalone start script #991

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

LaurensBosscher
Copy link
Contributor

@LaurensBosscher LaurensBosscher commented Dec 18, 2024

Running the line with the "*" on the terminal gives the following output:

RK3566-X55:~ # cp /usr/local/share/mupen64plus/mupen64plus.cfg* /storage/.config/mupen64plus/mupen64plus.cfg
cp: can't create '/storage/.config/mupen64plus/mupen64plus.cfg/mupen64plus.cfg': Path does not exist
cp: can't create '/storage/.config/mupen64plus/mupen64plus.cfg/mupen64plus.cfg.rgarc': Path does not exist

I think this was added to support a device (instead of platform) specific configuration at some point but if we want to support this we need need further modification(s) for the install script/launch script. The current implementation breaks for all platforms and all systems.

@r3claimer
Copy link
Contributor

This is a better way to handle for sure but this is not it and you will break several devices.

@r3claimer r3claimer marked this pull request as draft December 18, 2024 23:02
@LaurensBosscher
Copy link
Contributor Author

LaurensBosscher commented Dec 18, 2024

This is a better way to handle for sure but this is not it and you will break several devices.

Hi @r3claimer, currently the configuration is broken for all platforms with multiple configurations in rocknix\distribution\packages\emulators\standalone\mupen64plus-sa\mupen64plus-sa-core\config:

image

With this fix we'll go from having all RK3266 and RK32566 devices being broken to "only" the device specific configurations not being applied. Currently no configuration file is being applied at all so to me this seems like a step in the right direction.

I understand that this is not the final solution but judging by the scripts we would need to access the device id (e.g the oga, ogab, ogs part in the filename) in the bash script somehow. I only see references to a PLATFORM, not a device id. Could you make a recommendation on how would we could do this?

Edit:

I see that for e.g ODroid Go Advanced we're taking care of the .oga part for the config in device quirks:

image

Handling device specific configurations in the device quirks seems sensible to me. Let me know if you agree.

If I'm reading the script correctly this will work with this fix. Since:

if [ -f "/storage/.config/mupen64plus/mupen64plus.cfg.ogabe" ]; then
  rm /storage/.config/mupen64plus/mupen64plus.cfg
  cp /storage/.config/mupen64plus/mupen64plus.cfg.ogabe /storage/.config/mupen64plus/mupen64plus.cfg
fi

Will copy the file to /storage/.config/mupen64plus/mupen64plus.cfg where start_mupen64plus.sh expects it to be.

Thus, in conclusion, this fix should work both for devices that have a device specific configuration file and for devices that don't. If a device specific configuration is not properly handled in the device quirks, I would recommend that we fix it in there instead of adding device specific code in the generic start_mupen64plus.sh script.

Could you double check this?

@LaurensBosscher LaurensBosscher marked this pull request as ready for review December 18, 2024 23:27
@@ -37,7 +37,7 @@ mkdir -p ${GAMEDATA}

# Copy files to GAMEDATA
if [[ ! -f "${M64PCONF}" ]]; then
cp ${SHARE}/mupen64plus.cfg* ${M64PCONF}
cp ${SHARE}/mupen64plus.cfg ${M64PCONF}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cp ${SHARE}/mupen64plus.cfg ${M64PCONF}
cp ${SHARE}/mupen64plus.cfg* ${GAMEDATA}

I think this is the fix that @r3claimer is looking for.

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

Successfully merging this pull request may close these issues.

3 participants