Aller au contenu

AMD Gpu's Opengl workaround (Well, sort of)


Messages recommandés

Posté(e)

Attention, this is mostly directed at gaming rigs, computers in arcade cabinets, etc. I do not recommend touching system files on work computers or computers with sensitive information, unless you know what you are doing! Use it at your own risk!


...and always back up your files and make a restore point.

 

 

What's this for? 

Well, AMD's OpenGL drivers (at least on Windows) are well known for being a real mess.
For example, games that worked perfectly with drivers 22.5.1 no longer work in later versions (after the mayor opengl driver rewrite), and other games work the other way around.


A very clear example is Teknoparrot. Games based on Sega Lindbergh (Linux) use OpenGL.

With an AMD card, it's impossible to run all games without any problems on Windows! Some work with the old drivers, while others with the new ones. Examples:


Games that need old drivers:


- Tokyo Cop (with the new ones, ther'es a massive slowdown)
- Too Spicy (With new ones, missing models and textures)
- Affterburner Climax (No Elf Loader 2) (With new drivers it crashes from the beginning)


Games that need new drivers:


- Virtua Tennis 3 (with old ones, players are invisible)


and so on... You get the idea.

 


Unfortunately, the solution isn't as simple as simply placing the DLL file in the game's installation folder. In Teknoparrot's case, that doesn't work.


So the solution I've found is to have two copies (they're just two dll files) and copy the one that's needed at the time into the drivers folder.

By default we will always have the new version in the folder and it will only be changed to the old one for the specific game that needs it.

 

In this case we are going to use AHK, because it is very versatile although it could also be automated with bat files.


Instructions:


First of all, the library in question is the file "atioglxx.dll" and is located, in my case, in:


C:\Windows\System32\DriverStore\FileRepository\u0407052.inf_amd64_84d15514ad17ffa0\B406619\


You have to look in your own directory: C:\Windows\System32\DriverStore\FileRepository\, for a folder that starts wit "u", like mine: u0407052.inf_amd64_84d15514ad17ffa0, but maybe with different numbers. Inside that folder is another one, similar as "B406619", maybe also with other numbers. And inside this folder is "atioglxx.dll"


1. Unzip the attached zip file.


2. Put the "Backup" folder (it contains a an "atioglxx" folder containing 2 "New" and "Old" folders with the new and old atioglxx.dll libraries inside) in the root of your C drive: C:/Backup.
Now, the file in the "New" folder is from my own drivers version : Adrenalin 24.9.1. If your opengl drivers are working great with newer games, keep your version (located in the folder mentioned before), replacing the one in the "New" folder. In any case, keep always a copy of your original file just in case!


3. Install "TakeOwnershipPro.exe" (Comes inside the zip) . Right click The "B406619" (in my case) folder and click on the "TakeOwnershipPro" tab. This will give us permission to replace the file in the folder.


4. Make a bat file or download and install "AutoHotkey" and make an AHK script (or just modify and use one of the included in the zip flle) to automate the file replacement process.

For convenience you could make and put 2 ahk scripts appart, to manually switch between the old and new driver. I.e: Old.ahk and New.ahk


A few examples (remember to change the scripts inside to match your own directories):


New.ahk:


FileDelete, C:\Windows\System32\DriverStore\FileRepository\u0407052.inf_amd64_84d15514ad17ffa0\B406619\atioglxx.dll
FileCopy, C:\Backup\atioglxx\New\atioglxx.dll, C:\Windows\System32\DriverStore\FileRepository\u0407052.inf_amd64_84d15514ad17ffa0\B406619\*.*

 

Old.ahk:


FileDelete, C:\Windows\System32\DriverStore\FileRepository\u0407052.inf_amd64_84d15514ad17ffa0\B406619\atioglxx.dll
FileCopy, C:\Backup\atioglxx\Old\atioglxx.dll, C:\Windows\System32\DriverStore\FileRepository\u0407052.inf_amd64_84d15514ad17ffa0\B406619\*.*

 

 

Loader.ahk (To automatically load in this case, the game "Too spicy" with Teknoparrot i.e.). In order to avoid the script not reverting back to the original (new) driver in case the program fails, this script checks every 3 seconds if Budgieloader.exe (Teknoparrot) is still active. If not it closes every other program started with the game (Mamehooker, etc.) and puts back the new atioglxx.dll. In this example it loads, as said, Mamehooker and Demulshooter (for Gun recoil and outputs), Rivatuner (limit fps). It also does the same and if you press the Escape key, to exit the game.


#NoEnv
SendMode Input
Gui -DPIScale
FileDelete, C:\Windows\System32\DriverStore\FileRepository\u0407052.inf_amd64_84d15514ad17ffa0\B406619\atioglxx.dll
FileCopy, C:\Backup\atioglxx\Old\atioglxx.dll, C:\Windows\System32\DriverStore\FileRepository\u0407052.inf_amd64_84d15514ad17ffa0\B406619\*.*
flag := False
BlockInput, On
sleep 500
run, C:\Mamehooker\mamehook.exe
sleep 1500
Run, DemulShooter.exe -target=lindbergh -rom=2spicy -noinput
sleep 2000
Run, C:\Teknoparrot\TeknoParrotUi.exe --profile=2Spicy.xml,, min
Sleep 1000
BlockInput, Off
sleep 1500
SetTimer, checker , 3000 ; check every 3000 ms
Return 

checker:
App = BudgieLoader.exe ; Change the name to application you are checking.
loop {
Process, Exist, % App,
    if !ErrorLevel {
      Process, Close, mamehook.exe
      Run, KillProcess.exe mamehook.exe,, min
      Process, Close, BudgieLoader.exe
      Run, KillProcess.exe BudgieLoader.exe,, min
      Process, Close, TeknoParrotUi.exe
      Run, KillProcess.exe TeknoParrotUi.exe,, min
      Process, Close, DemulShooter.exe
      Run, KillProcess.exe DemulShooter.exe,, min
      Process, Close, DemulShooter.exe
      Run, KillProcess.exe DemulShooter.exe,, min
      sleep 2000
      run, KillProcess.exe RTSS.exe,, min
      FileDelete, C:\Windows\System32\DriverStore\FileRepository\u0407052.inf_amd64_84d15514ad17ffa0\B406619\atioglxx.dll
      FileCopy, C:\Backup\atioglxx\New\atioglxx.dll, C:\Windows\System32\DriverStore\FileRepository\u0407052.inf_amd64_84d15514ad17ffa0\B406619\*.*
      ExitApp
}
    else
    return
}
*$Esc:: 
    Process, Close, mamehook.exe
    Run, KillProcess.exe mamehook.exe,, min
    Process, Close, BudgieLoader.exe
    Run, KillProcess.exe BudgieLoader.exe,, min
    Process, Close, TeknoParrotUi.exe
    Run, KillProcess.exe TeknoParrotUi.exe,, min
    Process, Close, DemulShooter.exe
    Run, KillProcess.exe DemulShooter.exe,, min
    Process, Close, DemulShooter.exe
    Run, KillProcess.exe DemulShooter.exe,, min
    sleep 2000
    run, KillProcess.exe RTSS.exe,, min
     FileDelete, C:\Windows\System32\DriverStore\FileRepository\u0407052.inf_amd64_84d15514ad17ffa0\B406619\atioglxx.dll
     FileCopy, C:\Backup\atioglxx\New\atioglxx.dll, C:\Windows\System32\DriverStore\FileRepository\u0407052.inf_amd64_84d15514ad17ffa0\B406619\*.*
    ExitApp

 

Btw. Put KillProcess.exe in the same directory as the script...

 

The example files are also inside the attached zip file.


If there are any questions, I will gladly answer.

AMDOpenglfix.zip

Veuillez vous connecter pour commenter

Vous pourrez laisser un commentaire après vous êtes connecté.



Connectez-vous maintenant
×
×
  • Créer...