Prev: 65AE Up: Map Next: 6700
6600: Scroll Screen Right
Used by the routine at Door_Prep_01.
It's only necessary to scroll 0B character blocks as the display moves for one door only.
ScreenScroll_Right 6600 LD B,$0B B=0B.
ScreenScroll_Right_Loop 6602 PUSH BC Push the counter onto the stack.
6603 CALL ScreenScroll_Main_Right Call ScreenScroll_Main_Right.
Calling this twice provides parallax scrolling!
6606 CALL ScreenScroll_Tellers_Right Call ScreenScroll_Tellers_Right.
6609 CALL ScreenScroll_Tellers_Right Call ScreenScroll_Tellers_Right again.
660C POP BC Restore the counter off the stack.
660D DJNZ ScreenScroll_Right_Loop Decrease counter by one and loop back to ScreenScroll_Right_Loop until counter is zero.
660F RET Return.
Copies the playfield data into the buffer, and then out onto the screen.
ScreenScroll_Main_Right 6610 LD IX,$5B00 IX=BufferGeneral.
6614 LD HL,$406A HL=406A.
6617 LD B,$0D B=0D.
6619 CALL ScreenScroll_Buffer_Right Call ScreenScroll_Buffer_Right.
661C LD HL,$407E HL=407E.
661F LD DE,$407F DE=407F.
6622 LD IX,$5B00 IX=BufferGeneral.
6626 LD B,$0D B=0D.
6628 CALL ScreenScroll_Copy_Right Call ScreenScroll_Copy_Right.
662B LD HL,$59EA HL=59EA.
662E LD IX,$5B00 IX=BufferGeneral.
6632 LD B,$0D B=0D.
6634 CALL ScreenScroll_BufferAttrs_Right Call ScreenScroll_BufferAttrs_Right.
6637 LD HL,$59FE HL=59FE.
663A LD DE,$59FF DE=59FF.
663D LD IX,$5B00 IX=BufferGeneral.
6641 LD B,$0D B=0D.
6643 CALL ScreenScroll_CopyAttrs_Right Call ScreenScroll_CopyAttrs_Right.
6646 RET Return.
Scroll Tellers Desk right one character block.
ScreenScroll_Tellers_Right 6647 LD IX,$5B00 IX=BufferGeneral.
664B LD HL,$502A HL=502A.
664E LD B,$04 B=04.
6650 CALL ScreenScroll_Buffer_Right Call ScreenScroll_Buffer_Right.
6653 LD HL,$503E HL=503E.
6656 LD DE,$503F DE=503F.
6659 LD IX,$5B00 IX=BufferGeneral.
665D LD B,$04 B=04.
665F CALL ScreenScroll_Copy_Right Call ScreenScroll_Copy_Right.
6662 RET Return.
6663 RET Return? Possibly unused.
Copies screen data into the (general) buffer.
ScreenScroll_Buffer_Right 6664 LD C,$08 C=08.
ScreenScroll_Buffer_Right_Loop 6666 LD A,(HL) Store the contents of memory HL is referencing to IX.
6667 LD (IX+$00),A
666A INC IX Increment IX by one.
666C INC H Increment H by one.
666D DEC C Decrease C by one.
666E JR NZ,ScreenScroll_Buffer_Right_Loop
6670 LD A,H
6671 SUB $08
6673 LD H,A
6674 LD DE,$0020
6677 ADD HL,DE
6678 LD A,H
6679 AND %00000111 Keep only bits 0-2.
667B CALL NZ,ScreenScroll_NextLine_Right
667E DJNZ ScreenScroll_Buffer_Right
6680 RET Return.
Copies attribute data into the (general) buffer.
ScreenScroll_BufferAttrs_Right 6681 LD A,(HL) Store the contents of memory HL is referencing to IX.
6682 LD (IX+$00),A
6685 LD DE,$FFE0 DE=FFE0.
6688 ADD HL,DE
6689 INC IX
668B DJNZ ScreenScroll_BufferAttrs_Right Decrease counter by one and loop back to ScreenScroll_BufferAttrs_Right until counter is zero.
668D RET Return.
Writes the attribute bytes out of the buffer and onto the screen.
ScreenScroll_CopyAttrs_Right 668E PUSH BC
668F LD BC,$001F
6692 LD A,(IX+$00)
6695 LDDR
6697 LD (DE),A
6698 INC IX
669A DEC HL
669B DEC DE
669C POP BC
669D DJNZ ScreenScroll_CopyAttrs_Right
669F RET Return.
Copies the data held in the buffer back to the screen.
ScreenScroll_Copy_Right 66A0 PUSH BC
66A1 PUSH HL
66A2 CALL ScreenScroll_CopyTeller_Right
66A5 POP HL
66A6 LD BC,$0020
66A9 ADD HL,BC
66AA LD A,H
66AB AND %00000111 Keep only bits 0-2.
66AD JR Z,ScreenScroll_Copy_Right_Skip
66AF LD A,H
66B0 ADD A,$07
66B2 LD H,A
Skips over moving down one line from above.
ScreenScroll_Copy_Right_Skip 66B3 PUSH HL
66B4 POP DE
66B5 INC DE
66B6 POP BC
66B7 DJNZ ScreenScroll_Copy_Right
66B9 RET Return.
Scrolls the very top part of the tellers desks.
ScreenScroll_CopyTeller_Right 66BA PUSH HL
66BB PUSH HL
66BC LD BC,$001F
66BF LD A,(IX+$00)
66C2 INC IX
66C4 LDDR
66C6 LD (DE),A
66C7 POP DE
66C8 POP HL
66C9 INC H
66CA INC D
66CB INC DE
66CC LD A,H
66CD AND %00000111 Keep only bits 0-2.
66CF RET Z
66D0 JR ScreenScroll_CopyTeller_Right
Adds 07 to H (as part of HL).
ScreenScroll_NextLine_Right 66D2 LD A,H Adds 07 to H.
66D3 ADD A,$07
66D5 LD H,A
66D6 RET Return.
Prev: 65AE Up: Map Next: 6700