slackey@bbn.com (Stan Lackey) (01/24/89)
A short time ago, I posted that I was having trouble with DLI's; when I changed the color regs and character set in a DLI routine, and depended on the system VBI to restore them from the soft copy, I got significant flicker, both above and below the line I was using the DLI on. I then implemented a fast VBI routine that always restored the color regs and the char pointer, but still got occasional flicker. The thing I neglected to mention was what turned out to be the problem: I was using a timer interrupt to track a trakball/mouse input. The timer interrupt frequency was quite high, interrupting several times per display interval. (I originally tried to use the VBI to track the trakball, but found that it was much too slow. Even moderate speed in moving the ball would cause it to overrun.) I am now using the Commodore mouse, in joystick-simulation mode. It can be tracked at VBI speeds, not very well, but it does eliminate the above problem. I even eliminated the fast VBI routine, as it was no longer needed to reduce flicker. Has anyone had this problem? Does it occur when the timers are used as sound generators? Is there a way around the problem [of fast timer interrupts interacting with VBI/DLI's]? Oh - I made a mistake in a previous posting. My statement that using the cbm mouse in analog proportional mode read on the Atari as the highest pot value was wrong - it actually reads as the number 3 [where the range is 0-228], regardless of mouse position. -Stan
brett@sylvester.umd.edu (Brett S Bourbin) (01/24/89)
In article <34962@bbn.COM> slackey@BBN.COM (Stan Lackey) writes: >The thing I neglected to mention was what turned out to be the problem: I was >using a timer interrupt to track a trakball/mouse input. The timer interrupt >frequency was quite high, interrupting several times per display interval. >(I originally tried to use the VBI to track the trakball, but found that it >was much too slow. Even moderate speed in moving the ball would cause it >to overrun.) In my old days I wrote a handler to keep up with a mouse as an input device and I had the same problems at first. The VBI can not keep up with such a device. My solution was to track it during the VBI and selected DLI's. I think I did it every four or so lines and then also during the VBI and got a very acceptable responce. You might want to try that. Also, when working with DLI's, it is always good to split them over the vertical length of the screen and handle them in slices. Since there is very little time during the DLI, (I think it was about 14 color-clocks for horizontal blank) splitting up the tasks into small chunks helps eminiate flickering. Remember that there is only one DLI vector, so it has to be reloaded after each DLI slice. --Brett S Bourbin __ __ _ __ _ Instructional Computing Programs -- Univ of Maryland | || | / || || \ | || || || || | INTERNET: brett@SYLVESTER.UMD.EDU | || || || || | bbourbin@UMD5.UMD.EDU \_||_/ |__||__||__| BIX: brettb College Park BITNET: bbourbin@UMDD