Prev: BFA8 Up: Map Next: C0A0
C000: BANG!
Used by the routines at Lose_Life and CD47.
Bang C000 CALL Prep_Bang Clear the screen.
C003 LD B,$03 Pass Bang_Frame_01 to Bang_Copy.
C005 LD HL,$F000
C008 CALL Bang_Copy
C00B LD B,$03 Pass Bang_Frame_02 to Bang_Copy.
C00D LD HL,$F100
C010 CALL Bang_Copy
C013 LD B,$03 Pass Bang_Frame_03 to Bang_Copy.
C015 LD HL,$F200
C018 CALL Bang_Copy
C01B CALL Shot_Sound_02_Alias Calls $6502 twice.
C01E CALL Shot_Sound_02_Alias
C021 LD B,$06 Pass Bang_Frame_04 to Bang_Copy.
C023 LD HL,$F300
C026 CALL Bang_Copy
C029 LD B,$05 Pass Bang_Frame_05 to Bang_Copy.
C02B LD HL,$F400
C02E CALL Bang_Copy
C031 LD B,$05 Pass Bang_Frame_06 to Bang_Copy.
C033 LD HL,$F500
C036 CALL Bang_Copy
C039 LD B,$08 Blanks the display by passing a "clear" part of the screen buffer to Bang_Copy.
C03B LD HL,$5000
C03E CALL Bang_Copy
C041 LD B,$40 Jump to Bang_Halt_Loop.
C043 JP Bang_Halt_Loop
Prep_Bang C046 LD HL,$4000 Writes 00 to all 6144 bytes of the screen buffer (i.e. "blanks it").
C049 LD DE,$4001
C04C LD BC,$17FF
C04F LD (HL),$00
C051 LDIR
C053 LD HL,$5800 Continues into the attributes buffer, and writes $02 (red ink) to every location.
Value Ink Paper Bright
02 00 00 00
C056 LD DE,$5801
C059 LD BC,$02FF
C05C LD (HL),$02
C05E LDIR
C060 RET Returns.
Bang_Copy C061 PUSH BC Sets the screen location and the bang image frame sizing, then calls Print_Bang, issues a short pause and ...
C062 LD BC,$2008
C065 LD DE,$480C
C068 EX DE,HL
C069 CALL Print_Bang
C06C POP BC
Bang_Halt_Loop C06D HALT
C06E DJNZ Bang_Halt_Loop
C070 RET ...returns.
Print_Bang C071 PUSH BC Copy the bang image frame to the screen buffer.
C072 PUSH HL
C073 LD B,$00
C075 EX DE,HL
C076 LDIR
C078 EX DE,HL
C079 POP HL
C07A INC H
C07B LD A,H
C07C AND $07
C07E CALL Z,Bang_Next_Line
C081 POP BC
C082 DJNZ Print_Bang
C084 RET Return.
Bang_Next_Line C085 LD A,H Handles working out the next line progressively in the screen buffer.
C086 SUB $08
C088 LD H,A
C089 LD A,L
C08A ADD A,$20
C08C LD L,A
C08D RET NC
C08E LD A,H
C08F ADD A,$08
C091 LD H,A
C092 RET Return.
C093 DEFB $C3,$90,$EA,$04,$33,$49,$44,$46
C09B DEFB $47,$B1,$D2,$04,$32
Prev: BFA8 Up: Map Next: C0A0