[net.micro] TMS9918A Help Wanted

haddock@waltz.UUCP (01/16/85)

			<Did you hear that scream?  It sounded like ...
			<Like someone with their lip caught in a disk drive.

I dug up the algorithm - still need it?

1. Set up VDP registers for Graphics II Mode
	R0 = 02    R1 = C0    R2 = 0F    R3 = 80  Pattern name tbl    = >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