So I got this PC version of the game Shin Sangoku Musou 3 (真三國無雙). And of course it for some proprietary operating system (we do not speak of its names :P). As a Linux person the first thing you try is to try running it under Wine / WineX / Cedega.
A little bit of surprise, it ran with Wine latest development version, at least it’s gone thru all the splash screen, characters selection, until it gets to the actual game, crashed.
After turning on some debugging and tracing, followed by consulting on #winehq, I’ve learnt that this game hits one of the famous Wine and DirectX issue, multi-threaded Direct3D.
Still I’m a bit adventurous as usual, and did a bit of code reading and hacking in Wine, trying a few different quick-and-dirty approaches to get threads to use the same GLXContext, not that I’m an OpenGL guru.
After a few tries, I gave up. However I still kind of wanna be able to play this game under Linux. So I rethink the problem from a different approach, and did a even more dirty hack, so that only the main thread can do any GL calls. Any other threads will simply returns before trying. Yes, VERY UGLY indeed. So ugly that let’s not even talk about it anymore ;)
And guess what, that does the trick. It gets into the actual game. So apparently it’s creating a new thread only for the pre-game loading screen. So now instead of the loading animation screen, I simply get a black blank screen, and the game continues after that.
And just for fun, I’ve even created a character with the top Taiwanese model’s name :P
More screenshots here.