[hatari-devel] Questions on Falcon DMA sound

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


I'm investigating poor sound quality on EmuTOS with some programs that use the 
DSP for sound processing.  At this point, I suspect a problem with the sound 
system handling rather than the DSP.  I've chosen to use the program mp2audio 
because it seems to use the XBIOS to control the sound system & the DSP, rather 
than accessing the hardware directly.

mp2audio uses a number of XBIOS sound calls, most of which seem relatively 
straght forward. However, at one point it calls Sndstatus() with a non-zero 
argument, which should "reset the sound system".  According to Atari's Falcon 
development documentation, this means:
	. DSP is tristated
	. gain and attenuation are zeroed
	. old matrix connections are reset
	. ADDERIN is disabled
	. mode is set to 8 bit stereo
	. play & record tracks are set to track 0
	. monitor track is set to zero
	. interrupts are disabled
	. buffer operation is disabled (0)

A quick look at EmuTOS's code says that not much of this is done :-(.  However, 
looking at a TOS4 disassembly, not much is done there either (although there 
are some things done which EmuTOS should probably copy).  Certainly there is no 
explicit manipulation of anything in the above list except attenuation 
($ff893a).

Quite possibly the documentation is just wrong.  However, in TOS4, there are 
manipulations of 'mystery bits' that are not documented in the development 
notes or the Compendium.  Specifically:
	. bit 3 of $ff8937 is toggled
	. bit 2 of $ff8938 is toggled
	. bit 3 of $ff8938 is cleared (only)

Seeking further enlightenment, I looked at the Hatari source code in the repo.  
Changes to these bits are entirely ignored.  I also note that there are 
reported problems with sound quality in Hatari even under TOS4.

So I wonder if one or more of these bits do things to the sound system which 
Hatari does not yet emulate.  A test case for this would be running the 
existing EmuTOS on real hardware (and observing the sound problems) and then 
adding the mystery bit manipulation and seeing if it fixes it.  I will try to 
do that over the next few days.

But meanwhile I would be interested to hear comments from the smart hardware 
people about those mystery bits.

Roger




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