🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #3417

VGA programming poser

#3417
From: ~{QG9p~}
Date: Tue, 29 Sep 1992 00:55
32 lines
1796 bytes
I've been thinking about how to write a color pixel pattern to VGA
screen AND setting the background color in one pass, so I am posting
this as a challenge.

Objective: write a bicolor pattern to a rectangular area on a VGA
  graphic screen according to a bitmap, where a bitmap value of 1 
  denotes a pixel color of COLOR1 and a bit value of 0 denotes color 
  COLOR0, using the smallest possible number of access to the video 
  memory.

You may make the following assumptions:
  (0) the screen is in 16 color mode;
  (1) the rectangular area does not cross byte boundary;
  (2) the pallette registers are BIOS default, which means you can
use the color values directly as map masks if needed;

Do not make any assumption regarding the actual values of COLOR1
and COLOR0.

You can use everything the standard VGA spec provides, but probably
should restrict yourself to the following registers: map mask, set-reset, 
enable set-reset, data rotate, (write) mode, bit mask and latch.

You probably don't want to post anything that requires two writes
for each 8 pixels for that would be too easy (unless you think it
is genuinely creactive.)

Let the net be the judge (and the work be the reward.)


  Ya-Gui Wei
Technical Details
Message-ID: <BvBEK3.244@usenet.ucs.indiana.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!spool.mu.edu!sol.ctr.columbia.edu!usenet.ucs.indiana.edu!bronze.ucs.indiana.edu!yawei

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!spool.mu.edu!sol.ctr.columbia.edu!usenet.ucs.indiana.edu!bronze.ucs.indiana.edu!yawei
From: yawei@bronze.ucs.indiana.edu (~{QG9p~})
Newsgroups: comp.os.msdos.programmer,comp.sys.ibm.pc.hardware
Subject: VGA programming poser
Summary: writing color pattern in one pass challenge
Message-ID: <BvBEK3.244@usenet.ucs.indiana.edu>
Date: 29 Sep 92 00:55:14 GMT
Sender: news@usenet.ucs.indiana.edu (USENET News System)
Organization: Indiana University
Lines: 32
Nntp-Posting-Host: bronze.ucs.indiana.edu