Cycling Targeting Computer @ Very High Resolution, Crashes

A Forum dedicated to the Suggestion, Creation and Editing of XWA Dynamic Link Library Files

Moderator: JeremyaFr

Cycling Targeting Computer @ Very High Resolution, Crashes

User avatar
ImAlrightBlargh
Recruit
Posts: 2
Joined: Thu Jan 07, 2016 2:03 am

Post by ImAlrightBlargh » Thu Jan 07, 2016 6:01 pm

Hello folks. Newbie to X-Wing Alliance but oldschool X-Wing and Tie Fighter player here. I'd like to take a moment before I get into this issue to thank the various contributors to this project. I really loved playing X-wing as a youngin back in the MacOS days and it is great to revisit that same experience in a format that still holds up to today's gaming expectations.


I encountered an issue while playing at particularity high resolutions. The game performs well and is stable with XWAU and XWAHacker modifications even at high resolution, with the exception of crashes when cycling targets through the targeting computer.

It does seem to be strongly resolution related. I primarily experimented at 3440x1440 as that is my monitor's native resolution so most of my observations took place at that setting, and the issue is quite prevalent. As an interesting side point, I did set the game to 4K (3840x2160) and while the issue still occurred it seemed to take longer on average for the crash to happen. Precursory testing while stepping down to 2886x1200 seems to be stable.

I did note there are certain circumstances when the game does not seem to be as effected. For example, Prologue, Mission 6, Rebel Rendezvous (The mission you deliver bacta at the rebel hospital space station) the game functions entirely fine until the Imperial Star Destroyer arrives. Once you start cycling targets at that point it crashes. Other missions may crash after only one or a few cycles.

I have seen similar reports from those using very high resolution setups. I'm only a gamer, and am not very knowledgeable about such things, but maybe it is related to an issue loading certain spacecraft models into the targeting computer's mini screen render, or maybe caching a certain number on a busier level? Someone with more technical knowledge may have better insight.

I know this is a bit "first world problem"esque, but at the same time this game has survived this long, if the challenges of running at very high resolution aren't insurmountable, what's to say people won't be playing this in ultrawide or 4k for the next few years? The game actually looks and plays pretty darn great at high res and unfortunately there is a pronounced stepdown in quality when going below native resolution. Any insight on the issue or solutions might be very helpful for the future of the game.

Some more information below...
XWA Version: 2.02 "Steam"
XWAU Version: XWAUXPv1.3
XWAHacker Version: .25 GUI
OS: Windows 10 64
Hardware: i5 4690 / Radeon R9 390

Any other information that may be helpful I'd be happy to provide. If there is any further troubleshooting anyone would like me to attempt let me know.

gongo
Cadet 4th Class
Posts: 16
Joined: Sat Sep 05, 2015 4:18 am

Post by gongo » Tue Jan 19, 2016 6:58 pm

-
Last edited by gongo on Thu Jan 14, 2021 10:11 pm, edited 1 time in total.

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

Post by Reimar » Tue Jan 19, 2016 9:02 pm

You are using the ddraw.dll?
Because the main 3D scene is as far as I could tell actually always rendered at your native screen resolution by it.
So you shouldn't lose much quality by keeping a lower resolution in the xwahacker settings.
Apart from that it would admittedly be interesting to know why it crashes.
Can you get some information from the crash? (I don't have any screen setup that would allow me to test myself).
The command-line xwahacker also has a patch (-p 13) to disable the starfield, just in case that might be the problem.

gongo
Cadet 4th Class
Posts: 16
Joined: Sat Sep 05, 2015 4:18 am

Post by gongo » Tue Jan 19, 2016 9:57 pm

-
Last edited by gongo on Thu Jan 14, 2021 10:11 pm, edited 1 time in total.

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Tue Jan 19, 2016 10:28 pm

@Reimar it might be an idea to remove your older files, and if the DLL is the same please name the file the same

at the moment you have
In the thread Direct3D 11 via DDraw.dll
ddraw_for_3D.zip dated Mon Jan 04, 2016 which is 39.1 KiB
in the same thread lower down you have
ddraw_for_3D.zip dated Tue Jan 05, 2016 which is 40.17 KiB

This might be confusing to some people, could you please remove the outdated version please

Then you have
ddraw_for_XvT_BoP_TIE95_XWing95.zip
in the thread ddraw.dll for XvT BoP
But looking at the ddraw.cfg from both zip files there are minimal differences but the ddraw.dll one for XvT_BoP_TIE95_XWing95 is 256kb the other from ddraw_for_3D is 89kb, but can these be interchangeable between XWA and the older games?

I think you need some sort of text file in with the other files stating what these files do and for what game, also including the info Jeremy added to his text file, if your ddraw.dll is based off of his work which it looks to be, please.
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

gongo
Cadet 4th Class
Posts: 16
Joined: Sat Sep 05, 2015 4:18 am

Post by gongo » Thu Jan 21, 2016 12:43 am

-
Last edited by gongo on Thu Jan 14, 2021 10:11 pm, edited 1 time in total.

gongo
Cadet 4th Class
Posts: 16
Joined: Sat Sep 05, 2015 4:18 am

Post by gongo » Wed Jan 27, 2016 7:18 am

-
Last edited by gongo on Thu Jan 14, 2021 10:10 pm, edited 1 time in total.

nevara
Cadet 4th Class
Posts: 12
Joined: Mon Dec 15, 2014 3:49 pm

Post by nevara » Sat Feb 25, 2017 3:49 pm

Have the same issue with UHD. Took me a while to figure out the resoultion is too high.

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Feb 25, 2017 8:15 pm

Hello,
The max supported resolution height is 1200. With higher resolution, the game will crash.

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

Post by Reimar » Sun Mar 12, 2017 10:20 pm

Thanks for the information, I added a warning to the new XWAHacker information for this case.
(it also should work on XP again and adds - untested - support for enabling the FPS display so people don't have to follow the hex-editing instructions in this forum)

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon Mar 13, 2017 1:08 pm

Hello Reimar,
I've found a typo: "scene" instead of "texture"
in https://sourceforge.net/p/xwahacker/cod ... qt.cpp#l84

Code: Select all

[SHOWFPS_FPS_TEXSTATS] = "FPS and scene statistics",

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

Post by Reimar » Mon Mar 13, 2017 6:58 pm

JeremyaFr wrote:Hello Reimar,
I've found a typo: "scene" instead of "texture"
Stupid copy-paste lazyness... Should be fixed now (also the lazy way without version bump, I'll just pretend this never happened :D ...).

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Mon Mar 13, 2017 8:36 pm

Just curious Reimer

Why on your resolution do you only have 4 sets when there are actually 5? You seem to be missing 1280 x 1024 :?

1. 640 x 480
2. 800 x 600
3. 1152 x 864
4. 1280 x 1024 ( not present in either your *.bat or GUI )
5. 1600 x 1200

Often wondered, but never asked :D
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

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

Post by Reimar » Mon Mar 13, 2017 10:38 pm

I don't remember the details, but I think the 1280x1024 selection code path goes a bit differently (weird compiler behaviour maybe?) so it's harder to patch.
And my comments (line 39/41 https://sourceforge.net/p/xwahacker/cod ... wahacker.c) actually indicate that there are in fact 6 different resolutions.
And now I think I remember: the missing resolutions are 1024x768 and 1280x1024.
I think unfortunately the compiler decided to share the 1024 for those two, so changing one would change the other, which would get really confusing...

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Mon Mar 13, 2017 10:41 pm

That makes perfect sense, thanks

I just wondered that's all :D thanks :2thumbs:
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue Aug 01, 2017 4:05 pm

Hello,

I think I've found how to fix the crash when a resolution heigh > 1200 is used.

Code: Select all

# support high resolutions (H > 1200)
At offset 10F54B, replace E8903CFCFF with 9090909090.
This removes a call to a function that use a static buffer whose the size is 1200 items. This buffer seems to be used only on software mode. So I think it's OK to remove the call.

EDIT: Don"t apply this fix. It makes the game crash.
Last edited by JeremyaFr on Wed Aug 23, 2017 2:36 pm, edited 1 time in total.

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

Post by Reimar » Wed Aug 02, 2017 8:29 pm

Nice! It's untested but I've added this to xwahacker (both GUI and cmdline, though haven't added a bat file for cmdline, I assume everyone wanting that should just use the GUI).

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed Aug 23, 2017 2:45 pm

This patch makes the game crash in "Prologue, Mission 6" on Medium difficulty.
I've tested the mission without the patch and the game ran fine.
I've then tested with the patch and the game crashed.

Instead of it, you can try that:

Code: Select all

# support high resolutions (H > 1200)
At offset 0D31EB, replace 7617 with EB17.
I've tested the mission with this fix and the game ran fine.

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Wed Aug 23, 2017 6:08 pm

Ah shite, I added this

Code: Select all

# support high resolutions (H > 1200)
At offset 10F54B, replace E8903CFCFF with 9090909090.
to both XWAUCPv1.4 and the DSUCPv2.4

So your say the above offset makes the game crash

and

Code: Select all

# support high resolutions (H > 1200)
At offset 0D31EB, replace 7617 with EB17.
is the correct offset?

Best thing I can do is to leave it out, if people wish to make changes to there resolution do it with XWAHacker

I'm I right in saying this high resolution offset only applies to those who use a Resolution Height higher than 1200, equal too or below 1200 it won't affect the game or crash?
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed Aug 23, 2017 6:41 pm

1) Yes, it makes the game crash.
2) It needs to be tested.
3) The purpose of the patch is to avoid a crash when a resolution height > 1200 is used. It is not needed for resolution height <= 1200. I suggest to not apply this patch in the craft packs. Those who use a resolution height > 1200 can apply the patch with XWAHacker alongside the desired resolution. This should not affect configs with a resolution height <= 1200.

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Wed Aug 23, 2017 6:46 pm

I agree, I've deleted the offset from the craft pack now I'll have to recompile and upload them lol oh what fun :D
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

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

Post by Reimar » Sat Aug 26, 2017 12:44 pm

Ok, XWAHacker now uses the new suggestion instead.

Darth_Binks
Cadet 1st Class
Posts: 120
Joined: Wed Jul 14, 2004 11:01 pm

Post by Darth_Binks » Sun Oct 15, 2017 11:31 am

I have an interesting variation of this crash;

I'm using The latest XWAUCP, and the latest XWA hacker, and the lastest ddraw file. If I turn on 32bit rendering with xwahacker, and I target any large capitol ship the render stops and I see two small green dots. The game hasn't locked up, because I can still q space and quit the mission.

I'm running at 1920x1080 with 95 FOV and 1.8 HUD scale, fix graphic corruption and 32b rendering checked.
Windows 7 64b Pro SP1
ASUS Ranger VIII Maximus MOBO
Corsair 32 GB DDR4 RAM @ 3000MHz
Gigabyte GTX 970 4GB VRAM
Sound Blaster Z SB1500
Blue Zoidberg: As for me I design mansions and then live in them. I'm lying! I'm an apalling failure!<BR>Red Zoidberg: Me too! A big fat one.<BR>-The Farnsworth Parabox, Futurama

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

Post by Reimar » Sun Oct 15, 2017 5:36 pm

No, this is not related at all, you're not even running at the high resolutions this thread is about.
Unless you are using a driver from around early 2016, there is no point in using the xwahacker fix options you are using, you need to use the ddraw.dll instead.

LoveADuck
Recruit
Posts: 1
Joined: Wed Nov 01, 2017 5:09 pm

Post by LoveADuck » Wed Nov 01, 2017 5:15 pm

Hi all -

Registered to say that I'm running at 2560x1440 via the GUI version of Reimar's hacker, and still getting crashes a few seconds into the mission, even with the "fix crashes for high resolutions" box checked. I can dial it back to 1920x1080 and it works fine, but I'd love to get it working in proper full screen. Let me know what further info I can provide, and thanks a million for all of your hard work.

Post Reply