pigeond pigeond

pigeon's blog - the pigeon concerto in D minor

Fun with Wine hacking
2006/08/20 13:46:58
coding linux software

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.




Comments are closed.






blog top 24 tags
api bonding debian engrish fglive fgmap flightgear google ISP laptop lca2007 lca2008 linux live map mpserver navaids network qotd quote of the day taiwan vim windows wine
Search
 
Web pigeond.net









this site is
created with vim



nearly all pages in this site are validated as
Valid HTML 4.01!

css validated by
Valid CSS!


pigeond.net copyright 2001 - 2014
designed, created, and coded by pigeon at pigeond dot net
all rights reserved