Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Highly Theoretical (Read 12536 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Highly Theoretical

I finally got around to porting Neill Corlett's SSF and DSF decoder to foobar2000, based on my existing PSF loader from foo_psf.

For those who don't already know, SSF is a sound format for Sega Saturn music, while DSF is for Dreamcast music.

Enjoy.

Highly Theoretical

Reply #1
Thanks! Now I can listen to some Dreamcast music in foobar!
Your work is much appreciated.

Highly Theoretical

Reply #2
I finally got around to porting Neill Corlett's SSF and DSF decoder to foobar2000, based on my existing PSF loader from foo_psf.

For those who don't already know, SSF is a sound format for Sega Saturn music, while DSF is for Dreamcast music.

Enjoy.


Thanks Very Much and...
Will you port "Highly Advanced GSF Player" to fb2k in someday ? 
I can't find any GSF Decoder in fb2k

Highly Theoretical

Reply #3
Thanks Very Much and...
Will you port "Highly Advanced GSF Player" to fb2k in someday ? 
I can't find any GSF Decoder in fb2k

hope that someone port ''Highly Advanced GSF Player'' to fb2k, can't wait to play all of my GSF/MiniGSF Files...

Highly Theoretical

Reply #4
hope that someone port ''Highly Advanced GSF Player'' to fb2k, can't wait to play all of my GSF/MiniGSF Files...


and snsf/minisnsf too!!!

And huge thanks for this plugin, kode54!

There are some ssf file that can't be played for some unknown reason tho, for example shining force soundtrack, located here:

Shining Force 3


Highly Theoretical

Reply #5
hope that someone port ''Highly Advanced GSF Player'' to fb2k, can't wait to play all of my GSF/MiniGSF Files...


and snsf/minisnsf too!!!

And huge thanks for this plugin, kode54!

There are some ssf file that can't be played for some unknown reason tho, for example shining force soundtrack, located here:

Shining Force 3

where to get snsf/minisnsf ? I'v never seen it before. I just listen SPC

Highly Theoretical

Reply #6
There are some ssf file that can't be played for some unknown reason tho, for example shining force soundtrack, located here:

Shining Force 3

Idiots renamed all of the SSFLIB files to replace the underscores with spaces. That breaks all the _LIB* import tags in all the MINISSF files. You'll have to rename all the SSFLIB files to replace spaces with underscores.

hope that someone port ''Highly Advanced GSF Player'' to fb2k, can't wait to play all of my GSF/MiniGSF Files...


and snsf/minisnsf too!!!

Neither of which have very well constructed player libraries. They will require considerably more work to port. Maybe I'll get to one of those some day.

For instance, SNSF requires a more complete SNES emulation than SPC playback. I'm sure there's a nicer emulator than Snes9X that can be gutted for that purpose. Perhaps something already in C++ with full multi-instance safety. Not terribly important for normal playback, very handy for when you are converting files or scanning for ReplayGain levels at the same time.


Highly Theoretical

Reply #8
where to get snsf/minisnsf ? I'v never seen it before. I just listen SPC


ftp.modland.com, there are many interesting and obscure formats.


To hear the difference between snsf/spc try to listen to the Tales of Phantasia title song 

Quote from: kode54 link=msg=0 date=
Idiots renamed all of the SSFLIB files to replace the underscores with spaces. That breaks all the _LIB* import tags in all the MINISSF files. You'll have to rename all the SSFLIB files to replace spaces with underscores.


LOL, thanks!

Quote from: kode54 link=msg=0 date=
I'm sure there's a nicer emulator than Snes9X that can be gutted for that purpose.


Sure, ZSnes is opensource, and it I like its sound way more than Snes9x. I've seen some SPC player that used different cores for playback, and judging by what I've heard, ZSnes is the best. There is SNESAPU (I guess I spelled it right), it has good sound to, not sure if it's opensource and feature-complete tho.


Highly Theoretical

Reply #9
There are some ssf file that can't be played for some unknown reason tho, for example shining force soundtrack, located here:

Shining Force 3

Idiots renamed all of the SSFLIB files to replace the underscores with spaces. That breaks all the _LIB* import tags in all the MINISSF files. You'll have to rename all the SSFLIB files to replace spaces with underscores.


Message from Coma, MODLAND admin (and idiot?):

I may very well be one in this case, even if I don't remember it. I usually never change the names of the lib files, because of the hardcoded file names. Well, I've changed the names now. I also found some other libs with the same problem, so I'll take care of those too. Send kode54 my thanks if you want. He may call me whatever he wants if he at the same time points out ways we can fix and improve the collection.

Highly Theoretical

Reply #10
Sure, ZSnes is opensource, and it I like its sound way more than Snes9x. I've seen some SPC player that used different cores for playback, and judging by what I've heard, ZSnes is the best. There is SNESAPU (I guess I spelled it right), it has good sound to, not sure if it's opensource and feature-complete tho.

Actually, I was thinking more along the lines of bsnes. That may well mold nicely into a player. Also, removing the PPU renderer would do well to speed it up, since that's probably the major bottleneck. And if I recall, SNSF doesn't have use for the PPU.

Also, thanks, deus-ex, that reminds me I should probably refrain from calling people idiots.

Highly Theoretical

Reply #11
I happened to bump into another problematic SSF soundtrack:

Scorcher

While it plays without problems on XP 32bit, on Vista x64 it just skips all the tracks and console shows only "opening file c:\blablabla......" No errors or something like that.

Oh, and while on other SSFs playlist shows some bitrate values, on these Scorcher tracks it shows "?" instead, but the tags are being read properly.

I guess you can't make workarounds for ALL poorly ripped soundtracks, but maybe (I hope) this is not the case? 


Highly Theoretical

Reply #12
(Scorcher SSF rip doesn't work, etc.)

The problem is that the data blocks in these SSF files are larger than the Saturn's sound memory, so they wrap around on upload and overwrite parts of themselves. I've added a security check to prevent that from happening.

Also, my xSF components do not report bitrate. Are you sure you don't have foo_input_aossf installed?

Highly Theoretical

Reply #13
Also, my xSF components do not report bitrate. Are you sure you don't have foo_input_aossf installed?

Now that you said it I'm not sure, but I deleted every foo_input_aoXXX, now I'm curious WTF is happening with bitrates. Will post my discoveries later 


Highly Theoretical

Reply #14
Now I'm sure I don't have foo_input_aossf, and here's the picture showing playlist with bitrates, and my mad skillz also 



What's strange, other SSFs are playing fine.
Quote
I've added a security check to prevent that from happening

[EDIT] So should I get a new input_ssf version already? :-)



Highly Theoretical

Reply #17
It's nice to have working ssf/dsf plugins, the old aossf/aodsf ones were missing DSP for the dreamcast tracks, for some reason.

Ironically, it seems that foo_input_ht is missing dsp for the *saturn* tracks, while playing DC ones fine... it plays like that in every track.
Also, the Alisia Dragoon tracks sound like if FM sound was completely unemulated.
ftp://ftp.modland.com/pub/modules/Saturn%...isia%20Dragoon/

(edit: check the very first track)

Also, tag writing is not implemented yet?

The problem is that the data blocks in these SSF files are larger than the Saturn's sound memory, so they wrap around on upload and overwrite parts of themselves. I've added a security check to prevent that from happening.

I'm not sure what exactly is the problem - all the files fit well in the 512k memory (I ripped those ssfs). You may be thinking of sequence/tone data being bigger than what is mapped into memory, but this shouldn't be a problem since the sound driver only interprets what is mapped. So I could add 500k sound data into ram, if only 50k is mapped, that 50k will be read.

The seq/tone may very well be larger than the mapped data, though. But it's like that on many other rips, even on some that were directly ripped from the saturn ram.

Highly Theoretical

Reply #18
It's nice to have working ssf/dsf plugins, the old aossf/aodsf ones were missing DSP for the dreamcast tracks, for some reason.

Yes, I recall that aodsf is not complete yet.

Ironically, it seems that foo_input_ht is missing dsp for the *saturn* tracks, while playing DC ones fine... it plays like that in every track.

Yeah, kingshriek's SSF/DSF page does say there is something wrong with the DSP with Saturn tracks, that it never reaches the code to upload the DSP code. I'm not sure what would cause this, or how to debug it, though.
Also, the Alisia Dragoon tracks sound like if FM sound was completely unemulated.

ftp://ftp.modland.com/pub/modules/Saturn%...isia%20Dragoon/

(edit: check the very first track)

Yup, looks like it handles modulation registers, but doesn't actually emulate modulation. I've looked at the code and I'm going to have to say no for now. It's written such that it emulates a whole block of samples at a time for each channel, rather than a single sample at a time per channel. This kind of mucks up using a ring buffer for the FM emulation.

Also, tag writing is not implemented yet?
Definitely implemented, the same as with foo_psf. Perhaps you could tell me what you're trying to do so I can replicate the problem? I suppose I should check it myself anyway, I haven't retagged any files recently.

The problem is that the data blocks in these SSF files are larger than the Saturn's sound memory, so they wrap around on upload and overwrite parts of themselves. I've added a security check to prevent that from happening.

I'm not sure what exactly is the problem - all the files fit well in the 512k memory (I ripped those ssfs). You may be thinking of sequence/tone data being bigger than what is mapped into memory, but this shouldn't be a problem since the sound driver only interprets what is mapped. So I could add 500k sound data into ram, if only 50k is mapped, that 50k will be read.

The seq/tone may very well be larger than the mapped data, though. But it's like that on many other rips, even on some that were directly ripped from the saturn ram.

Scorcher, level1.ssf, run through psf2exe: 593,924 bytes. That would be 593,920 bytes uploaded to memory. The Saturn emulator upload code was wrapping at 524,288 and overwriting the beginning of the memory.

Since there are a number of problems with the SSF support, I've disabled it until further notice. Use aossf instead.

Highly Theoretical

Reply #19
Definitely implemented, the same as with foo_psf. Perhaps you could tell me what you're trying to do so I can replicate the problem? I suppose I should check it myself anyway, I haven't retagged any files recently.

I just get a corrupted/unsupported file error upon tagging, on any tag change I want to do (even just adding an "a" into an existing tag, or removing a single letter). Is there something special that is needed for tagging (an external file)?

Quote
Scorcher, level1.ssf, run through psf2exe: 593,924 bytes. That would be 593,920 bytes uploaded to memory. The Saturn emulator upload code was wrapping at 524,288 and overwriting the beginning of the memory.

I see, I've tried reripping and got similar results... It looks like an error in ssfmake, since absolutely nothing indicates a size that big (that and everything above the 512k mark is zeroed out, and nothing is mapped to that region either).


Quote
Yeah, kingshriek's SSF/DSF page does say there is something wrong with the DSP with Saturn tracks, that it never reaches the code to upload the DSP code. I'm not sure what would cause this, or how to debug it, though.

That's specific to Neil Corletts early ssf player, which dates back to something like 2003. Or are you using that code instead of the MAME one?
The aossf plugins use audio overload, which is based on mame iirc, and it is one of the best scsp emulators out there (far from perfect though, especially concerning FM).

Highly Theoretical

Reply #20
Definitely implemented, the same as with foo_psf. Perhaps you could tell me what you're trying to do so I can replicate the problem? I suppose I should check it myself anyway, I haven't retagged any files recently.

I just get a corrupted/unsupported file error upon tagging, on any tag change I want to do (even just adding an "a" into an existing tag, or removing a single letter). Is there something special that is needed for tagging (an external file)?

Yeah, I just noticed the problem and fixed it. The tag writer checks the file's header when writing, and it was still checking the version number for PSF or PSF2. foo_input_qsf had the same problem. Both are now fixed.

Quote
Yeah, kingshriek's SSF/DSF page does say there is something wrong with the DSP with Saturn tracks, that it never reaches the code to upload the DSP code. I'm not sure what would cause this, or how to debug it, though.

That's specific to Neil Corletts early ssf player, which dates back to something like 2003. Or are you using that code instead of the MAME one?
The aossf plugins use audio overload, which is based on mame iirc, and it is one of the best scsp emulators out there (far from perfect though, especially concerning FM).

Yeah, this is Neill Corlett's SSF/DSF player, as referred to by the name "Highly Theoretical." I'm not sure if the player core has been updated much since then, either. I could try using the MAME SCSP core for SSF playback, but I'm not sure if that will fix the DSP problem, unless it's only a problem with the SCSP emulator.

Highly Theoretical

Reply #21
I'm positive it would fix the DSP problem, since the mame scsp core is a lot more advanced. Plus, the mame-based aossf input plugin has no problems with DSP (that I know of). Other than that, there is the Yabause scsp core, but it's either a lot less advanced, or it already got the mame code implemented in it.

I'd also suggest moving the DSF player to the mame core, while you are at it...

Highly Theoretical

Reply #22
I'm positive it would fix the DSP problem, since the mame scsp core is a lot more advanced. Plus, the mame-based aossf input plugin has no problems with DSP (that I know of). Other than that, there is the Yabause scsp core, but it's either a lot less advanced, or it already got the mame code implemented in it.

Easier said than done. For instance, the Saturn sound player code and SCSP/AICA emulator are written for interrupt polling (how many samples/cycles until next interrupt, which register writes interrupt execution, etc.) rather than callbacks. May as well just rip out the SSF support and use aossf, since that already uses the MAME core.

I'd also suggest moving the DSF player to the mame core, while you are at it...

aodsf uses that, and doesn't sound so hot. Are you sure it's in a finished state?

There doesn't seem to be anything wrong with Highly Theoretical's DSF playback.

Highly Theoretical

Reply #23
I only checked Ikaruga, and it's mostly good except for a few instruments not playing at the correct volume. I think it's the most noticable on the chapter 03 ("Faith") music (track 06 if you rip it from the game yourself).

edit: but, audio overload has that problem too, strange. I think it may have been ripped badly. (on some saturn tunes, if you set the wrong volume in the sound driver, the track went batshit crazy - may be something similar here as well)