Direct3D8 to Direct3D9 Proxy
Final Fantasy XI in Direct3D9!
Donations
This project is released for free in hopes to help fix issues with playing the game on laptops that have switchable graphics. Donations can be made to show your appreciation to my work and a way to say thanks if this project has helped fix any issues you may have had. Donations are also what encourage me to continue working on this (and other FFXI related projects) in the future if other bugs and problems arise. Any amount is appreciated and I am thankful to anyone that does donate. I hope this project can help fix your issues like it has mine. :slight_smile:
What Is This Project?
To understand what this project is, we should first understand why it's needed. Final Fantasy XI is a game that was designed and developed starting back in the late 1990's into the early 2000s. Because of this, the development of FFXI was 2-4 years prior to Direct3D 9 existing. This means that FFXI was designed and coded for Direct3D 8 instead, as that was the latest available version at the time. In the 20+ years of XI's lifespan, SquareEnix has never done any work to upgrade the game, on PCs, to newer modern DirectX versions.
Microsoft had deprecated the older versions of DirectX over time, including Direct3D8, which FFXI uses, shortly after Direct3D 9 was released. While this does not stop it from working, it does stop it from receiving any kind of support or updates going forward. With this, Nvidia also dropped support and deprecated it within their drivers. As Windows advanced from the Windows XP of that era to todays Windows 10 and 11, the support internally for the older versions of DirectX have also changed at the OS level. Anything older than DirectX 9 is now handled in a much less than ideal manner, effectively causing it to be CPU bound and will no longer take full advantage of a users graphics card in many cases. The main one being with laptops.
During XI's lifespan, Nvidia (and AMD) developed mobile variants of their desktop GPU chips, allowing laptops to have much more power for gaming. However this came with a tradeoff in the form of Nvidia Optimus and AMD Switchable Graphics, their technologies that causes the laptop to 'decide' which chip it will use for rendering various things. With the older variants of Windows (ie. XP, Vista, 7 and 8/8.1) this was fine and DirectX 8 games would still trigger the dedicated GPU in the laptop (if it has one) allowing for best performance while playing the game. However, starting with Windows 10, this is no longer the case. Games using the older DirectX technologies such as DirectX 8 will no longer activate the dedicated GPU. (The only way for users to force this to happen now is if your laptop has a modern MUX switch and you force it on.)
This project is a Direct3D proxy DLL. This means that when loaded, it sits between Final Fantasy XI and Direct3D allowing it to intercept and alter how calls made to the original d3d8.dll work. When using my proxy, PlayOnline (pol.exe) will load my d3d8.dll file instead of the one located in your Windows system directory. After this happens, my proxy will then intercept any calls made to the original expected Direct3D 8 DLL exports. When this happens, my proxy DLL will then load and make use of the real d3d9.dll instead. Any calls made to the expected Direct3D 8 objects are rewritten and forwarded to their Direct3D 9 variants. (More work is done behind the scenes such as rewriting deprecated shader instructions and such, but this is the main jist of what happens.)
tldr; This project makes Final Fantasy XI run using Direct3D 9 instead of Direct3D 8, thus allowing Nvidia Optimus (and AMD's Switchable Graphics tech) to activate and cause the users laptop to make use of its dedicated GPU.
Who Should Use This Project?
While anyone can try and use this project to see if it helps with their performance issues, it's mainly intended and designed for laptops that have Nvidia Optimus / AMD Switchable Graphics and either do not have a MUX chip, or do not use their MUX chip in a 'dedicated graphics only' mode. Using modern laptops that have these kinds of selective graphics features will cause the laptop to never trigger running FFXI on the actual dedicated GPU, thus, you are then limited to the software rendering layer of handling Direct3D 8 instead. As laptop CPUs continue to advance as well, users will generally see even worse performance on higher end / newer laptop CPUs.
Thus, this project is ideal for the following criteria:
- You are playing on a laptop that is running a version of Windows newer than 8 or 8.1. (ie. Windows 10 or 11)
- You are playing on a laptop that has Nvidia Optimus or AMD Switchable Graphics.
- You are playing on a laptop that either does not have a dedicated MUX switch or your MUX switch is not set to always run in dedicated graphics mode.
For myself, I have the following two laptops and need a proxy to gain proper performance and make the game playable:
- MSI GE72VR 7RF Apache Pro - Intel Core i7-7700HQ, Nvidia GeForce 1060 Mobile GPU
- MSI Titan GT77 HX 13V - Intel Core i9-13980HX, Nvidia GeForce 4090 Mobile GPU
Using either of these laptops with FFXI by default will see performance of about 5-15fps in-game with a lot of input lag, stuttering and other performance issues. Using a proxy, such as mine, will force the game to run using Direct3D 9 and bring it back to crisp and stable 30fps. (Even allowing unlocking to 60fps or higher as desired.) This also fixed all rendering issues and side effects I would have/see with the default stock software rendering that Windows does. (ie. bad/missing shadows, incorrect lighting, washed out colors, incorrect clipping, render states not working correctly causing custom drawn things via Ashita, such as fonts with backgrounds, to not render.)
System Requirements
You will need the following things installed in order to make use of this project:
For Windows 8.1, 10, 11 and newer, you may be prompted to install DirectPlay when you load the game, this is required to even play Final Fantasy XI but is disabled by default on newer operating systems. Simply accept the installation for that and follow the steps on-screen to do so. This is built into Windows and not related to this project at all but is required to play the game. You may need to manually do this yourself via Turn Windows Features On or Off. Under Legacy Components is DirectPlay, which you need to enable.
How To Use / Install
The way to use and install this project will depend on if you are playing on the live retail servers, or if you are playing on a private server. Please follow the proper instructions below based on which you are playing on. Failure to follow the directions correctly or for the kind of server you are playing on will cause the proxy to not load or fail to load properly, causing the game to crash or just not work at all.
Retail Installation
- Download the latest version of this project.
- Open the folder where you have PlayOnline installed. (ie. C:\Program Files (x86)\SquareEnix\PlayOnlineViewer\)
- Extract the projects d3d8.dll and d3d8.ini files into this folder. (The same folder as pol.exe is in.)
When completed, it should look like this: https://i.imgur.com/UxkK2cL.png
Private Server Installation
- Download the latest version of this project.
- Open the folder to where your private servers boot loader is located. (ie. pol.exe, horizon-loader.exe, xiloader.exe, etc.)
- Extract the projects d3d8.dll and d3d8.ini files into this folder.
When completed, it should look like this: https://i.imgur.com/AjWHGD9.png
Note: Private servers have all kinds of different custom installs and configurations. Because of this, the default location of their bootloader may not be the same as where Ashita generally places and expects it. You will need to consult with the staff of your private server if you need help locating where the proper location is to install a proxy such as mine.
Downloads & Support
My Direct3D proxy project has moved from the Ashita forums to the Ashita Discord server.
You will first need to join the Ashita Discord server via:
https://discord.gg/Ashita
You can then find all news, updates, information and downloads for the proxy under the 'atom0s Direct3D Proxy' section.