I have two GpWIZ keyboard controllers and when in MAME i set up the controls and they come out as Joy 1 Up, Joy 1 Down, etc. But after a restart sometimes they swap, so if I reconfigure the controls it comes out as Joy 2 Up. Obviously you can see how this is frustrating.
If I can setup MAME with keyboard buttons instead of joystick controls that would work since I can run XPADDER, but it seems regardless of if i'm running xpadder or not MAME takes my inputs as "joy 1" not the letter xpadder has it set to.
edit: I found some software from the hyperspin forums, Tur's Game Controller Order. It lets you assign an order to the USB devices you have plugged in so when you boot up windows it disconnects/reconnects them in that order. This seems to keep the joystick numbers correct and all my bindings don't mess up.