Skip to navigation


Save and load: BRKBK

[6502 Second Processor version]

Name: BRKBK [Show more] Type: Subroutine Category: Save and load Summary: Set the standard BRKV handler for the game
Context: See this subroutine in context in the source code Variations: See code variations for this subroutine in the different versions References: This subroutine is called as follows: * DEEOR calls BRKBK * SVE calls BRKBK

BRKV is set to this routine by the BRKBK routine, which is called by the decryption routine at DEEOR just before the game is run for the first time, and at the end of the SVE routine after the disc access menu has been processed (so this resets BRKV to the standard BRKV handler for the game).
.BRKBK LDA #LO(BRBR) \ Set BRKV to point to the BRBR routine, disabling SEI \ interrupts while we make the change and re-enabling STA BRKV \ them once we are done LDA #HI(BRBR) STA BRKV+1 CLI RTS \ Return from the subroutine