Now I have solved the problem.
In emulation in the core I change from mame2015 to mame2000 and now is detecting the controller (2nd player)