← BCB9 Front end: title screen, input-device menu, and attract cycle Map BE3C → Print the front-end menu text
BE03: Draw the KRAKOUT title logo
Draws the KRAKOUT title logo, a 14-by-3 block of glyph cells with its own per-cell attribute block.
draw_title_logo BE03 LD HL,SCREEN_BASE+$49 Pass 1 destination: the logo's top-left display cell, character row 2 column 9.
BE06 LD DE,title_logo_glyphs Glyph bitmaps: 8 bytes per cell, cell after cell.
BE09 LD B,$03 Walk the logo's character rows (rows 2–4).
logo_row BE0B PUSH BC Hold the row counter and this row's first cell across the columns below.
BE0C PUSH HL
BE0D LD B,$0E Walk this row's cells (columns 9–22).
logo_col BE0F PUSH BC Hold the column counter and this cell's address across the glyph copy.
BE10 PUSH HL
BE11 LD C,$46 Draw this cell's glyph with a throwaway attribute. Pass 2 repaints every cell's color.
BE13 CALL draw_glyph
BE16 POP HL
BE17 INC L Step to the next column in the same row. After the 14th column, take the row's start cell back, step down one character row and repeat.
BE18 POP BC
BE19 DJNZ logo_col
BE1B POP HL
BE1C CALL advance_buffer_row
BE1F POP BC
BE20 DJNZ logo_row
Pass 2 copies the attribute block into the attribute file, cell for cell, which is what gives the logo its multicolor look. Pass 1 left every cell a throwaway attribute.
BE22 LD HL,ATTR_BASE+$49 Pass 2 destination: the attribute cell for character row 2 column 9.
BE25 LD DE,title_logo_attrs Per-cell attribute block: the logo's final colors. They replace the throwaway attributes that pass 1 wrote.
BE28 LD B,$03
logo_attr_row BE2A PUSH BC Hold the row counter and this row's first attribute cell across the columns below.
BE2B PUSH HL
BE2C LD B,$0E
logo_attr_col BE2E LD A,(DE) Copy one cell's final attribute into the attribute file.
BE2F LD (HL),A
BE30 INC DE
BE31 INC HL
BE32 DJNZ logo_attr_col
BE34 POP HL Take the row's start cell back, step down one character row and repeat.
BE35 CALL advance_buffer_row
BE38 POP BC
BE39 DJNZ logo_attr_row
BE3B RET
← BCB9 Front end: title screen, input-device menu, and attract cycle Map BE3C → Print the front-end menu text
Fork me on GitHub