For the case sensitive names, wouldn't it be better to just select a consistent spelling approach for the rom files? For example making all of the lower case. This will not require scanning a dir (which may be a long time if number of roms increase) and will not affect Windows builds in any way.

Attached patch that changes all roms and nvrs references to lowercase only.

Secondly, proposed patch only ignores case sensitivity for the files, not whole dirs (and we have dirs inside roms directory). Using consistent naming also address that situation and it's a lot simpler.

You have a point tomaszkam. My first thought was also to just convert the subpath to lowercase inside romfopen, but when I later realized that the end-user have to change every non-lowercase file either manually or by finding/writing a script it did not feel very user-friendly and I thought of this solution instead. And as A. Naim said scanning the directory shouldn't be an issue.
Regarding the subdirectories inside the roms-directory they are both premade and lowercase so that will probably not be a problem either.

But as a long-time Linux-user I would like to go all lowercase, since I like it that way :) However this approach just felt like it would be the most user-friendly.

EDIT:
How about using both solutions?
1. Try the file with its default filename (I actually think this would be true in most cases, but could probably be skipped on Linux).
2. If running Linux and the file does not exist, try it with all lowercase (this would be the preferred way for Linux).
3. If it still does not exist, do a directory scan.

Doing it this way would make it work in most likely all cases, but if anyone do have problems with for example subdirectories being non-lowercase they could just rename everything and it should work without having to do a directory scan.

EDIT 2:
Also, it should be no problem to add so it also searches subdirectories case-insensitive if that really might be an issue.

I think that the problems we currently encounter is caused by random use of lower/upper case letters for the rom names. Moreover the casing was different between the docs and actual code, so matching readme will not help.
And I think, once it would be clear that all files and dirs need to use lower case, then no workaround would be needed at all, as user will just rename their roms.

I consider any attempt to implement behaviour that mimics case-insesitive filesystem on case-sensitive one as over-engineering. And less platform depended code, the better.

tomaszkam wrote:I think that the problems we currently encounter is caused by random use of lower/upper case letters for the rom names. Moreover the casing was different between the docs and actual code, so matching readme will not help.
And I think, once it would be clear that all files and dirs need to use lower case, then no workaround would be needed at all, as user will just rename their roms.

I consider any attempt to implement behaviour that mimics case-insesitive filesystem on case-sensitive one as over-engineering. And less platform depended code, the better.

I'm of the opinion that case-sensitivity in general is not a great idea. I mean, your reasoning there is probably right, but *puts in Internet Pedant Hat and travels back to 1980-something*.

Although I don't know if this holds true for all languages, for English (and Latin/Greek/Germanic derived languages in general) the idea that there's a difference between "MyTextFile.txt", "myTextFile.txt" or "mytextfile.txt" doesn't seem to make sense, to me, linguistically.

Overall, it adds to the "remembered data load", and a bit to the "vocal communication load", and doesn't really add anything useful enough, IMO. A better option would be to rename the files; ex. "My Accounting File.txt", "My Journal File.txt", or "Random Notes File @ $Name_Of_Tech_Conference.txt".

...And yeah, I'm as prone to "New Document.txt #" for random notes as anyone else. So don't take this too seriously. I mean, if you're writing a new OS, it might be useful, but otherwise, it's just the random musings of some random person on the internet on something that's not going to be changed at this point. I don't take it too seriously, either.

Although if I ever do make an OS or programming language, it'll probably be case-insensitive. :p