Thread: CPUAffinity?
View Single Post
  #10  
Old 08-17-2022, 07:38 PM
digush digush is offline
Sarnak


Join Date: Jul 2017
Location: USA
Posts: 268
Default duuuuuuuuuude



this is the batch file i use to launch EQ
it's slightly modified a bit, but this works if you have a 4-core CPU with hyperthreading thus having 8-threads.
so if you have a 4-core CPU without hyperthreading (4 threads) you will have to edit the batch file to handle precisely 4 threads.
if you have an 8-core CPU with hyperthreading (16 threads) you will have to edit the batch file to handle precisely 16 threads. you get the jist.


For this particular batch file to work:
1)inside your Environment Variable in the Windows Operating System
you have to set(or create) a variable:
-Variable_Name to "eqgame"
-Variable_Value to "C:\YOUR_EQ_DIRECTORY\eqgame.exe"

..if this variable(eqgame) does not exist, create it(it gets created when you install EQ)
.....One example: it might not exist if you moved a backed-up EQ directory to a fresh windows install

2)Also need to change the following line in the batch file accordingly:
- SET _AppFolder=C:\YOUR_EQ_DIRECTORY (this is EverQuest's Home)











<<START Launch_Titanium_Affinity.BAT>>

@@ECHO OFF

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

setlocal
SET _AppFolder=C:\YOUR_EQ_DIRECTORY
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



start /affinity %_affinity% eqgame patchme
endlocal


<<END Launch_Titanium_Affinity.BAT>>



credits:

https://wiki.project1999.com/Players:Technical/Affinity
https://www.youtube.com/watch?v=hgFuYs-okjY







Last edited by digush; 08-17-2022 at 08:04 PM.. Reason: minor thing
Reply With Quote