[hatari-devel] The DSP and wait states

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


Hi all,
As a result of Eero's questions on emutos-devel, I've decided to come up with 
my own questions on hatari-devel :-).

I was curious about how the DSP emulation was integrated into Hatari, so I 
looked at the code a little bit.  One thing that I was a bit puzzled about was 
the addition of extra cycles for access to external memory.  The code always 
seems to add 2 cycles for access to external memory, which is NOT how the real 
DSP runs.

The real DSP inserts wait states according to values in the BCR.  A reset sets 
the BCR to 0xffff (15 wait states for access to all external memory), but about 
the first thing any DSP program running on the Atari does is to set the BCR to 
0x0000 to indicate 0 wait states for access to all external memory.  Of course 
I certainly don't understand Hatari very well, so perhaps I've misinterpreted 
the code somehow.  But I've done a grep for DSP_BCR, and it is only referenced 
in DSP initialisation, when setting its value to 0xffff.

Roger




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