In case anyone needs it here is the config file for a USB NES controller with exit emulator and save load state.
input_player1_joypad_index = 0
input_player1_b_btn = 2
input_player1_a_btn = 1
input_player1_start_btn = 9
input_player1_select_btn = 8
input_player1_l_y_plus = -1
input_player1_up_axis = -1
input_player1_l_y_minus = +1
input_player1_down_axis = +1
input_player1_l_x_minus = -0
input_player1_left_axis = -0
input_player1_l_x_plus = +0
input_player1_right_axis = +0
input_enable_hotkey_btn = “9″
input_exit_emulator_btn = “8″
input_enable_hotkey_btn = 9
input_save_state_btn = 1
input_enable_hotkey_btn = 9
input_load_state_btn = 2