🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #1394

Re: vga mode 13h question

#1394
From: Cyberman
Date: Mon, 05 Oct 1992 23:27
84 lines
3755 bytes
   Baylor was espousing about 'Re: vga mode 13h question',
   on [10-04-92  06:08] to All!
 Ba> Kinda sorta - there's only one plane. After much arguing with
 Ba> one person i think we arrived at that you only use one plane to get
 Ba> the linear video mapping feel (packed pixels). So you dont' get 
 Ba> another plane.

    By turnoing off the Chain4 bit you have linear access to 1
    plane at a time.  Mode 13h packs the 4 planes together like
    this:

    pixel

    0 1 2 3
    | | | |
    | | | ++------+
    | | ++++----+ |
    | ++++----+ |-+-Plane 3
    ++++----+ |-+ --Plane 2
    ++      |-+ ----Plane 1
    +-------+ ------Plane 0

 >Can you use the set_address_high and set_address_low to pan the screen
 >around?
 >
 Ba> Don't know - have you tried? You have no spare memory area to
 Ba> scroll onto the screen, but anything can be done (and  cause an error)
 Ba> in assembler. But you shouldn't be able to get anything usefull 
 Ba> out of this.

    You can use it to scroll the screen down and pan.  The
    panning is limited to only 4 pixels I haven't been able to
    find a way to move it by single pixels and acording to the
    books you can't do it.

    To move a single line down calculate the number of pixels per
    line (display pitch NOT screen width) and divide by 4.
 
 >Can you use page flipping?
 >
 Ba> Uh, not that i know of. 320x200x1 = 64k, and since only one
 Ba> plane gets used, you use all available memory. So i doubt you can get
 Ba> more. If anyone has a tweak to get to other planes for more linear
 Ba> pages i'd love to see it.

    YES you can simply turn off chain4 memory system and address
    each plane seperately.  Then change the start of display
    memory (SAH/SAL).  This allows you to flip pages quickly.
 
 >I have the feeling that the answer to all these questions. If so then
 >why would anyone want to use this mode? My current scrolly is so
 >processor consuming that I can't do anything else!! 
 >
 Ba> 	1) It's the only official 256 color mode. The others are hidden
 Ba> or our inventions.
 Ba> 	2) I've seen really good things done with it. In sprites
 Ba> (pascal source on garbo) they use a virtual page by defining an
 Ba> array [1..64000] of byte. All changes and masking is done to that,
 Ba> wait for a vertical retrace then you can use a movsw (movsd works
 Ba> too on 386s, right?).

    Not all do you can use display memory to store images and can
    transfer them with a movsb at 4 bytes at a time this is very
    fast.  With a local bus card things might move faster.
 
 >Should I use Mode X from now on? I believe you can do the above
 >questions with  this mode, right?

 Ba> 	I guess if you know it already. I kinda hate doing bit/pixel
 Ba> masking and using all the silly registers - you can use mode 13
 Ba> without any usage of vga registers. But i guess once you write the
 Ba> masking routines and all the pain is past.
 Ba> 	And plenty of people have written routines to help out.

    Mode X does not require bit pixel addressing.  It does
    require you to set which plane you are writeing to.

        Stephen Cyberman@Toz.Buffalo.NY.US
        Scripted at Mon  10-05-1992  17:15:50

... HOLY SMOKE BATMAN , I'M ON FIRE !!!
--- Blue Wave/QWK v2.10
                                                                              
Technical Details
Message-ID: <gate.PZ37RB1w165w@toz.buffalo.ny.us>
Path: arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!darwin.sura.net!spool.mu.edu!uwm.edu!rutgers!ub!toz!cyberman

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!darwin.sura.net!spool.mu.edu!uwm.edu!rutgers!ub!toz!cyberman
From: cyberman@toz.buffalo.ny.us (Cyberman)
Newsgroups: rec.games.programmer
Subject: Re: vga mode 13h question
Message-ID: <gate.PZ37RB1w165w@toz.buffalo.ny.us>
Date: 5 Oct 92 23:27:00 GMT
Lines: 84
X-Maildoor: WaflineMail 1.00r