Technique · engine
Controller reading
How a game reads its controllers each frame and turns the buttons into held and newly pressed bits for the rest of the code.
A game reads its controllers once a frame. It keeps the buttons held and works out which were pressed since the last frame, since most actions start on a press. Demo playback often writes into the same bytes.