OMG! ZIRIA! ZIRIA!! ZIRIA!!! IT ACTUALLY HAPPENED!! 34 YEARS LATER!! The epic/legendary Tengai Makyou/Far East of Eden: Ziria JRPG has finally been localized! Supper the Subtitler struck again! Simply unstoppable, NOTHING can prevent him from TOTAL PCECD localization domination!!!! WHACHA GONNA DO BROTHER?!?!
Main Menu

ADPCM question....

Started by OldRover, 06/11/2016, 09:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

OldRover

Been looking for documentation on this but haven't found much. Anyway, what I need to know is how many cycles need to pass between stopping ADPCM playback and starting a new one. They can't be used back-to-back on real hardware (works fine on emulators, naturally), so there is clearly some kind of latency issue I need to take into consideration. I can't test this for real as I don't have real hardware at the moment, so I figured one of y'all might know how much time I need to let pass before telling the ADPCM circuit to play another sample.
Turbo Badass Rank: Janne (6 of 12 clears)
Conquered so far: Sinistron, Violent Soldier, Tatsujin, Super Raiden, Shape Shifter, Rayxanber II

touko

i think the delay is short, may be less than 80 cycles .

TurboXray

According to the dev manual; "AD_STOP: Stop ADPCM playback. Since playback speed is about 16khz, a delay will occur before stopping. Check stop status through AD_STAT."

 Is this what you're doing? Polling AD_STAT call until clear to start another sample?

OldRover

Quote from: TurboXray on 06/11/2016, 11:05 AMAccording to the dev manual; "AD_STOP: Stop ADPCM playback. Since playback speed is about 16khz, a delay will occur before stopping. Check stop status through AD_STAT."

 Is this what you're doing? Polling AD_STAT call until clear to start another sample?
Actually, I was originally doing it the other way around, since I had no access to any kind of proper documentation. So basically I should use AD_STOP, and then poll AD_STAT until it returns a clear status. :D
Turbo Badass Rank: Janne (6 of 12 clears)
Conquered so far: Sinistron, Violent Soldier, Tatsujin, Super Raiden, Shape Shifter, Rayxanber II

TurboXray

That's what I've done. But.. might be a good idea to do a time out part of the loop, just in case for some reason response time/state is stuck(?). And try it next frame, if it falted out on the initial time out? Maybe I'm just paranoid, but I've seen CD games stall before.. I always wondered if it was cause of case scenarios the programmers didn't account for. Better to have a skipped or delayed sample, than a game lock.

OldMan

or call AD_STOP,  and check AD_STAT before you play the new sample.
(ie, if( AD_STAT() == 0 ) { play sample }


FWIW, AD_STAT() check one of the adpcm registers, and returns it in X, iirc.

touko

#6
Like oldman said, why you don't use ad_stat ??

I didn't understand your question the first time i read,i thought you want to know how many cycles takes to stop an old adpcm sample and start a new one,and not the delay between the two.

ad_stat return 1, when a sample is running,so you only wait while ad_stat = 1 before starting a new one,because in cycles you can not answer to that question , because it depends on where you are in your sample,and sample's lenght .