Skip to content

Attempt to fix NextUI (and other CFW platforms) save sync path resolution when local variants are mismatched - #269

Merged
BrandonKowalski merged 1 commit into
rommapp:mainfrom
hilts-vaughan:fix-save-sync-issue
Aug 23, 2026
Merged

Attempt to fix NextUI (and other CFW platforms) save sync path resolution when local variants are mismatched#269
BrandonKowalski merged 1 commit into
rommapp:mainfrom
hilts-vaughan:fix-save-sync-issue

Conversation

@hilts-vaughan

Copy link
Copy Markdown
Contributor

I ran into a problem where I was unable to get my Romm server to sync a save over to my NextUI device (TrimUI Brick). I am not completely sure what happened but I believe it to be the following sequence of events:

  1. I already had a copy of a ROM on my device, since I was using it without Grout. This was in the MGBA folder.
  2. I connected my device to Grout and downloaded a copy of the game. This placed it in GBA, which I guess was the default.
  3. I already had some save progress and wanted to import this into the device. I ran sync and got some files synced and/or pulled down but it looks like it just pushed an autosave to ROMM
  4. I deleted the blank save file (it came from launching the game I presume, empty with all FF) and tried syncing again. Nothing.
  5. I tried changing the directory mapping to MGBA (which I prefer to use anyway) and pull again, and nothing.

After futzing around with the SQL Lite DB, it would appear that at some point along the way the sync manager was dropping saves in the GBA folder even though the ROM was in MGBA. It would seem that when pulling fresh, remote saves
Grout was refusing to pull them when using mGBA. Codex did manage to fix this over FTP when I gave it control. The following was generated by Codex and left untouched:


  • NextUI scanned installed ROMs under CFW keys such as gba while the metadata cache was indexed by RomM slugs such as GBA. This made every local ROM cache lookup miss and prevented remote-only save discovery even when the downloaded ROM basename exactly matched RomM. Resolve the inverse platform binding during NextUI scans and cover the real GBA/MGBA layout with a regression test.
  • Preserve the emulator-specific save directory inferred from the installed ROM folder so a ROM launched from Game Boy Advance (MGBA) downloads into Saves/MGBA instead of the platform's default Saves/GBA. For subsequent updates, pair timestamped RomM download operations with the already validated local save by ROM and managed slot, retaining its exact filename, path, and emulator directory rather than constructing a second misplaced file.
  • Add regression coverage modeled on the Final Fantasy Tactics Advance failure reproduced on a NextUI TrimUI Brick: initial remote-only discovery now carries MGBA forward, and a newer server save with a datetime-tagged filename overwrites the existing plain local save path. The full Go test suite passes in the project's official SDL-equipped build image.

I am attaching this in case it is useful. I have run the tests via Docker but I don't know enough about the codebase to prove correctness. Let me know if this is useful at all.

NextUI scanned installed ROMs under CFW keys such as gba while the metadata cache was indexed by RomM slugs such as GBA. This made every local ROM cache lookup miss and prevented remote-only save discovery even when the downloaded ROM basename exactly matched RomM. Resolve the inverse platform binding during NextUI scans and cover the real GBA/MGBA layout with a regression test.

Preserve the emulator-specific save directory inferred from the installed ROM folder so a ROM launched from Game Boy Advance (MGBA) downloads into Saves/MGBA instead of the platform's default Saves/GBA. For subsequent updates, pair timestamped RomM download operations with the already validated local save by ROM and managed slot, retaining its exact filename, path, and emulator directory rather than constructing a second misplaced file.

Add regression coverage modeled on the Final Fantasy Tactics Advance failure reproduced on a NextUI TrimUI Brick: initial remote-only discovery now carries MGBA forward, and a newer server save with a datetime-tagged filename overwrites the existing plain local save path. The full Go test suite passes in the project's official SDL-equipped build image.
@BrandonKowalski
BrandonKowalski merged commit d1e3e59 into rommapp:main Aug 23, 2026
2 checks passed
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.

2 participants