Board index » delphi » SVGA scrolling

SVGA scrolling

Pascal programmer please help!
I want to do the following:

My knowledge of vga programming is very limited so please help me right
if I say something wrong.  As far as I know one full 640x480x265color
page will take up 256k of the VGA card's memory.  Now say I for example
write the four full screen pictures to a 1Meg. SVGA card, only the first
one will be displayed(0,0,639,479).  Isn't there a way to switch to these
other three pages using BGI? Even better isn't there a way how you can
change the visual page with only a few coords?

FOR ex.

This is a representation of a 1 Meg. VGA card
      1                300               640
                              1280

----------------------------------------------------------------------------
-
| |-----------------------------|                                          |
 1
| |                                           |
       |
| |                      |
                   |
| |                      |                                                 |
| |                      |                                         |
| |-----------------------------|                                          |
 480
|                                                                  |
|                                                                  |
|                                                                  |
|                                                                  |
|                                                                  |
----------------------------------------------------------------------------
--  960

The current "viewing coords." is starting at 1,1 ending at 640,480
Can't you change this to for ex. starting at 100,100 ending at 740,580?
If this is possible would it be possible to use this as a scrolling
tecnique?

Basically what I want is a routine/procedure that can view every part of a
VGA
card.

Help in any way will be welcome
Please reply via E-mail

Thanks in advance
Pierre van Rooyen

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet

 

Re:SVGA scrolling


check out the VESA specs, there is some function to set the starting point
(in video memory) of the screen buffer.

                        Steven Roelants
                        ste...@adii.be

Re:SVGA scrolling


Quote
conn...@sec.lia.net wrote:
> Pascal programmer please help!
> I want to do the following:

> My knowledge of vga programming is very limited so please help me right
> if I say something wrong.  As far as I know one full 640x480x265color
> page will take up 256k of the VGA card's memory.

Nope.  You need to check your math.  In 256-color modes, one pixel equals one
byte of memory.  640 x 480 = 307200 = 300K, not 256K.

Quote
> Now say I for example
> write the four full screen pictures to a 1Meg. SVGA card, only the first
> one will be displayed(0,0,639,479).

You can't.  With memory requirements by that mode, you have enough memory for
only 3 full screens.

Quote
> Isn't there a way to switch to these
> other three pages using BGI? Even better isn't there a way how you can
> change the visual page with only a few coords?

The VESA BIOS which is present on most cards in use provides calls to perform
these functions.  See functions AX=4f06h and AX=4f07h.  A copy can be found
at:

ftp://x2ftp.oulu.fi/pub/msdos/programming/specs/vesasp12.zip

Note that the current specification is 1.2 code will still work with cards
which implement 2.0 VESA functions.  Also, AFAIK there's no plaintext version
of the VESA 2.0 *final* VESA 2.0 specification (though you can find a draft in
the same directory as vbe20.zip).

Also, BGI is notoriously slow.  You'd do better to either get a VESA library
and work with that, or start reading and create your own.

Quote
> FOR ex.

> This is a representation of a 1 Meg. VGA card
> [incomprehensible ASCII rendition of screen]

> The current "viewing coords." is starting at 1,1 ending at 640,480
> Can't you change this to for ex. starting at 100,100 ending at 740,580?
> If this is possible would it be possible to use this as a scrolling
> tecnique?

BTW, graphics are *always* 0-based at addressing level.  The upper left corner
of the screen is (0,0) and the lower right is (639,479) for 480x640 mode.
This is pretty much a universal convention.

Quote
> Basically what I want is a routine/procedure that can view every part of a
> VGA
> card.

I don't have code handy for this sort of windowing, but it's easy to
accomplish by calling VESA function int 10h, AX=4f07h.

Quote
> Help in any way will be welcome
> Please reply via E-mail

Copy sent to e-mail.

Quote
> Thanks in advance
> Pierre van Rooyen

> -------------------==== Posted via Deja News ====-----------------------
>       http://www.dejanews.com/     Search, Read, Post to Usenet

--
Scott Earnest        | We now return you to our regularly |
set...@ix.netcom.com | scheduled chaos and mayhem. . . .  |

Other Threads