Prev: F5DA Up: Map Next: F637
F606: OR Blit Title Strips
Used by the routine at DrawAttractTitle.
OR-blits horizontal strips of bitmap data from the source pointer in HL into the screen buffer, using the four-byte parameter block at TitleBlit_Params–C4FC. *TitleBlit_Params seeds the outer strip counter in B; *C4FA drives the screen row lookup (with 8C00 / 8D style indexing); *C4FB is the byte count per strip (LDIR length); the loop runs until B reaches *C4FC after each pass. Called from DrawAttractTitle with HL pointing at ROM graphics (6D7D and 7005).
Input
HL Pointer to source bitmap data in ROM
BlitTitleStrips F606 LD A,($C4F9) B=*TitleBlit_Params (initial strip index for B).
F609 LD B,A
BlitTitleStrips_Strip F60A PUSH BC Stash BC on the stack (strip index and loop state).
F60B PUSH HL Stash HL on the stack (source pointer for this strip).
Derive a screen destination from *C4FA and the screen row address lookup table; combine with the next source byte and OR into the low byte of the destination address.
F60C LD L,B L=B (strip index into the row term).
F60D LD B,$45 B=45 (row address table high-byte base, rotated with *C4FA).
F60F LD A,($C4FA) C=*C4FA (row / band parameter).
F612 LD C,A
F613 SLA C Shift C left; rotate into B (table pointer high byte 8C / 8D).
F615 RL B
F617 LD H,$46 H=46 (row address table base high byte).
F619 SLA L Shift L left through H (index into the row address table).
F61B RL H
F61D LD A,(HL) A=*(HL) (low byte of the screen row base address).
F61E INC HL Advance HL.
F61F LD H,(HL) H=*(HL) (high byte of the screen row base address).
F620 LD L,A L=A (full row base address in HL).
F621 LD A,(BC) A=*(BC) (source bitmap byte).
F622 OR L OR with L (low byte of the screen address).
F623 LD L,A Write merged low byte back to L.
F624 POP DE Restore destination pointer into DE from the stack.
F625 EX DE,HL Swap DE and HL (destination now in HL).
F626 LD B,$00 Clear B (high byte of LDIR length).
F628 LD A,($C4FB) C=*C4FB (bytes to OR along this strip).
F62B LD C,A
F62C LDIR LDIR copies BC bytes from the source bitmap (HL) into the strip at DE.
F62E POP BC Restore BC from the stack.
F62F INC B Advance the strip index B by one.
F630 LD A,($C4FC) A=*C4FC (terminal strip index).
F633 CP B Compare A with B.
F634 JR NZ,BlitTitleStrips_Strip Loop back to BlitTitleStrips_Strip until all strips for this bitmap are done.
F636 RET Return.
Prev: F5DA Up: Map Next: F637