GOOD topic. Finally got mine to work properly (controls were inverted, x360ce didn't work, right stick didn't work).
Here's my DualShock 2 configuration:
bd1202e0000000000000504944564944,Dual USB Vibration Joystick,a:b2,b:b1,x:b3,y:b0,back:b8,start:b11,leftstick:b9,rightstick:b10,leftshoulder:b6,rightshoulder:b7,dp up:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a2,lefttrigger:b4,righttrigger :b5,
(no code function, so delete spaces before "USB" and "Vibration")
I'm using a generic USB adapter with it (the Chinese blue one).
If your controller doesn't work, use this tool -
http://www.generalarcade.com/gamepadtool/
Map the controls and then copy and paste (without quotes ["] or apostrophes [']).