unison's bidirectional folder sync allows me to mount and sync the r4 cart micro sd card with a folder on my computer. this allows me to stage modifications i want to make to the r4 cart filesystem, and keep a backup, including my save files.
staging changes is convenient so i don't have to keep the micro sd card mounted while managing individual files, adding roms. a backup is desired so if anything happens to my r4 cart i don't lose my save files, only since my last sync.
mount the vfat filesystem from the micro sd card from the r4 card:
sudo mount -t vfat /dev/sda1 ~/mnt/r4-gold -o uid=slime,gid=slime
unison configuration:
$ cat .unison/r4-gold.prf
root=/cranny/r4-gold
root=/home/slime/mnt/r4-gold
fat = true
times = true
auto = true
bidirectional sync using unison:
$ unison r4-gold
Unison 2.53.7 (ocaml 5.2.0): Contacting server...
Looking for changes
Reconciling changes
cranny/r4... mnt/r4-gold
<---- props __rpg/lastsave.ini
<---- changed nds/0350 - Pokemon Trozei! (USA).sav
new file ----> nds/0396 - Brain Age - Train Your Brain in Minutes a Day! (USA).nds
3 items will be synced, 0 skipped
16.0 MiB to be synced from cranny/r4-gold to mnt/r4-gold
512 KiB to be synced from mnt/r4-gold to cranny/r4-gold
Proceed with propagating updates? [] y
Propagating updates
Unison 2.53.7 (ocaml 5.2.0) started propagating changes at 19:39:45.97 on 11 Mar 2025
[BGN] Copying properties for __rpg/lastsave.ini from /home/slime/mnt/r4-gold to /cranny/r4-gold
[END] Copying properties for __rpg/lastsave.ini
[BGN] Updating file nds/0350 - Pokemon Trozei! (USA).sav from /home/slime/mnt/r4-gold to /cranny/r4-gold
[END] Updating file nds/0350 - Pokemon Trozei! (USA).sav
[BGN] Copying nds/0396 - Brain Age - Train Your Brain in Minutes a Day! (USA).nds from /cranny/r4-gold to /home/slime/mnt/r4-gold
[END] Copying nds/0396 - Brain Age - Train Your Brain in Minutes a Day! (USA).nds
Unison 2.53.7 (ocaml 5.2.0) finished propagating changes at 19:39:46.01 on 11 Mar 2025, 0.038 s
Saving synchronizer state
Synchronization complete at 19:39:46 (3 items transferred, 0 skipped, 0 failed)