Add RP9 package support#2186
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c0e08fe0b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Persist deployed media and reuse it on later launches. Reserve DF0 for ADF boot media and honor explicit A500/A2000 Kickstart versions.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 070e8ddcef
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Reset package-owned configuration and media when Quickstart ejects an RP9.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a1dbf61e03
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6f60d0d068
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Create an exclusive per-load directory before writing frontend-provided WHDLoad or RP9 data. Track and remove only artifacts owned by that load so name collisions cannot overwrite or delete existing save files.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 41d2d681ad
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e2415881f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9b060a6759
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (root == "absolute" || root == "external") | ||
| return path.is_absolute() && std::filesystem::exists(path, error) ? path : std::filesystem::path {}; |
There was a problem hiding this comment.
Reject package-supplied absolute host paths
When an untrusted RP9 declares an absolute or external hard-drive path such as <harddrive root="absolute">/home/user</harddrive>, this branch accepts any existing host directory; add_harddrive() then mounts it read-write because readonly defaults to false. Guest code included in the same package can consequently modify or delete arbitrary user files, so external roots should require explicit user approval or be rejected/read-only.
Useful? React with 👍 / 👎.
| } else { | ||
| write_log(_T("RP9: additional CD available in extracted package: %s\n"), path_string.c_str()); |
There was a problem hiding this comment.
Keep additional packaged CDs available for swapping
When an RP9 contains multiple <cd> entries, only the first is attached; every later image is merely logged and is not retained in another slot, the CD MRU list, or another swap structure. Multi-disc packages therefore have no usable path to select disc 2 from the package during emulation, unlike extra floppies which are preserved in dfxlist.
Useful? React with 👍 / 👎.
Reject package-controlled external host paths to prevent untrusted media from mounting writable user directories. Publish packaged CDs only after successful validation, preserving their priority order for swapping.
Summary
--autoload, Quickstart, Play, drag-and-drop, Android, and libretro.rp9andapplication/vnd.cloanto.rp9across Linux/FreeBSD/Flatpak, macOS, iOS, Windows, and Android packagesWhy
RP9 packages contain both media and the complete machine configuration required to run them. Treating them like WHDLoad archives would incorrectly depend on WHDBooter JSON and lose the configuration encoded by the package.
The implementation follows the current RetroPlatform manifest, external-content, media-priority, shared-data, and SuperHires/interlaced clipping conventions. Archive extraction also rejects traversal, filesystem collisions, non-portable names, excessive entries, and oversized expansion.
Validation
testDebugUnitTestand ARM64 native buildtests/test_rp9_manifest.shtests/test_rp9_file_associations.shtests/test_play_content_detection.shtests/test_play_start_logic.shtests/test_play_use_content_logic.shgit diff --checkReferences