From 0752063d44aa293a8493cce4b71f80a557ef8e37 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sat, 29 Sep 2018 21:57:22 -0400 Subject: [PATCH] megademo: auto-detect Apple II vs IIe and patch accordingly --- megademo/c64_opener.s | 2 +- megademo/check_email.s | 15 ++++++++++----- megademo/megademo.s | 14 ++++++++++++++ 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/megademo/c64_opener.s b/megademo/c64_opener.s index 26716f62..24ac11da 100644 --- a/megademo/c64_opener.s +++ b/megademo/c64_opener.s @@ -71,7 +71,7 @@ loopcoB:dex ; 2 bne loopcoA ; 2nt/3 beq c64_split -.align $100 +;.align $100 ;================================================ diff --git a/megademo/check_email.s b/megademo/check_email.s index 26961c84..00d74142 100644 --- a/megademo/check_email.s +++ b/megademo/check_email.s @@ -124,7 +124,9 @@ celoopB:dex ; 2 ; Total of 17030 cycles to get back to where was - ; For this part we want + ; For this part we want on Apple II/II+ + ; On Apple IIe and newer want T 000/11111 + ; because the font is shifted upwards a line ; T00000000000000000000 G0000000000000000000000 ; T00000000000000000000 G0000000000000000000000 @@ -161,7 +163,10 @@ em_outer_loop: sta draw_line_p1+1 ; 4 jsr draw_line_1 ; 6 ;== line3 - bit PAGE1 ; 4 +ce_patch: + bit PAGE1 ;IIe ; 4 +; bit PAGE0 ;II/II+ ; 4 + lda #$55 ; 2 sta draw_line_p1+1 ; 4 jsr draw_line_1 ; 6 @@ -183,7 +188,7 @@ em_outer_loop: jsr draw_line_1 ; 6 ;== line7 - bit PAGE0 ; 4 + bit PAGE1 ; 4 lda #$55 ; 2 sta draw_line_p2+1 ; 4 jsr draw_line_2 ; 6 @@ -332,8 +337,8 @@ em_letters: .byte 8,3, " A SAS LA KS",128 .byte 8+128,3,"FEYSESEHEEKS",128 - .byte 9,3, "EI L",$22,"SE .",128 - .byte 9+128,3,"EIHLOSEH.",128 + .byte 9,3, "A !",$22,"SA .",128 + .byte 9+128,3,"EYHIOSEH.",128 .byte 12,4, " /I",128 .byte 12+128,4," /Y",128 diff --git a/megademo/megademo.s b/megademo/megademo.s index d99ef2e5..8a727451 100644 --- a/megademo/megademo.s +++ b/megademo/megademo.s @@ -6,6 +6,20 @@ .include "hardware.inc" + ;=================== + ; Check for Apple II and patch + ;=================== + + lda $FBB3 ; IIe and newer is $06 + cmp #6 + beq apple_iie + + lda #$54 ; patch the check_email font code + sta ce_patch+1 + + +apple_iie: + ;=================== ; set graphics mode ;===================