BUTTONS .rs 1 ; currently pressed buttons BUTTONS_TMP .rs 1 ; temporary variable for buttons BUTTONS_HOLD_TIME .rs 1 ; up/down/left/right buttons hold time KONAMI_CODE_STATE .rs 1 ; Konami Code state .if GAMES_COUNT >= 11 MAXIMUM_SCROLL .equ GAMES_COUNT - 11 .else MAXIMUM_SCROLL .equ 0 .endif ; controller reading, two times read_controller: pha tya pha txa pha jsr .real ; first read ldx