Board index » delphi » fast scrolling in mode13h

fast scrolling in mode13h

Hi,

Does anyone know how to scroll in mode 13h? Must I draw the pictures all
time in new position?

thanks

 

Re:fast scrolling in mode13h


Quote
Steffen Binas wrote:

> Hi,

> Does anyone know how to scroll in mode 13h? Must I draw the pictures all
> time in new position?

For mode 13h, the short answer to needing to redraw is yes, though
double-buffering can speed things up.  If you want faster scrolling, try
mode X instead.  It's planar, and it doesn't have the same restrictions
that mode 13h does (memory in mode 13h is chained together in an
extremely inefficient way).

Quote
> thanks

--
Scott Earnest                      | _,-""-_,-""-_,-""-_,-""-_,-""-_,-"
|
set...@ix.netcom.com (primary)     | We now return you to our regularly
|
siny...@{*word*104}space.org (alternate) | scheduled chaos and mayhem. . . .
|

Re:fast scrolling in mode13h


 Hello,

  there is no problem : you must simply move lines in video buffer
to their new positions. Video buffer starts at A000:0000 (or SegA000:0000
in Pascal 7.0). In this video mode, one byte corresponds to one pixel, so
you can easily count starting offsets of any line in the video buffer. Then
move its contents with
Pascal Move or rep movsb.

  Andrew Koudryavtsev (and...@koudr.spb.su)

Steffen Binas <0332770751-0...@t-online.de> wrote in article <58pceq$...@news00.btx.dtag.de>...

Quote
> Hi,

> Does anyone know how to scroll in mode 13h? Must I draw the pictures all
> time in new position?

> thanks

Re:fast scrolling in mode13h


In article <01bbeb3d$23b02760$08ffd...@igorsh.spb.runnet.ru>, on 16 Dec 1996
10:47:33 GMT, igo...@spb.runnet.ru says...

Quote

> Hello,

>  there is no problem : you must simply move lines in video buffer
>to their new positions. Video buffer starts at A000:0000 (or SegA000:0000
>in Pascal 7.0). In this video mode, one byte corresponds to one pixel, so
>you can easily count starting offsets of any line in the video buffer. Then
>move its contents with
>Pascal Move or rep movsb.

It's faster to use rep movsw, and even faster to rep movsd
(doublewords). But pascal doesn't recognise 386 opcodes, so
you say:
        DB 66h
        rep movsw

Et Voila.

Quote

>  Andrew Koudryavtsev (and...@koudr.spb.su)

>Steffen Binas <0332770751-0...@t-online.de> wrote in article

<58pceq$...@news00.btx.dtag.de>...
Quote
>> Hi,

>> Does anyone know how to scroll in mode 13h? Must I draw the pictures all
>> time in new position?

No, you can. But you don't have to. There's a way to program the
CRTC (Cathode Ray Tube Controller) to think that $a000:???? is the
beginning of the video segment instead of $a000:0000 thus no
redraw.

Check out MODE13h on my homepage,
        http://connexus.apana.org.au/~mikuto/darky
(go into the downloads section)

I'll add CRTC scrolling in the next revision
(a week or so).

Quote
>> thanks

Your welcome. :)
Hope it helps.

--
--------------------------------------------------------------
/------\/-----\/-----\/-\  /-\/------\/-----\/-----\/---\  /-\
\| /-\ || /-\ || /-\ || | /  /| /\/\ || /-\ || /-\ ||    \ | |
 | | | || \_/ || \_/ || |/ /_ | |||| || | | || | | || |\  \| |
 | | | || /-\ || /-\| | /-\  || |\/| || | | || | | || | \  \ |
/| \-/ || | | || | | \| | |  || |  | || \_/ || \_/ || |  \   |
\______/\_/ \_/\_/ \_/\_/ \__/\_/  \_/\_____/\_____/\_/   \__/
--------- http://connexus.apana.org.au/~mikuto/darky ---------

Other Threads