Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

mineral55
Posts: 47
Joined: Mon Dec 13, 2021 11:52 pm
Has thanked: 6 times
Been thanked: 6 times

Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

Unread post by mineral55 »

For the less tech savvy among us that haven't thought about using a symbolic link in order to reach their gameboy roms automatically instead of having to go up a directory to access the GAMEBOY folder each time when using the Super Gameboy core, here is a short guide for you:

  1. If you keep your Super Gameboy sfc files in your SGB folder transfer them to the GAMEBOY folder within /media/fat/games/GAMEBOY/ and empty its contents and delete it (if you do this now you may skip step 5).

  2. Plug in a keyboard into your MiSTer

  3. Press the F9 key

  4. Enter root as your username and 1 as the password

  5. Delete the SGB folder if you haven't already

    Code: Select all

    rmdir /media/fat/games/SGB/

    it will complain if you have files in there in which case (making certain there's nothing in SGB that you care to save):

    Code: Select all

    rm /media/fat/games/SGB/*
    rmdir /media/fat/games/SGB/
  6. Enter the command

    Code: Select all

    ln -s /media/fat/games/GAMEBOY/ /media/fat/games/SGB

    then enter:

    Code: Select all

    exit

    and reset your MiSTer

  7. Voila! Your SGB folder is now a soft link to the GAMEBOY folder and you can access your romlist directly from the SGB core without going through extra key presses now!

I think you can do this remotely with curl but I don't know how :( Can someone post how to in this thread?

rafael
Posts: 13
Joined: Sun May 24, 2020 10:11 pm
Has thanked: 26 times
Been thanked: 5 times

Re: Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

Unread post by rafael »

I think this should do the trick (please replace the variable with the IP of your MiSTer on your local network)

Code: Select all

ssh root@$MISTER_IP_ADDRESS ln -s /media/fat/games/GAMEBOY/ /media/fat/games/SGB
rhester72
Top Contributor
Posts: 1323
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 15 times
Been thanked: 213 times

Re: Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

Unread post by rhester72 »

I'm still not sure how on earth you're symlinking on a filesystem that doesn't support soft links.
rafael
Posts: 13
Joined: Sun May 24, 2020 10:11 pm
Has thanked: 26 times
Been thanked: 5 times

Re: Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

Unread post by rafael »

rhester72 wrote: Sun Aug 14, 2022 3:00 pm I'm still not sure how on earth you're symlinking on a filesystem that doesn't support soft links.
Check this post out for more information
viewtopic.php?t=322
mineral55
Posts: 47
Joined: Mon Dec 13, 2021 11:52 pm
Has thanked: 6 times
Been thanked: 6 times

Re: Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

Unread post by mineral55 »

rafael wrote: Sun Aug 14, 2022 3:40 pm
rhester72 wrote: Sun Aug 14, 2022 3:00 pm I'm still not sure how on earth you're symlinking on a filesystem that doesn't support soft links.
Check this post out for more information
viewtopic.php?t=322
I can't seem to find much there other than symlinks work in MiSTer and I may have issues transferring to another device (links turn into text files?) so it's not a good idea to have a lot of them? Will this potentially break anything does anyone know?
User avatar
pgimeno
Top Contributor
Posts: 710
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Re: Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

Unread post by pgimeno »

If a symbolic link becomes a text file, you can always redo it. The only problem is knowing that it was a symlink to begin with.

My files are in another partition of the SD card, using ext4fs, and the "main" exFAT partition only has the Linux system, menu.rbf, the main MiSTer and MiSTer.ini, and the rest are symlinks to the other partition. Working like that for over a year now without problems, apart from case sensitivity issues in some cores due to ext4 being case sensitive, which were easy to fix, and a couple minor annoyances.

So I'd say it's pretty safe.
JayRockets
Posts: 54
Joined: Thu Aug 04, 2022 11:16 pm
Has thanked: 3 times
Been thanked: 7 times

Re: Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

Unread post by JayRockets »

rafael wrote: Sun Aug 14, 2022 6:08 am I think this should do the trick (please replace the variable with the IP of your MiSTer on your local network)

Code: Select all

ssh root@$MISTER_IP_ADDRESS ln -s /media/fat/games/GAMEBOY/ /media/fat/games/SGB
where do I enter this? it isn't working in command prompt

edit: nevermind. I must have uninstalled OpenSSHClient. it worked.
User avatar
ItalianGrandma
Posts: 211
Joined: Sun May 24, 2020 7:09 pm
Has thanked: 45 times
Been thanked: 52 times
Contact:

Re: Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

Unread post by ItalianGrandma »

For anyone using WinSCP, you can just right click inside the directory you want to add the link to and add a new link. Then you specify the path it points to and you’re all set.

Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 195 times

Re: Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

Unread post by Malor »

A better way of doing this, which didn't become mainstream on the Mister until after this thread was created, is to use favorites.sh. You can get it by using update_all, and turning on the Wizzo extension scripts.

Once you've got it, just run that script and point it at the ROM you want. Then name it whatever you like, and it will create and save it as an "mgl" file. This is a text file that tells the menu what core to launch and what ROM to use. It functions rather like a symlink, but doesn't depend on any filesystem features. It should work to load any core and ROM that the main menu can find, including any filesystem type or network share.

If you can mount a location into the directory tree somewhere, an MGL should be able to load ROMs from there.

KOLWE-X
Posts: 11
Joined: Thu May 26, 2022 2:29 pm
Has thanked: 1 time

Re: Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

Unread post by KOLWE-X »

Thanks mineral55,
works good so far. But unfortunatley I can't use my saves in the GB core and/or in the SGB core. If tried it with:

ln -s /media/fat/saves/GAMEBOY/ /media/fat/saves/SGB

But that doesn't work :(

Is there any way that both cores can share the same save file?
Thanks again for all the good work here.

Best regards,

kolwe-x

mineral55
Posts: 47
Joined: Mon Dec 13, 2021 11:52 pm
Has thanked: 6 times
Been thanked: 6 times

Re: Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

Unread post by mineral55 »

No problem, it really wasn't any work on my part. I just remembered that MiSTer runs on linux and it might be possible to make links and somehow it is!

I'm guessing SGB doesn't handle saves the same as GAMEBOY? I guess they should in theory handle saves the same. Does anyone know?

KOLWE-X
Posts: 11
Joined: Thu May 26, 2022 2:29 pm
Has thanked: 1 time

Re: Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

Unread post by KOLWE-X »

Hi mineral55,

I've tested it and you can use the saves from GB in the SGB core or the other way around. But I have to copy the save files manually.
Hopefully someone will have a solution in future. That would be very nice :D

mineral55
Posts: 47
Joined: Mon Dec 13, 2021 11:52 pm
Has thanked: 6 times
Been thanked: 6 times

Re: Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

Unread post by mineral55 »

Oh you just forgot to empty SGB you silly goose! You can't have a symbolic link exist with the folder it's linking away from lol. It should recognize your GAMEBOY saves once you've backed up and emptied SGB and run ln -s /media/fat/saves/GAMEBOY/ /media/fat/saves/SGB

KOLWE-X
Posts: 11
Joined: Thu May 26, 2022 2:29 pm
Has thanked: 1 time

Re: Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

Unread post by KOLWE-X »

Nope, that doesn't work.
I've got the GAMEBOY directory in my SGB Save directory. So the system can't see the save files. :?
It should see the saves directly inside the SGB save folder, but how?

mineral55
Posts: 47
Joined: Mon Dec 13, 2021 11:52 pm
Has thanked: 6 times
Been thanked: 6 times

Re: Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

Unread post by mineral55 »

what does ls -l output from /media/fat/saves/?

KOLWE-X
Posts: 11
Joined: Thu May 26, 2022 2:29 pm
Has thanked: 1 time

Re: Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

Unread post by KOLWE-X »

Hi,
sorry for my late response, but I was busy the last days.

As you can see in the screenshot from Filezilla, the command

ln -s /media/fat/saves/GAMEBOY/ /media/fat/saves/SGB

does this.

So the MiSTer Core of SGB can't see the saves, because it's searching the SGB saves file, but not the GAMEBOY file.
Is there any possible command, so the saves from GB will show up in the SGB folder?

Thanks again for all help.

Attachments
1.JPG
1.JPG (39.48 KiB) Viewed 14133 times
mineral55
Posts: 47
Joined: Mon Dec 13, 2021 11:52 pm
Has thanked: 6 times
Been thanked: 6 times

Re: Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

Unread post by mineral55 »

That's not the output of ls -l. I suspect that your link didn't take or you made some kind of typo which ls -l would reveal. I'm assuming you didn't SSL into your MiSTer so you can't copy and paste the output? Since you're on windows I'm not sure what the best app for it is so I can't be of help there. I personally tested symlinking saves/SGB pointing to saves/GAMEBOY and it worked fine with the GAMEBOY core using its folder as always and the SGB core now referring to saves/GAMEBOY (via the symlink named SGB). I believe you skipped a step or did something wrong

KOLWE-X
Posts: 11
Joined: Thu May 26, 2022 2:29 pm
Has thanked: 1 time

Re: Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

Unread post by KOLWE-X »

I don't know what to do else? It's the same procedure as for the games, like your first post, but with the saves it doesn't work.
I've use Putty to get into the root of my MiSTer, but it's always doing this, like in the picture I#ve uploaded.
So, nobody seems to have this problem, because no one else response to our posts. I can live with this issue, so it's ok. I give up. :(

Tulius
Posts: 40
Joined: Sat May 29, 2021 4:51 am
Has thanked: 3 times
Been thanked: 4 times

Re: Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

Unread post by Tulius »

I wanted to do the same for NeoGeo CD core to search for .CHDs in a new NeoGeocd game folder instead of together with MVS/AES rom folders, because they are two different consoles.

mineral55
Posts: 47
Joined: Mon Dec 13, 2021 11:52 pm
Has thanked: 6 times
Been thanked: 6 times

Re: Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

Unread post by mineral55 »

KOLWE-X wrote: Sun Feb 26, 2023 12:50 pm

I don't know what to do elese? It's the same procedure as for the games, like your first post, but with the saves it doesn't work.
I've use Putty to get into the root of my MiSTer, but it's always doing this, like in the picture I#ve uploaded.
So, nobody seems to have this problem, because no one else response to our posts. I can live with this issue, so it's ok. I give up. :(

Why give up so easy?
This is what I did again to test and my output with ls -l

Code: Select all

/media/fat/saves# ln -s ../saves/GAMEBOY/ ../saves/SGB
/media/fat/saves# ls -l
total 2432
drwxr-xr-x 2 root root 131072 Feb  8 10:21 ATARI7800
drwxr-xr-x 2 root root 131072 Jun 20  2022 AtariLynx
drwxr-xr-x 2 root root 131072 Nov 24 20:08 GAMEBOY
drwxr-xr-x 2 root root 131072 Sep 25 22:45 GAMEBOY2P
drwxr-xr-x 2 root root 131072 Feb 15 15:24 GBA
drwxr-xr-x 2 root root 131072 Sep 25 03:50 GBA2P
drwxr-xr-x 2 root root 131072 Dec  3 18:19 GBC
drwxr-xr-x 2 root root 131072 Feb 14 03:52 Genesis
drwxr-xr-x 2 root root 131072 Jan 11 04:34 MegaCD
drwxr-xr-x 2 root root 131072 Jan 21 20:54 NEOGEO
drwxr-xr-x 2 root root 131072 Feb  5 04:46 NES
drwxr-xr-x 2 root root 131072 Sep 13 21:32 PokemonMini
drwxr-xr-x 2 root root 131072 Feb 21 08:19 PSX
lrwxr-xr-x 1 root root     17 Feb 26 13:00 SGB -> ../saves/GAMEBOY/
drwxr-xr-x 2 root root 131072 Feb  9 06:10 SGB_Backup
drwxr-xr-x 2 root root 131072 Sep 28 14:01 SMS
drwxr-xr-x 2 root root 131072 Feb 20 05:19 SNES
drwxr-xr-x 2 root root 131072 Dec 26 08:39 TGFX16
drwxr-xr-x 2 root root 131072 Jul 28  2022 WonderSwan

My original SGB folder was changed to SGB_Backup (since I can't create a symlink when a folder of the same name exists as aforementioned) and to test my symlink I go into the SGB core and boot up Metroid and load up my first save. It works! Symlinks work perfectly fine with saves on MiSTer. You're doing something wrong

Attachments
20230226_130641-Metroid II - Return of Samus (World).png
20230226_130641-Metroid II - Return of Samus (World).png (263.42 KiB) Viewed 14059 times
maze
Posts: 18
Joined: Tue Nov 22, 2022 6:48 am
Has thanked: 2 times
Been thanked: 1 time

Re: Using a Symbolic Link to Make Accessing ROM Set Easier From the Super Gameboy Core

Unread post by maze »

Thanks for this thread. I've got a bunch of symlinks set up now, which is great.

Is it safe to link from /saves/GBC to /saves/GAMEBOY/? I assume so, but I'm not sure if there would be any conflicts.

Post Reply