D815: Copy a sprite's graphic into a working buffer
D815 |
LD A,(DE) |
D816 |
AND $0C |
D818 |
RRCA |
D819 |
RRCA |
D81A |
LD C,A |
D81B |
LD (HL),A |
D81C |
INC HL |
D81D |
LD A,(DE) |
D81E |
AND $03 |
D820 |
INC A |
D821 |
LD B,A |
D822 |
LD (HL),A |
D823 |
LD ($D72E),BC |
D827 |
LD A,C |
D828 |
ADD A,A |
D829 |
ADD A,A |
D82A |
ADD A,A |
D82B |
LD ($D813),A |
D82E |
LD C,A |
D82F |
XOR A |
D830 |
ADD A,C |
D831 |
DJNZ $D830 |
D833 |
LD ($D814),A |
D836 |
INC DE |
D837 |
PUSH DE |
D838 |
INC HL |
D839 |
LD ($D730),HL |
D83C |
LD E,L |
D83D |
LD D,H |
D83E |
INC DE |
D83F |
LD (HL),$00 |
D841 |
LD BC,$023F |
D844 |
LDIR |
D846 |
POP DE |
D847 |
LD A,$04 |
D849 |
LD HL,($D730) |
D84C |
LD BC,$0048 |
D84F |
EX AF,AF' |
D850 |
PUSH BC |
D851 |
PUSH HL |
D852 |
CALL $DB83 |
D855 |
POP HL |
D856 |
POP BC |
D857 |
ADD HL,BC |
D858 |
EX AF,AF' |
D859 |
DEC A |
D85A |
JR NZ,$D84F |
D85C |
LD BC,$0048 |
D85F |
LD HL,($D730) |
D862 |
LD A,$02 |
D864 |
EX AF,AF' |
D865 |
PUSH BC |
D866 |
PUSH HL |
D867 |
CALL $DB9B |
D86A |
POP HL |
D86B |
POP BC |
D86C |
ADD HL,BC |
D86D |
EX AF,AF' |
D86E |
ADD A,$02 |
D870 |
CP $0A |
D872 |
JR NZ,$D864 |
D874 |
LD A,$04 |
D876 |
LD HL,($D730) |
D879 |
LD D,H |
D87A |
LD E,L |
D87B |
LD BC,$0120 |
D87E |
ADD HL,BC |
D87F |
LD BC,$0048 |
D882 |
EX AF,AF' |
D883 |
PUSH BC |
D884 |
PUSH DE |
D885 |
PUSH HL |
D886 |
CALL $D9B0 |
D889 |
POP HL |
D88A |
POP DE |
D88B |
POP BC |
D88C |
ADD HL,BC |
D88D |
EX DE,HL |
D88E |
ADD HL,BC |
D88F |
EX DE,HL |
D890 |
EX AF,AF' |
D891 |
DEC A |
D892 |
JR NZ,$D882 |
D894 |
RET |