$DD00

From: Stephen Judd (judd_at_merle.acns.nwu.edu)
Date: 1998-10-26 03:31:29

Hola folks,

	First, the Chicago Expo yesterday was really great.  There were
many interesting people there, and several, such as Robin Harbon
and Nate Dannenberg, even stayed with me.  I'm touched, and it was a hoot.

	Nate has done many interesting things (unlike Robin, heh ;-),
including a 64 MOD player, a totally cool 128 tower, and most recently a 
QuickCam interface and renderer (which was a big hit at the show).
He has several different renderers for it -- 4x4, 2x2, multicolor floyd-
steinberg -- and the most recent is an interlaced-multicolor mode
renderer.  This last one had an interesting problem, and I wonder if
anyone here could provide some insight into why some of the very peculiar 
symptoms occured.

	To make a long story short (and I mean loooong -- it took several
days of frustration to figure out the solution :)... because the picture is
interlaced, an interrupt is running which swaps bitmaps, and in particular
modifies $DD00.  But $DD00 is also used to communicate with the quickcam,
so that there are little pieces of code like

	LDA $DD00
	AND #$F3
	a few other things
	STA $DD00

As you've probably figured out, the problem was that an interrupt was
occasionally triggered between the LDA and STA, and what the interrupt
wrote to $DD00 was quickly hosed by the STA above.  SEI and CLI fixed
up the problem just fine.
	The bizarre thing is the symptoms, which were our only clue: at 
random intervals, garbage would flicker on the screen, in fact what looked 
like fairly regular garbage.  Moreover, on different (even/odd) frames the 
entire screen would be vertically shifted by some small number of pixels 
(2-4 say).  This includes the raster interrupt -- an INC $D020 and DEC $D020
indicated where the interrupt occured at, and it was in two physically
different places on the screen!  Moreover, the cause of the screen garbage
is not very obvious to me, since changing $DD00 like above ought to
merely switch to an "out of phase" bitmap -- not a totally different
VIC bank!

	So, I have my guesses, but can anyone explain how messing with 
$DD00 can totally confuse VIC?

-Steve
-
This message was sent through the cbm-hackers mailing list.
To unsubscribe: echo unsubscribe | mail cbm-hackers-request@dot.tcm.hut.fi.

Archive generated by hypermail 2.1.1.