schellingb / dosbox-pure

DOSBox Pure is a new fork of DOSBox built for RetroArch/Libretro aiming for simplicity and ease of use.
GNU General Public License v2.0
775 stars 65 forks source link

Asking for clarification about DosBox-Pure extracted files (RA) #509

Closed weniard closed 4 months ago

weniard commented 4 months ago

Hello, assuming I use RA with dosbox-pure and rename the game.zip to game.dosz, launch the game with the core, what happens to the files? According to the documentation it seems that all the modifications are zipped in a single file under the saves folder, is that correct? Or does dosbox pure spread executables around the RA folders? It is very important for me because I don’t want executables speeading in unzipped form all over my RA folder (I have seen this question on multiple websites but none got a definite answer about this).

tl:dr; Does dosbox pure encapsulates all the extracted/modified files into a single zip file under saves?

Thanks

schellingb commented 4 months ago

DOSBox Pure supports all kinds of content that can be loaded. Depending on the file type loaded it will prepare the C: drive of the emulated DOS environment.

So when loading <GAME>.zip or <GAME>.dosz, it will load that ZIP file as the base of C: drive and then it will overlay <GAME>.pure.zip from RetroArch's designated save directory (if it exists). Any changes made to the C: drive will then be written back to that <GAME>.pure.zip file. Changes can be new files, file renamings or file deletions. It all is tracked in that single .pure.zip save file.

Other content paths that can be loaded:

weniard commented 4 months ago

Thank you for the information Btw this is for an iPhone atm, so what is mounted as a "c: drive" there?

schellingb commented 4 months ago

the C: drive of the emulated DOS environment

Drives in DOS are accessed by a letter and colon. The C: drive generally is the main hard disk in DOS. So DOSBox Pure (the emulator) prepares the drives inside the emulated DOS environment on startup. It tries to do as much as it can automatically so a user doesn't have to worry. But this is not like a console emulator, it still is emulating a full computer and an operating system that can be configured in all kinds of ways.

Anyway, if all you worry about is number of files in the save directory of RetroArch, it will just be one per game.

weniard commented 4 months ago

What worries me is if the .dosz that contains files including .scr .bat .exe will be extracted and spread across my RA folder or if all the files that are being read/modified are hermetically saved as a compressed file into saves folder without uncompressed files roaming around, this is because my phone come into contact with a windows system and I don't want it to be a carrier of uncompressed executables (I scan everything with vitustotal/jotti but still..)

schellingb commented 4 months ago

Oh, what makes you think DOSBox Pure extracts files and saves it in random places? It does nothing like that. Data is read out of the ZIP file and processed in memory directly. It doesn't need to extract the ZIP first before running it, it's quite a bit smarter than that :-)

weniard commented 4 months ago

Yes but when the emulation ends everything (changes to the original) are packed inside a zip in saves folder right?

Btw, I use a safe website but nothing is 100% (and I check with virustotal and jotti) , but what happens if dosbox pure hypothetically emulates an infected file while sandboxed on retroarch ios? I assume all the effects of the malware are also stored inside that zip? Can an old malware break out of the sandbox and affect the system? I know that RA is sandboxed and also iOS is running every app sandboxed but still, I assume it is possible but rare to break out of the emulator and the ios sandbox?

schellingb commented 4 months ago

DOSBox Pure comes with no warranty or guarantees. You use it at your own risk.