minor documentation corrections/clarifications
This commit is contained in:
parent
af8d290492
commit
430949a484
|
@ -182,7 +182,7 @@ destroyed.
|
||||||
### 03 - Flying Capsule
|
### 03 - Flying Capsule
|
||||||
|
|
||||||
Other Names: Weapon Zeppelin, Power-Up Capsule, Weapon Wings, Weapon Drop,
|
Other Names: Weapon Zeppelin, Power-Up Capsule, Weapon Wings, Weapon Drop,
|
||||||
or Flying Item Pod
|
Flying Item Pod, or Football
|
||||||
|
|
||||||
Weapon Item transportation device that which travels from the left end of the
|
Weapon Item transportation device that which travels from the left end of the
|
||||||
screen to the other in a wave-like pattern.
|
screen to the other in a wave-like pattern.
|
||||||
|
|
|
@ -345,7 +345,7 @@ set_weapon_item_sprite:
|
||||||
lsr
|
lsr
|
||||||
lsr ; flash every #$08 frames
|
lsr ; flash every #$08 frames
|
||||||
and #$03 ; keep bits .... ..xx
|
and #$03 ; keep bits .... ..xx
|
||||||
ora #$04 ; set bit 3
|
ora #$04 ; set bit 2 (use palette defined in bits 0 and 1)
|
||||||
sta ENEMY_SPRITE_ATTR,x ; update enemy sprite attribute so it flashes
|
sta ENEMY_SPRITE_ATTR,x ; update enemy sprite attribute so it flashes
|
||||||
|
|
||||||
@set_sprite_code:
|
@set_sprite_code:
|
||||||
|
@ -735,7 +735,7 @@ flying_capsule_routine_01:
|
||||||
|
|
||||||
; weapon zeppelin pointer 3
|
; weapon zeppelin pointer 3
|
||||||
flying_capsule_routine_02:
|
flying_capsule_routine_02:
|
||||||
jmp play_explosion_sound
|
jmp play_explosion_sound ; create explosion sound and 2 sets of explosion type #$89 at location
|
||||||
|
|
||||||
; pointer table for rotating gun (#$a * #$2 = #$14 bytes)
|
; pointer table for rotating gun (#$a * #$2 = #$14 bytes)
|
||||||
; level 1 or level 3 enemy
|
; level 1 or level 3 enemy
|
||||||
|
|
|
@ -1430,7 +1430,7 @@ init_pulse_and_noise_channels:
|
||||||
lda #$00
|
lda #$00
|
||||||
tax
|
tax
|
||||||
|
|
||||||
; write #$00-#$05 to $0106
|
; write #$00 to all sound slots' sound code
|
||||||
@loop:
|
@loop:
|
||||||
sta SOUND_CODE,x
|
sta SOUND_CODE,x
|
||||||
inx
|
inx
|
||||||
|
@ -4100,10 +4100,10 @@ load_sprite_to_cpu_mem:
|
||||||
iny ; increment sprite_xx read offset
|
iny ; increment sprite_xx read offset
|
||||||
lda ($08),y ; load low byte of new sprite read address
|
lda ($08),y ; load low byte of new sprite read address
|
||||||
sta $06 ; store low byte into $06
|
sta $06 ; store low byte into $06
|
||||||
iny
|
iny ; increment sprite_xx read offset
|
||||||
lda ($08),y ; load high byte of new sprite read address
|
lda ($08),y ; load high byte of new sprite read address
|
||||||
sta $09 ; replace existing read high byte in $09 with new address
|
sta $09 ; replace existing read high byte in $09 with new address
|
||||||
lda $06 ; load low byte back into $06
|
lda $06 ; load low byte
|
||||||
sta $08 ; replace existing read low byte in $08 with new address
|
sta $08 ; replace existing read low byte in $08 with new address
|
||||||
ldy #$00 ; clear sprite_xx read offset since starting at new address
|
ldy #$00 ; clear sprite_xx read offset since starting at new address
|
||||||
|
|
||||||
|
@ -4135,7 +4135,7 @@ load_sprite_to_cpu_mem:
|
||||||
lda ($08),y ; read 3rd byte (sprite tile attributes) (Byte 2)
|
lda ($08),y ; read 3rd byte (sprite tile attributes) (Byte 2)
|
||||||
and $0d ; keep/strip sprite palette from sprite tile byte 2, based on bit 2 of SPRITE_ATTR
|
and $0d ; keep/strip sprite palette from sprite tile byte 2, based on bit 2 of SPRITE_ATTR
|
||||||
ora $00 ; merge sprite code tile byte 2 with attribute data from SPRITE_ATTR
|
ora $00 ; merge sprite code tile byte 2 with attribute data from SPRITE_ATTR
|
||||||
eor $0b ; exclusive to handle flipping a flipped sprite tile, e.g. flip + flip = no flip
|
eor $0b ; exclusive or to handle flipping a flipped sprite tile, e.g. flip + flip = no flip
|
||||||
sta OAMDMA_CPU_BUFFER+2,x ; write sprite attributes to CPU buffer
|
sta OAMDMA_CPU_BUFFER+2,x ; write sprite attributes to CPU buffer
|
||||||
iny ; increment sprite_xx read offset
|
iny ; increment sprite_xx read offset
|
||||||
lda $0b
|
lda $0b
|
||||||
|
@ -4218,7 +4218,7 @@ draw_player_hud_sprites:
|
||||||
ldy #$04 ; set hud_sprites base offset to show GAME OVER
|
ldy #$04 ; set hud_sprites base offset to show GAME OVER
|
||||||
lsr
|
lsr
|
||||||
bcs @four_sprites ; branch if in game over
|
bcs @four_sprites ; branch if in game over
|
||||||
ldy $00 ; not in game over, load number of lives remaining
|
ldy $00 ; not in game over, load number of lives remaining for current player
|
||||||
lda P1_NUM_LIVES,y ; player y lives
|
lda P1_NUM_LIVES,y ; player y lives
|
||||||
ldy #$00 ; set hud_sprites base offset to show medals
|
ldy #$00 ; set hud_sprites base offset to show medals
|
||||||
cmp #$04
|
cmp #$04
|
||||||
|
@ -4240,7 +4240,7 @@ draw_player_hud_sprites:
|
||||||
lda $00
|
lda $00
|
||||||
sta OAMDMA_CPU_BUFFER+2,x ; write the tile attributes (blue palette for p1, red palette for p2)
|
sta OAMDMA_CPU_BUFFER+2,x ; write the tile attributes (blue palette for p1, red palette for p2)
|
||||||
lsr ; set carry flag if on player 2
|
lsr ; set carry flag if on player 2
|
||||||
lda sprite_sprite_medal_x_offset,y ; load x offset based on sprite number
|
lda sprite_medal_x_offset,y ; load x offset based on sprite number
|
||||||
bcc @continue
|
bcc @continue
|
||||||
adc #$af ; add #$af to sprite x offset if on player 2 (see previous lsr)
|
adc #$af ; add #$af to sprite x offset if on player 2 (see previous lsr)
|
||||||
|
|
||||||
|
@ -4263,7 +4263,7 @@ hud_sprites:
|
||||||
.byte $0a,$0a,$0a,$0a ; medals
|
.byte $0a,$0a,$0a,$0a ; medals
|
||||||
.byte $02,$04,$06,$08 ; game over text
|
.byte $02,$04,$06,$08 ; game over text
|
||||||
|
|
||||||
sprite_sprite_medal_x_offset:
|
sprite_medal_x_offset:
|
||||||
.byte $10,$1c,$28,$34
|
.byte $10,$1c,$28,$34
|
||||||
.byte $10,$1c,$28,$34
|
.byte $10,$1c,$28,$34
|
||||||
|
|
||||||
|
|
|
@ -341,7 +341,7 @@ remove_registers_from_stack_and_rti:
|
||||||
pla ; remove byte from stack
|
pla ; remove byte from stack
|
||||||
tay ; store in y
|
tay ; store in y
|
||||||
pla ; remove byte from stack
|
pla ; remove byte from stack
|
||||||
tax ; story in x
|
tax ; store in x
|
||||||
pla ; remove byte stack
|
pla ; remove byte stack
|
||||||
plp ; set cpu flags from stack
|
plp ; set cpu flags from stack
|
||||||
|
|
||||||
|
@ -2380,7 +2380,7 @@ change_ppu_write_address:
|
||||||
lda #$01 ; specifies to increment graphic read address by 1 byte
|
lda #$01 ; specifies to increment graphic read address by 1 byte
|
||||||
ldx #$00 ; specifies that the 2-byte graphic read address is located at $00
|
ldx #$00 ; specifies that the 2-byte graphic read address is located at $00
|
||||||
jsr advance_graphic_read_addr ; increment 2-byte graphic read address at $00 by 1 byte
|
jsr advance_graphic_read_addr ; increment 2-byte graphic read address at $00 by 1 byte
|
||||||
jmp begin_ppu_graphics_block_write ; start populating nametable with zeros
|
jmp begin_ppu_graphics_block_write ; start writing graphics block to PPU
|
||||||
|
|
||||||
; handle when entire graphic data code has been read
|
; handle when entire graphic data code has been read
|
||||||
; restore previously-loaded bank and re-init the PPU
|
; restore previously-loaded bank and re-init the PPU
|
||||||
|
@ -3905,7 +3905,7 @@ set_frame_scroll_weapon_strength:
|
||||||
@p2_game_over_status:
|
@p2_game_over_status:
|
||||||
ldy P2_GAME_OVER_STATUS ; player 2 game over state (1 = game over)
|
ldy P2_GAME_OVER_STATUS ; player 2 game over state (1 = game over)
|
||||||
bne run_player_invincibility_and_weapon_strength ; branch if player 2 is in game over, or if this is a single player game
|
bne run_player_invincibility_and_weapon_strength ; branch if player 2 is in game over, or if this is a single player game
|
||||||
ora #$02 ; set bit 2 to #$01 when player 2 is not in game over
|
ora #$02 ; set bit 1 to #$01 when player 2 is not in game over
|
||||||
|
|
||||||
; a will be #$00 when both players are in game over
|
; a will be #$00 when both players are in game over
|
||||||
; a will be #$01 when player 1 not game over, player 2 game over (or not playing)
|
; a will be #$01 when player 1 not game over, player 2 game over (or not playing)
|
||||||
|
@ -5107,7 +5107,7 @@ apply_gravity:
|
||||||
|
|
||||||
; player death
|
; player death
|
||||||
init_player_dec_num_lives:
|
init_player_dec_num_lives:
|
||||||
jsr init_player_and_weapon
|
jsr init_player_and_weapon ; initialize player variables to 0
|
||||||
sta PLAYER_STATE,x ; set player state to #$00 (falling into level)
|
sta PLAYER_STATE,x ; set player state to #$00 (falling into level)
|
||||||
lda P1_NUM_LIVES,x ; load player number of lives
|
lda P1_NUM_LIVES,x ; load player number of lives
|
||||||
beq @set_game_over ; branch if no more lives
|
beq @set_game_over ; branch if no more lives
|
||||||
|
@ -5291,6 +5291,9 @@ set_carry_exit:
|
||||||
sec ; set carry flag
|
sec ; set carry flag
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
; initialize player variables to 0
|
||||||
|
; input
|
||||||
|
; * x - player offset (0 = p1, 1 = p2)
|
||||||
init_player_and_weapon:
|
init_player_and_weapon:
|
||||||
lda #$00 ; a = #$00
|
lda #$00 ; a = #$00
|
||||||
sta P1_CURRENT_WEAPON,x ; reset current player's weapon
|
sta P1_CURRENT_WEAPON,x ; reset current player's weapon
|
||||||
|
|
Loading…
Reference in New Issue