Prev: D5F8 Up: Map Next: D688
D604: Update Screen Buffer
ScreenBuffer_Update D604 LD HL,$6B00 HL=ShadowScreenBuffer.
D607 LD DE,$4000 DE=4000.
D60A CALL CopyShadowBufferToScreen Call CopyShadowBufferToScreen.
D60D LD HL,$7300 HL=7300.
D610 LD DE,$4800 DE=4800.
D613 CALL CopyShadowBufferToScreen Call CopyShadowBufferToScreen.
D616 LD HL,$7B00 HL=7B00.
D619 LD DE,$5000 DE=5000.
This routine is called three times which correlates to the three sections of the screen layout.
CopyShadowBufferToScreen D61C PUSH HL Stash the shadow buffer pointer on the stack.
D61D LD A,D A=D.
D61E EX AF,AF' Exchange AF with the shadow AF register.
D61F LD A,L A=L.
D620 CALL Blit Call Blit.
D623 LD E,A E=A.
D624 LD L,A L=A.
D625 INC D Increment D by one.
D626 INC H Increment H by one.
D627 CALL Blit Call Blit.
D62A LD E,A E=A.
D62B LD L,A L=A.
D62C INC D Increment D by one.
D62D INC H Increment H by one.
D62E CALL Blit Call Blit.
D631 LD E,A E=A.
D632 LD L,A L=A.
D633 INC D Increment D by one.
D634 INC H Increment H by one.
D635 CALL Blit Call Blit.
D638 LD E,A E=A.
D639 LD L,A L=A.
D63A INC D Increment D by one.
D63B INC H Increment H by one.
D63C CALL Blit Call Blit.
D63F LD E,A E=A.
D640 LD L,A L=A.
D641 INC D Increment D by one.
D642 INC H Increment H by one.
D643 CALL Blit Call Blit.
D646 LD E,A E=A.
D647 LD L,A L=A.
D648 INC D Increment D by one.
D649 INC H Increment H by one.
D64A CALL Blit Call Blit.
D64D LD E,A E=A.
D64E LD L,A L=A.
D64F INC D Increment D by one.
D650 INC H Increment H by one.
D651 CALL Blit Call Blit.
D654 EX AF,AF' Switch AF back with the normal AF register.
D655 LD D,A D=A.
D656 POP HL Restore the shadow buffer pointer from the stack.
D657 LD A,L L+=20.
D658 ADD A,$20
D65A LD L,A
D65B LD E,A E=A.
D65C CP $E0 Jump to CopyShadowBufferToScreen if A is not E0.
D65E JP NZ,CopyShadowBufferToScreen
D661 CALL Blit Call Blit.
D664 LD E,A E=A.
D665 LD L,A L=A.
D666 CALL Blit Call Blit.
D669 LD E,A E=A.
D66A LD L,A L=A.
D66B CALL Blit Call Blit.
D66E LD E,A E=A.
D66F LD L,A L=A.
D670 CALL Blit Call Blit.
D673 LD E,A E=A.
D674 LD L,A L=A.
D675 CALL Blit Call Blit.
D678 LD E,A E=A.
D679 LD L,A L=A.
D67A CALL Blit Call Blit.
D67D LD E,A E=A.
D67E LD L,A L=A.
D67F CALL Blit Call Blit.
D682 LD E,A E=A.
D683 LD L,A L=A.
D684 CALL Blit Call Blit.
D687 RET Return.
Prev: D5F8 Up: Map Next: D688