Prev: 7C00 Up: Map Next: 7CAD
7C03: Draw decorative screen border graphics
This routine follows the menu selection and draws the decorative border graphics around the main screen play area using the graphics tiles at 841A.
The routine that follows at 7CAD adds the colours.
game border full
Draw top two rows of decorative screen border
7C03 LD A,$02 Number of character rows (2)
7C05 LD ($8BB0),A
7C08 LD A,$20 Start in top left of screen display
7C0A LD ($8BAF),A Number of columns (32)
7C0D LD HL,$4000
7C10 LD DE,$841A Start of graphics
7C13 CALL $81F3 Draw onto screen
Draw left-hand column of decorative border (2 character columns, 14 rows)
7C16 LD A,$02 Number of columns (2)
7C18 LD ($8BAF),A
7C1B LD A,$0E Number of character rows (14)
7C1D LD ($8BB0),A
7C20 LD DE,$861A Start of graphics data for this section
7C23 LD HL,$4040 Set screen display address to starting position
7C26 CALL $81F3 Draw onto screen
Draw bottom left third of screen (devil and left-hand side of scroll)
7C29 LD A,$07 7 columns
7C2B LD ($8BAF),A
7C2E LD A,$08 8 character rows
7C30 LD ($8BB0),A
7C33 LD DE,$86FA Start of graphics data for this section
7C36 LD HL,$5000 Set screen display to starting position
7C39 CALL $81F3 Draw onto screen
Draw right-hand column of decorative border (2 character columns, 14 rows)
7C3C LD A,$02 Number of columns (2)
7C3E LD ($8BAF),A
7C41 LD A,$0E Number of character rows (14)
7C43 LD ($8BB0),A
7C46 LD DE,$88BA Start of graphics data for this section
7C49 LD HL,$405E Set screen display to starting position
7C4C CALL $81F3 Draw onto screen
Draw decorative scroll in bottom third of screen
7C4F LD A,$12 18 columns
7C51 LD HL,$5007 Set and store screen display starting draw position
7C54 LD ($8BAD),HL
7C57 LD ($8BAC),A Store column counter (18)
7C5A LD DE,$899A Point to start of scroll graphics data
The scroll is composed of 18 columns composed of the same 1 x 8 (character) column pattern
7C5D LD A,$01 Store number of columns (1)
7C5F LD ($8BAF),A
7C62 LD A,$08 Store number of character rows (8)
7C64 LD ($8BB0),A
7C67 LD HL,($8BAD) Retrieve screen display address to draw at
7C6A CALL $81F3 Draw on screen
7C6D LD A,($8BAC) Column drawn, so reduce column counter by 1
7C70 DEC A If all 18 columns are done, jump to next section
7C71 JR Z,$7C7F
7C73 LD ($8BAC),A Re-store column counter
7C76 LD HL,($8BAD) Retrieve display screen address pointer
7C79 INC HL Move it one character to the right...
7C7A LD ($8BAD),HL ...and store it
7C7D JR $7C5A Continue onto next column
Tiny manual graphic tweak to bottom right of scroll (2 bytes)
7C7F LD HL,$57D7 Screen display address position
7C82 LD (HL),$07
7C84 INC HL ...and the one to its right.
7C85 LD (HL),$FF
Small scroll overlap in bottom right
7C87 LD HL,$50F7 Set screen display to starting position
7C8A LD DE,$8B9A Point to start of graphics data
7C8D LD A,$02 Number of columns (2)
7C8F LD ($8BAF),A
7C92 LD A,$01 Number of character rows (1)
7C94 LD ($8BB0),A
7C97 CALL $81F3 Draw onto screen
Graphics for bottom third of screen, right hand side (angel and right-hand edge of scroll) - 8 rows x 7 columns
7C9A LD A,$07 Number of columns (7)
7C9C LD ($8BAF),A
7C9F LD A,$08 Number of character rows (8)
7CA1 LD ($8BB0),A
7CA4 LD DE,$89DA Point to start of graphics data
7CA7 LD HL,$5019 Set screen display to starting position
7CAA CALL $81F3 Draw onto screen
Prev: 7C00 Up: Map Next: 7CAD