Currently, Cxbx uses inconsistent folders and file names.
For this issue, gather all folder and file names,
Determine the most sensible variant for each,
Update the code to use this outcome.
Examples:
The location of the log file can be customized by the user, so that doesn't need to change.
As for where to store data such as emulated HDD, EEPROM, etc, I believe there should be a user configurable data directory, or at least the option to chose weather to store these files in the emulators path (for portable usage) or in AppData, "%LOCALAPPDATA%" seems like a good fit.
Settings in the registry is acceptable, but a more user-friendly solution would be to store them in a .xml or .ini file in the data directory mentioned above.
Hello again team, I would suggest an ini with a portable switch.
$cwd\HDD
$cwd\Cache
...
etc
To add on to this, it would be nice if the pixel shader definitions (ex. PSDef000.txt) had their own folder as it tends to clutter the directory once I run a few games. There were another type of files that appeared in the root folder as well, I think it had a .xvu extension? I can't find any to check right now...
Organizing these into a folder in the root directory, or into a %appdata% directory similar to the HLECache would be a nice addition.
Actually, those files are purely meant for debugging, so they should be skipped in release builds too.
@LukeUsher commented from discord:
- On first execution of the emulator, Cxbx-Reloaded should pop up a dialog, asking you to chose a configuration path. This path could be AppData (or $HOME on *nix), current working directory, or a 3rd option: A custom path (implemented via a folder open dialog/browse button)
- This dialog should be accessible at any time via the settings menu. to be able to change the data path at any time
- A menu option should be added, which will allow you to browse that directory easy without having to find it yourself.
I am sure this ticket is outdated since pull request https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/pull/1280 introduced feature for selection 3 options which are:
In the later feature of settings.ini reader from either same directory as executable or User Profile, if the first option doesn't exist. Pull request https://github.com/Cxbx-Reloaded/Cxbx-Reloaded/pull/1370.
This issue isn't complete until we've documented each emulator-controlled piece of stored information, like log files, debug dumps, settings file, etc.
Then we need to decide on keeping or changing format and location for each of those.
Only after those decisions have been implemented, this issue can be closed.
Most helpful comment
To add on to this, it would be nice if the pixel shader definitions (ex. PSDef000.txt) had their own folder as it tends to clutter the directory once I run a few games. There were another type of files that appeared in the root folder as well, I think it had a .xvu extension? I can't find any to check right now...
Organizing these into a folder in the root directory, or into a %appdata% directory similar to the HLECache would be a nice addition.