INFO: Common graphic problems with XWA

Any issues with the XWAU or X-Wing Alliance? Please let us know here!
Post Reply

INFO: Common graphic problems with XWA

Rebel_Terrorist
Cadet 1st Class
Posts: 192
Joined: Fri Jun 24, 2005 11:01 pm

Post by Rebel_Terrorist » Thu Oct 16, 2008 2:57 pm

This is a post intended to give information about common problems in XWA (and sometimes in other X-Wing series games).

About the black textures in the concourse and the missing cursor: There is a post about these two problems.

Thanks to Reimar's great work, now there's a solution for all the problems of newer nVidia cards on X-Wing Alliance (and hopefuly for XvT and BoP soon) and for ATI cards also!!

See below for more information
Last edited by Rebel_Terrorist on Wed Feb 04, 2009 9:55 pm, edited 1 time in total.

R2-D2
Recruit
Posts: 6
Joined: Fri Oct 10, 2008 4:55 pm

Post by R2-D2 » Thu Oct 16, 2008 11:57 pm

For those having an ATI HDxxx card: Try to use your onboard graphics adapter if you have one! That needs some changing in the BIOS and seems not to be possible with all boards but can be a solution - worked fine with me, that is. Save your hardware profile first since Windows doesn't like having the graphics adaptor changed...

Rebel_Terrorist
Cadet 1st Class
Posts: 192
Joined: Fri Jun 24, 2005 11:01 pm

Post by Rebel_Terrorist » Fri Oct 17, 2008 10:29 am

Rebel_Terrorist wrote:This is a post intended to give information about common problems in XWA (and sometimes in other X-Wing series games).

ATI Radeon HDXXX cards seem to be incompatible with all X-Wing games. I don't know a definitive solution for this problem so far. Using the onboard graphics adapter (if its not another HDXXXX chip) is a solution, but its far from the best... (see post by R2-D2 below)

About the black textures in the concourse and the missing cursor: There is a post about these two problems.

About the missing target box: this is a general problem in the nVidia 8XXX cards. There is no solution for it.

About the disappearing objects with nVidia cards: this is a problem on all 8XXX cards. Reverting to drivers 169.21 fixes this problem, but causes the missing target box problem.

waylon
Cadet 1st Class
Posts: 146
Joined: Tue Oct 28, 2008 1:37 pm

Post by waylon » Tue Oct 28, 2008 1:48 pm

ATI HDXXX and nVidia 8XXX cards will work on vista 32. But multiplayer game can not work since vista is directX10. It definitely driver problem, now supplier do not put much effort on XP. Eventually, it will be all Vista.
XvT multiplayer mission pack 3.3beta & X-Wing Conversion 4.0 +XvT rebel part & XvT imperial part & TFC 2.0 are available!
http://www.maxgames.it/xwc/

Rebel_Terrorist
Cadet 1st Class
Posts: 192
Joined: Fri Jun 24, 2005 11:01 pm

Post by Rebel_Terrorist » Mon Dec 29, 2008 1:08 pm

I'm giving up in this fight. It's lasting for too long, and i thing keeping 169.21 drivers wont help much. I will install the latest 178.24 and use their advantages, like PhysX. I hope that the games that work well would keep doing so.

And i hope that someday, nvidia will finally release some new drivers that fix the problems of XWA on XP.

aldosirenio
Recruit
Posts: 1
Joined: Mon Dec 29, 2008 5:05 am

Post by aldosirenio » Wed Dec 31, 2008 8:25 am

I have an ATI Radeon Mobility X1400 on a Dell Laptop... Other games work so nicely... It just frustrating, XWA is my all-time favorite!
I tweaked the xwingalliance.exe to support 1400x900 resolution, and some melee training simulator work fine... and the game looks soooo beautiful! Fast, perfect textures, unbelievable speed... but whenever I try to play Tour of Duty missions, the game crashes to the desktop.
Anyone can help?
Thanks.

Rebel_Terrorist
Cadet 1st Class
Posts: 192
Joined: Fri Jun 24, 2005 11:01 pm

Post by Rebel_Terrorist » Mon Jan 12, 2009 8:39 pm

SOMEBODY FOUND A SOLUTION FOR THE DISAPPEARING OBJECTS PROBLEM!!!! It's a bit crude, but it works perfectly and is easy to get used to it.
You see, the disappearing objects has something to do with the target being rendered on the MFD. I noticed this as when i was flying without any ship targeted, things worked normally. But there was no way i was going to enter any battle with the targeting computer off, even if Skywalker will... And just turning the MFD off doesn't solve the problem.
The solution is pressing the 0 (zero) key on the numpad. That toggles the MFD target rendering on and off, so you can have it on while you're flying on the MFD and turn it off when you're pursuing the target visually. If you have a joystick with a programming software, now it's time to use it.

:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D

android513
Recruit
Posts: 1
Joined: Thu Jan 15, 2009 2:18 am

Post by android513 » Thu Jan 15, 2009 2:38 am

I find it interesting that I'm using an ATI Radeon 2600HD on my computer (XP home), and running just X-Wing Alliance(v.2.02) with no updated craft works fine. Not sure why, though. It's unfortunate that such a good game is slowly becoming aged-out, I've had this game since not long after it came out and I still love it. Still only beat it once, maybe twice (big maybe, can't quite remember.)

User avatar
guru_redeye
Cadet 2nd Class
Posts: 62
Joined: Wed Oct 06, 2004 11:01 pm

Post by guru_redeye » Sat Jan 17, 2009 4:15 am

Rebel_Terrorist wrote:
... ATI Radeon HDXXX cards seem to be incompatible with all X-Wing games ...
I have an ATI Radeon HD3650 chipset card and Xwing vs. Tie Fighter works with it (including the 3D hardware acceleration patch). My favourite's still XWA though, what - indeed - doesn't work with it :(

Reimar
Cadet 1st Class
Posts: 239
Joined: Mon Jan 19, 2009 11:45 am

Post by Reimar » Mon Jan 19, 2009 12:04 pm

EDIT: Please simply use the .bat files in the zip file attached several posts further down instead of these manual hacks.

I found a solution torun X-Wing Alliance on my HD 4850. It was quite some effort, so I want to document it here, even though I don't know if you like that kind of solution.
First, I used Linux and Wine (http://www.winehq.org/). Unfortunately, it is known not to work there (http://appdb.winehq.org/objectManager.p ... n&iId=2916).
Still, that did fix the rendering issues, but it did not react to keyboard input and rendering was very slow.
So next I fixed the keyboard input issue: http://bugs.winehq.org/show_bug.cgi?id=8854 - I am not sure if that hackish solution will be allowed in wine, but if you want to do
the modification yourself you only need to replace the dinput.dll.so with a fixed version in your wine installation.
I have no idea if it will work for you, but the dinput.dll.so I finally used is here: http://natsuki.mplayerhq.hu/~reimar/dinput.dll.so
The next issue is that ATI can't write OpenGL drivers if their life depended on it (and wine uses OpenGL), the data is not transferred via DMA, so that background-drawing for the stars etc. is far too slow.
As a first attempt I tried to make X-Wing Alliance render to 32 bit instead of 16 bit, which is a simple change (EDIT: this only makes sense if you can fix/remove the star background somehow, also not sure if the graphics quality is really any better), with a hex editor change
in xwingalliance.exe:
at offset 0x1a90ac (0x5aa0ac in memory) change 0x02 to 0x04
Pattern from: 00 00 f0 3e 01 00 00 00 02 00 00 00 00 00 80 3f
to: 00 00 f0 3e 01 00 00 00 04 00 00 00 00 00 80 3f

EDIT: or use the xwahacker linked a few posts below like this:
xwahacker xwingalliance.exe -p 1
to fix the starfield you also need the patches 15,17,19,21,23,25,27,29,31.

This change should be optional and breaks e.g. the loading screen and in-game menu, so decide yourself if you want that.

To completely disable the background rendering, this change works under Wine (EDIT: this unfortunately does not work on Windows),
but to try it change in xwingalliance.exe:
at offset 0x10c8c3 (0x50d4c3 in memory) change 0x00 to 0x10
Pattern from: a1 48 33 77 00 6a 00 8d 4c 24 10 6a 00 8b 10 51 6a 00
to: a1 48 33 77 00 6a 00 8d 4c 24 10 6a 10 8b 10 51 6a 00

EDIT: or use xwahacker xwingalliance.exe -p 13

If you'd like to know what it does: it maps the framebuffer read-only into system memory. Luckily this does not crash under wine when the stars etc. are drawn into it.
When the framebuffer is then unmapped, it does not get transferred to the graphics card (which would cause the performance issues), since after all the application
was not supposed to change it.
I know this is very technical, but I hope you can understand the idea anyway and I'll try to find time and look over here to answer any questions about it.
Last edited by Reimar on Tue May 12, 2009 12:31 pm, edited 3 times in total.

User avatar
guru_redeye
Cadet 2nd Class
Posts: 62
Joined: Wed Oct 06, 2004 11:01 pm

Post by guru_redeye » Tue Jan 20, 2009 4:07 am

Wo0OOW!!! :shock:

Would you have something for Windows XP Professional + Directix 9.0c and above ? :D

Reimar
Cadet 1st Class
Posts: 239
Joined: Mon Jan 19, 2009 11:45 am

Post by Reimar » Tue Jan 20, 2009 10:59 am

guru_redeye wrote:Would you have something for Windows XP Professional + Directix 9.0c and above ? :D
Unfortunately no, I do not even really know what the issue is. The biggest problem is that I can't find any documentation for Direct3D 7 (which I think XWA uses, at least nothing newer).
My best guess currently is that Direct3D 7 by default tries to use a 16 bit Z-Buffer which none of the newer cards support, but that does not really match the artefacts well either (the ones I get are different from those described previously, there are large square holes in the objects where the background shines through). It would be interesting to see a comparison which Z-Buffer formats the working vs. non-working ATI cards claim to support - not sure which tool can get that information, maybe http://developer.nvidia.com/object/nvpixelformat.html ?
I am really certain that it is not a hardware issue, but only a driver one, since it works fine in wine (even without extra hacks, the speed issue is only due to emulating Direct3D via OpenGL).

User avatar
guru_redeye
Cadet 2nd Class
Posts: 62
Joined: Wed Oct 06, 2004 11:01 pm

Post by guru_redeye » Tue Jan 20, 2009 6:18 pm

Well I am not sure if XWA uses D3D 7, since the minimum Directx version it needs to be installed is 6.0. As for the documentation, I have a Directix 7.0 / 8.0 programming API documentation for visuall C++ / visual Basic (what Dx version - I guess - contains D3D 7) but not sure if that's what you need. And - may be - I have docs of earlier Directx versions (not sure if 6.0 is amongst them) deeply "buried in" somewhere :) let me know if you need any of these I'll try to dig them out from somewhere (hope I'll succeed lol) and send it via e-mail.

Reimar
Cadet 1st Class
Posts: 239
Joined: Mon Jan 19, 2009 11:45 am

Post by Reimar » Tue Jan 20, 2009 10:21 pm

EDIT: Please simply use the .bat files in the zip file attached several posts further down instead of these manual hacks.

Ok, that was a horrible experience but I have a solution for ATI cards. I doubt it helps the NVidia users out there though.
I have to wonder what compiler they used for XWA, the code is horribly inefficient, a simple recompile with a modern compiler would probably halve the size of the binary.
Anyway, the issue was indeed due to the Z-Buffer, and it is a ATI driver bug: the IDirectDrawSurface::Blt funtion is broken when used on the Z-Buffer with DDBLT_DEPTHFILL, somehow the Z-Buffer gets only partially filled. If you have more confidence in ATI's software department than I do I'd recommend to send them a bug report.
The solution is to use instead the Direct3D7 function IDirect3DViewPort::Clear2 function.
Note that XWA only requests (I think) Direct3D 1, so if you are unlucky it might just crash on some Windows versions, but it worked for me on Windows XP x64.
To use ViewPort::Clear2 to clear Z-Buffer you have to make these changes to the xwingalliance.exe (tested with 2.02):
at offset 0x1973ce (0x597fce in memory):
Pattern from: c7 45 ec ff ff 00 00
to: c7 45 ec 00 00 80 3f
at offset 0x197410 (0x598010 in memory):
Pattern from: 50 68 00 00 00 03 6a 00 6a 00 8d 4d 88 51 8b 15 a4 e7 b0 00 52 a1 a4 e7 b0 00 8b 08 ff 51 14
to: 90 6a 00 ff 75 ec 6a 00 6a 02 8d 4d 88 51 90 90 90 90 6a 01 a1 bc 15 7b 00 50 8b 08 ff 51 50

EDIT: or use
xwahacker xwingalliance.exe -p 11
xwahacker xwingalliance.exe -p 7
the link to the xwahacker source and binary can be found a few posts down.
Last edited by Reimar on Tue May 12, 2009 12:31 pm, edited 3 times in total.

User avatar
guru_redeye
Cadet 2nd Class
Posts: 62
Joined: Wed Oct 06, 2004 11:01 pm

Post by guru_redeye » Wed Jan 21, 2009 3:58 am

I've found and modified both binary strings in the executable using OllyDbg v2.00 beta internal hexeditor following your instructions, and XWA can start the game in 3D mode now (what it couldn't do at all without your modification!) some parts of the cockpit are definitely distinguishable, but the most of the screen is full of that known typical skew radial artifact shown by ATI cards (tried to make a screen grab, but I kept getting a blank bitmap so I cant show it here sorry). The game still goes on, the radio messages are heard. I am convinced this is definitely an achievement, but it needs further correction. By the way my XP is a 32-bit one: Microsoft Windows XP Professional 5.1 Build 2600 SP2.

Reimar
Cadet 1st Class
Posts: 239
Joined: Mon Jan 19, 2009 11:45 am

Post by Reimar » Wed Jan 21, 2009 8:29 am

guru_redeye wrote:but the most of the screen is full of that known typical skew radial artifact shown by ATI cards
Sorry, but the only artefact I have and also the only one I have ever seen reported for ATI cards is that square (mostly 8x8) parts of the models are simply missing with the background being shown instead.
I have no idea what kind of problem it is you are having now. Also, I never had an issue with 3D not working at all, so something is quite different in your case.
Are you using the 8.12 drivers? If you're unlucky it is just the HD3xxx generation that has _that_ issue ;-).

User avatar
guru_redeye
Cadet 2nd Class
Posts: 62
Joined: Wed Oct 06, 2004 11:01 pm

Post by guru_redeye » Wed Jan 21, 2009 6:54 pm

Well I've bought this card in september (2008) so it's quite new - may be that's the cause it behaves differently than earlier 3xxx cards, and I agree, it definitely can be a cause that it's one of the 3xxx series for 3D mode not working at all. Fortunately I've found an example for that "typical ATI artifact" I mentioned above - some1 posted on guru3d forums in march (2008) about this, click here to check it out. That post is about HD3870 cards. Additionally you can find a picture link at the top of his post. What can be seen on that picture is very similar to the effect I experience (if it's not totally the same!). As for the driver version I use, its the "official" version straight from the CD I got in the box, its version is 8.452.0.0, its date is 2008 january 09. By the way I've sent the error report already earlier, describing the XWA 3D mode not working issue exactly, without any results. :(

Reimar
Cadet 1st Class
Posts: 239
Joined: Mon Jan 19, 2009 11:45 am

Post by Reimar » Wed Jan 21, 2009 6:57 pm

EDIT: Please simply use the .bat files in the zip file attached several posts further down instead of these manual hacks.

You can also try some of the other hacks I've been experimenting with, I made a patcher to keep track of these for me:
http://natsuki.mplayerhq.hu/~reimar/xwahacker.exe and source http://natsuki.mplayerhq.hu/~reimar/xwahacker.c (if it matters, consider it GPL v3-licensed).
It is command-line only for now (cross-platform Guis are still a pain to do),
xwahacker.exe xwingalliance.exe -p 7
xwahacker.exe xwingalliance.exe -p 11
is the modification that fixed things for me on Windows.
The 32 bit framebuffer and star-background stuff is quite experimental, I don't think it looks much better than with 16 bit - at least not until someone makes XWA use 32 bit textures for the models, too ;-)
Last edited by Reimar on Tue May 12, 2009 12:32 pm, edited 1 time in total.

Reimar
Cadet 1st Class
Posts: 239
Joined: Mon Jan 19, 2009 11:45 am

Post by Reimar » Wed Jan 21, 2009 7:06 pm

guru_redeye wrote:Fortunately I've found an example for that "typical ATI artifact" I mentioned above - some1 posted on guru3d forums in march (2008) about this, click here to check it out.
That very much looks like an issue with the Z-values of the vertices. Not really related to the other issue though. If I'd have to guess, the cards only support floating-point Z-values now, and ATI forgot some conversions...
guru_redeye wrote:As for the driver version I use, its the "official" version straight from the CD I got in the box, its version is 8.452.0.0, its date is 2008 january 09.
That is nearly one year old, that's what I would consider "ancient". I'd recommend installing the 8.12 version, but make sure you have the installation package of your current version around, in my experience every new ATI driver version breaks about as many things as it fixes. So if it fixes XWA you can be sure it will break at least one of your other games :D

User avatar
guru_redeye
Cadet 2nd Class
Posts: 62
Joined: Wed Oct 06, 2004 11:01 pm

Post by guru_redeye » Wed Jan 21, 2009 7:20 pm

Well I've also tried latest omega drivers already, without any results again. :( Anyways I dont believe in keep changing drivers one after one, it seems to me obvious it's much more effective to approach fixing this XWA problem with updating the code itself since it exists on all newer video cards and drivers in several forms. I mean XWA has conflicts with many of them on many ways. I think the entire graphic engine needs an update.

Reimar
Cadet 1st Class
Posts: 239
Joined: Mon Jan 19, 2009 11:45 am

Post by Reimar » Wed Jan 21, 2009 10:07 pm

guru_redeye wrote:Well I've also tried latest omega drivers already, without any results again. :(
What is the point of trying the omega drivers? They are even older than the one you had!
guru_redeye wrote:I think the entire graphic engine needs an update.
Have fun waiting, unless the source is released updating the drivers at least once in a year is certain to be a much faster way to get things working.

User avatar
guru_redeye
Cadet 2nd Class
Posts: 62
Joined: Wed Oct 06, 2004 11:01 pm

Post by guru_redeye » Wed Jan 21, 2009 11:00 pm

Firstly I'd love to believe it honestly that a simple driver change would fix it, but

1.) Which is older ? XWA or a video driver what is ~ 1 year old ? You cant wait for video card manufacturers to keep considering the programming aspects of decade old games. And even if they did that, it can happen easily that they can't fix these problems. I have a lotta other games / graphic apps and I never had to keep changing video drivers for any of them. Of course driver updates may improve and / or fix things but I am convinced not in this case unless it's particularly declared by the manufacturer.

2.) Even if you fix all the problems for e.g. my card by changing the driver - what I doubt - there will be a lotta others what still won't work with XWA.

As for the waiting - I've been watching Totally Games forums (and posting there) for years and it's clear to me that they will prolly never submit any update for XWA (as I posted about this here on another thread). The only cause I thought it's worth to join you on this thread was your approach on the topic - what was modding the code itself as far I could get it. It's clear to me that if we'll ever have any update for XWA, it'll prolly be fan based.

User avatar
guru_redeye
Cadet 2nd Class
Posts: 62
Joined: Wed Oct 06, 2004 11:01 pm

Post by guru_redeye » Thu Jan 22, 2009 5:31 am

AlaricK wrote:
... So, two things:
1. Buy an NV board, it does not especially matter what model, although getting something in the GTX 200-series would obviously help to run all the new graphical updates with this game nowadays...

2. Buy a copy of Vista 32 or 64, depending on your OTHER gaming needs, and learn how to configure the OS and run it just like XP runs (it CAN be done), then follow Markus's installer instructions if you run 64-bit, and you are ALL SET TO RUN XWA ON TODAY'S HARDWARE! ...
wo00OTERZZZ welcome! xD

I am glad we've drawn your attention to this thread and made you post here, Alaric Kell.

Thanx for the tip I am sure it would solve the problems ... at least for that 10..20% of peeps who are just about to update their hardware (parts) and/or OS on their comp or have the money to buy a few comps and OS's for experimenting (too bad I am in the other 80%..90% :( ).

Anyways, this entire videohardware issue what affects more type of videohardwares/chipsets including some Nvidia ones as well - as far I know - is only one of those topics what should be included in a future code update for XWA. It's a 10 year old game and simply needs an update, that's all.

By the way, if you have something for code update I am sure it would be welcome here on XWAUpgrade forums if you would share it with us (on another forum thread of course, since this one is for common graphic problems for XWA) or at least the link to that website what you've mentioned. It would be even better I guess, if you would join an XWA modding community (like XWAUpgrade for example) if you feel you have the knowledge and resolution for that.

User avatar
guru_redeye
Cadet 2nd Class
Posts: 62
Joined: Wed Oct 06, 2004 11:01 pm

Post by guru_redeye » Thu Jan 22, 2009 7:53 am

Lmao ... Since it seems you know why is XWA much better than Rogue Squadron, you can't be a bad man xD

P.s.: I've also been playing xwing series games from the first DOS version one (since ~1996) :)

User avatar
guru_redeye
Cadet 2nd Class
Posts: 62
Joined: Wed Oct 06, 2004 11:01 pm

Post by guru_redeye » Sun Jan 25, 2009 2:04 am

woo0OTERZ BELL RINGING AND FIREWORKS !!! great news in ATI issue ! xD

You were right Reimar, your XWA patch works with the newest driver on my card !! :D Although that was the last opportunity I've ever believed in, I decided to give it a shot and updated my video drivers just to check it out if that works aaaaand ... the miracle has happened lol. I've started it with the original executable first and what I saw switching in 3D mode was exactly that effect you've described earlier (those 8x8 blank squares appearing on the screen). Ah! We're half way there! (lol) - thought to myself and re-copied the other executable in my XWA folder what I've modified earlier by your instructions aaaand .. YEEEHAAA!! xD my XWA 3D mode works like never before ! :D.

I dare suggest it for everyone who has the same problem with his ATI card. It's clear to me though that there can be a lot of peeps out there who cant perform this kinda 'patching' so I thought about uploading the patched XWA exec itself somewhere but I am not sure if it doesnt contravene some copyrights so I cant decide if I may ... (any oppinions about this ?).

Lastly here are some specs of the video hardware / driver I use (I know I know that's faaar from being the best lmao):

Video card : .. Sapphire Radeon HD3650 512 Megs DDR2 RAM
Driver : ......... ATI Radeon HD3600 Series / ATI Technologies Inc. / Version: 8.561.0.0 / Date: december 1 2008

Post Reply