I disassembled the code that was present in the controller input. At present, he just seems to have temporary control of things, to be able to execute up to 8 bytes worth of instructions, per frame.
STZ $4201; WAI; NOP; NOP; BRA #$FA
REP #$20; SEI; WAI; NOP; NOP; BRA #$FA
LDA #$1815; WAI; NOP; NOP; BRA #$FA
STA $0EFA; WAI; NOP; NOP; BRA #$FA
LDA #$FC15; WAI; NOP; NOP; BRA #$FA
STA $0EFC; WAI; NOP; NOP; BRA #$FA
LDA #$1B0C; WAI; NOP; NOP; BRA #$FA
STA $0EFE; WAI; NOP; NOP; BRA #$FA
LDA #$0D0E; WAI; NOP; NOP; BRA #$FA
STA $0F00; WAI; NOP; NOP; BRA #$FA
LDA #$1D12; WAI; NOP; NOP; BRA #$FA
STA $0F02; WAI; NOP; NOP; BRA #$FA
LDA #$FC1C; WAI; NOP; NOP; BRA #$FA
STA $0F04; WAI; NOP; NOP; BRA #$FA
LDA #$1815; WAI; NOP; NOP; BRA #$FA
STA $0F08; WAI; NOP; NOP; BRA #$FA
LDA #$FC15; WAI; NOP; NOP; BRA #$FA
STA $0F0A; WAI; NOP; NOP; BRA #$FA
LDA #$1B0C; WAI; NOP; NOP; BRA #$FA
STA $0F0C; WAI; NOP; NOP; BRA #$FA
LDA #$0D0E; WAI; NOP; NOP; BRA #$FA
STA $0F0E; WAI; NOP; NOP; BRA #$FA
LDA #$1D12; WAI; NOP; NOP; BRA #$FA
STA $0F10; WAI; NOP; NOP; BRA #$FA
LDA #$FC1C; WAI; NOP; NOP; BRA #$FA
STA $0F12; WAI; NOP; NOP; BRA #$FA
LDA #$1815; WAI; NOP; NOP; BRA #$FA
STA $0F15; WAI; NOP; NOP; BRA #$FA
LDA #$FC15; WAI; NOP; NOP; BRA #$FA
STA $0F17; WAI; NOP; NOP; BRA #$FA
LDA #$1B0C; WAI; NOP; NOP; BRA #$FA
STA $0F19; WAI; NOP; NOP; BRA #$FA
LDA #$0D0E; WAI; NOP; NOP; BRA #$FA
STA $0F1B; WAI; NOP; NOP; BRA #$FA
LDA #$1D12; WAI; NOP; NOP; BRA #$FA
STA $0F1D; WAI; NOP; NOP; BRA #$FA
LDA #$FC1C; WAI; NOP; NOP; BRA #$FA
STA $0F1F; WAI; NOP; NOP; BRA #$FA
LDA #$1815; WAI; NOP; NOP; BRA #$FA
STA $0F23; WAI; NOP; NOP; BRA #$FA
LDA #$FC15; WAI; NOP; NOP; BRA #$FA
STA $0F25; WAI; NOP; NOP; BRA #$FA
LDA #$1B0C; WAI; NOP; NOP; BRA #$FA
STA $0F27; WAI; NOP; NOP; BRA #$FA
LDA #$0D0E; WAI; NOP; NOP; BRA #$FA
STA $0F29; WAI; NOP; NOP; BRA #$FA
LDA #$1D12; WAI; NOP; NOP; BRA #$FA
STA $0F2B; WAI; NOP; NOP; BRA #$FA
LDA #$FC1C; WAI; NOP; NOP; BRA #$FA
STA $0F2D; WAI; NOP; NOP; BRA #$FA
LDA #$FCFC; WAI; NOP; NOP; BRA #$FA
STA $0F13; WAI; NOP; NOP; BRA #$FA
LDA #$FCFC; WAI; NOP; NOP; BRA #$FA
STA $0F2E; WAI; NOP; NOP; BRA #$FA
SEP #$20; NOP; WAI; NOP; NOP; BRA #$FA
LDA #$08; NOP; WAI; NOP; NOP; BRA #$FA
STA $13C6; WAI; NOP; NOP; BRA #$FA
LDA #$18; NOP; WAI; NOP; NOP; BRA #$FA
STA $0001; WAI; NOP; NOP; BRA #$FA
RTS; NOP; NOP; WAI; NOP; NOP; BRA #$FA
The code obviously has to reside in ram somewhere, and is updated each and every frame. This of course has the possibility of writing a bootloader of some sort, smash the stack, and execute the bootloader, which could be made to write 8 bytes of code/data per frame, or if done more efficiently, possibly up to 16 per frame, using 2 multitaps of input.
As it is, in this case, he is just using the control to change the rules of the game in place, by writing a couple of bytes that tells the game engine that game has just been beaten, then returns control to the game.