double buffered dmasound player in stos

STOS-related stuff in here please

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

mlynn1974
Captain Atari
Captain Atari
Posts: 206
Joined: Mon Mar 03, 2008 10:33 pm
Contact:

double buffered dmasound player in stos

Postby mlynn1974 » Mon Feb 12, 2018 1:42 am

I have written a double buffered DMA sound player in STOS.
It uses DMA Sound so it is really only STE compatible, but Steem will play it just fine. It also uses gemdos fopen\fread\fseek\fclose (see my other post).

It is a prototype for such a routine which I might try to write in assembly (with STFM compatibility).
I know it clicks a little bit when the samples swap buffers but it is better than nothing.
It can play samples larger than physical memory e.g. an STE with 512k can play a 1.7Mb sample running off a hard disk or virtual hard disk in Steem.

You can download my prototype demo here (1.38Mb):
http://www.lynn3686.com/download/stos/motd1.zip
This plays the old Match of the Day tune with some player statistics showing. The music is sampled at 12.5kHz, 8-bit, signed using Audicity.
I haven't tested this on a real STE yet. I have just developed it in STOS using Steem 3.2
Still got, still working: Atari 4Mb STe, 520STFM, 2.5Mb STF.
Hardware: Cumana CSA 354, Ultimate Ripper, Blitz Turbo, Synchro Express II (US and UK Versions).

OverlordMRK
Retro freak
Retro freak
Posts: 11
Joined: Thu Aug 31, 2017 10:25 pm

Re: double buffered dmasound player in stos

Postby OverlordMRK » Mon Feb 12, 2018 8:19 am

That sounds really clear for 12.5Khz, nice. When you mean write in assembly, are you meaning to create an actual extension for STOS? STFM compatibility would be good for this in STOS as well as STE. I presume because of processor time and access speed, it would be limited to having just a game title screen and the music playing in the background? But still, that would be pretty neat regardless!

User avatar
thomas3
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 103
Joined: Tue Apr 11, 2017 8:57 pm
Location: the people's republic of south yorkshire, uk.

Re: double buffered dmasound player in stos

Postby thomas3 » Tue Feb 13, 2018 10:26 pm

:cheers: This is really cool! Thanks!

mlynn1974
Captain Atari
Captain Atari
Posts: 206
Joined: Mon Mar 03, 2008 10:33 pm
Contact:

Re: double buffered dmasound player in stos

Postby mlynn1974 » Thu Feb 15, 2018 12:07 am

When you mean write in assembly, are you meaning to create an actual extension for STOS?

No I was thinking of writing the whole routine in assembly. I don't know how to write a full extension from scratch. STOS is fine for a quick prototype.

I think the demo code like a scroller or sprites would have to run on the VBL interrupt to guarantee execution. This isn't possible\practical in STOS. The disk loader would have to run on the main loop because disk i/o in an interrupt would block the main loop. I think this is how the Kinky Boots demo by POV works.

>it would be limited to having just a game title screen and the music playing in the background?
Yes for long tunes MOD format is better, but for sample demos this technique is good.
Still got, still working: Atari 4Mb STe, 520STFM, 2.5Mb STF.
Hardware: Cumana CSA 354, Ultimate Ripper, Blitz Turbo, Synchro Express II (US and UK Versions).

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

Re: double buffered dmasound player in stos

Postby MiggyMog » Sun Feb 18, 2018 12:51 pm

Cool. There are some details on making an extension in the stos gamemaker's manual but there are supposedly details mising. There is an example with the missing link extension on the disk. You can get it in exxos' s site
('< o o o o |''| STM,2xSTFM,2xSTE+HD,C-Lab Falcon MK2+HD,Satandisk,Ultrasatandisk,Ethernat.


Social Media

     

Return to “STOS”

Who is online

Users browsing this forum: No registered users and 2 guests