changeset 3204:64ad5cd0b912

Added some HD6309 optimizations to level1's covdg.asm file. Optimization 1) added TFM clear screen Optimization 2) added TFM scroll screen One of the optimizations was copied over from the level2's covdg.asm file.
author David Ladd <drencor-xeen@users.sourceforge.net>
date Fri, 28 Jul 2017 15:42:20 -0500
parents a188cc456fa1
children e85fdf0e52ae
files level1/modules/covdg.asm
diffstat 1 files changed, 22 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/level1/modules/covdg.asm	Mon Jul 03 10:34:01 2017 -0700
+++ b/level1/modules/covdg.asm	Fri Jul 28 15:42:20 2017 -0500
@@ -77,7 +77,7 @@
          stx   <V.CrsrA,u 	save start cursor position
          leax  >512,x		point to end of screen
          stx   <V.ScrnE,u 	save it
-         lda   #$60		get default character
+LDClrCh  lda   #$60		get default character
          sta   <V.CChar,u 	put character under the cursor
          sta   <V.Chr1,u	only referenced here ??
          lbsr  ClrScrn		clear the screen
@@ -138,6 +138,13 @@
 
 * Screen Scroll Routine
 SScrl    ldx   <V.ScrnA,u	get address of screen
+         IFNE  H6309
+         ldd   #$2060
+         leay  a,x              down one line
+         ldw   #512-32
+         tfm   y+,x+            scroll screen up
+         stx   <V.CrsrA,u       save new cursor address
+         ELSE
          leax  <32,x		move to 2nd line
 L00E9    ldd   ,x++		copy from this line
          std   <-34,x		to prevous
@@ -147,6 +154,7 @@
          stx   <V.CrsrA,u	save address of cursor (first col of last row)
          lda   #32		clear out row...
          ldb   #$60		...width spaces
+         ENDC
 L00FD    stb   ,x+		do it...
          deca  			end of rope?
          bne   L00FD		branch if not
@@ -183,9 +191,13 @@
 
 * $0D - move cursor to start of line (carriage return)
 Retrn    bsr   HideCrsr		hide cursor
+         IFNE  H6309
+         aim   #$E0,<V.CrsAL,u
+         ELSE
          tfr   x,d		put cursor address in D
          andb  #$E0		place at start of line
          stb   <V.CrsAL,u	and save low cursor address
+         ENDC
 ShowCrsr ldx   <V.CrsrA,u 	get cursor address
          lda   ,x		get char at cursor position
          sta   <V.CChar,u 	save it
@@ -229,10 +241,18 @@
 
 * $0C - clear screen
 ClrScrn  bsr   CurHome		home cursor
-L0189    lda   #$60		get default char
+L0189    equ   *
+         IFNE  H6309
+         ldw <V.ScrnE,u
+         subr x,w
+         leay LDClrCh+1,pc
+         tfm y,x+
+         ELSE
+         lda   #$60		get default char
 L018B    sta   ,x+		save at location
          cmpx  <V.ScrnE,u 	end of screen?
          bcs   L018B		branch if not
+         ENDC
          bra   ShowCrsr		now show cursor
 
 * $01 - home cursor