Revised STOS SNDH Routine, fixed and works

STOS-related stuff in here please

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

EstTeeEfEm
Captain Atari
Captain Atari
Posts: 299
Joined: Mon May 04, 2015 9:02 pm

Revised STOS SNDH Routine, fixed and works

Postby EstTeeEfEm » Sun Jan 10, 2016 4:33 pm

This is a revised SNDH routine

There are a couple of pointers though...
Unless you depack the .SND files found in the archive you will need to depack them, I use the missing link extension to do this however if you comment out the "T=DEPACK" line you can load a .SND that has already been unpacked prior to loading it in.

The main fault in the oriignal was the exclusion of DREG(0) Which holds the song number hence why some tracks would play and others not, i found that any tracks with more than 1 song failed but now its fixed, Yay! :P

Code: Select all

10 rem STOS sndh player - wahoo!
20 rem original by gwEm/swe (yay!) for gfa (boo!)
30 rem haxXx0red by ggn - wahay!
40 rem given to you by sh3-rg - 0day kodwarez! ;)
50 rem Bugfixed & DREG(0)/Depack routine added by Black of Relix Games
60 rem NB: MOST, if not ALL SNDH Files are packed
70 rem   : This source requires THE MISSING LINK EXTENSION
80 rem   : However you can unpack the files prior to loading
90 rem   : and just "REM" the code where noted
100 gosub 170 : rem load files
110 gosub 240 : rem start music
120 repeat
130 M=mouse key
140 until M<>0
150 gosub 300 : rem stop music
160 end
170 rem                                   load files
180 reserve as work 11,314 : rem make space for inline
190 reserve as work 12,70000 : rem make space for the sndh tune
200 bload "stossndh.bin",start(11) : rem load inline
210 bload "seagulls.snd",start(12) : rem load the sndh tune
220 T=depack(start(12)) : rem Unpack music - You can comment this out tho!
230 return
240 rem                                   set up & start music
250 dreg(7)=50 : rem 50 for 50Hz, 60 for 60Hz
260 dreg(0)=1 : rem DReg(0) Holds the song number
270 areg(6)=start(12) : rem points to sndh
280 call start(11) : rem start playing tune
290 return
300 rem                                   stop music
310 call start(11)+4 : rem stop playing tune
320 return


And the files for this ..
STOSSND2.zip


Much thanks to GWem for the original,
GGN for the hackingness
&
SH3-RG for the original STOS source.

And for those following my threads: this was fixed a LONG time ago but i lost the source, this source comes from an old notepad I dug out while working on Frogger ... ALWAYS back stuff up!!
Enjoy you STOSSERS ;)
You do not have the required permissions to view the files attached to this post.

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: Revised STOS SNDH Routine, fixed and works

Postby exxos » Sun Jan 10, 2016 4:42 pm

Cool :) So does that routine work better than the missing link musauto command then ?
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

EstTeeEfEm
Captain Atari
Captain Atari
Posts: 299
Joined: Mon May 04, 2015 9:02 pm

Re: Revised STOS SNDH Routine, fixed and works

Postby EstTeeEfEm » Sun Jan 10, 2016 4:45 pm

It "appears" to play more technical stuff, for instance musauto can linger notes after it stops whereas SNDH.BIN doesnt.. and the SNDH is more resistant to strange music tracks... the seagulls.snd that i added to the ZIP is a good example of this.. digidrums and SID - TAO at his best
If you unpack the music files prior to loading you dont even need TML, the memory footprint of using TML for SNDH is a bit crazy ;)

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: Revised STOS SNDH Routine, fixed and works

Postby exxos » Sun Jan 10, 2016 4:48 pm

EstTeeEfEm wrote:It "appears" to play more technical stuff, for instance musauto can linger notes after it stops whereas SNDH.BIN doesnt.. and the SNDH is more resistant to strange music tracks... the seagulls.snd that i added to the ZIP is a good example of this.. digidrums and SID - TAO at his best
If you unpack the music files prior to loading you dont even need TML, the memory footprint of using TML for SNDH is a bit crazy ;)


Cool :) maybe you can do a quick readme file on this and zip it up so I can include it on my extensions page ?
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

EstTeeEfEm
Captain Atari
Captain Atari
Posts: 299
Joined: Mon May 04, 2015 9:02 pm

Re: Revised STOS SNDH Routine, fixed and works

Postby EstTeeEfEm » Sun Jan 10, 2016 4:51 pm

No problems,

I'll redo the code a bit as well, tidy it up and make it generally more pleasing to read lol..
It might be tomorrow though or sometime in the late eve (UK Time)

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: Revised STOS SNDH Routine, fixed and works

Postby exxos » Sun Jan 10, 2016 4:54 pm

EstTeeEfEm wrote:No problems,

I'll redo the code a bit as well, tidy it up and make it generally more pleasing to read lol..
It might be tomorrow though or sometime in the late eve (UK Time)


No rush :) I'm not even at home on weekends anyway :)
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

EstTeeEfEm
Captain Atari
Captain Atari
Posts: 299
Joined: Mon May 04, 2015 9:02 pm

Re: Revised STOS SNDH Routine, fixed and works

Postby EstTeeEfEm » Mon Jan 11, 2016 10:54 am

Well, glad there isn't a rush lol, I started writing a stand-alone player.. it started to get a little complicated, some of the Tune names: authors, songs and the like are embedded in the .SND music files.. once I get into these I can have a stand-alone player, source and documentation for you..
No point just uploading some source to play it, might as well make something out of it ;)

EstTeeEfEm
Captain Atari
Captain Atari
Posts: 299
Joined: Mon May 04, 2015 9:02 pm

Re: Revised STOS SNDH Routine, fixed and works

Postby EstTeeEfEm » Mon Jan 11, 2016 10:54 am

And it even plays TAO's specialist STE SID music :D

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: Revised STOS SNDH Routine, fixed and works

Postby exxos » Mon Jan 11, 2016 11:06 am

Nice :) Yeah its probably good to do a simple routine which is barebones to play them, then people can copy the code into their own programs. If its documented properly then it will save others in the future having the same confusion :)
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator


Social Media

     

Return to “STOS”

Who is online

Users browsing this forum: No registered users and 2 guests