Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| user:rion [2021/09/16 10:52] – [AMD Troubleshooting Tearfree and Freezes] rion | user:rion [2026/06/10 14:45] (current) – rion | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | <WRAP center round important 90%> | + | ====== Storage Manager ====== |
| - | Under Construction!</ | + | |
| - | ===== Switchres - minimum dot clock ===== | + | {{toc>}} |
| - | <WRAP center round info 60%> | + | > Introduced in **Batocera v43**. |
| - | Most of this information has been gathered from [[https:// | + | |
| + | Batocera' | ||
| + | |||
| + | USB drives, external hard drives, SSDs, SD cards, | ||
| + | |||
| + | <WRAP tip> | ||
| + | The Storage Manager introduced in Batocera v43 allows multiple drives to be combined into a single ROM library without requiring symbolic links, manual mounts, or custom scripts. | ||
| </ | </ | ||
| - | Fun fact about CRTs: they receive more data than they actually display and keep those extra bits outside of the frame at the top and the bottom. This will be relevant for the next paragraph. | + | {{wiki:use_external_storage_system_settings.png? |
| - | The dot clock. Essentially, | ||
| - | The issue with modern graphics cards is that they have a **minimum** required bandwidth to function, anything below that will simply not render (or in some cases, lock up the hardware). Typical minimum bandwidths for these cards are 8 p/s, 12 p/s and 25 p/s. Sometimes the minimum bandwidths will differ depending on which ports are used, digital ports tend to have an even higher minimum bandwidth. | + | ===== Overview ===== |
| - | So what can we do about this? The answer is simple: | + | |
| - | === Super resolutions === | + | The Storage Manager can: |
| - | CRTs are beautiful in the sense that they don't think in pixels, only lines. So essentially, | + | |
| + | | ||
| + | * Format and prepare new drives | ||
| + | * Use multiple drives simultaneously | ||
| + | * Present all ROMs as a single library under ''/ | ||
| + | | ||
| + | | ||
| - | It' | + | From the user' |
| - | So therefore, we will let Switchres calculate | + | < |
| + | / | ||
| + | </ | ||
| + | |||
| + | Batocera handles | ||
| + | |||
| + | {{wiki: | ||
| + | |||
| + | A simplified overview: | ||
| + | |||
| + | < | ||
| + | Internal ROMs | ||
| + | │ | ||
| + | Drive 1 /roms | ||
| + | │ | ||
| + | Drive 2 /roms | ||
| + | │ | ||
| + | MergerFS | ||
| + | │ | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | ===== Requirements ===== | ||
| + | |||
| + | A drive must contain | ||
| + | |||
| + | < | ||
| + | roms | ||
| + | </ | ||
| + | |||
| + | Supported: | ||
| + | |||
| + | < | ||
| + | Drive | ||
| + | └── roms | ||
| + | ├── nes | ||
| + | ├── snes | ||
| + | └── psx | ||
| + | </ | ||
| + | |||
| + | Not supported: | ||
| + | |||
| + | < | ||
| + | Drive | ||
| + | └── Batocera | ||
| + | └── roms | ||
| + | </ | ||
| + | |||
| + | Not supported: | ||
| + | |||
| + | < | ||
| + | Drive | ||
| + | ├── nes | ||
| + | ├── snes | ||
| + | └── psx | ||
| + | </ | ||
| + | |||
| + | The Storage Manager currently expects the '' | ||
| + | |||
| + | ===== Using Existing Drives ===== | ||
| + | |||
| + | |||
| + | |||
| + | When Batocera detects a mounted drive containing a compatible root-level | ||
| + | |||
| + | {{wiki: | ||
| + | |||
| + | After accepting the prompt, Batocera adds the drive to the storage pool. | ||
| + | |||
| + | {{wiki: | ||
| + | |||
| + | After the merge completes, the ROMs stored on the drive become available alongside | ||
| + | |||
| + | ===== Formatting a New Drive ===== | ||
| + | |||
| + | |||
| - | Here's an example: let's say you're playing | + | If a blank drive is detected, Batocera can automatically prepare it for game storage. |
| - | Same goes for any other modeline, like for 256x224 it would calculate 512x224x60, 768x224x60 and so on until it meets the minimum required bandwidth (dot clock) set in the INI. | + | {{wiki: |
| - | < | + | < |
| - | Super resolutions are only supported by MAME and Libretro cores. | + | Formatting a drive will permanently erase all existing data stored on that drive. Make sure any important files have been backed up before proceeding. |
| </ | </ | ||
| - | ===== Testing modelines ===== | + | |
| - | {{: | + | Selecting **Format & Merge** will format the drive and add it to the Storage Manager. |
| - | configure switchres.ini to your monitor (WinScp) | + | {{wiki: |
| - | Connect to Batocera | + | Batocera |
| - | Have a keyboard connected | + | * Format the drive |
| + | * Create | ||
| + | * Generate the standard ROM directory structure | ||
| + | * Merge the drive into the Storage Manager | ||
| + | * Refresh the game lists | ||
| + | |||
| + | {{wiki: | ||
| + | |||
| + | ===== Using Multiple Drives ===== | ||
| + | |||
| + | Multiple drives can be used simultaneously. | ||
| + | |||
| + | Example: | ||
| - | Exit Emulation Station | ||
| < | < | ||
| - | /etc/init.d/S31emulationstation stop | + | /media/roms1/roms |
| + | / | ||
| </ | </ | ||
| - | or | + | Batocera combines them into a single virtual library: |
| - | Exit to terminal | + | < |
| - | '' | + | / |
| + | </ | ||
| + | |||
| + | Games can be distributed across multiple drives while still appearing as one collection inside EmulationStation. | ||
| + | |||
| + | ===== Internal Drives ===== | ||
| + | |||
| + | The Storage Manager is not limited | ||
| + | |||
| + | Additional internal drives can also be used. | ||
| + | |||
| + | For example: | ||
| - | From putty type for this to test modeline 640x480@60 with configured monitor profile | ||
| < | < | ||
| - | DISPLAY=:0 switchres 640 480 60 -i switchres.ini -s -l grid | + | / |
| + | / | ||
| </ | </ | ||
| - | You can change between 2 types of grids with Tab. | ||
| - | Exit pressing Escape from keyboard to try a new modeline | + | As long as the drive is mounted by Batocera and contains |
| + | |||
| + | This includes: | ||
| + | |||
| + | * SATA hard drives | ||
| + | * SATA SSDs | ||
| + | * NVMe SSDs | ||
| + | * USB storage devices | ||
| + | * SD cards | ||
| + | |||
| + | <WRAP info> | ||
| + | The drive name does not matter. What matters is that the mounted drive contains a root-level '' | ||
| + | </ | ||
| + | |||
| + | ===== Safe Drive Removal ===== | ||
| + | |||
| + | |||
| + | |||
| + | Drives can be safely removed from: | ||
| + | |||
| + | * **Main Menu** | ||
| + | * **System Settings** | ||
| + | * **Eject an Extra Disk** | ||
| + | |||
| + | {{wiki: | ||
| + | |||
| + | After selecting the drive, Batocera asks for confirmation before removing it from the storage pool. | ||
| + | |||
| + | {{wiki: | ||
| + | |||
| + | Batocera automatically updates the storage pool and refreshes the game lists. | ||
| + | |||
| + | {{wiki: | ||
| + | |||
| + | Games stored only on the removed drive will disappear from the library until that drive is connected and merged again. | ||
| + | |||
| + | ===== What Gets Merged? ===== | ||
| + | |||
| + | Only the ROM library is merged: | ||
| - | Go back to Es with command | ||
| < | < | ||
| - | /etc/init.d/ | + | /userdata/roms |
| </ | </ | ||
| - | or restart with | + | |
| + | Folders such as: | ||
| < | < | ||
| - | reboot | + | / |
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| </ | </ | ||
| - | Modelines to test your switchres.ini settings with | ||
| - | < | ||
| - | [[https:// | + | remain on internal storage. |
| + | |||
| + | The Storage Manager does not merge BIOS files, save files, screenshots, | ||
| + | |||
| + | ===== Internal ROM Preservation ===== | ||
| + | |||
| + | When the first additional ROM drive is merged, Batocera preserves the existing internal ROM collection. | ||
| + | |||
| + | Internally, existing ROMs stored in: | ||
| - | For example the Arcade game Dottori Kun ([[http:// | ||
| < | < | ||
| - | DISPLAY=:0 switchres 128 192 61.035156 -i switchres.ini -s -l grid | + | / |
| </ | </ | ||
| - | ===== AMD Troubleshooting Tearfree and Freezes ===== | + | are moved into: |
| + | < | ||
| + | / | ||
| + | </ | ||
| - | If you get uneven frame-pacing and microstutters in Mame and/or Retroarch we need to disable | + | This allows internal ROMs to remain visible alongside ROMs stored on merged drives. |
| - | ''/ | + | |
| + | If all merged drives are later removed, Batocera restores the internal ROM library back to the normal | ||
| + | |||
| + | ===== Limitations ===== | ||
| + | |||
| + | The Storage Manager currently requires this layout: | ||
| - | * 20-amdgpu.conf (GCN 3, GCN 4, GCN 5, RDNA & RDNA 2) or download an already fixed [[https:// | ||
| < | < | ||
| - | Section " | + | < |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | EndSection | + | |
| </ | </ | ||
| - | * 20-radeon.conf (TeraScale and older, GCN 1 & GCN 2) or download an already fixed [[https:// | + | Nested ROM folders are not detected automatically. |
| + | |||
| + | Example: | ||
| < | < | ||
| - | Section " | + | < |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | EndSection | + | |
| </ | </ | ||
| - | Don't forget to '' | + | is not automatically merged. |
| - | **Games freeze or EmulationStation freeze.** | + | Only the ROM library is merged. Other userdata folders remain independent. |
| - | This has been reported by some users and myself included. | + | ===== Advanced Technical Details ===== |
| - | It's not know yet what is the underlying reason. It could be a driver or kernel issue. | + | |
| - | We need to add **Option " | + | Batocera uses **MergerFS** to combine ROM folders from multiple drives into a single virtual directory. |
| - | ''/ | + | |
| - | * 20-amdgpu.conf (GCN 3, GCN 4, GCN 5, RDNA & RDNA 2) or download an already fixed [[https:// | + | The merged library is presented at: |
| < | < | ||
| - | Section " | + | / |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | EndSection | + | |
| </ | </ | ||
| - | * 20-radeon.conf (TeraScale and older, GCN 1 & GCN 2) or download an already fixed [[https:// | + | Internally, Batocera maintains a storage pool containing: |
| < | < | ||
| - | Section " | + | / |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | EndSection | + | |
| </ | </ | ||
| - | Don't forget to '' | + | plus any merged ROM folders. |
| - | | + | Example: |
| + | |||
| + | < | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | These locations are combined into: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | ==== MergerFS File Placement Policy ==== | ||
| + | |||
| + | Batocera currently uses the following MergerFS create policy: | ||
| + | |||
| + | < | ||
| + | category.create=eplfs | ||
| + | moveonenospc=true | ||
| + | minfreespace=4G | ||
| + | </ | ||
| + | |||
| + | **eplfs** means: | ||
| + | |||
| + | < | ||
| + | Existing Path, Least Free Space | ||
| + | </ | ||
| + | |||
| + | When writing a new file: | ||
| + | |||
| + | * MergerFS looks for branches where the target folder already exists | ||
| + | * Among those branches, the branch with the least free space is preferred | ||
| + | * Branches with less than 4 GB free are ignored | ||
| + | * If a drive becomes full during a write operation, the file can automatically move to another branch | ||
| + | |||
| + | Example: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | A new ROM copied into: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | would be stored on: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | because it has the least free space while still meeting the minimum free space requirement. | ||
| + | |||
| + | <WRAP important> | ||
| + | The MergerFS implementation and file placement policy may change between Batocera releases. This section reflects the behavior introduced with Batocera v43. | ||
| + | </ | ||
| + | |||
| + | ===== Frequently Asked Questions ===== | ||
| + | |||
| + | ==== Can I use internal drives? ==== | ||
| + | |||
| + | Yes. Any drive mounted by Batocera containing a root-level '' | ||
| + | |||
| + | Example: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | ==== What happens if I unplug a merged drive? ==== | ||
| + | |||
| + | Batocera updates the storage pool and refreshes the game lists. | ||
| + | |||
| + | Games stored only on the disconnected drive will temporarily disappear until the drive is connected again. | ||
| + | |||
| + | ==== Are BIOS files merged? ==== | ||
| + | |||
| + | No. | ||
| + | |||
| + | Only: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | is merged. | ||
| + | |||
| + | BIOS files remain stored in: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | ==== Are saves merged? ==== | ||
| + | |||
| + | No. | ||
| + | |||
| + | Save files remain stored in the normal userdata location, for example: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | ==== Can I store ROMs in a different folder? ==== | ||
| + | |||
| + | No. | ||
| + | |||
| + | The Storage Manager currently expects a root-level folder named: | ||
| + | |||
| + | < | ||
| + | roms | ||
| + | </ | ||
| + | |||
| + | ==== Does the drive name matter? ==== | ||
| + | |||
| + | No. | ||
| + | |||
| + | For example, both of these are valid if they contain a root-level '' | ||
| + | |||
| + | < | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| - | //TearFree is a tearing prevention option which prevents tearing by using the hardware page flipping mechanism// | + | ===== References ===== |
| - | //Microstutter short irregular frame dips// | + | * Batocera TV — '' |
| + | * Storage Manager demonstration: | ||
| + | * https://youtu.be/XpH27Yswe38? | ||
| - | //Frame-pacing uneven distribution of frames// | + | * Batocera Storage Manager source code: |
| + | * https://github.com/ | ||
- user/rion.1631789522.txt.gz
- Last modified: 5 years ago
- by rion