Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: Notesfiles $Revision: 1.6.2.17 $; site waltz.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!inuxc!pur-ee!uiucdcs!waltz!haddock
From: haddock@waltz.UUCP
Newsgroups: net.micro
Subject: Re: TMS9918A Help Wanted
Message-ID: <30700005@waltz.UUCP>
Date: Wed, 16-Jan-85 03:40:00 EST
Article-I.D.: waltz.30700005
Posted: Wed Jan 16 03:40:00 1985
Date-Received: Fri, 18-Jan-85 02:24:55 EST
References: <22300008@uok.UUCP>
Lines: 45
Nf-ID: #R:uok:22300008:waltz:30700005:000:1397
Nf-From: waltz!haddock    Jan 16 02:40:00 1985


			3C00
	R4 = 00    R5 = 00    R6 = 00    R7 = 00  Pattern color tbl   = >2000
						Pattern generator tbl = >0000
2. Fill Pattern Name Table with 0 to 255 (do 3 times [3*256=768])
3. Fill Pattern Generator Table with 0's
4. Fill Pattern Color Table with color pairs (backgrnd and plot color)

5. WHILE no more (x,y) DO
	get_pair(x,y)
	plot(x,191-y) /* Adjust for upper left = (0,0)
			 while (x,y) has normal origin */
   END


Plot(x,y)
   Pattern# = |x/8| + |y/8|*32		/* |x| = integer_part(x) */
		    /*  ^-- Don't skimp here! Those LSBits need to be zero'ed */

   Pattern#_offset = Pattern# * 8 + (y MOD 8) /* = which byte on screen */

   VDP_addr = Pattern#_offset + base address of Pattern Generator Table

   contents_of(VDP_addr) |= bitmask[x MOD 8]
			 /* bitmask[]={>80,>40,>20,...,>01} */

   Return

================================================================
			   _____
	-Rusty-		|\/   o \    o
			|   (  -<  O o	   Where's the fish?
			|/\__V__/

ARPA:	Haddock%Waltz%TI-CSL@CSNet-Relay
	Rusty@Maryland (forwarded to CSNet address)
CSNet:	Haddock@TI-CSL
USENET:	{convex!smu, ut-sally, texsun, rice} ! waltz ! haddock