Prev: F17F Up: Map Next: F1BA
F18E: Cycle a character buffer group forwards and scroll the screen right 8 columns
Used by the routines at 7866 and EC7B. Cycles one of the character buffer groups in pages 0xD7-0xDD forwards depending on the current leftmost column of the play area that is on screen (X=(7FFE)):
X Character buffer group
8, 64, 120, 176 0xD7
16, 72, 128, 184 0xD8
24, 80, 136, 192 0xD9
32, 88, 144, 200 0xDA
40, 96, 152, 208 0xDB
48, 104, 160, 216 0xDC
56, 112, 168, 224 0xDD
F18E LD A,($7FFE) 7FFE holds X, the x-coordinate of the leftmost column of the play area on screen
F191 SUB $08 A=0x00, 0x08, 0x10, 0x18, 0x20, 0x28 or 0x30 (depending on the value of X)
F193 SUB $38
F195 JR NC,$F193
F197 ADD A,$38
F199 RRCA A=0xD7-0xDD
F19A RRCA
F19B RRCA
F19C ADD A,$D7
F19E LD H,A Point HL at the last byte of the last buffer in the group
F19F LD L,$7C
F1A1 LD DE,$7F78 Copy the last buffer in the group (buffer 5) to 7F60 temporarily
F1A4 LD BC,$0019
F1A7 LDDR
F1A9 LD E,$7C Point DE at the last byte of the last buffer in the group
F1AB LD D,H
F1AC LD C,$64 Move buffers 1-4 up into slots 2-5 (thus overwriting buffer 5)
F1AE LDDR
F1B0 LD HL,$7F78 Copy buffer 5 from its temporary storage location into slot 1
F1B3 LD C,$19
F1B5 LDDR
F1B7 JP $E845 Scroll the screen right 8 columns (the routine at 7866 replaces this instruction with a RET)
Prev: F17F Up: Map Next: F1BA