Prev: 63C3 Up: Map Next: 6412
6400: Copy source sprite tiles over target sprite tiles
Used by the routine at 6412 to prepare sprite tiles 0xEF-0xF7, which are used by animatory states 0x09, 0x0A, 0x0F and 0x1F (corresponding to the sprites of Sam rolling and somersaulting).
Input
C Number of tiles to copy
E Target sprite tile reference
L Source sprite tile reference
6400 LD H,$C7 This is the base page of the graphic data for the source tile
This entry point is used by the routine at 6412 with H=0xD7.
6402 LD D,$C7 This is the base page of the graphic data for the target tile
6404 LD B,$10 Copy the source sprite tile over the target sprite tile (8 bytes of graphic data interleaved with 8 bytes of mask data)
6406 LD A,(HL)
6407 LD (DE),A
6408 INC H
6409 INC D
640A DJNZ $6406
640C INC L Move to the next source sprite tile reference
640D INC E Move to the next target sprite tile reference
640E DEC C Have all the sprite tiles been copied yet?
640F JR NZ,$6400 Jump back if not
6411 RET
Prev: 63C3 Up: Map Next: 6412