Repository navigation
libretro: Add an option to let a game write to its own disks - #428
Merged
Merged
Conversation
Game disks are always inserted write-protected, so a game that saves to
its own disk fails: Eamon's master disk can't register a character
("WRITE PROTECTED / BREAK IN 350"). With "Write-protect Game Disks"
disabled, a disk follows its image file's own permission. It stays
enabled by default.
|
For the libretro implementation, any changes to the disk should be stored in the SRAM folder. If the original disk is modified, it's checksum will change and the game will no longer be detected for RetroAchievements. Here's the MSX implementation. |
Writing to the original image changes its checksum, so RetroAchievements no longer recognises the game. With "Write-protect Game Disks" disabled, a game disk is now copied to the save folder the first time it is inserted, and that copy is the one written and used afterwards. The original image is never written. Without a save folder the disk stays write-protected.
sunlollyking
force-pushed
the
game-disk-write-protect
branch
from
October 6, 2026 13:39
27259f9 to
d67ea4a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The libretro core always inserts a game's disks write-protected, so a game that saves to its own disk can't. Eamon is the one I hit: registering a character on the master disk ends in
WRITE PROTECTED/BREAK IN 350.#SAVEDISK:doesn't help there, since the game writes to the disk it booted from, and some games won't start on a protected disk at all.This adds a "Write-protect Game Disks" option under Disk Control. It's enabled by default, so nothing changes unless it's turned off; disabled, a disk follows its image file's own permission, as the desktop builds do. Save disks are untouched.
Tested with Eamon 001's master disk: enabled it stops at
WRITE PROTECTEDas now, disabled it carries on to the next question.