#include #include void printAndWait(char* text) { printf(text); delay(100); } void main() { while(1) { switch(joypad()) { case J_LEFT: printAndWait("Left!\n"); break; case J_RIGHT: printAndWait("Right!\n"); break; case J_UP: printAndWait("Up!\n"); break; case J_DOWN: printAndWait("Down!\n"); break; case J_START: printAndWait("Start!\n"); break; case J_SELECT: printAndWait("Select!\n"); break; case J_A: printAndWait("A!\n"); break; case J_B: printAndWait("B!\n"); break; } } }