Next Generation Emulation banner

x360ce Libraries Tutorial by resolutespider5

480K views 59 replies 20 participants last post by  jrplayz 
#1 · (Edited)
x360ce Libraries Tutorial
By ResoluteSpider5. V4 December 2013.

What is x360ce and how to use it contains additional information.

x360ce App Tutorial at http://ngemu.com/threads/tutorial-by-resolutespider5.155011/

Various x360ce Guides at http://ngemu.com/threads/various-x360ce-guides-by-resolutespider5.156807/

x360ce (XBOX 360 Controller Emulator) is an emulator that allows DirectInput-only controllers (i.e. many gamepads, joysticks, steering wheels, etc.) to be used with XInput-only games and applications. I earlier wrote an x360ce App Tutorial. I suggest you read it before reading this.

In summary, the x360ce App download contains x360ce.exe (x360ce App). The App creates an xinput1_3.dll (x360ce Library), if it is not already present in the folder. The App also creates (if not already present in the folder), and edits, an x360ce.ini (x360ce Configuration file). The Configuration file contains settings for the Library. The App is not needed for x360ce emulation, but the Library and Configuration files are.

On the x360ce download page (http://code.google.com/p/x360ce/downloads/list ) as well as the current App download (x360ce.App-x.x.x.xxx.zip) there are also library downloads:
  • x360ce_lib32_rxxx.zip (or x360ce_libraries_rxxx_x86.zip). This is the current 32-bit x360ce Library download. IT IS THE CORRECT FILE FOR ALMOST EVERYONE. The reason for this is that, even if you are on 64-bit Windows, almost all games run 32-bit binaries regardless.
Note: there may be VS2010 and VS2012 builds of Library downloads available. VS2010 builds use Visual Studio 2010, rather than Visual Studio 2012, and may be better for "Dark Souls".

The main advantage of using the Library (xinput1_3.dll) from the Library download, instead of the App download, is that included Library is normally more up to date, so compatibility with games and systems should be superior. The main disadvantage of using the Library download is that setup can be more complex.

If you want to use them, do the following. The first thing to do is to download the current version of x360ce_lib32_rxxx.zip. After you unzip, you should find something like the following files. I will also say the simplest way they could be used.
  • xinput1_3.dll: x360ce Library, responsible for x360ce emulation. Put this in the game's executable folder (except for games using Valve's Source engine, see my App Tutorial for details). It is also described as an API wrapper, as it “wraps around” the system DInput. With some games it needs to be renamed to xinput1_2.dll, xinput1_1.dll or xinput9_1_0.dll, see later on for details. Do not confuse it with the system file of the same name, which is very different.
  • x360ce.sample.ini: this file is not required. It is a sample file for x360ce Configuration file (x360ce.ini), which contains settings for xinput1_3.dll, which can be both controller and game specific. HOWEVER x360ce.ini IS REQUIRED, and it is simplest to put this in the same folder as xinput1_3.dll.
  • x360ce.gdb: x360ce Game Database. It is simplest to put this in the same folder as xinput1_3.dll. If the file is present, and your game is listed in it, the [InputHook] needed for that game should be automatic. It masks the [InputHook] of x360ce.ini.
  • dinput8.dll: x360ce Loader. Put this in the same folder as xinput1_3.dll, but only if needed. It is a simple loader, which loads xinput1_3.dll for games that need HookLL enabled. It may also help a few other games like “Dark Souls”. So it is needed by very few games. Do not confuse it with the system file of the same name, which is very different.
  • LICENSE.txt, LGPL.txt, ReadMe.rtf: these files are not normally needed.
As described above, you can put your x360ce.ini and x360ce.gdb files in the same folder as xinput1_3.dll. But you can also place them in the following locations. With Windows XP, you can put them in the “%allusersprofile%\Application Data\x360ce” folder, which is often “C:\Documents and Settings\All Users\Application Data\x360ce”. With Windows Vista/7/8 you can put them in the “%allusersprofile%\x360ce” folder, which is often “C:\ProgramData\x360ce”. The advantage of doing this is you can have the same x360ce.gdb and x360ce.ini file for all your games, and to change these files means that you change the settings for all of your games.

Well that's about it! The only complication is really the creation of the x360ce.ini file. The library download only contains x360ce.sample.ini. Advanced users can edit this file to create their own x360ce.ini. But unfortunately this is not very easy, unless you understand the settings well.

An easier way is to use the App, x360ce.exe. As explained earlier, x360ce.exe creates the xinput1_3.dll Library (which we don't want in this instance, as it may be out of date); but it also creates and edits the x360ce.ini (which we do want).

So one way to set up x360ce is to do the following. Please note that there is a multitude of different ways of doing this. This is the procedure for games with only 32-bit binaries, which is usually the case.

1. Check What is x360ce and how to use it for requirements. Also my x360ce App Tutorial might help. For 64-bit x360ce see my 64-bit x360ce tutorial.

2. Download the latest versions of the App download (x360ce.App-x.x.x.xxx.zip) and 32-bit Library download (x360ce_lib32_rxxx.zip). Unzip them both.

3. Firstly, get the files from the Library download. Put the xinput1_3.dll (x360ce Library file) in the game's executable folder (except for games using Valve's Source engine, see my App Tutorial). Put x360ce.gbd, and dinput8.dll (only if needed), in the same folder.

4. Get x360ce.exe from the App download. Put it in the same folder as you have just put the xinput1_3.dll file.

5. Open x360ce.exe, and create and edit x360ce.ini as described in my App Tutorial. The only difference this time is that x360ce.exe will not create an xinput1_3.dll (Library), as there is already one present in the folder. Note: x360ce.exe only works with a 32-bit Library. If you want to use a 64-bit Library (which only works with a few games), first create x360ce.ini using a 32-bit Library.

6. If the x360ce.ini version does not match the xinput1_3.dll version, it may display the error message: “Configuration file version does not match x360ce version”. You can suppress this by adding Version=1 to the [Options] section of x360.ini, see below.

[Options]
Version=1
7. With certain games, the Library file (xinput1_3.dll) needs to renamed to xinput1_2.dll, xinput1_1.dll or xinput9_1_0.dll. See the Game Compatibility List. Rename them manually, or use the App. In the App, go to Options > Installed Files, and tick the boxes needed. This will clone the present Library file, rather than the Library file generated by the App.

8. Close x360ce.exe before running your game, saving any changes. You may need to enable gamepads in your game too.
Some games require Input Hooking, but are not included in x360ce.gdb. Look at the Game Compatibility List : games using the the former HookMode (Normal or Compatibility Mode), and games not mentioned, could be affected. So add the following to x360ce.ini for these games:

[InputHook]
HookLL=0
HookCOM=1
HookSA=0
HookWT=0
HookDI=0
HookPIDVID=0
HookName=0
This enables HookCOM for Normal Games. For Compatibility Games, enable (=1) HookCOM plus HookDI plus HookPIDVID. See http://ngemu.com/threads/various-x360ce-guides-by-resolutespider5.156807/#post-2119670 for an explanation.

Thanks to x360ce team for all the people you've helped: tapeq (tapcio), ejocys, Squall-Leonh@rt, etc.
 

Attachments

See less See more
#44 ·
Hi all :)
i've got a game pad that only has 1-Axis and 8 buttons and I want to set the "back" and "start" buttons of the xbox 360 pad to a keyboard key (Z and X)for example, because I haven't got more place in my pad.
Is it that posible?
Thank you for your time =D
you can do it but it would be a little complicated.
first you should install a virtual game pad, then assign you game pad and keyboard buttons to that virtual controller. then use that virual gamdpad on x360ce. this way you'll lose vibration for sure. if you want to test this method tell me to give you the link of virtual gamepad software
 
#40 ·
I saved myself a lot of hassle and bought the Mayflash USB Adapter. I don't have to worry a/b setting up buttons anymore with x360ce. My controller is now detected as Xinput so it fools Windows into thinking I'm using a Xbox 360 controller and it also works wirelessly via Bluetooth.
 
#43 ·
there are two softwares that do the job without need of x360ce.
motionjoy and Scp
both detect ps3 controller and define them as xinput not only to games but also to windows itself.
i know that your USB device is trouble free but in case you want to spend a lot less, usb module would be way to go
 
#45 ·
The device costs less than $21 USD and a/b the same as a USB module.
 
#47 ·
Lol, you got an answer for everything
 
#52 ·
No they are not. It has a switch to change from Dinput to Xinput
 
#55 ·
iam having issues with singularity, it works and everything but if i press aand hold a button or try to jump the game slows down
and i know is not my PC or even the game cause without xboxce the game run fine and even jumping is normal the problem is when
xboxce is running, any ideas on how to fix this issue? thanks in advance.
 
#57 ·
when i run x360ce.exe, i got this message.

System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\ProgramData\X360CE\x360ce.gdb'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
at System.IO.File.WriteAllText(String path, String contents, Encoding encoding)
at x360ce.Engine.GameDatabaseManager.SetPrograms(IEnumerable`1 programs, IEnumerable`1 games)
at x360ce.App.SettingsFile.Save(Boolean updateGameDatabase)
at x360ce.App.SettingsFile.Load()
at x360ce.App.Controls.GameSettingsUserControl.InitDefaultList()
at x360ce.App.Controls.GameSettingsUserControl..ctor()
at x360ce.App.MainForm.InitializeComponent()
at x360ce.App.MainForm..ctor()
at x360ce.App.Program.Main(String[] args)
 

Attachments

#58 ·
First of all, i would like to thank you for your great work. Its a big scale one, its impact i mean. Anyone willing to spend some little time learning how to use this can rely on any controller they have, instead of having to buy an overpriced xbox controller. Thank a lot guys, really.
Now a question. Why can't i find the x360ce.gdb and Dinput8.dll files for download on your sites?
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top