Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

-- SVGA-Mode Screen Addressing --

Status
Not open for further replies.

OSProgrammer

Programmer
Oct 30, 2003
29
0
0
SA
Hi!

When I Set The Resolution Of The Screen Into 1024x768(SVGA), If I Want To Draw a Line I Should Use Banking.
How Can I Do That With Screen Addressing(USING CORDINATE).

I'm Using TASM (ideal)

Give An Example Please.

Bye
OSProgrammer
 
you need to get a good book on graphics programming. There is far more to it than can be conveyed in a message board. Some of it depends what environment you are using (windows, dos etc.)
The thing with banking is that there is not enough mapped memory to cover the whole screen, so the graphics card has to map part of its memory to the address-space accessed by the processor. The card's ports can be used to tell it which bits to map. To avoid you having to know which ports, and how it works, there are things like the vesa standard. This is not just to save you dealing with ports (you're going to have to do that anyway if you want to do your own graphics); the point is that the cards don't all use the same ports the same way, so you can't write your own global solution. If you want to use vesa drivers, then you just need to get some help on using the vesa interrupt (for instance, dos environment) to find out what graphics modes actually are available on your card, and to work out the granularity of the banking (how many kbytes at a time does it shift down the screen). Then when you're drawing your line you need to keep track of when you hit the bottom of the screen (easy! roll-over of 64K), and move enough banking units up the screen that your line is now near the top (but for efficiency not unnecessarily so), and carry on drawing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top