Ok, if I understand correctly, this is how your panel is wired:
P1B1 --> Joystick 1 Button 1
P2B1 --> Joystick 2 Button 1
A1 --> Mouse Button 1
A2 --> Mouse Button 2
And you're seeing all four of these buttons light up even though you only want P1 and P2 to light up - correct?
Here's the problem - By default, mame uses the following input codes for P1B1, P1B2, and P1B3:
P1_BUTTON1: KEYCODE_LCONTROL, JOYCODE_1_BUTTON1, MOUSECODE_1_BUTTON1
P1_BUTTON2: KEYCODE_LALT, JOYCODE_1_BUTTON2, MOUSECODE_1_BUTTON3
P1_BUTTON3: KEYCODE_SPACE, JOYCODE_1_BUTTON3, MOUSECODE_1_BUTTON2
So on your cp, P1B1 and MouseB1 do the same thing (same for P1B3 and MouseB2) - correct? I guess I really need to know how you have your buttons wired.