def fm2_line(up, down, left, right, a, b, start, select, reset=False):
    """formats one frame of input with the given button presses"""
    return ''.join(('|1|' if reset else '|0|') +
                   ('R' if right else '.') +
                   ('L' if left else '.') +
                   ('D' if down else '.') +
                   ('U' if up else '.') +
                   ('T' if start else '.') +
                   ('D' if select else '.') +
                   ('B' if b else '.') +
                   ('A' if a else '.') +
                   '|........||')