Maidens of the Kaleidoscope

~Hakurei Shrine~ => Help Me, Eirin! => Tech Support => Topic started by: qyot27 on May 15, 2011, 12:05:44 AM

Title: Touhou 13 demo crashes DirectX on XP, but not Wine on Ubuntu
Post by: qyot27 on May 15, 2011, 12:05:44 AM
I've been trying to get the demo to run but absolutely nothing is working.  I have DirectX 9.0c June 2010 and all OS and video driver updates (as of a couple weeks ago, anyway) installed, and I launch the game under Japanese locale.  I can get through the character select screen, but the instant it tries to load the first level, d3dx9_43.dll crashes and brings everything down with it.

Specs:
Windows XP SP3, 1GHz Celeron Coppermine, 512MB RAM, Nvidia GeForce 6200 (256MB) PCI

Yes, the computer is ancient.  However, up until the crash happens I'm getting ~60fps.  Right before it crashes it suddenly drops to around 34fps.


The stranger thing here, is that on the same hardware, but under my Ubuntu 11.04 install and Wine 1.3.19, it doesn't crash and actually lets me play.  The only problem with that is the framerate is lucky to hit a high of 30fps, and drops as play continues.

I was worried when I saw the 'Low-class Intel Core CPU' part in the game specs, but why would it be okay under Wine on the same exact old hardware?  Is it something Core-specific in DirectX that Wine gets around somehow?
Title: Re: Touhou 13 demo crashes DirectX on XP, but not Wine on Ubuntu
Post by: Puffy on May 15, 2011, 01:21:34 PM

I but the instant it tries to load the first level, d3dx9_43.dll crashes and brings everything down with it.

Specs:
Windows XP SP3, 1GHz Celeron Coppermine, 512MB RAM, Nvidia GeForce 6200 (256MB) PCI

Yes, the computer is ancient.  However, up until the crash happens I'm getting ~60fps.  Right before it crashes it suddenly drops to around 34fps.


The stranger thing here, is that on the same hardware, but under my Ubuntu 11.04 install and Wine 1.3.19, it doesn't crash and actually lets me play.  The only problem with that is the framerate is lucky to hit a high of 30fps, and drops as play continues.

I was worried when I saw the 'Low-class Intel Core CPU' part in the game specs, but why would it be okay under Wine on the same exact old hardware?  Is it something Core-specific in DirectX that Wine gets around somehow?

Hmmm, i sense that you need to reinstall DirectX 9, because it crashes, and 2nd, the specs, i think its an issue, because you tested it on a different OS and you get about the same fps of around 30.

I;m not no expert but i think the reason why things will be 'ok' in Wine and Ubunto, because it doesn't use as much resources as XP.
Title: Re: Touhou 13 demo crashes DirectX on XP, but not Wine on Ubuntu
Post by: Momiji on May 16, 2011, 12:01:47 AM
You made sure you updated DirectX 9, right?  Also try updating your video card drivers.

Most importantly, that's one crazy slow system (especially the videocard being PCI, and the CPU).  Things will work under Wine because it's translating DirectX into OpenGL and ends up abstracting out some of the missing functionality you may have in Windows.  On the other hand you'll see just what kind've performance you actually have, and you'll end up being CPU bottlenecked in Linux as opposed to videocard bottlenecked in Windows.

At first glance, your videocard is a DirectX 9 part so that alone _should_ be okay, but other things may not be copacetic OS/driver wise.
Title: Re: Touhou 13 demo crashes DirectX on XP, but not Wine on Ubuntu
Post by: qyot27 on May 16, 2011, 01:05:45 AM
Yeah, I made sure I updated DirectX by downloading the full DX9.0c June 2010 Redist package and installing it from that.  Same with the video driver - it's 270.61.  I tried the demo shortly after it came out in April, found out that it failed, updated DX9 and the video driver, and tried again.  Still failed.

I also tried seeing if I could use the WineD3D stuff under Windows by placing the dlls in the directory with the demo, but that causes opengl32.dll to crash.  And I just realized that those (the prebuilt WineD3D-win32 libraries provided by nongnu.org) were probably from 1.1.x, not 1.2.x or 1.3.x.  I'll have to compile them myself and test again.
Title: Re: Touhou 13 demo crashes DirectX on XP, but not Wine on Ubuntu
Post by: Momiji on May 16, 2011, 04:30:20 AM
You really shouldn't try replacing Windows dlls with Wine dlls.  In fact unless you have system file protection disabled Windows won't even let you.  Plus they're still converting DX9 to OpenGL, which you don't need to do in Windows.

The games may actually require SSE2, which your CPU doesn't have.  Not entirely sure if that'd be an issue but it's possible.

If anything, check your machine's fans and heatsinks to see if anything's clogged with dust and overheating.  Also do a memtest (http://www.memtest86.com/) to make sure your RAM isn't going bad.
Title: Re: Touhou 13 demo crashes DirectX on XP, but not Wine on Ubuntu
Post by: qyot27 on May 16, 2011, 08:16:10 AM
Windows accepts DLL overrides if they reside in the same folder as the program attempting to use them.  In other words, if there's a Wine d3dx9_43.dll in the same folder as th13.exe, it'll try to use Wine's dll instead of the system one that's protected from replacement.  That way you can swap them out at will, and it only affects th13.exe.

Which also leads me to the conclusion.  After compiling Wine from git under MSys/MinGW (which took nearly 4 hours, and ultimately failed while building d3d10.dll), plus manually going in and making some of the other DLLs because the game was still crashing, I tested it again with all the successful* freshly-compiled Wine DLLs in th13's directory.

*d3d8.dll, d3d9.dll, d3dx9_43.dll, d3d10core.dll, ddraw.dll, dxgi.dll, libwine.dll, and wined3d.dll

No crash, and actual gameplay started.  At first, I was getting the same performance issue I was under Ubuntu.  I tried shuffling some of the DLLs away for reasons of cleanliness - if I don't need an overridden DLL, don't have it in there.  ddraw.dll seems to have been the performance culprit.  Turns out, the only DLL actually necessary to override is d3dx9_43.dll, the same one that was crashing using the normal DirectX and prompted this thread in the first place.

So what it simply looks like is something's up with the MS version of that file, at least on my hardware.  Wine's version works perfectly, and I'm getting a full ~60fps, just like the previous games.


Thanks for all the help.  It spurred me to actually test this idea.
Title: Re: Touhou 13 demo crashes DirectX on XP, but not Wine on Ubuntu
Post by: Momiji on May 16, 2011, 07:14:44 PM
Oh that sort've overriding.  Ahahaaa, that's funny.  Using Wine's DirectX DLLs to fix Windows.  XD
Title: Re: Touhou 13 demo crashes DirectX on XP, but not Wine on Ubuntu
Post by: SasakiAkatsuchi on June 02, 2011, 08:46:38 PM
I'm actually having a similar problem in that d3dx9_43.dll errror shows up and it asks me to reinstall. However, for me the error pops up before the menu even opens. My computer is not ancient, its able to run all other touhou games, and its vista operating system. Any advice?
Title: Re: Touhou 13 demo crashes DirectX on XP, but not Wine on Ubuntu
Post by: DX7.EP on June 02, 2011, 08:47:57 PM
Try getting a copy of d3dx9_43.dll online and sticking that into your TH13 directory.