Button Press Values

In an effort to keep the NerdTAS file format relatively concise, the information about which buttons are pressed is done in a bit mask style value.  This value places the buttons in a specific order.  The buttons represent the binary value after assigning each button to a bit.

The simple way to come up with the value that represents the buttons that are pressed is to add up the values shown below for all buttons that are NOT pressed. This may seem backwards, but the way the NES and SNES work is that buttons are represented by a “1” when they are not pressed, and by a “0” when they are.  For that reason, the NerdTAS file format treats them the same way.

NES Button Data Values:

  • Up = 128
  • Down = 64
  • Left = 32
  • Right = 16
  • B = 8
  • A = 4
  • Select = 2
  • Start = 1

SNES Button Data Values:

  • Up = 2048
  • Down = 1024
  • Left = 512
  • Right = 256
  • B = 128
  • A = 64
  • Y = 32
  • X = 16
  • L = 8
  • R = 4
  • Select = 2
  • Start = 1