Finally i found a really easy solution We Just need to press
Ctrl+Alt+F2, login, then write emulationstation, to go back Quit Emulationstation and press Ctrl+Alt+F1.The mouse works like a charm in atomiswave and mame, just put the game, go to Retroarch, Quick menu, Settings, Input p1, Move the mouse Index and the mouse to see it, no need udev nothing! Just that. I try to logout but now Raspberry pi OS have a Login Graphical screen, so we can't logout and run emulationstation just from a desktop Shortcut. But is a solution to shoot in games.