programmers resources
  http://www.intel-assembler.it/  (c)2017 intel-assembler.it   info@intel-assembler.it
 
Search :  
Lingua Italiana    English Language   
Index
 
just an empty assembly space
just an arrow Intel Platform
just an arrow Article & Guides
just an arrow Download Software


23/01/2009 Featured Article: How to remove Buzus Virus (permalink)




:::3141120:::
Bottone Scambio Directory Pubblicitaonline.it
Home Page | Articles & Guides | Download | Intel Platform | Contacts

Google
 


Bookmark and Share
Download 
Tell a friend



Accessing 256 kB of memory on a standard VGA-card

How to access unchained memory using bitplanes

(by vulture)

An old but interesting article on VGA video card programming.
The memory layout of the chain-4 screen is rather different from the normal MCGA gfxmode. Like I said previously, the memory is divided into 4 bitplanes.


This article is online from 2924 days and has been seen 5628 times




      +---------------------------------------------------------------+
      |*                                                             *|
      |                                                               |
      |  ۰                   ۰                             |
      |  ۰    ۰ ۰   ۰ ۰ ۰     ۰ ۰     ۰   |
      |  ۰    ۰ ۰   ۰   ۰   ۰     ۰   ۰ ۰     ۰   |
      |  ۰    ۰ ۰   ۰   ۰   ۰     ۰ ۰     ۰   |
      |  ۰    ۰ ۰   ۰   ۰   ۰     ۰   ۰ ۰ ۰ ۰   |
      |  ۰ ۰   ۰   ۰ ۰   ۰  ۰ ۰    |
      |                                                               |
      |                        T - R - I - A - D                      |
      |*                                                             *|
      +---------------------------------------------------------------+
                               +--------------+
                               | . PRESENTS . |
                               +--------------+


                        Chain-4 Documentary Version 2.0
------------------------------------------------------------------------------
-
  Written By : Vulture                    Total Files  : 2
  File Type  : Textfile                   Release Date : 17th of June 1995
  Difficulty : Medium level               Filename     : CHAINDOC.ZIP
------------------------------------------------------------------------------
-

=-=-=-=-=-=-=-=-=-=-=-=-= CHAIN-4 VIDEOMODE DOCFILE =-=-=-=-=-=-=-=-=-=-=-=-=-

=-= What is chain-4 ? =-=

Most VGA intros are written in mode 13h. This is 320*200*256 mode. The memory
in this mode is lineair and thus fairly easy to handle. The resolution isn't
that great but for most intros it's enough. One can make very cewl graphics
in this mode. So all in all this is a great mode to use. However, a major
disadvantage is the fact that only 64 kB of VGA memory can be accessed.
This is the entire screen (320*200 = almost 64kB = 1 page) you see in front
of you. So, when you use this mode you aren't using the full standard 256kB
of memory present on the VGA-card but just 64kB. For most people mode 13h is
sufficient but for the more serious coders it just isn't enough. They want to
use the full 256 kB of memory available for e.g fast pageflipping, full screen
scrolling and lots of other cewl things. Here we go:
Chain-4 is a method of accessing 256 kB of memory on a standard VGA-card.
When using chain-4 the VGA memory is unchained wich basicly means that the
memory is no longer linear as were the case in standard mode 13h. Due to VGA
hardware this gives us 256 kB of memory. On a chain-4 screen pixels are placed
on so-called bitplanes. Normally there are four pages (=planes) available,
each 64kB big. This is coz a segment can only be 64 kB big. And 4*64kB=256kB.
It is also possible to 'tweak' the videomode and get into higher resolutions.
E.g 320*240*256. This results in you having less pages available because
you have more pixels on a page. However, in this doc I will not go into
tweaking the videomode but stay with the basics.
Take a look at the following diagram. It shows a possible chain-4 screen.

  0            X         640
   +----------------------+
   |      =>+--------+    |
   |        |  View  |    |   The viewport always shows 1/4=64k of the
   |        |  Port  |    |   total chain-4 screen. In this case the
   |        |        |    |   chain-4 screen is 2 pages width and 2
 Y |        ---------    |   pages high. The total chain-4 screen can
   |                      |   be anything that adds up to 4 pages.
   |   Chain-4 screen     |   More of this l8r downbelow.
   |                      |
   +----------------------+
 400

The memory layout of the chain-4 screen is rather different from the normal
MCGA gfxmode. Like I said previously, the memory is divided into 4 bitplanes.


(*** download for full text ***)



Top
Download 
Tell a friend
Bookmark and Share



Similar Articles

ELYSiUM's VGA Graphics & Sound Blaster Coding
Beginner VGA Graphics & Sound Blaster Programming
(by ELYSiUM)

Linear Frame Buffer (LFB) Emulator
An LFB emulator for VESA with Asm source code
(by Alexei A. Frounze)

Simple Horizontal Scroller
Asm code for scrolling text in vga
(by Carlos Hasan)

SVGA PutPixel
Programming the SVGA card in asm and C
(by ABE)

The PC GAMES PROGRAMMERS ENCYCLOPEDIA 1.0
A collection of 85 asm programming documents
(by various)

VGA Programmers Master Reference Manual
Complete VGA programming manual
(by Andrew Scott)

VGA Trainer Program
A course for graphic programming in Pascal/ASM
(by Grant Smith Denthor of ASPHYXIA)

 Tags: vga


webmaster jes
writers rguru, tech-g, aiguru, drAx

site optimized for IE/Firefox/Chrome with 1024x768 resolution

Valid HTML 4.01 Transitional


ALL TRADEMARKS ® ARE PROPERTY OF LEGITTIMATE OWNERS.
© ALL RIGHTS RESERVED.

hosting&web - www.accademia3.it

grossocactus
find rguru on
http://www.twitter.com/sicurezza3/
... send an email ...
Your name

Destination email

Message

captcha! Code