[hatari-devel] Question about Falcon030 & mono/stereo

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


I spent a little while trying to debug a problem while converting my Falcon music replay code from stereo/16bit to mono/16bit, and while it seems to be doing what it should, it sounds wrong.

After poking around with various things I began to realize the output sounds a lot like the Codec is still outputting stereo (the sound is replaying at 2x frequency, with contiguous chunks missing)

I traced the crossbar using Hatari's debugging features and the HW does seem to be correctly configured for 16bit mono (ff8921 = $c0). This register is written only once according to the crossbar trace.

Anyway I did a second experiment - I set the replay routine to output stereo data  again and switched just the Codec to mono. The output sounds correct/the same - which shouldn't be the case if the Codec really is in mono mode (at best, it should drop in pitch).

So my question is - is mono replay a known issue in Hatari, or is it me not configuring the Crossbar/Codec correctly? It is controlled by a single bit in ff8921 but maybe there are other config register dependencies?

-------+-----+-----------------------------------------------------+----------
$FF8921|byte |Sound mode control                BIT 7 6 . . . . 1 0|R/W  (STe)
       |     |0 - Stereo, 1 - Mono -----------------' |         | ||
       |     |0 - 8bit -------------------------------+         | ||
       |     |1 - 16bit (F030 only) ------------------'         | ||    (F030)


It's probably my fault at some level so I'll keep looking but it seems strange that toggling this bit (7) doesn't have any effect on the audio. I'm pretty sure that's all I did in the past, even if it was a long time ago!

D.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/