From f8a210ce02bdc631f901e91f0bbd41e0ddf0e98e Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Mon, 11 Sep 2017 14:52:32 -0400 Subject: [PATCH] tfv: better clear screen display --- tfv/tfv.s | 16 ++-------------- tfv/tfv_flying.s | 2 ++ tfv/tfv_utils.s | 22 ++++++++++++++++++++++ 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/tfv/tfv.s b/tfv/tfv.s index e9819f10..71b327a2 100644 --- a/tfv/tfv.s +++ b/tfv/tfv.s @@ -14,22 +14,10 @@ ; memset() ;=================================== - ; Clear top/bottom of page 0 + ; Clear top/bottom of page 0 and 1 ;=================================== - lda #$0 - sta DRAW_PAGE - jsr clear_top - jsr clear_bottom - - ;=================================== - ; Clear top/bottom of page 1 - ;=================================== - - lda #$4 - sta DRAW_PAGE - jsr clear_top - jsr clear_bottom + jsr clear_screens ;========================== ; Do Opening diff --git a/tfv/tfv_flying.s b/tfv/tfv_flying.s index 0c768e11..ca35f79f 100644 --- a/tfv/tfv_flying.s +++ b/tfv/tfv_flying.s @@ -45,6 +45,8 @@ flying_start: ; Clear screen/pages + jsr clear_screens + jsr set_gr_page0 ; Init Variables diff --git a/tfv/tfv_utils.s b/tfv/tfv_utils.s index f32ebe62..102ff289 100644 --- a/tfv/tfv_utils.s +++ b/tfv/tfv_utils.s @@ -2,6 +2,28 @@ ;= ROUTINES ;===================================================================== + +clear_screens: + ;=================================== + ; Clear top/bottom of page 0 + ;=================================== + + lda #$0 + sta DRAW_PAGE + jsr clear_top + jsr clear_bottom + + ;=================================== + ; Clear top/bottom of page 1 + ;=================================== + + lda #$4 + sta DRAW_PAGE + jsr clear_top + jsr clear_bottom + + rts + ;========== ; page_flip ;==========