256 colors in 16

 BBS: Inland Empire Archive
Date: 12-15-92 (13:58)             Number: 234
From: ERIC B. FORD                 Refer#: NONE
  To: SCOTT WUNSCH                  Recvd: NO  
Subj: 256 colors in 16               Conf: (2) Quik_Bas
 >  EBF> I know that.  I mean how do you make the screen
 > flicer fast enough?  You
 >  EBF> can't redraw it.  You can't practically have
 > every other line flicker the
 >  EBF> screen. Must be some interrupt?

 >   Draw the red part of each pixel on page #1, green on
 > #2, blue #3.  Then just switch the vpage between the
 > three quickly.  Normally, this would just entail a
 > simple SCREEN ,,,1 and so on.  However, since we would
 > have to use mode X in order to get 256 with multiple
 > pages, it must be done by calling an interrupt,
 > telling the card to change pages.

Right that's what I'm saying.  No one is going to have half
their program switching the page.  There must be an
interrupt.  BUT WHERE???  WHAT???  HOW???  I got this thing
on VGA interrupts, (below) but I can't find what I'm
looking for.

Current video mode = 03

Sequencer registers:
-----------------------------------------------
 0h: 03h    3  :Reset
 1h: 00h    0  :Clocking mode
 2h: 03h    3  :Map mask
 3h: 00h    0  :Character map select
 4h: 02h    2  :Memory mode

Miscellaneous output register
   : 67h       :

CRTC data register contents:
-----------------------------------------------
 0h: 5fh   95  :Horizontal total (+5= 100)
 1h: 4fh   79  :Horizontal display enable end
 2h: 50h   80  :Start horizontal blanking
 3h: 82h  130  :End horizontal blanking (=  98)
 4h: 55h   85  :Start horizontal retrace
 5h: 81h  129  :End horizontal retrace (=  97)
 6h: bfh  191  :Vertical total (= 447)
 7h: 1fh   31  :Overflow
   : Bit 9 :0 - Vertical Retrace start
   : Bit 9 :0 - Vertical Display enable end
   : Bit 9 :0 - Vertical Total
   : Bit 8 :1 - Line compare
   : Bit 8 :1 - Start vertical blank
   : Bit 8 :1 - Vertical Retrace start
   : Bit 8 :1 - Vertical Display enable end
   : Bit 8 :1 - Vertical Total
 8h: 00h    0  :Preset row scan
 9h: 4fh   79  :Maximum scan line address (=  15)
   :           :double scan set to 0
 ah: 0dh   13  :Cursor start
 bh: 0eh   14  :Cursor end
 ch: 00h    0  :Start address high
 dh: 00h    0  :Start address low
 eh: 07h    7  :Cursor location high
 fh: 80h  128  :Cursor location low
10h: 9ch  156  :Vertical retrace start (= 412)
11h: 8eh  142  :Vertical retrace end (= 414)
   :           :CRTC registers 0 to 7 write protected.
   :           :Refresh Cycle Select=0
   :           :(not)Enable vertical interrupt=0
   :           :(not)Clear vertical interrupt=0
12h: 8fh  143  :Vertical display enable end (= 399)
13h: 28h   40  :Offset (logical line width)
14h: 1fh   31  :Underline location (=  31)
   :           :Double word mode=0
   :           :Count by 4 mode=0
15h: 96h  150  :Start vertical blanking (= 406)
16h: b9h  185  :End vertical blanking (= 441)
17h: a3h  163  :Mode Control ()
18h: ffh  255  :Line compare ()

Attribute controller registers:
-----------------------------------------------
 0h: 00h    0  :Palette color #0
 1h: 00h    0  :Palette color #1
 2h: 00h    0  :Palette color #2
 3h: 00h    0  :Palette color #3
 4h: 00h    0  :Palette color #4
 5h: 00h    0  :Palette color #5
 6h: 00h    0  :Palette color #6
 7h: 00h    0  :Palette color #7
 8h: 00h    0  :Palette color #8
 9h: 00h    0  :Palette color #9
 ah: 00h    0  :Palette color #10
 bh: 00h    0  :Palette color #11
 ch: 00h    0  :Palette color #12
 dh: 00h    0  :Palette color #13
 eh: 00h    0  :Palette color #14
 fh: 00h    0  :Palette color #15
10h: 04h    4  :Attribute mode control
11h: 00h    0  :Border color
12h: 0fh   15  :Color plane enable
13h: 08h    8  :Horizontal pixel panning
14h: 00h    0  :Color select

Graphics controller registers:
-----------------------------------------------
 0h: 00h    0  :Set/reset
 1h: 00h    0  :Enable set/reset
 2h: 00h    0  :Color compare
 3h: 00h    0  :Data rotate/function select
 4h: 00h    0  :Read map select
 5h: 10h   16  :Graphics mode
 6h: 0eh   14  :Miscellaneous
 7h: 00h    0  :Color don't care
 8h: ffh  255  :Bit mask

---
 * Origin: Eric Ford (1:3632/1.6)
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