[Feature] DOSBox Pure saves: expose the core-written .pure.zip to getSaveFile()/saveSave (core has no SRAM), and don't extract the zip by default
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 70/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- cpp, javascript, wasm
Hướng nghiên cứu
Start with data/src/emulator.js, especially the EJS_dontExtractRom and dontExtractIfCore handling, then trace getSaveFile(), getSaveFilePath(), and the saveSaveFiles/saveSave events. The issue identifies dosbox_pure_libretro.cpp and the existing PR #1064 as the relevant core and save-path context. Verify that DOSBox Pure is added to the non-extraction defaults and that a core-written .pure.zip is returned with its path; no specific test file is mentioned.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary. With dosbox_pure, a game's own in-game save never reaches a frontend that collects saves through gameManager.getSaveFile() (RomM does), because the core exposes no SRAM and the save it does write is not on the path getSaveFile() reads. Two small things would fix it; one of them is already on main and unreleased.
What happens (measured on 4.2.3, dosbox_pure, a zip with a root AUTORUN.CONF doing mount c .)
downloadRom()decompresses the archive into the emscripten FS and hands the core one member — in 4.2.3 only["arcade", "mame"]skip extraction, andthis.fileNamecomes out asAUTORUN.CONF.- Because the content extension is
conf, DOSBox Pure skips its union-drive/save machinery entirely —dosbox_pure_libretro.cpp:2710-2712:
so the game writes its save straight into the extracted tree in MEMFS (King's Quest VI wrote// Loading a .conf file behaves like regular DOSBox (no union drive mounting, save file, start menu, etc.) dbp_skip_c_mount = (path_extlen == 4 && !strncasecmp(path_ext, "conf", 4));/KQ6SG.000), which is gone with the tab. A save state does not carry it back: loading the state in a fresh tab, the file is absent and the game's restore dialog is empty. - The core has no SRAM at all —
dosbox_pure_libretro.cpp:3839-3840(same in theEmulatorJS/dosbox-purefork):
so RetroArch never writesvoid *retro_get_memory_data(unsigned id) { (void)id; return NULL; } size_t retro_get_memory_size(unsigned id) { (void)id; return 0; }save_file_path()(/data/saves/DOSBox-pure/AUTORUN.srmhere),getSaveFile()returnsnull, and thesaveSaveFiles/saveSaveevents hand the frontendnull. RomM stores the four bytesnullas the save.
What already exists on main
PR #1064 added EJS_dontExtractRom and the dontExtractIfCore list (data/src/emulator.js:349, still arcade/FBNeo/MAME only). Handed the zip, DOSBox Pure takes its union-drive path and writes changes to <content>.pure.zip in the libretro save directory (DBP_GetSaveFile(SFT_GAMESAVE)), which is /data/saves (IDBFS) — so on nightly the save at least survives per browser. That is unreleased; v4.2.3 is the latest release.
Feature request
- Let a frontend collect the core-written save file. When
save_file_path()does not exist but the core has written a file intosavefile_directory(for DOSBox Pure,<content>.pure.zip), havegetSaveFile()return that file — or firesaveSaveFiles/saveSavewith it — so frontends that persist saves server-side (RomM'sEJS_onSaveSave) get real bytes instead ofnull.getSaveFilePath()would then name that file so the frontend knows the extension. - Default
dosbox_pureto not-extracted, i.e. add it todontExtractIfCore, or documentEJS_dontExtractRomas required for DOSBox Pure saves — today a frontend that does not know about it gets the extracted-.confbehaviour above. - A release carrying #1064 would already improve things for everyone on 4.2.3.
Happy to test a nightly against RomM. For transparency: measured on my own instance; the write-up was drafted with Claude Code's help from those measurements.
- Ngôn ngữ chính
- JavaScript
- Star
- 4.3k
- Fork
- 1k
- Merge trung bình
- 13 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của EmulatorJS/EmulatorJS
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
EmulatorJS/EmulatorJS#1295 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
EmulatorJS/EmulatorJS#1285 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bot to check dependencies updateĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
EmulatorJS/EmulatorJS#1296 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature] Add a web componentĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
EmulatorJS/EmulatorJS#1292 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Improve developer experience for contributorsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
EmulatorJS/EmulatorJS#1291 · 8 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của EmulatorJS/EmulatorJS
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
thedevs-network/kutt#1059 ·
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
0. Needs triage 35-feedback bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày