STE sample dma. solved

Troubles with your machine? Just want to speak about the latest improvements? This is the place!

Moderators: Mug UK, Zorro 2, Greenious, spiny, Moderator Team

FedePede04
Atari Super Hero
Atari Super Hero
Posts: 951
Joined: Fri Feb 04, 2011 12:14 am
Location: Denmark
Contact:

STE sample dma. solved

Postby FedePede04 » Sat Oct 14, 2017 1:08 pm

Hi
is there a way to get a callback function on the STE, telling when the STE have finish playing a sample.
when i look at the data-sheet, i can't see any callback functions.
how do you guys know when it have finish playing a sample / buffer, and when to change the sample/buffer?
Last edited by FedePede04 on Sat Oct 14, 2017 10:40 pm, edited 1 time in total.
Atari will rule the world, long after man has disappeared

sometime my English is a little weird, Google translate is my best friend :)

User avatar
MiggyMog
Atari Super Hero
Atari Super Hero
Posts: 801
Joined: Sun Oct 30, 2005 4:43 pm
Location: Scotland

Re: STE sample dma.

Postby MiggyMog » Sat Oct 14, 2017 2:45 pm

Paranoid STE FAQ on the WIKI has details . You can see when play cursor has reached end
('< o o o o |''| STM,2xSTFM,2xSTE+HD,C-Lab Falcon MK2+HD,Satandisk,Ultrasatandisk,Ethernat.

FedePede04
Atari Super Hero
Atari Super Hero
Posts: 951
Joined: Fri Feb 04, 2011 12:14 am
Location: Denmark
Contact:

Re: STE sample dma.

Postby FedePede04 » Sat Oct 14, 2017 3:02 pm

many thanks :cheers:
i will look into that immediately.
Atari will rule the world, long after man has disappeared

sometime my English is a little weird, Google translate is my best friend :)

arf
Atari maniac
Atari maniac
Posts: 97
Joined: Thu May 17, 2012 9:56 pm

Re: STE sample dma.

Postby arf » Sat Oct 14, 2017 8:11 pm

FedePede04 wrote:Hi
is there a way to get a callback function on the STE, telling when the STE have finish playing a sample.
when i look at the data-sheet, i can't see any callback functions.
how do you guys know when it have finish playing a sample / buffer, and when to change the sample/buffer?


Unfortunately, you need to poll whether the end is reached. No callback :-/ You may have a look at the source of GEMJing, where STE playback is implemented: http://www.donzé.ch/atari/software/gemjing/ - forgive the bad programming style, I didn’t know it better back then.

FedePede04
Atari Super Hero
Atari Super Hero
Posts: 951
Joined: Fri Feb 04, 2011 12:14 am
Location: Denmark
Contact:

Re: STE sample dma.

Postby FedePede04 » Sat Oct 14, 2017 8:32 pm

thx, i will have a look.
i have really much code, that nobody should look in, and it is not even old :cheers:
Atari will rule the world, long after man has disappeared

sometime my English is a little weird, Google translate is my best friend :)

FedePede04
Atari Super Hero
Atari Super Hero
Posts: 951
Joined: Fri Feb 04, 2011 12:14 am
Location: Denmark
Contact:

Re: STE sample dma.

Postby FedePede04 » Sat Oct 14, 2017 8:46 pm

btw it was what i was afraid off, that you needed to poll, and it is special some crap when is a sound that is looping :'(
also my loop is 400 byte, so in worse cases i can get to wait for 1.5 frame. well i have to figure out what to do.
oh well maybe people won't notice bad loop points in the bike engine sound :lol:
Atari will rule the world, long after man has disappeared

sometime my English is a little weird, Google translate is my best friend :)

User avatar
Cyprian
Atari God
Atari God
Posts: 1403
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: STE sample dma.

Postby Cyprian » Sat Oct 14, 2017 8:57 pm

Hey FedePede04,
what about using dedicated MFP interrupt (Mono or Timer A)?

http://www.atari-forum.com/viewtopic.php?t=29782
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
MiggyMog
Atari Super Hero
Atari Super Hero
Posts: 801
Joined: Sun Oct 30, 2005 4:43 pm
Location: Scotland

Re: STE sample dma.

Postby MiggyMog » Sat Oct 14, 2017 9:06 pm

I forgot that http://atari-ste.anvil-soft.com/html/devdocu4.htm has a copy of the STE FAQ . The forum wiki seems to be inaccesable at the moment.
('< o o o o |''| STM,2xSTFM,2xSTE+HD,C-Lab Falcon MK2+HD,Satandisk,Ultrasatandisk,Ethernat.

FedePede04
Atari Super Hero
Atari Super Hero
Posts: 951
Joined: Fri Feb 04, 2011 12:14 am
Location: Denmark
Contact:

Re: STE sample dma.

Postby FedePede04 » Sat Oct 14, 2017 9:10 pm

thanks that is a good idea, i shall use the timer a for my music player, but that runs 300hz (or 6 time in a 50hz loop), so i could maybe wait on the last one.
also i have to generate the freq on the fly for the bike engine.
i will just have to play around and try out to see if i can do it, worst instant then i just have to skip the bike engine sound
Atari will rule the world, long after man has disappeared

sometime my English is a little weird, Google translate is my best friend :)

FedePede04
Atari Super Hero
Atari Super Hero
Posts: 951
Joined: Fri Feb 04, 2011 12:14 am
Location: Denmark
Contact:

Re: STE sample dma.

Postby FedePede04 » Sat Oct 14, 2017 9:12 pm

MiggyMog wrote:I forgot that http://atari-ste.anvil-soft.com/html/devdocu4.htm has a copy of the STE FAQ . The forum wiki seems to be inaccesable at the moment.


many thanks, i actual found that page a little time ago, and it was that website there help me play samples on the STE.
i had never try it before. :D
Atari will rule the world, long after man has disappeared

sometime my English is a little weird, Google translate is my best friend :)

FedePede04
Atari Super Hero
Atari Super Hero
Posts: 951
Joined: Fri Feb 04, 2011 12:14 am
Location: Denmark
Contact:

Re: STE sample dma. solved

Postby FedePede04 » Sat Oct 14, 2017 10:42 pm

again many thanks all for the help :cheers:
now there will be sample sound on the motor bike
Atari will rule the world, long after man has disappeared

sometime my English is a little weird, Google translate is my best friend :)


Social Media

     

Return to “Hardware”

Who is online

Users browsing this forum: No registered users and 2 guests