Sheesh, it's been so long that I'd forgotten which codebase I was using.
I've dug up and uploaded the source for both the Kickstarter and 2015 editions to GitHub. This wouldn't be much use to you for the Ouya I don't think - although I know nothing of their protocol or what controllers are compatible.
https://github.com/Gadgetoid/picade-ps3
I think the place to start might be LeoJoy: https://github.com/AlanChatham/LeoJoy/tree/master/leojoy