[Coco] DAC sound output and keyboard input
John W. Linville
linville at tuxdriver.com
Thu Jun 19 10:25:53 EDT 2014
On Thu, Jun 19, 2014 at 10:51:20PM +1000, Mark McDougall wrote:
> Hi Gurus,
>
> I have a strange problem and I'm not sure whether it is an issue with my
> code, the Coco, or MESS.
>
> If I configure the Coco3 for DAC sound output, occasionally I get incorrect
> results when reading the keyboard to detect if *ANY* key is pressed (ie, the
> column select is zero (0) which ordinarily would return the results for all
> rows). In some cases - and there's seemingly no pattern to it - bit 7 is
> reset, indicating a key has been depressed in that column. And once on, it
> is stuck on. It also *seems* to happen more often when I use <F10> (toggle
> throttle) in MESS, which suggests that it's perhaps an emulation problem).
>
> This *only* happens when I use the DAC for sound output. It has *never*
> happened when using 1-bit sound output or no sound output at all.
>
> Any ideas? I can post the relevant code snippets if required.
Bit 7 is JOYIN (the comparator output), used to read the joysticks
(via successive approximation ADC). You probably should mask that
when you are doing your "any key" check.
John
--
John W. Linville Someday the world will need a hero, and you
linville at tuxdriver.com might be all we have. Be ready.
More information about the Coco
mailing list