VBA-M Configuration

Post Reply
phorsyon
Junior Member
Posts: 5
Joined: Thu Mar 20, 2008 6:31 am

VBA-M Configuration

Post by phorsyon »

Hello folks!

 

Yesterday somebody told me about a cross-platform GameBoyAdvanced emulator called VBA-M, so I decided to give it a shot. Besides some win32 and win64 builds I also found a source package that successfully compiled and runs under linux (64-bit).

 

http://vba-m.com/vbam/vbasources/vbamSRC245.rar

 

The problem is that it doesn't create default config files. I expedted it to create a folder like $HOME/.vba-m/ containing default configs. Setting --fullscreen and --filter per command line is no problem, but howto setup a gamepad?

mudlord
Senior Member
Posts: 306
Joined: Sun Feb 08, 2009 7:16 am

VBA-M Configuration

Post by mudlord »

I would suggest getting it from SVN.

 

The "SDL" directory in the source contains a example config file [img]<fileStore.core_Emoticons>/emoticons/smile.png[/img]/emoticons/smile@2x.png 2x" width="20" height="20" />

phorsyon
Junior Member
Posts: 5
Joined: Thu Mar 20, 2008 6:31 am

VBA-M Configuration

Post by phorsyon »

OK, I got the source from the svn, compiled it, copied the example config and tried really hard to understand the explaination of the mapping format. It just confusing. [img]<fileStore.core_Emoticons>/emoticons/wink.png[/img]/emoticons/wink@2x.png 2x" width="20" height="20" />

 

Code: Select all

# Key configuration (all numbers are in hexadecimal!)
#
# Keys values are in the format YXXX where Y is the device number. 0 means
# keyborad and XXX is the SDL define for the desired key (read SDL_keysym.h).
#
# If Y is greater than 0, it means joystick number Y-1 and it uses the
# following format for XXX:
#
# - if XXX < 20, XXX is the axis number multiplied by 2. An even number means
#   movement to the negative side (on the X axis, it means left). An odd
#   number means movement to the positive side (on the X axis, it mean
#   right). For the Y axis, negative means up and positive means down.
#   X axis is usally axis number 0 and Y is axis number 1.
# - if 20 >= XXX > 30, then XXX is the HAT number multiplied by 4 plus the
#   direction: 0 for up, 1 for down, 2 for right and 3 for left. Example:
#   0021 is HAT 0 down, 0026 is HAT 1 right.
# - if 80 >= XXX > 100, XXX is the joystick button number (XXX-080).

 

But I figured it means:

 

Key format is YZXX

 

Y = the number of the gamepad. 0 means keyboard.

Z = seems to be always 0. (Aleast it looks like in the example)

XX = mapped key

 

Axis goes from 00 >= XX < 20

e.g. for 1st x,y axis: Left=00, Right=01, Up=02, Down=03

e.g. for 2nd x,y axis: Left=04, Right=05, Up=06, Down=07

 

HATs goes from 20 >= XX < 30

e.g. for 1st HAT: Up=20, Down=21, Right=22, Left=23

e.g. for 2nd HAT: Up=24, Down=25, Right=26, Left=27

 

Buttons goes from 80 >= XX < 100

e.g.: Button1=80, Button2=81, etc. pp.

Post Reply