Notes:Earth Defense Force

Invincibility Cheat Subroutine
The addresses correspond to the Japanese version Super E.D.F.

$00/861D 4B         PHK $00/861E AB         PLB $00/861F C2 30      REP #$30 $00/8621 AD 53 01   LDA $0153  [$00:0153]   //controller button press $00/8624 F0 15      BEQ $15    [$863B] $00/8626 AD 3F 01   LDA $013F  [$00:013F]   //cheat progress counter $00/8629 0A         ASL A                   $00/862A AA          TAX compare button press against stored cheat sequence $00/862B BD 4F 86   LDA $864F,x[$00:864F] $00/862E CD 53 01   CMP $0153  [$00:0153] $00/8631 F0 05      BEQ $05    [$8638] button press doesn't match $00/8633 9C 3F 01   STZ $013F  [$00:013F]   //reset cheat progress $00/8636 80 03      BRA $03    [$863B] button press matches $00/8638 EE 3F 01   INC $013F  [$00:013F] check progress $00/863B AD 3F 01   LDA $013F  [$00:013F] $00/863E C9 0A 00   CMP #$000A              //10 successful presses required $00/8641 90 0B      BCC $0B    [$864E] success $00/8643 A9 FF FF   LDA #$FFFF $00/8646 8D 81 01   STA $0181  [$00:0181] $00/8649 85 16      STA $16    [$00:0016] $00/864B 9C 0A 01   STZ $010A  [$00:010A]   //resumes gameplay exit $00/864E 60         RTS

00864F 8000 0080 4000 0040 2000 1000 0008 0004 0002 0001 A   B    X    Y    L    R    up   down left right