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.