Modules/input/Usage
From MSX Game Library
Check joystick bouton example:
u8 joyStat = Joystick_Read(JOY_PORT_1); if (joyStat & JOY_INPUT_TRIGGER_A) { // Joystick A boutton pressed } else if (joyStat & JOY_INPUT_TRIGGER_B) { // Joystick B boutton pressed }