http://bugs.winehq.org/show_bug.cgi?id=31191
Bug #: 31191 Summary: All 'Sona Hanabira ni Kuchizuke wo' games fail to start because of wine buggy string compare implementation. Product: Wine Version: 1.5.8 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 AssignedTo: wine-bugs@winehq.org ReportedBy: ntrrgc@gmail.com Classification: Unclassified
The engine of Sona Hanabira (among other many games) does use indexed container files for retrieving game resources.
Having a key of type string, it performs binary search within the index to find the resource pointers.
But, because of buggy string compare APIs implementation in wine (mainly StringCompare and StringCompareEx, which are called by lstrcmp and lstrcmpi), comparison returns wrong values, and the seek fail.
At the moment, wine is just comparing DUCET values of each character (which is wrong in very many cases), and ignoring several possibilities of StringCompare API (like IGNORE_KANATYPE, i.e.). Some of them may apply to this bug, some may not. Anyway, it is broken.
For Sona Hanabira games, a workaround is to use this patcher which reorder index entries in the way Wine currently (wrongly) look for them: http://vn.i-forge.net/tools/#sono+hanabira+ni+kuchizuke+wo%C2%B1+linux+wine+...
This bug report is to (hopefully) avoid the need of that patch in the future.