This is a wiki for a reason. Anyone can contribute. If you see something that is inaccurate or can be improved, don't ask that it be fixed--just improve it.
[ Disclaimer, Create new user --- Wiki markup help, Install P99 ]

Difference between revisions of "Players:Technical/Affinity"

From Project 1999 Wiki
Jump to: navigation, search
m (Moved \ from _AppFolder to cmd.exe to ensure it's in there. Removed ECHO)
m (Added summary at top)
 
Line 1: Line 1:
 +
= Description = __NOTOC__
 +
This script will use the Affinity part of cmd.exe and start, and pick a random CPU to run EverQuest on.
 +
This will in theory extend the lifetime of your cpu by spreading the load over different cores each time Everquest is run.
 +
That is; Everquest will run on one core, but each time it runs it will pick a core at random.
 +
 +
= Script =
 
Create a batch file inside your Everquest Folder (for this example it assumes C:\EQLite).
 
Create a batch file inside your Everquest Folder (for this example it assumes C:\EQLite).
 
 
Call the batch file A_Run_Everquest.bat
 
Call the batch file A_Run_Everquest.bat
 
 
Copy paste the following code into the batch file
 
Copy paste the following code into the batch file
  
Line 31: Line 35:
 
</pre>
 
</pre>
  
 +
= Edits Required =
 
* Edit _AppFolder=<span style="color:red;">C:\EQLite\</span>  change this to the folder path that you installed everquest into
 
* Edit _AppFolder=<span style="color:red;">C:\EQLite\</span>  change this to the folder path that you installed everquest into
 
* Edit _MaxCPU=<span style="color:red;">8</span>  change this to the number of CPU cores you have (you can find this in Task Manager)
 
* Edit _MaxCPU=<span style="color:red;">8</span>  change this to the number of CPU cores you have (you can find this in Task Manager)
 
* Change your short cut from C:\EQLite\eqgame.exe patchme  to  C:\EQLite\A_Run_Everquest.bat
 
* Change your short cut from C:\EQLite\eqgame.exe patchme  to  C:\EQLite\A_Run_Everquest.bat
 
Ever time Everquest runs it will pick a random CPU core to run it on, this should over time extend the life of your cpu.
 

Latest revision as of 14:29, 31 July 2015

Description

This script will use the Affinity part of cmd.exe and start, and pick a random CPU to run EverQuest on. This will in theory extend the lifetime of your cpu by spreading the load over different cores each time Everquest is run. That is; Everquest will run on one core, but each time it runs it will pick a core at random.

Script

Create a batch file inside your Everquest Folder (for this example it assumes C:\EQLite). Call the batch file A_Run_Everquest.bat Copy paste the following code into the batch file

@@ECHO OFF

REM This only works up to Minimum of 1 and Maximum of 8 Cores
REM It picks a random CPU core between 1 and the Maximum and runs Everquest on that CPU core

setlocal
SET _AppFolder=C:\EQLite
SET _AppName=EVERQUEST
SET _AppEXE=eqgame.exe
SET _AppParams=patchme
SET /a _MaxCPU=8
SET /a _rand=%RANDOM%*%_MaxCPU%/32768+1 
SET _affinity=0x01
IF %_rand% EQU 2 SET _affinity=0x02
IF %_rand% EQU 3 SET _affinity=0x04
IF %_rand% EQU 4 SET _affinity=0x08
IF %_rand% EQU 5 SET _affinity=0x10
IF %_rand% EQU 6 SET _affinity=0x20
IF %_rand% EQU 7 SET _affinity=0x40
IF %_rand% EQU 8 SET _affinity=0x80

cmd.exe /c start "%_AppName%" /affinity %_affinity% "%_AppFolder%\%_AppEXE%" %_AppParams%
endlocal

Edits Required

  • Edit _AppFolder=C:\EQLite\ change this to the folder path that you installed everquest into
  • Edit _MaxCPU=8 change this to the number of CPU cores you have (you can find this in Task Manager)
  • Change your short cut from C:\EQLite\eqgame.exe patchme to C:\EQLite\A_Run_Everquest.bat