; ============================================================
; STARTUP RIGHT-HALF SPLASH + FIRMWARE PRINT ROUTINE
;
; Deliberately outside LF_COPY_START..LF_LIFE_COPY_END so the
; known-good Life RAM image and its addresses remain untouched.
;
; The overlay occupies only columns 16..31 on each row.
; Its four strings are separately terminated to preserve the left half.
; ============================================================

        ORG     &H3000

; ============================================================
; RIGHT-HALF SPLASH
;
; Four independent 16-character rows.  Each row is separately
; zero-terminated so LF_PRINTZ cannot wrap into the next line.
; Columns 0..15 are therefore left untouched.
;
; CUSTOMIZE ONLY THESE FOUR 16-CHARACTER STRINGS.
; ============================================================

LF_SPLASH0:
        DB      "          Xerxes"
        DB      0

LF_SPLASH1:
        DB      "    Game of Life"
        DB      0

LF_SPLASH2:
        DB      "     ROM Version"
        DB      0

LF_SPLASH3:
        DB      "                "
        DB      0


; ============================================================
; LF_SHOW_SPLASH
;
; Draw the four right-half text rows using the proven firmware
; text path.  Called after LCD initialization and before LF_LOADER.
; ============================================================

LF_SHOW_SPLASH:
        LD      $6,LF_SPLASH0POS
        PRE     IZ,LF_SPLASH0
        CAL     LF_PRINTZ

        LD      $6,LF_SPLASH1POS
        PRE     IZ,LF_SPLASH1
        CAL     LF_PRINTZ

        LD      $6,LF_SPLASH2POS
        PRE     IZ,LF_SPLASH2
        CAL     LF_PRINTZ

        LD      $6,LF_SPLASH3POS
        PRE     IZ,LF_SPLASH3
        CAL     LF_PRINTZ

        RTN


; Zero-terminated normal/small-character printer.
; Proven helloROM / benchROM firmware path.
;
; Input:
;   IZ -> zero-terminated text
;   $6 = firmware text cursor (0 = upper-left)
;
LF_PRINTZ:
        LDI     $7,(IZ+$SX)

        LD      $0,$7
        DIU     $7
        DID     $0
        OR      $7,$SZ
        RTN     Z

        CAL     &H0197
        JR      LF_PRINTZ


; ============================================================
; FORCE FULL 64 KB ROM IMAGE
; ============================================================

