OpenSWE1R / openswe1r

An Open-Source port of the 1999 Game "Star Wars Episode 1: Racer"
https://openswe1r.github.io/
GNU General Public License v2.0
315 stars 26 forks source link

Emulate CD drive with CD install folder linked to current directory #109

Closed JayFoxRox closed 6 years ago

JayFoxRox commented 6 years ago

This makes it easier to install OpenSWE1R. Simply copy your "/gnome/" folder contents from disc to your preferred location, then copy the openswe1r binary in the same folder and run it! These instructions should also be added to the wiki when this PR is merged.

The "CD Path" registry key is hardcoded to the "D:" drive. When loading files, the "d:/gnome/" folder is mapped to "./". The volume name is hardcoded to "racer100_0". I feel this is pretty hacky, but I don't see many other ways around this issue.

I'm not aware of any discs with a different volume name, but if they exist, it might result in trouble. Similarily, if the game files are not in the "/gnome/" folder, that could also result in issues, so other releases of the game should be checked. The FiX guide also mentions that a file is written to disc for testing. I did not check for such checks yet. An issue should be created after merge so this can be investigated.

Legally, I don't think this patch is an issue. The original CD check seems more like a tool to check for correctness of files, rather than preventing anyone from making illegal copies. Even if it was supposed to do that, the technical differences between systems still make this patch necessary for interoperability. We simply can't check for a CD on some platforms, simply because they don't even have a CD drive anymore. On other platforms, the CD interface is vastly different, so every solution would be about as bad as the current one, as it would be specifically tailored for SWE1R.

Closes #85