minor documentation

This commit is contained in:
Michael Miceli 2023-09-28 23:46:53 -04:00
parent dcd3d93dca
commit 989006e1e6
3 changed files with 4 additions and 5 deletions

View File

@ -542,7 +542,7 @@ game_end_routine_05:
lda #$00 ; a = #$00
sta GRAPHICS_BUFFER_MODE ; set GRAPHICS_BUFFER_MODE to #$00 to prepare writing text to screen (write_text_palette_to_mem)
sta CURRENT_LEVEL ; set current level to #$00
dec GAME_MODE ; reset game mode to normal (not demo, not intro)
dec GAME_ROUTINE_INDEX ; set game routine to be game_routine_05 to start the first level
rts
; pointer table for ending credits text (#$49 * #$2 = #$90 bytes)

View File

@ -233,7 +233,7 @@ vertical_blank_entry:
lda PPUSTATUS ; read PPU status with bit layout -> VSO- ----
bpl vertical_blank_entry ; ensure still in VBLANK
lda #$00 ; clear accumulator
sta GAME_MODE ; set the game mode to normal #$00 (not demo)
sta GAME_ROUTINE_INDEX ; set the game routine index so that game is in game_routine_00
jsr clear_ppu ; initialize PPU
ldx #$ff
txs ; initialize stack pointer location to $01ff, stack range is from $01ff down to $0100 (descending stack)

View File

@ -5,10 +5,9 @@
; palette colors.
BANK_NUMBER = $8000
GAME_MODE = $18 ; 0 for normal, 1 for demo, 3 for intro
GAME_ROUTINE_INDEX = $18 ; which part of the game routine to execute (see game_routine_pointer_table)
GAME_END_ROUTINE_INDEX = $19 ; which part of the ending sequence to execute (see game_end_routine_tbl)
GAME_ROUTINE_INIT_FLAG = $19 ; used to determine if the current game_routine has initialized, used in game_routine_02 and game_routine_03
GAME_END_ROUTINE_INDEX = $19 ; used after beating the game to know which part of the ending sequence to execute for sequencing the animations, credits, restart, etc. (see game_end_routine_tbl)
GAME_ROUTINE_INIT_FLAG = $19 ; (same address as above) used to determine if the current game_routine has been initialized, used in game_routine_02 and game_routine_03
FRAME_COUNTER = $1a ; the frame counter loops from #$00 to #$ff increments once per frame. Also known as the global timer
NMI_CHECK = $1b ; set to #$01 at start of nmi and #$00 at end
; used to track if nmi occurred during game loop