Georges-Antoine Assi 8a243c71e9 Sync saves from every in-browser player as a browser device (#5091)
* feat(player): play RPG Maker 2000/2003 games in the browser with EasyRPG

Embed the EasyRPG web player for extracted game folders on the rpg-maker
platform. The backend generates the player's index.json from the scanned
files and merges in the free EasyRPG RTP under every name the official
and fan RTPs give its assets, so games that lean on the RTP find them.
In-game saves sync with the user's RomM saves through the player's
IndexedDB storage.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* refactor(easyrpg): read the free RTP from a fixed path instead of an env var

The full image always keeps the RTP at /var/www/html/assets/easyrpg/rtp,
so the path is a constant beside the web path nginx serves it under. The
dev container links its copy there at startup.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(easyrpg): code-review fixes for the save sync and asset endpoint

- Wait for an in-flight push before the quit push, so the newest save uploads
- Keep Play disabled until the fresh rom (and its saves) is fetched
- Stop onPlay and the rom fetch from acting after the view unmounts
- Leave through usePlayerExit like the other players
- Handle a rejected IDB commit when the run itself fails
- Track uploads by the browser's file name
- Load only visibility and files per asset request, not the full rom
- Serve DEV_MODE files as octet-stream, matching nginx
- Make the traversal test actually reach the endpoint

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* refactor(easyrpg): simplify pass over the player and asset endpoint

- Load only file paths per asset request, and look up RTP folders in O(1)
- Reuse RomFile.file_name_for_download and usePlayerFullscreen
- Share one dev/prod serve helper for game and RTP files
- Derive the save sync's game key from the rom
- Have the RTP table tool reuse normalize_name
- Make save-module internals private and tidy the prepare/read loops

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* feat(easyrpg): flag RPG Maker game folders on the rom schemas

Gallery lists carry no files, so the frontend guessed that every multi-file
rom on the rpg-maker platform was playable, including RPG Maker XP/VX/MV
folders. Rom now has a deferred `is_easyrpg_game` subquery (an RPG_RT.ldb at
the folder root), loaded with the other gallery file stats and derived from
loaded files on the with_files path, and the frontend reads it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* refactor(easyrpg): drop server save sync, keep saves per user in the browser

Server sync moves to a follow-up that puts the web players on device sync.
Saves now stay in the player's IndexedDB, as js-dos does, with the same note
on the start page. The player is launched as `<rom id>-<user id>` so each
RomM account sharing a browser profile keeps its own saves; nginx and Vite
drop the user id when routing to the backend.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* feat(sync): let a client ask negotiate to restore the saves it lost

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* feat(saves): sync web player saves as a browser device

A shared layer for the in-browser players: each browser profile registers
as a sync device, keeps every account's saves in its own IndexedDB store,
negotiates them with the server at launch (restoring any it lost), and
pushes changes with the device's conflict guard. Hashes match the server's,
including its zip-entry hash.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* feat(emulatorjs): save as the browser's sync device, with the slot guard

EmulatorJS now uploads and downloads as this browser's registered device
instead of the IP-based login device, confirms downloads with their hash, and
lets a write that continues the slot's head be refused when another device
wrote the slot since; that progress is archived and the session keeps
writing to the archive.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* feat(settings): list, rename, pause and remove your devices

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* feat(player): sync EasyRPG, js-dos, PICO-8 and Ruffle saves with RomM

Each player's own storage is restored from the browser's synced copy before
boot and captured back during play and on leave:
- EasyRPG: its IDBFS saves, one slot per in-game slot
- js-dos: its changes zip through fsChanges pull/push, migrating saves it
  kept in OPFS before
- PICO-8: cartdata files, flushed by loading a blank cart on leave
- Ruffle: the game's SharedObjects zipped into one save, kept out of
  localStorage between plays so accounts don't share them

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(easyrpg): address Greptile review

- Start timing the play session once the player page loads
- Use object-form props in the view test's button mock
- Keep the RTP table tool's docstring to one sentence

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(saves): address Greptile review on web device save sync

- Remove EasyRPG save files that sync deleted, so the game cannot load them
- Keep the stale-device guard on device sync's page-close uploads
- Restore only the Ruffle SharedObjects the current SWF can reach

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(saves): code-review pass on web device save sync

Restore master's EasyRPG RTP table path lost in the merge, serialize
DeviceSaveSync pushes, only mark a no_op synced when the server hash
matches, forget the browser device when it is removed, close a late
EasyRPG IndexedDB connection, send content_hash on unload updates, and
share the IndexedDB helpers and slot-conflict check.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* refactor(saves): simplify pass on web device save sync

Archive conflicts through uploadArchivedSave and isSlotConflict, skip
hashing unchanged bytes, share bytesEqual from saveSync/hash, pass
restore_unlisted from DeviceSaveSync, use newest() for the EmulatorJS
slot head, and trim one-off Ruffle and PICO-8 helpers.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* chore(saves): review-polish pass on web device save sync

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* docs(saves): humanizer pass on web device save sync comments

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* refactor(saves): open every player IndexedDB through openDb

The save sync store now rejects when another tab blocks its upgrade
instead of waiting forever, as the EasyRPG and pending-asset stores
already did.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* feat(sync): let negotiate scope server saves to the client's emulators

A browser player's saves load only in that player, so a native save in
the same slot must not pair with it or download into it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(saves): register the browser device on each launch

Registration returns the existing device, so calling it every time
brings back a device removed from any browser, which EmulatorJS
otherwise kept sending as a dead id. The cached id now serves only when
offline. DeviceSaveSync also negotiates within its own emulator.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* refactor(player): share web player save sync through useDeviceSaveSync

The coalesced polled push, the flush before leaving, the page-close
capture and the discard prompt live in one composable, and the player
suites share one DeviceSaveSync fake from test-utils.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(saves): update one archive per slot after another device takes it

A slot refused mid-session archived every later write as a new save.
Later writes now update that archive in place, page-close sends
included, and the next launch settles the slot.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* perf(ruffle): skip unchanged polls and upload saves every 5 minutes

Polls compare the stored SharedObjects with the last read before zipping
them, and keep what changed in the browser, uploading it at most every
5 minutes. Leaving and page close still upload at once.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* perf(ruffle): sync saves like EmulatorJS, polling every second

Polls compare the raw stored strings, so an idle second decodes,
zips and hashes nothing. A change uploads once two polls agree on it,
and a failing upload backs off from 2 to 30 seconds through the retry
backoff EmulatorJS uses, now shared from saveSync. Leaving still
uploads at once.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-04 10:05:19 -04:00
2026-04-15 19:20:17 -04:00
2024-05-21 19:22:14 -04:00
2024-02-11 16:41:36 +01:00
2024-07-09 13:43:14 +02:00

romm logo

A beautiful, powerful, self-hosted ROM manager and player.

Trendshift hackernews badge
selfh.st badge Discord

Overview

Scan, enrich, browse and play your ROM collection from one beautiful & free self-hosted app. Metadata from 10+ providers, save sync across your devices, and support for over 400 platforms. RomM is a must-have for anyone who plays on emulators.

Browsing a library and playing a game in RomM

Features

Installation

The easiest way to start is with the Quick Start Guide in the docs. If you're having trouble with setup, please review the page for troubleshooting steps.

Prefer a hosted deploy over wiring up the stack yourself?

Deploy on Hostinger
Starting at $6.49/mo · Setup guide

Deployment and infrastructure support for this install is handled by Hostinger. Prices are indicative and may not reflect current offerings. Signups through the link above send a share of the revenue back to us, which helps fund the project.

Official apps

Playnite libraryPlaynite logo Playnite plugin

Effortlessly integrate your retro game collection into Playnite, the open-source game library manager that provides a unified interface for all of your games on PC.

Windows Desktop QR pairing

Install  by @gantoine


Argosy libraryArgosy logo Argosy

Sync your library, download games on demand and track your achievements, from a gamepad-first interface designed for Anbernic, Retroid Pocket, Odin, and similar devices.

Android Handhelds QR pairing Save sync

Download  by @tmgast


Grout multi-selectGrout logo Grout

A lightweight client for your favorite handheld custom firmwares*. Download games, box art and BIOS files wirelessly, and sync your saves automatically as you play.

Linux Handhelds Save sync

Quick start  by @BrandonKowalski

*Supports Allium, Batocera, Knulli, MinUI, muOS, NextUI, Onion, ROCKNIX, Spruce and TrimUI.

Community

Here are some cool projects maintained by members of our community. Please note that our team does not regularly review their source code.

Mobile

Desktop

Handhelds

Other

Support the project

Consider supporting this project on Open Collective. Funds cover hosting, development, and maintenance, and we pass some along to community projects to nurture a healthy ecosystem of apps.

Open Collective

Our Friends

Here are a few projects that we think you might like:

  • Lutris: Open gaming platform for Linux
  • Cocoon: Controller-first Android frontend for retro handhelds
  • muOS: Custom firmware for Anbernic and other handhelds
  • RetroDECK: Retro gaming on SteamOS and Linux
  • Steam ROM Manager: An app for managing ROMs in Steam
  • Hasheous: Hash lookup service that maps ROMs to game metadata
  • Gaseous: Another ROM manager with web-based emulator
  • Playmatch: Microservice for matching ROM hashes to games
  • EmulatorJS: An embeddable, browser-based emulator
  • PortMaster: Native game ports for Linux handhelds
  • MelonLoader: Universal mod loader for Unity games
  • NextUI: MinUI-based custom firmware for TrimUI handhelds
  • RetroAchievements: Achievements for retro games

Supported By

These companies support us by providing their tools for free:

Greptile Socket
Description
No description provided
Readme AGPL-3.0 497 MiB
Languages
Python 50.1%
Vue 40.3%
TypeScript 7.2%
CSS 0.9%
Shell 0.6%
Other 0.8%