Non-standerd vga modes

 BBS: Inland Empire Archive
Date: 05-17-92 (14:10)             Number: 180
From: MATT PRITCHARD @ 930/21      Refer#: NONE
  To: CORIDON HENSHAW               Recvd: NO  
Subj: Non-standerd vga modes         Conf: (2) Quik_Bas
MP@9> Performance varies: In the environment you can see a hit of over
MP@9> 20x on some of the more complex routines (line, Sprite).  5x or
MP@9> more on simple routines (point, Block).  If you are interested,
MP@9> I'll Post a .OBJ for a few primitives; but you may also want to
MP@9> write the routines yourself so that you have a total
MP@9> understanding of the code.

CH>If you tell me where to OUT/POKE/INP/PEEK I can do it.

Ok, assuming you are in 360 x 480 mode lets plot a point:


CONST ScreenWidth = 360, ScreenWidthBytes = 90 CONST
VgaSegment = &hA000 CONST VGASequencer = &H3C4, MapMaskReg
= 2, VGASeqData = &H3C5

DIM SHARED Power2(4)
COMMON SHARED Power2(4)

INIT.CODE:
       Power2(0) = 1 : Power2(1) = 2 : Power2(2) = 4 : Power2(2) = 8

        ....
        your program
        ....

SUB PSET.MODEX (Xpos, Ypos, Colour) STATIC

      OUT VGASequencer, MapMaskReg
      OUT VGASeqData, Power2(Xpos AND 3)

      DEF SEG = VgaSegment
      POKE Ypos * ScreenWidthBytes + (X \ 4), Colour

END SUB

Hope this helps...

-Matt Pritchard

===
 * SLMR 2.1a * All hope abandon, ye who enter messages here.

--- InterPCB 1.50
 # Origin: CENTRAL BBS -Texas' BEST BBS! 214-393-7090 HST  3+GIGs (8:930/21)
 * Origin: Gateway System to/from RBBS-NET (RBBS-PC 1:10/8)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET