SPWAW Artillery Fix Version 2.1 - REMOVED

SPWaW is a tactical squad-level World War II game on single platoon or up to an entire battalion through Europe and the Pacific (1939 to 1945).

Moderator: MOD_SPWaW

Riitaoja
Posts: 85
Joined: Fri Jan 30, 2015 11:45 am

SPWAW Artillery Fix Version 2.1 - REMOVED

Post by Riitaoja »

[center]UPDATE 10/1/2015:
It has now been confirmed that the SPWAW artillery screen fix works only for dual core cpu's. The old (dual core only) fix is still available for download here http://www.spwaw.com/phpBB2/download.php?id=25708:

Users of Intel Quad core cpu's may try to edit the CMD file and use AFFINITY 8 instead of AFFINITY 2. This may or may not work. In general however if the computer has more than two cpu cores then the fix will not work.

Note: If you downloaded the now removed version 2 or 2.1 of the artillery fix it should still work fine for dual core cpu's.

[/center]

[center]UPDATE 9/25/2015:
There have been reports that the fix does not work for people using a quad core Intel i5 cpu. Previously there were reports that the fix does not work for Intel i7 cpu either. Due to this I have decided to remove the download link for the fix until I can test the fix again on an Intel i5 or Intel i7 cpu and see what is wrong.
[/center]


UPDATED to version 2.1 on 9/18/2015




IMPORTANT! Read this first:

It seems that if you have set any compatibility modes for mech.exe the artillery screen fix does not work. So if you are having problems first make sure that when you right click on mech.exe and go to the compatibility tab there are no options set. You actualy can't even have the option "Run this program as administrator" set or windows will refuse the artillery fix .cmd file to change the cpu AFFINITY. [X(]

Image



KNOWN ISSUE: The fix does not work for computers that have an Intel i7 processor. This may be related to Hyper-Threading that is used by that CPU. Similary Intel i3 may also have issues since it too uses Hyper-Threading.



I thought I'd post this fix in a separate thread for more visibility. This is my latest fix for the unresponsive arttillery screen. What this version does is it checks how many physical cpu cores the users computer has and then starts SPWAW with the correct AFFINITY value automaticaly.

The first version of the fix just worked for owners of dual core processors but if the user had for example a quad core processor he had to manualy edit the command line script to make the fix work. Now this one fix should work for all multi core cpu's up to an 8 core machine.

So far I have tested this to work on three different multi core processor computers. A single core with hyper-threading, a dual core and a quad core.

DL link to GameFront:
-REMOVED


from the readme file:
SPWAW Artillery screen fix version 2.1 (automatic)
--------------------------------------------------

What's new in version 2.1:
-Fixed a typo that would cause the game to restart when closing it on a quad core cpu.
-Added in some commands to check for presence of Hyper-Threaded Logical cpu cores to detect
Intel i3 and Intel i7 processors. Using command "wmic cpu get NumberOfLogicalProcessors".
This does not mean that the fix will work on Intel i3 or i7 processors yet. I will continue
to study on how to make the fix compatible with Intel processors that use HT.

Note for Windows 7 (and Vista) users:
-Steel Panthers World at War suffers from corrupted colors on Win7 and Vista systems.
There are several methods to fix the corrupted colors for old games on Windows 7 but
I would recomend using a program called "DxWnd".


This is a version of the Artillery screen fix that should work automaticaly without the need to
manualy edit the AFFINITY numbers. The command line script runs a series of checks to see how many
cpu cores the users computer has and then launches SPWAW with the appropriate cpu AFFINITY value
fixing the artillery screen unresponsiveness.

Usage:
- First extract the file "SPWAW_Arty_FIX_v2.cmd" to your \Steel Panthers World at War\ -foler
(where mech.exe resides.)
- To use the fix start the game from the file "SPWAW_Arty_FIX_v2.cmd".

.
.
.


Technical information for those who are interested in how the fix works in depth:

What causes the artillery screen unresponsiveness in SPWAW is an incompatibility of the game when
run on modern multi core processors. For some reason SPWAW needs to run on the last physical cpu
core of a multi core processor.

The correct AFFINITY value depends on the number of physical cpu cores the users computer has.
So for example a standard dual core cpu needs a value of "2", a quad core cpu needs a value of "8",
a six core cpu needs a value of "20" and so on... The AFFINITY values are derived from binary code that
is then converted to a hexadecimal value. e.g. Fourth (4) core is 1000 in binary and 8 when converted
into a hexadecimal.

Rather than having the user figure out how many cpu cores his/her computer has and then finding out the
correct AFFINITY value this script handles it automaticaly. The command 'wmic cpu get NumberOfCores' is
used to find out the number of physical cpu cores.

It is worth noting that hyper threaded cores do not count when determining the correct AFFINITY value
for SPWAW. For example a single core intel CPU with Hyper-Threading should be run on AFFINITY value of "1"
since the last physical core is core #1 and the second core (#2) is just a Hyper-Threaded logical core.

The script currently supports CPU's that have up to 8 physical cores.

Additional note for Windows 7 (and Vista) users regarding the corrupted color issue:
Windows 7 has an issue with SPWAW where the color palette is messed up. To fix the colors I recommend using the DxWnd program. See here for instructions on how to set it up for SPWAW:
fb.asp?m=3811621
sami heimola
Posts: 421
Joined: Mon May 08, 2000 8:00 am
Location: kouvola finland

RE: SPWAW Artillery Fix Version 2 (Automatic)

Post by sami heimola »

Thanks Riitaoja[:)]! It's about time to get rid of that annoyning arty bug... Now all we need is that scenario loading fix in Editor[:'(]

User avatar
Major_Mess
Posts: 471
Joined: Sun Feb 08, 2004 4:28 pm
Location: The True North. Strong and Free

RE: SPWAW Artillery Fix Version 2 (Automatic)

Post by Major_Mess »

Thanks Riitoaja, if you don't mind I'll use this .cmd file on V1.1 <- coming out soon.



ORIGINAL: sami heimola

... Now all we need is that scenario loading fix in Editor[:'(]


I think I've sorted that one out guys, here's a link >>> scen files fix. This should sort that problem out.


cheers


MM
Click below. You know you want to!!


Image
Riitaoja
Posts: 85
Joined: Fri Jan 30, 2015 11:45 am

RE: SPWAW Artillery Fix Version 2 (Automatic)

Post by Riitaoja »

ORIGINAL: Major Mess

Thanks Riitoaja, if you don't mind I'll use this .cmd file on V1.1 <- coming out soon.

Go right ahead if you like!

Also if anyone has ideas on how to further improve the .cmd script you are free to do so. I think it works pretty good now but there is always the possibility that it might not work for some computers.
User avatar
Major_Mess
Posts: 471
Joined: Sun Feb 08, 2004 4:28 pm
Location: The True North. Strong and Free

RE: SPWAW Artillery Fix Version 2 (Automatic)

Post by Major_Mess »

Dude, thanks.


PM sent.



MM
Click below. You know you want to!!


Image
User avatar
Alby
Posts: 4659
Joined: Sat Apr 29, 2000 8:00 am
Location: Greenwood, Indiana
Contact:

RE: SPWAW Artillery Fix Version 2 (Automatic)

Post by Alby »

ORIGINAL: sami heimola

Thanks Riitaoja[:)]! It's about time to get rid of that annoyning arty bug... Now all we need is that scenario loading fix in Editor[:'(]

Its fixed
[:)]

sami heimola
Posts: 421
Joined: Mon May 08, 2000 8:00 am
Location: kouvola finland

RE: SPWAW Artillery Fix Version 2 (Automatic)

Post by sami heimola »

Unfortunately patch seems not to work in my end [:(]... I unzpped patch, installed cmt's into scen folder. Then I went to Editor. Chose "load scenario". Crash immediately[8|] ... Any help?

edit:Sorry if I wrote into wrong topic.
Riitaoja
Posts: 85
Joined: Fri Jan 30, 2015 11:45 am

RE: SPWAW Artillery Fix Version 2 (Automatic)

Post by Riitaoja »

No offence meant but I think this thread should be about the artillery screen fix only.

You could perhaps continue the discussion about the Enhanced mod and the scenario loading issue in a separate thread to avoid confusion.
User avatar
DROregon
Posts: 129
Joined: Sat Jan 19, 2002 10:00 am
Location: Oregon
Contact:

RE: SPWAW Artillery Fix Version 2 (Automatic)

Post by DROregon »

Your patch worked for me! Thank You!
Image
sami heimola
Posts: 421
Joined: Mon May 08, 2000 8:00 am
Location: kouvola finland

RE: SPWAW Artillery Fix Version 2 (Automatic)

Post by sami heimola »

Well thanks about fix but I noticed that if go to Art menu, choosing target hex will be "marked" so sloooowwww[&:]... I thought first that fix don't work at all but waiting a bit game accepted my chosen hex finally. Maybe it will work faster in future patches (if any way possible)?
Riitaoja
Posts: 85
Joined: Fri Jan 30, 2015 11:45 am

RE: SPWAW Artillery Fix Version 2 (Automatic)

Post by Riitaoja »

ORIGINAL: sami heimola

Well thanks about fix but I noticed that if go to Art menu, choosing target hex will be "marked" so sloooowwww[&:]... I thought first that fix don't work at all but waiting a bit game accepted my chosen hex finally. Maybe it will work faster in future patches (if any way possible)?

Can you tell me what processor your computer has? This information should be found somewhere in "Control panel" under "system".


There are so many different processors out there. I have been able to personaly test this fix to work on three different computers however all of those were running on Intel CPU's. The processors that I have tested this to work were:

- Intel ATOM D410 single core with two threads using hyper-threading technology. The correct AFFINITY value was found to be "1"
- Intel G2030 dual core (no hyper-threading). Correct AFFINITY value was "2".
- Intel i5 quad core (no hyper-threading). Correct AFFINITY value was "8".

It is still undetermined how the more advanced intel cpu's that use Hyper-Threading react to the fix. The intel CPU's I have not tested are Intel i3 and Intel i7. Also all AMD branded processors are currenly untested but they could prove problematic since AMD uses it's own multi core technology where for example a 6 core processor has 3 modules and each module contains two physical cores. Hopefully they run fine with the affinity fix but without testing I can't be sure.


If however the fix does not work you could try to find out a working AFFINITY value for your particular CPU by trial and error.
Trying to launch the mech.exe via a .cmd file with the follwing different commands one by one and always testing how the artillery screen works:

start /B /WAIT /AFFINITY 1 MECH.EXE

start /B /WAIT /AFFINITY 4 MECH.EXE

start /B /WAIT /AFFINITY 8 MECH.EXE

start /B /WAIT /AFFINITY 10 MECH.EXE

start /B /WAIT /AFFINITY 20 MECH.EXE

start /B /WAIT /AFFINITY 40 MECH.EXE

start /B /WAIT /AFFINITY 80 MECH.EXE
Riitaoja
Posts: 85
Joined: Fri Jan 30, 2015 11:45 am

RE: SPWAW Artillery Fix Version 2 (Automatic)

Post by Riitaoja »

Edit:
Again hopefully the artillery fix works for AMD processors as it is and this speculation is unnessesary.


Pure speculation on my part again but for multi core module based AMD processors there might even be a need to start the game with two cores enabled instead of just one. I may have a chance to test SPWAW on a computer that has a 6-core AMD CPU at some point. So if that happens I will update this post with my findings.

Basicaly what I am thinking is that if there are 3 mudules and each contain 2 physical cores then instead of using core #6 to run SPWAW you would possibly need to use both cores #5 and #6.

so it would look something like this:

1 \_ module 1
2 /

3 \_ module 2
4 /

5 \_ module 3 - the whole of module 3 is needed to run SPWAW.
6 /

This is just theory and I could be completely wrong. However if this logic is indeed correct for AMD branded processors then the AFFINITY values would look very different.

Looking at the binary code:
10000 & 100000 would be cores #5 & #6
and together they would give a binary value of "110000" which in term would translate to a hexadecimal value of "30"

So a possible AFFINITY value to run SPWAW correctly on a six-core AMD cpu would be 30.
sami heimola
Posts: 421
Joined: Mon May 08, 2000 8:00 am
Location: kouvola finland

RE: SPWAW Artillery Fix Version 2 (Automatic)

Post by sami heimola »

For Riitaoja: Intel(R) Core(TM) i5-2500K CPU@3.30MHz
Riitaoja
Posts: 85
Joined: Fri Jan 30, 2015 11:45 am

RE: SPWAW Artillery Fix Version 2 (Automatic)

Post by Riitaoja »

ORIGINAL: sami heimola

For Riitaoja: Intel(R) Core(TM) i5-2500K CPU@3.30MHz

I see it is a standard i5 system with 4 cores and no hyper-threading. It should actualy work with the AFFINITY value of 8 which artillery fix ver2 should automaticaly assign.

Very puzzling...


All I can think of at the moment are the standard things which you probably have already tried but here goes:

- Update your graphics card drivers. Especialy if you have updated to Windows 10 sometimes the drivers do not get updated properly. Looking at your CPU specs it seems to use Intel HD graphics 2000. However looking at the intel drivers site here:
https://downloadcenter.intel.com/produc ... Processors
It looks like Intel does not currently have a proper Windows 10 driver for it!!!

- Sound drivers might also be in need of updating. to test if it is a sound issue you can run the game with all the sounds disabled from the preferances:
Soundtrack -> OFF
Unit sound fx -> OFF
weather & battle sound fx -> OFF
terrain sound fx -> OFF

- Also you might want to try to run the game through dxwnd:
fb.asp?m=3811621


Unfortunately that is all that comes to my mind at the moment. [:(]
sami heimola
Posts: 421
Joined: Mon May 08, 2000 8:00 am
Location: kouvola finland

RE: SPWAW Artillery Fix Version 2 (Automatic)

Post by sami heimola »

I tried that affinity 8 thing->still slooowwww
I shut all sounds (terrain/unit/background/weather)->still slooowww
nvidia geforce drivers->latest update
I have not tried that dxwnd thing yet(never heard abot that before[8|])
Riitaoja
Posts: 85
Joined: Fri Jan 30, 2015 11:45 am

RE: SPWAW Artillery Fix Version 2 (Automatic)

Post by Riitaoja »

The DXWnd program takes the old DirectX7 commands that SPWAW uses and translates them into a format that is more friendly for modern operating systems that use DirectX11. It might be useful if for nothing else it should cut down the ammount of random crashes.

By the way how does the artillery screen work for you if you start the game directly from mech.exe without applying any fixes? <- Not nessessary since after a moment of posting this I think I found the reason why the artillery fix was not working see below:


EDIT:

I just tested running mech.exe in a compatibility mode. Sure enought the artillery screen did not work. So make sure you do not have any compatibility modes set for mech.exe.

For instance when I set Mech.exe to run in a compatibility mode for Windows 95 the affinity option is completely disabled. This ofcourse means that the artillery screen fix can not function either. Not even the run as administrator option is allowed apparently.

So basicaly your compatibility tab for mech.exe should look like this:


Image
Attachments
compatibility.jpg
compatibility.jpg (43.49 KiB) Viewed 598 times
sami heimola
Posts: 421
Joined: Mon May 08, 2000 8:00 am
Location: kouvola finland

RE: SPWAW Artillery Fix Version 2 (Automatic)

Post by sami heimola »

Riitaoja, does dxwnd work with Windows 10 too?
User avatar
Major_Mess
Posts: 471
Joined: Sun Feb 08, 2004 4:28 pm
Location: The True North. Strong and Free

RE: SPWAW Artillery Fix Version 2 (Automatic)

Post by Major_Mess »

ORIGINAL: sami heimola

....... does dxwnd work with Windows 10 too?


Yes it does.

MM
Click below. You know you want to!!


Image
pepita17
Posts: 31
Joined: Sun Mar 16, 2014 9:21 am

RE: SPWAW Artillery Fix Version 2 (Automatic)

Post by pepita17 »

Hello,

i am back again to spwaw (thanks to the new enhanced fr),
but it seems the arty download link is not working anymore.

if we can have a fresh one...
MTM78
Posts: 1
Joined: Sun Sep 13, 2015 9:19 pm

RE: SPWAW Artillery Fix Version 2 (Automatic)

Post by MTM78 »

Hi all. Just reporting that the fix also does not work on my machine. CPU is: Intel i7 4700MQ 2.40ghz

Thanks for taking the time for these kinds of projects.
Post Reply

Return to “Steel Panthers World At War & Mega Campaigns”