This maybe your controller. I have a USB controller that is replicate of the Sega Saturn controller (not the analog one.) On most controllers Button 1 would be Start. On mine it's Button 9. The bottom row is usually Button 1, 2, and 3 to match older game controllers (Atari, NEC, NES/Familcom, Sega 8 bit systems like the Master System, Sega Genesis/Mega Drive 3 button, etc) but on mine its Button 4, 2, 1. I can go into cases button you get the idea.
I'm just getting in developing in TIC-80 but could you create setup screen? instead of hard coding the settings put the button ID into an array. arrButton[0] = 6 (button 6). Also if your setting could could be saved (cookie, LocalStorage, text file) you wouldn't have to reset your configuration when swope cartrages.