i am trying to implement the STE dma audio in verilog. The only documentation i have is the latest online version of the "profibuch" and the atari ste fanpage http://atari-ste.anvil-soft.com/html/devdocu4.htm
. Both are a little sparse when it comes the STE audio.
I have several questions:
- When exactly is /xsint getting active and when is it being released? It cannot be active during the entire frame since in loop mode it would be permanently active which wouldn't make much sense. My current implementation activates it as soon as replay starts and de-asserts it when cur_addr == end_addr. Which leads to the next question:
- Is the end address actually ever reached? My implementation actually reached the end address (but without reading something) to have the pause necessary to generate a rising edge on /xsint
- What is the purpose of the 74ls164 shift register? I think it's somehow meant to compensate for the delay imposed by the word FIFO. But why is then delayed 250us (1/8 2Mhz cycle)? And the delay between writing the last word of a sample into the fifo and having it being played back is much longer than 250us.
- the control register can be read. What does one read there? Exactly what has been written or e.g. the current playback state in bit0?
- When are the addresses latched? I currently latch the end address, so it doesn't hurt if it's being overwritten while a frame is being played. In loop mode at the end of a frame i then reset the current address to the base address (which is not latched and may have changed) and update the latched end address fromt he current end address.
Also i have another question regarding the mfp: Even the latest profibuch claims that when timer a or b are in event or pulse mode the inputs i3/i4 don't generate interrupts. The datasheets in know say this only happens in pulse mode but not in event mode. I think the profibuch is wrong here ...
My implementation is sort of working. Something is wrong with playback speed. The pitch is correct (so the audio frequency is correct), but somehow the songs run too slow. I am not sure if i understand the sample rate correctly. My understanding is:
- in stereo mode exactly as many words as "sample rate" are fetched from memory per seconds. And e.g. in 25khz mode 25000 words are being read and one byte is sent to both outputs at that rate.
- in mono mode only half the words are needed and e.g. in 25khz mode only 12500 words are being read per second.
Still something is fishy ... maybe my hsyncs are too short and the fifo runs out of data ... will have to check that ...
And finally (just out of couriosity): Is video overscan "colliding" with audio? Is audio data transfer really limited to the sync phase or is it exteding into the borders and may thus collide with opened borders?