If you get a PowerA 'enhanced' joypad then there are two extra buttons on the bottom of the pad that can be mapped to any other.
See:
https://www.powera.com/products/powera-spectra-enhanced-wired-controller-for-xbox-one/Other controllers also have this ability.
What you could do is map the buttons to the left and right directions on the dpad - or/and up and down directions.
Now it's normally impossible for those two button directions to be pressed at the same time. So if they are then you can use that to activate your cheat system.
eg
LEFT + RIGHT DPAD + A = add a life
LEFT + RIGHT DPAD + B - skip a level
etc...
A more complex one would be to map the left to the left extra button and then up to the right extra button. Then press right down on the pad whilst pressing the two extra buttons - this would make up, down, left and right be pressed all at the same time.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
https://deluxepixel.com