home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,039 of 4,675   
   Terje Mathisen to R.Wieser   
   Re: How to blitz draw text mode screen(s   
   20 Oct 17 17:36:55   
   
   From: terje.mathisen@nospicedham.tmsw.no   
      
   R.Wieser wrote:   
   > Hello Jens,   
   >   
   > As you have not mentioned how you did what you tried it might well be   
   > some of my suggestions will be what you already know and have done.   
   > In that case, don't blame me please.   
   >   
   > A couple of things: 1) Direct memory access (fastest there is) 2)   
   > Draw synchorised with the screen,.  I seem to remember an INT which   
   > will only return when the drawing of a single screen is completed. 3)   
   > Do not save the *whole* screen, but just the part which gets   
   > overwritten by the mouse.   
      
   If you have an old screen like the original CGA, then you do need to   
   avoid glitches, and the way to do that is indeed to   
      
   a) Only draw during retrace (horizontal or vertical)   
      
   b) Keep the canonical screen in RAM, i.e. only write to video memory and   
   never read it. This includes avoiding BIOS calls to scroll the screen!   
      
   If you need to do a lot of scrolling, simply update the RAM backing   
   buffer and update the physical screen when you have time for it.   
      
   c) Write as little as possible, so for a mouse cursor you could be able   
   to do that within a single horizontal retrace (or a few), which would   
   make it much lower latency than a vert retrace delay.   
      
   Using all of those ideas allowed me to keep up with a 9600 baud VT220   
   tty stream, no matter how complicated, and without a receive buffer in   
   the RS232 chip.   
      
   Terje   
      
   --   
   -    
   "almost all programming can be viewed as an exercise in caching"   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca