.CheckForPause_b0 STA storeA ; Store the value of A so we can retrieve it below LDA currentBank ; Fetch the number of the ROM bank that is currently PHA ; paged into memory at $8000 and store it on the stack LDA #0 ; Page ROM bank 0 into memory at $8000 JSR SetBank LDA storeA ; Restore the value of A that we stored above JSR CheckForPause ; Call CheckForPause, now that it is paged into memory JMP ResetBankP ; Jump to ResetBankP to retrieve the bank number we ; stored above, page it back into memory and set the ; processor flags according to the value of A, returning ; from the subroutine using a tail callName: CheckForPause_b0 [Show more] Type: Subroutine Category: Icon bar Summary: Call the CheckForPause routine in ROM bank 0 Deep dive: Splitting NES Elite across multiple ROM banksContext: See this subroutine in context in the source code References: This subroutine is called as follows: * CheckSaveLoadBar calls CheckForPause_b0 * DrawScrollFrames calls CheckForPause_b0
Returns: N, Z flags Set according to the value of A passed to the routine
[X]
Subroutine CheckForPause (category: Icon bar)
Pause the game if the pause button (Start) is pressed
[X]
Subroutine ResetBankP (category: Utility routines)
Page a specified bank into memory at $8000 while preserving the value of A and the processor flags
[X]
Subroutine SetBank (category: Utility routines)
Page a specified ROM bank into memory at $8000
[X]
Variable currentBank in workspace ZP
Contains the number of the ROM bank (0 to 6) that is currently paged into memory at $8000