coding noob needs help :(

Hey guys im new to codingand need some help, i have build my midi controller and am stuck with the code, ive included a picture of the controller and the sketch, it has 20 switches 16 for the arcade buttons and 4 for the joystick, it has 4 potentiometers, im using an arduino mega 2560. if any one can help it would be very appreciated and if any more information is needed do not hesitate to ask
many thanks
gary

sketch_for_the_nes_controller.zip (8.13 KB)

Does any of it work? Can you successfully detect the various buttons and knobs?

ive not been able to test it yet is there any sketches that can point me in the right direction