changeset 3172:799037203bef

Make CoHr three times faster! Since the cursor will eventually blink the current character position we don't need to render a cursor each character printed out. Also, since the new character will always be placed on top of the current cursor position, we don't need as well to erase the cursor prior to rendering a new character on it. These changes make CoHr very enjoyable now. Also, when listing with dir, list, etc you don't see a cursor sweeping the entire screen.
author lfantoniosi
date Sat, 13 May 2017 23:06:21 -0700
parents 0116eacf444a
children adcbab1e0f36
files level1/modules/cohr.asm
diffstat 1 files changed, 23 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/level1/modules/cohr.asm	Sat Apr 22 18:59:02 2017 +0100
+++ b/level1/modules/cohr.asm	Sat May 13 23:06:21 2017 -0700
@@ -170,7 +170,7 @@
                          
 DoNormalChar                 
          pshs  y,a       
-         lbsr  DoEraseCursor
+*         lbsr  DoEraseCursor
          puls  y,a       
          inc   V.51CursorChanged,u
          bsr   DrawCharacter
@@ -199,7 +199,8 @@
          ldd   V.51XPos,u * Update old Cursor pos
          std   V.51OldCursorPosX,u
          dec   V.51CursorChanged,u
-         lbsr  DoDisplayCursor * Display cursor
+         clr   V.51CursorOn,u
+*         lbsr  DoDisplayCursor * Display cursor
                          
          lbra  WriteExit2
          clrb             * Flag no error
@@ -378,8 +379,9 @@
          lbra  CancelEscSequence
                          
 DoBSUpdateCursor                 
-         lbsr  L0484     
-         lbsr  DoDisplayCursor
+         lbsr  L0484    
+         clr   V.51CursorOn,u 
+*         lbsr  DoDisplayCursor
          rts             
                          
 *
@@ -395,7 +397,9 @@
          lbsr  SoScrollScreen
          bra   L02BC     
 L02B9    sta   V.51YPos,u
-L02BC    lbsr  DoDisplayCursor
+L02BC    
+         clr   V.51CursorOn,u
+*        lbsr  DoDisplayCursor
          bra   L02A6     
                          
 *
@@ -438,7 +442,7 @@
          ldb   #$07      
          bsr   L0305     
          clr   V.51CursorOn,u * Flag cursor is off
-         lbsr  DoDisplayCursor * Display cursor
+*         lbsr  DoDisplayCursor * Display cursor
          lbra  CancelEscSequence
                          
 L0305    lsra            
@@ -526,7 +530,8 @@
 DelLine
          clrb
          stb   V.51XPos,u
-         lbsr  DoDisplayCursor
+         clr   V.51CursorOn,u
+*         lbsr  DoDisplayCursor
 *
 * $1b42 - clear to end of line
 *
@@ -576,7 +581,8 @@
          lbsr  L0316     
 L040D    puls  a         
          sta   V.51XPos,u
-         lbsr  DoDisplayCursor
+         clr   V.51CursorOn,u
+*         lbsr  DoDisplayCursor
          rts             
 *
 * $1b4A - clear to end of screen
@@ -593,7 +599,8 @@
          bne   L0421     
          leas  $01,s     
 L042A    dec   V.51CursorChanged,u
-         lbsr  DoDisplayCursor
+         clr   V.51CursorOn,u
+ *        lbsr  DoDisplayCursor
          lbra  CancelEscSequence
                          
 *
@@ -603,7 +610,9 @@
          lbsr  DoEraseCursor
          clr   V.51XPos,u
          clr   V.51YPos,u
-         lbsr  DoDisplayCursor
+         clr   V.51CursorOn,u
+         clr   V.51CursorOn,u
+*         lbsr  DoDisplayCursor
          lbra  L02A6
 
 *
@@ -639,7 +648,8 @@
          ldb   <V.NChar,u 	get X-pos
          subb  #C$SPAC		take out ASCII space
          stb   V.51XPos,u
-         lbsr  DoDisplayCursor
+         clr   V.51CursorOn,u
+*         lbsr  DoDisplayCursor
          lbra  L02A6     
                          
 *
@@ -664,7 +674,8 @@
          bcs   L0456     
          lda   #23       
 L0456    sta   V.51YPos,u
-L0459    lbsr  DoDisplayCursor
+L0459    clr   V.51CursorOn,u
+*        lbsr  DoDisplayCursor
          lbra  L02A6     
                          
 *