Author Topic: 360 Controller  (Read 705 times)

Offline Vaskie

  • Newbies
  • *
  • Posts: 1
  • Karma: +0/-0
360 Controller
« on: July 01, 2017, 08:49:26 pm »
Hello everyone,

I would love if someone could help me out set up my 360 controller to work with Finalburn Alpha. The issue that i am having is that every game, and every system is requiring me to set up the controller. I have followed a tutorial that i saw online but it didn't work out for me: http://http://neo-source.com/index.php?topic=2835.msg20592#msg20592

There are far too many arcade systems, and most of them have different type of button layouts and as it is, i have to configure for each game individually.

I have tried going into a game that uses as many buttons as possible (Street Fighter III) and configuring it, and saving it as a preset, making it the default. But when i go into let's say, Snow Bros or Bubble Bobble it doesn't have the buttons set up.

In a perfect world, i would like to start the emulator and just be able to use my 360 controller (besides obviously choosing the game).

Could someone give me a hand, maybe a preset file already configured for every system using the 360 controller ?

Thank you so very much!

Offline dink

  • Administrator
  • *****
  • Posts: 2676
  • Karma: +227/-0
  • feed the horse yumyum
Re: 360 Controller
« Reply #1 on: July 01, 2017, 09:38:04 pm »
The trick is copying all the buttons out of each game and putting them into 1 file and using that as a preset, Each games' button configuration is in fbalpha folder/config/games/millipede.ini for example.  Use a text editor (notepad for example).
If you can't figure that out post some ini files for games you have set up, like a cps2 game, a neogeo game, classic game (bubble bobble & snow bros) and any other systems you might play (megadrive? pgm?) and I'll make you a nice preset file. 

best regards,
- dink

Offline jan_klaassen

  • FBA Dev
  • ******
  • Posts: 315
  • Karma: +10/-0
Re: 360 Controller
« Reply #2 on: July 02, 2017, 10:48:51 am »
I have tried going into a game that uses as many buttons as possible (Street Fighter III) and configuring it, and saving it as a preset, making it the default. But when i go into let's say, Snow Bros or Bubble Bobble it doesn't have the buttons set up.

By default, fba will save the input mapping for each game. Saved input mappings will override the default preset, which is probably the problem that you ran into. Simply change the setting, and go into the config/games directory and delete the .ini files (except your preset).

Offline chupo_cro

  • Newbies
  • *
  • Posts: 6
  • Karma: +0/-0
Re: 360 Controller
« Reply #3 on: July 02, 2017, 01:04:12 pm »
I've had the same problem a few days ago when I installed FB Alpha. Although I've found some explanations on a few forums it wasn't so straightforward as it seemed. I did reconfigure the controls for certain game and made these as the default preset but that didn't work well.

After some investigation I've found that the names of the controls in config files can be generic or specific to some particular game. For example, if you redefine the fire key in game Scramble and choose the right shift, there will be:

Code: [Select]
input  "Fire 1"           switch 0x36
entry in the scramble.ini file located in config\games folder.

However, not every game marks the first fire key as Fire 1 and by making such configuration as the default the fire key will not work in all games. For example, in Phoenix the fire button is marked as P1 Button 1 and not Fire 1. By defining the Fire 1 button in the default configuration, the fire button will not work in all games.

After some more research I somewhere read there are both generic names for the game controls - and the specific ones. The generic name for the fire button is p1 fire 1 and that is the name you should use when making the .ini configuration file for the preset.

The preset configuration files are .ini files that are placed inside config\presets folder. Assuming you placed the file my_keyboard.ini in the config\presets folder, you will - upon launching the game - be able to select Input > Map Game Inputs and then you have to select Player 1 and my_keyboard in the drop-down menus and press Use preset button. Since your my_keyboard.ini file was configured with the generic names of the controls, every control the specific game uses will be mapped to the correct specific name for the control belonging to that particular game. You will then see the corresponding .ini file created or appropriately changed in config\games folder. For example, if you launched Scramble you would find scramble.ini in that folder - containing all the controls correctly maped from the generic names you used in the my_keyboard.ini preset.

You can find the codes you have to enter for the specific key or joystick direction if you redefine the keys for some arbitrary game and then open the corresponding .ini file to see the code. For example, you could redefine the key left in Scramble and assign it to a. Upon opening the scramble.ini you will see the:

Code: [Select]
input  "Left"             switch 0x1E
line meaning the code for key a is 0x1e. You can similarly decipher the codes for joystick movements and gamepad buttons.

I was interested in what these codes exactly are and upon Googling:

Code: [Select]
0x1e "a" 0x20 "d"
I found this page where there was:

Code: [Select]
W = 0x11
A = 0x1E
S = 0x1F
D = 0x20

in the code and the title mentioned Direct Input so I then searched for:

Code: [Select]
directx scancodes
and found the list of all scancodes that can be used in config files.

I thing this will be enough information so you can make your own preset config files. Here is how my keyboard and joystick preset config files look like:

my_keyboard.ini
Code: [Select]
version 0x020921

input "P1 Coin"          switch 0x06
input "P1 Start"         switch 0x02
input "P1 Up"            switch 0x11
input "P1 Down"          switch 0x1F
input "P1 Left"          switch 0x1E
input "P1 Right"         switch 0x20
input "p1 fire 4"        switch 0x4083
input "p1 fire 5"        switch 0x4085
input "p1 fire 6"        switch 0x4080
input "p1 fire 1"        switch 0x36
input "p1 fire 2"        switch 0x1C
input "p1 fire 3"        switch 0x4082
input "P2 Coin"          switch 0x07
input "P2 Start"         switch 0x03
input "P2 Select"        switch 0x05
input "P2 Up"            switch 0xC8
input "P2 Down"          switch 0xD0
input "P2 Left"          switch 0xCB
input "P2 Right"         switch 0xCD
input "p2 fire 4"        switch 0x1E
input "p2 fire 5"        switch 0x1F
input "p2 fire 6"        switch 0x20
input "p2 fire 1"        switch 0x2C
input "p2 fire 2"        switch 0x2D
input "p2 fire 3"        switch 0x2E
input "Reset"            switch 0x3D
input "Diagnostic"       switch 0x3C
input "Service"          switch 0x0A

my_joystick.ini
Code: [Select]
version 0x020921

input "P1 Coin"          switch 0x4088
input "P1 Start"         switch 0x4089
input "P1 Select"        switch 0x4087
input "P1 Up"            switch 0x4002
input "P1 Down"          switch 0x4003
input "P1 Left"          switch 0x4000
input "P1 Right"         switch 0x4001
input "p1 fire 4"        switch 0x4083
input "p1 fire 5"        switch 0x4085
input "p1 fire 6"        switch 0x4080
input "p1 fire 1"        switch 0x4084
input "p1 fire 2"        switch 0x4086
input "p1 fire 3"        switch 0x4082
input "P2 Coin"          switch 0x07
input "P2 Start"         switch 0x03
input "P2 Select"        switch 0x05
input "P2 Up"            switch 0xC8
input "P2 Down"          switch 0xD0
input "P2 Left"          switch 0xCB
input "P2 Right"         switch 0xCD
input "p2 fire 4"        switch 0x1E
input "p2 fire 5"        switch 0x1F
input "p2 fire 6"        switch 0x20
input "p2 fire 1"        switch 0x2C
input "p2 fire 2"        switch 0x2D
input "p2 fire 3"        switch 0x2E
input "Reset"            switch 0x3D
input "Diagnostic"       switch 0x3C
input "Service"          switch 0x0A
« Last Edit: July 02, 2017, 01:08:31 pm by chupo_cro »
Chupo_cro