On this page
  1. Related
  2. Games
  3. References
  4. Sources

A cheat code is a button sequence that the game checks for and rewards. Konami’s NES games show the range. Gradius checks Up Up Down Down Left Right Left Right B A while paused and grants power-ups1. Contra checks the same ten presses on the title screen and starts the game with 30 lives2. Super C checks a different six, Right Left Down Up A B, and starts the lives byte at 9 instead of 23.

  • While pausedGradius (1985). Up Up Down Down Left Right Left Right B A while paused: speed, missile, two options, and the shield.1
  • On the titleContra (1987). Up Up Down Down Left Right Left Right B A on the title screen: 30 lives.2Super C (1990). Right Left Down Up A B on the title screen: the lives byte starts at 9 instead of 2.3

Games

GameYearHowNote
Gradius1985While pausedUp Up Down Down Left Right Left Right B A while paused: speed, missile, two options, and the shield
Contra1987On the titleUp Up Down Down Left Right Left Right B A on the title screen: 30 lives
Super C1990On the titleRight Left Down Up A B on the title screen: the lives byte starts at 9 instead of 2
Every claim about this mechanic, by game (3)

References

  1. ^ abStart pauses the US NES Gradius, and while it's paused a routine compares each new press with a ten-entry table, Up Up Down Down Left Right Left Right B A: the same ten bytes as Contra's table. A wrong press sends the count back to 0, unlike Contra's, where a miss stores $FF and ends the check. The full sequence sets the speed count to 1, buys Missile, sets the options to 2 and the shield counter to 5, and leaves Double or Laser as they were. It also decrements a per-player byte that must not be negative for the check to run.Code“Gradius (USA)” · vermiceli/nes-contra-usrevised
    How we know

    In the cartridge (“Gradius (USA)”): $9ADA-$9B3D: with the pause flag $15 clear, Start (`$10`) sets it and saves the sound registers; with it set, if the player's byte at $3B is not negative, run the check with table 2, and at a count of 10 call $9C5E, decrement $3B, and zero the count; Start clears $15 and restores the sound; $9765-$9784, the check: point at table X, skip when the count at $33 is negative or no button is new, increment it on a match and set it to 0 on a miss; $9785-$979C: two table pointers ($9789, $9793), then the two ten-byte tables; the second is 08 08 04 04 02 01 02 01 40 80; $9C5E-$9C6C, the grant: 5 to $46 (shield), 1 to $41 (missile) and $40 (speed), 2 to $45 (options); $44 (Double or Laser) is not written. We don't reproduce the bytes.

    954konami_code_lookup_table:
    955    .byte $08,$08,$04,$04,$02,$01,$02,$01,$40,$80
    
    src/bank7.asm lines 954–955 at 687d651 · upstream ↗
    937    beq konami_input_index_correct ; on success, goto konami_input_index_correct
    938    lda #$ff                       ; incorrect sequence for Konami code
    939    sta KONAMI_CODE_NUM_CORRECT    ; since incorrect set KONAMI_CODE_NUM_CORRECT (number of successful inputs) to $ff
    
    src/bank7.asm lines 937–940 at 687d651 · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Revised after a check by a second AI model, 2026-10-21.

    In the claim ledger

  2. ^ abWhile the title screen scrolls in, the US NES Contra compares each new d-pad, A, or B press with a ten-entry table, Up Up Down Down Left Right Left Right B A. A wrong press sets the count to $FF, which stops the check until the title starts over. The full sequence sets a flag, and a new game then gives each player 29 lives in reserve instead of 2: 30 lives instead of 3.Codevermiceli/nes-contra-us
    How we know
    750game_routine_01:
    751    jsr konami_input_check                   ; check if current input is part of Konami code (30-lives code)
    
    src/bank7.asm lines 749–752 at 687d651 · upstream ↗
    930konami_input_check:
    931    ldy KONAMI_CODE_NUM_CORRECT    ; load the number of successful inputs of Konami code
    932    bmi konami_code_exit           ; if #$ff (invalid Konami input), exit
    933    lda CONTROLLER_STATE_DIFF      ; buttons pressed (only care on input change so held button doesn't affect code)
    934    and #$cf                       ; only care about input from d-pad and A/B buttons (not select nor start)
    935    beq konami_code_exit           ; if no input detected, exit
    936    cmp konami_code_lookup_table,y ; compare with Konami code sequence at index y
    937    beq konami_input_index_correct ; on success, goto konami_input_index_correct
    938    lda #$ff                       ; incorrect sequence for Konami code
    939    sta KONAMI_CODE_NUM_CORRECT    ; since incorrect set KONAMI_CODE_NUM_CORRECT (number of successful inputs) to $ff
    ⋮
    945    cpy #$0a                    ; Konami code is 10 inputs, compare against how many successfully entered
    946    bcc konami_code_exit        ; Konami code not yet fully entered, exit
    ⋮
    
    src/bank7.asm lines 930–955 at 687d651 · upstream ↗
    716game_routine_00:
    ⋮
    720    sty KONAMI_CODE_NUM_CORRECT     ; initialize konami check to #$00 (see konami_input_check)
    
    src/bank7.asm lines 716–720 at 687d651 · upstream ↗
    1165init_player_lives:
    1166    lda #$02                  ; start off with #$02 lives
    1167    ldy KONAMI_CODE_STATUS    ; 30-lives code switch ($01 = code activated)
    1168    beq init_player_num_lives ; if KONAMI_CODE_STATUS is not set, then just set 2 lives
    1169    lda #$1d                  ; KONAMI_CODE_STATUS active so set lives to #$1d (29 decimal)
    ⋮
    1174    sta P1_NUM_LIVES,x          ; if X is 1, then set P2_NUM_LIVES to accumulator (a is either #$02 or #$1d)
    
    src/bank7.asm lines 1165–1174 at 687d651 · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Checked by a second AI model, 2026-10-21.

    In the claim ledger

  3. ^ abThe US NES Super C checks a different code from Contra's on its title screen: six presses, Right Left Down Up A B, against Contra's ten-press Up Up Down Down Left Right Left Right B A. Like Contra, a wrong press locks the check out. The code raises the starting lives byte from 2 to 9, where Contra's raises it from 2 to 29.Codevermiceli/nes-super-c · vermiceli/nes-contra-usrevised
    How we know
    539; checks for 10 extra lives cheat, i.e. right left down up a b
    540extra_lives_cheat_input_check:
    541    ldy EXTRA_LIVES_CHEAT_NUM_CORRECT ; load number of correct inputs to 10 extra lives cheat
    542    bmi @exit                         ; exit if failed inputting
    ⋮
    546    cmp extra_lives_code_tbl,y        ; compare input to next valid input for 10 lives cheat
    547    bne @mark_failure                 ; branch if incorrect to mark failure
    ⋮
    552    lda #$01
    553    sta CHEAT_CODE_STATUS             ; successfully entered full cheat code, mark success
    ⋮
    555@mark_failure:
    556    lda #$ff
    557    sta EXTRA_LIVES_CHEAT_NUM_CORRECT ; mark failure entering code
    ⋮
    564extra_lives_code_tbl:
    ⋮
    
    src/bank-1.asm lines 539–565 at be6ccce · upstream ↗
    1154    jsr load_banks_extra_lives_cheat_input_check ; still animating intro, check for 10 extra lives cheat
    
    src/bank-f.asm line 1154 at be6ccce · upstream ↗
    1504    lda #$02                           ; default to 3 lives
    1505    ldy CHEAT_CODE_STATUS              ; check if 10 lives cheat entered
    1506    beq @continue                      ; branch if not entered
    ⋮
    1510        lda #$09                       ; 10 lives cheat entered, set number of lives to 10
    ⋮
    1515    sta PLAYER_NUM_LIVES,x    ; set player number of lives
    
    src/bank-f.asm lines 1504–1515 at be6ccce · upstream ↗
    930konami_input_check:
    ⋮
    938    lda #$ff                       ; incorrect sequence for Konami code
    939    sta KONAMI_CODE_NUM_CORRECT    ; since incorrect set KONAMI_CODE_NUM_CORRECT (number of successful inputs) to $ff
    ⋮
    954konami_code_lookup_table:
    955    .byte $08,$08,$04,$04,$02,$01,$02,$01,$40,$80
    
    src/bank7.asm lines 930–955 at 687d651 · upstream ↗
    1165init_player_lives:
    1166    lda #$02                  ; start off with #$02 lives
    1167    ldy KONAMI_CODE_STATUS    ; 30-lives code switch ($01 = code activated)
    1168    beq init_player_num_lives ; if KONAMI_CODE_STATUS is not set, then just set 2 lives
    1169    lda #$1d                  ; KONAMI_CODE_STATUS active so set lives to #$1d (29 decimal)
    
    src/bank7.asm lines 1165–1169 at 687d651 · upstream ↗

    Checked against the evidence by its author, an AI model, 2026-10-21.

    Revised after a check by a second AI model, 2026-10-21.

    In the claim ledger

Sources

Code