Qbasicnews.com
October 25, 2021, 10:28:11 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Is PCOPY faster than SCREEN mode,,apage, vpage?  (Read 2735 times)
torstum
Member
*
Posts: 62


« on: July 06, 2006, 06:47:22 PM »

I've discovered this really old command (already present in GW-Basic) that copies the content of one video page to another. Is it faster than the SCREEN command? My interpreted code would certainly appreciate some added boost.

  I've also read somewhere that the GW-Basic interpreter is faster than QBasic 1.1. Is this true?
Logged
Anonymous
Guest
« Reply #1 on: July 06, 2006, 07:47:01 PM »

Feel free to do tests, and bring them back. Thanks!
Logged
DrV
Na_th_an
*****
Posts: 1553



WWW
« Reply #2 on: July 06, 2006, 08:57:54 PM »

PCOPY is almost certainly slower than page flipping.  Page flipping only requires writing a couple of bytes to a video controller register, whereas PCOPY has to move all that memory around.  On the other hand, if port I/O is emulated, it might end up slower than the memory copy.
Logged
RyanKelly
Forum Regular
**
Posts: 109



WWW
« Reply #3 on: July 11, 2006, 11:51:30 PM »

The screen command does not perform page flipping.  The active page parameter sets the screen buffer drawn to by graphical and output statements, and the visible page parameter sets the the screen buffer that is actually display on the monitor.  PCOPY can be used to implement double buffering by copy from the active page and to the visible page.
Logged
DrV
Na_th_an
*****
Posts: 1553



WWW
« Reply #4 on: July 12, 2006, 09:50:27 AM »

If that's not page flipping then what is?
Logged
RyanKelly
Forum Regular
**
Posts: 109



WWW
« Reply #5 on: July 13, 2006, 12:26:38 AM »

Quote from: "DrV"
If that's not page flipping then what is?


The way torstum phrased his question made it appear that he had gotten the impression that he could perform page flipping by using the the screen statement alone, which until three minutes ago, I didn't think was possible.  I've always thought that the screen statement cleared the screen buffers, but I just ran a test and found that it in fact does not.

This being the case, I would assume that using the screen statement might be faster than using pcopy, however vsync techniques will wash out any advantage one approach might have over another.
Logged
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #6 on: July 13, 2006, 06:17:40 AM »

The SCREEN thingo just points the start of the display page somewhere in the video memory *if* the current video mode is the same to that specified in the command. If not, it changes video modes and initializes everything (sets the default values in the DAC registers and clears video memory).

The fastest way to achieve flickerless animation would be using page flipping VSync'd (when you switch pages you just move a pointer, so it takes virtually no time), the problem is that if we are under Windows (whatever version) the timing is not accurate and you get "ghost zones" and lots of flickering here and there. You have to go to pure MSDOS for this to work.
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!