← C3C1 Reset the title-screen credits marquee to the start of its message Map C41E → Load the next credits glyph into the marquee's load column
C3D0: Advance the credits marquee one pixel and report exhaustion
Scrolls the credits marquee left by one pixel and reports whether the message is finished. The text scrolls two pixels per frame.
Output
A $FF when the credits message is exhausted, else 0
A phase counter cycles through eight pixel steps. On the eighth it drops the next glyph into the rightmost cell. One whole character is therefore consumed per eight pixel steps.
credits_scroll_step C3D0 LD A,(credits_scroll_phase) Bump the phase counter; every 8th call (one full character width) it is time to feed the next glyph.
C3D3 INC A
C3D4 CP $08
C3D6 JR NZ,credits_scroll_step_0
C3D8 CALL credits_scroll_feed Feed the next glyph. On the message terminator, discard this frame's return and return $FF in A straight to the attract loop, past the shift below.
C3DB XOR A On the feed path, restart the phase at 0.
credits_scroll_step_0 C3DC LD (credits_scroll_phase),A Store the phase counter (0 just after a feed, otherwise the incremented value).
C3DF LD HL,SCREEN_BASE+$1077 Point at the top pixel row of the rightmost marquee cell (row 19 column 23).
C3E2 LD B,$08 Walk the cell's pixel rows.
C3E4 LD C,$00 Dead: C only feeds the two dead loads below. SLA shifts a blank pixel in at the right edge on its own.
credits_scroll_step_1 C3E6 PUSH HL Save the row's start byte for the next pixel row.
C3E7 LD A,C Dead: A and D are reloaded from the seed each row but never read.
C3E8 LD D,C
C3E9 SLA (HL) Shift this 128-pixel row left one pixel. SLA seeds 0 into the rightmost pixel and its high bit into carry. The RL chain walks that carry leftward across the rest of the strip's cells, one byte at a time.
C3EB DEC L
C3EC RL (HL)
C3EE DEC L
C3EF RL (HL)
C3F1 DEC L
C3F2 RL (HL)
C3F4 DEC L
C3F5 RL (HL)
C3F7 DEC L
C3F8 RL (HL)
C3FA DEC L
C3FB RL (HL)
C3FD DEC L
C3FE RL (HL)
C400 DEC L
C401 RL (HL)
C403 DEC L
C404 RL (HL)
C406 DEC L
C407 RL (HL)
C409 DEC L
C40A RL (HL)
C40C DEC L
C40D RL (HL)
C40F DEC L
C410 RL (HL)
C412 DEC L
C413 RL (HL)
C415 DEC L
C416 RL (HL)
C418 POP HL Advance to the next pixel row of the cell and repeat for all 8 rows.
C419 INC H
C41A DJNZ credits_scroll_step_1
C41C XOR A Return 0 in A: the message still has bytes to come.
C41D RET
← C3C1 Reset the title-screen credits marquee to the start of its message Map C41E → Load the next credits glyph into the marquee's load column
Fork me on GitHub