← C3D0 Advance the credits marquee one pixel and report exhaustion Map C443 → Credits and greetings scroll
C41E: Load the next credits glyph into the marquee's load column
Loads the next credit character from the credits message into the hidden rightmost marquee cell and advances the read pointer. At the message terminator it ends the scroll and reports the message exhausted.
Output
A $FF at the message terminator; otherwise the glyph is copied and the pointer advanced
At the message terminator that frame's pixel shift is skipped.
credits_scroll_feed C41E LD HL,(credits_read_ptr) Fetch the read pointer.
C421 LD A,(HL) Read the next character; $00 marks the end of the message.
C422 OR A
C423 JR NZ,credits_feed_have_char
C425 POP HL End of message: discard the return address back into the scroll step, so RET goes to the attract loop. A signals that the message is over.
C426 LD A,$FF
C428 RET
credits_feed_have_char C429 INC HL Advance the read pointer past this character.
C42A LD (credits_read_ptr),HL
C42D LD H,$00 Point HL at the code's glyph in the font, 8 bytes per glyph.
C42F LD L,A
C430 ADD HL,HL
C431 ADD HL,HL
C432 ADD HL,HL
C433 LD DE,FONT_BASE
C436 ADD HL,DE
C437 LD DE,SCREEN_BASE+$1077 Destination: top pixel row of the rightmost marquee cell.
C43A LD B,$08 Walk the glyph's pixel rows.
credits_feed_copy_loop C43C LD A,(HL) Copy each glyph row to the next pixel line of the cell (INC D steps down one line).
C43D LD (DE),A
C43E INC D
C43F INC HL
C440 DJNZ credits_feed_copy_loop
C442 RET
← C3D0 Advance the credits marquee one pixel and report exhaustion Map C443 → Credits and greetings scroll
Fork me on GitHub