# VICE joystick mapping file
#
# A joystick map is read in as patch to the current map.
#
# File format:
# - comment lines start with '#'
# - keyword lines start with '!keyword'
# - normal line has 'joynum inputtype inputindex action'
#
# Keywords and their lines are:
# '!CLEAR'    clear all mappings
#
# inputtype:
# 0      axis
# 1      button
# 2      hat
#
# For buttons, inputindex is the zero-based index of the button.
# For hats: hat 0 has inputindex 0,1,2,3 respectively for up, down, left and right. Hat 1 has 5,6,7,8 etc.
# For axes, and action 1 (joystick) and 2 (keyboard): axis 0 has inputindex 0,1 respectively for positive and negative, axis 1 has 2,3 etc.
# For axes, and action 6 (pot axis): inputindex is the zero-based index of the axis.
#
# action [action_parameters]:
# 0               none
# 1 pin           joystick (pin: 1/2/4/8/16/32/64 = u/d/l/r/fire/fire2/fire3)
# 2 row col       keyboard
# 3               map
# 4               UI activate
# 5 action-name   UI function
# 6 pot           potentiometer (1=pot x, 2=pot y)
#

!CLEAR

# Sony PLAYSTATION(R)3 Controller

# analog left -> joystick
# right
0 0 0 1 8
# left
0 0 1 1 4
# down
0 0 2 1 2
# up
0 0 3 1 1

0 0 4 1 16
0 0 5 1 16

# analog right
# right
0 0 6 2 0 2
# left
0 0 7 2 0 2
# down
0 0 8 2 0 7
# up
0 0 9 2 0 7

0 0 10 1 16
0 0 11 1 16

0 1 0 1 16
# O -> Space
0 1 1 2 7 4
# ^ -> RunStop
0 1 2 2 7 7
# # -> arrow left
0 1 3 2 7 1

# L1 -> N
0 1 4 2 4 7 
# R1 -> Y
0 1 5 2 3 1

0 1 6 1 1 16
0 1 7 1 1 16

# SELECT
0 1 8 5 virtual-keyboard
# START
0 1 9 4
# PS
0 1 10 5 quit

# L3 -> fire
0 1 11 1 1 16
# R3 - > return
0 1 12 2 0 1 

# DPAD -> joystick
# DPAD up
0 1 13 1 1
# DPAD down
0 1 14 1 2
# DPAD left
0 1 15 1 4
# DPAD right
0 1 16 1 8
 
