BBS: Inland Empire Archive Date: 11-19-92 (02:35) Number: 313 From: RAYMOND KEITH Refer#: NONE To: RICH GELDREICH Recvd: NO Subj: Re: Challenge! Conf: (2) Quik_Bas
> 'Here's a challenge for anybody who thinks they can figure it out: > ' Explain HOW this program shows more than 16 colors in a 16 > ' color mode. Your basicly updating the color palette while the display is in a horizontal retrace period. (1) The Input Status #1 register through port &H3DA gives you access to the VR field (Vertical Retrace) and the DE field (Display Enable NOT). These will let you know when to update the palette. (2) &HC7 is the Pel address read mode register which contains the eight bit address used to access one of the 256 color registers during a read opteration. (3) &HC8 is the Pel Address write mode register which contains the eight bit address used ot access one of the 256 color registers during a write operation. (4) &HC9 is the Pel data register which is a 18 bit wide register used to interface the host and the 256 color registers. Each color register can hold the primary colors, Red, Green, Blue. Each takes 6 bits. Since the host data bus is only 8 bits you can only change one color at a time. The registers above through &HC7 and &HC8 note which color register is being read or written to with the data in this register. Well you get the idea, wait for a horizontal retrace period, then change a color, etc. Rich I think that is what your doing. If not, my answer is surely techy looking enough to fool some people. <wide smile> Raymond --- DB 1.37/003468 * Origin: Real Estate N.W. BBS Files,Doors,(503)654-5054 24hrs (1:105/224)
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