Skip to main content
Topic: foo_input_gsf (Read 8160 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

foo_input_gsf

I spent about 8 hours modifying the viogsf source code to use a self-contained state structure, so it can be fully reentrant without requiring DLL loading hacks. The result is a foobar2000 component based on my existing PSF player and psflib code base, containing the emulator core in-process.

Component repository page

Component Github page - change log

viogsf library Github page - change log


Note that there are still some minor issues. Due to the psflib loader using repeated decompression attempts until it finds the correct buffer size, it takes a brief bit longer to unpack some PSF libraries, I think. That, or it's the ARM emulator speed.

There's also the issue of sound glitching on the Mother 3 GSF rip. I can't do anything about that. Songs from the rip, when extracted from the GSFLIB/MINIGSF set into stand-alone GBA ROM images, play back with glitches in the latest VBA-M emulator. The actual game's jukebox does not glitch like that. I am calling it as improper initialization in the rip code, ie. overzealous ripping or bypassing of initialization routines. Or possibly overzealous trimming. Would anyone care to test this GBA ROM image assembled from a track from the rip on actual hardware? It would add validity to my claims.

foo_input_gsf

Reply #1
GPLed code in foobar, oh noez! D:
then again, VBA-M people don't seem like asshats.

foo_input_gsf

Reply #2
But wait, we're both among the VBA-M people.


foo_input_gsf

Reply #4
I know. And the author of that component "fixed" it by toying with the optimization settings. That can't be a real fix.

The same bug occurs with a complete emulator. And it doesn't occur with the original game running in the same emulator. The rip is missing something. Likely some piece of initialization code which was deemed as unnecessary for music playback.

foo_input_gsf

Reply #5
I can't seem to find any GCF's at all that work with this plugin, the plugin reports all that I have tried with errors similar to:

Unable to open item for playback (Invalid GSF):
"C:\somefile\33 Victory (VS Gym Leader).minigsf"

Great work my friend, I like the idea of make foobar the one-stop everything player ^^
-Statrill

foo_input_gsf

Reply #6
Works for me. You'll need to link to the set you're trying to play. I just downloaded a fresh set from Zophar's Domain and it works just fine. All 86 .minigsf tracks decode correctly.

foo_input_gsf

Reply #7
Fixed Mother 3. Seems the new timing needs to allow the PCM FIFO buffers to underrun a bit more than halfway before we start plugging the gaps with silence. Or maybe the real way to do it is to LPC forward from the last samples written? Dunno. It works now.

foo_input_gsf

Reply #8
in version 2.0.4 and 2.0.5, play <Metroid Fusion>, I can only hear music less than half a second at start in each tracks, then just "kakakakkakakaka..." until track reach it end.
<Metroid Zero Mission> decode correctly.

foo_input_gsf

Reply #9
Crud, a stray Git update I never pulled into my Windows VM. Fixed.


foo_input_gsf

Reply #11
Alright, now here.  I tried playing tracks from a few games and the PSGs noise channel is really quiet, compared to Highly Advanced in winamp. (Really audible in Pokemon Firered battle themes, as they use noise for hihats and such).

foo_input_gsf

Reply #12
Compare to Castlevania: Harmony of Dissonance, you'll find it's already quite loud. Can you compare to actual hardware?

foo_input_gsf

Reply #13
Yep, and on real hardware its louder than with foobar (winamp with HA is almost spot on), I cant think of a reason why its behaving differently on winamp, but it looks like its only affecting Pokemon games (my ruby and emerald rips have the same issue).

foo_input_gsf

Reply #14
You could try reporting the issue to VBA-M on SourceForge, as they use the same sound code now. Not there's likely to ever be a fix, they don't do much of anything any more.

foo_input_gsf

Reply #15
Yes, I do my own thing these days, which are completely unrelated to emulator coding.
I don't work on VBA-M anymore.

Re: foo_input_gsf

Reply #16
Sorry for posting on a topic that has been dead for 4 years.

I've been having a glitch in games that use the MP2K/M4A/Sappy sound engine.
In some soundtracks, for a few instants the sound changes in a strange way.

I attached a WAV file reproducing the problem. At the last moment of the sample, the sound changes as a kind of surround mode.

For reference, it's Ice Montain Act 1 from Sonic Advance 1.

In other games like Pokemon or even Drill Dozer the same thing happens with some musics.


I're downloading GSF rips from http://gsf.joshw.info/

I'm sure that only the games that use the MP2K sound engine have this problem, because I have others that use another sound engine like the Super Mario Advance series, and do not habing this problem.

I hope my post was understandable...

Thanks.
I like sound sources, sound generators, sound chips.

Note that English is not my native language. Thanks.

Re: foo_input_gsf

Reply #17
Please use psflib and gsf2rom to produce a ROM of the test song, and test in the latest version of mGBA to verify it isn't a plugin issue. If possible, also test on actual hardware.

There have been reported issues of improperly optimized rips, and the gsfopt tool has been updated to address this issue, but this doesn't fix existing rips.

Re: foo_input_gsf

Reply #18
I do not know how to use C source programs...
Is there any other alternative to know if it is the plugin that is failing? Because I have never used C programs.

I like sound sources, sound generators, sound chips.

Note that English is not my native language. Thanks.


Re: foo_input_gsf

Reply #20
The rips are MiniGSF, not a single GSF. The program only accepts GSF files.
I like sound sources, sound generators, sound chips.

Note that English is not my native language. Thanks.

Re: foo_input_gsf

Reply #21
I managed to convert the song into a GSF file, and when I load it on mGBA, mGBA crashes.
I like sound sources, sound generators, sound chips.

Note that English is not my native language. Thanks.

Re: foo_input_gsf

Reply #22
OK, an update. I solved mGBA crash, and when I open the GSF There is no sound glitch.
I like sound sources, sound generators, sound chips.

Note that English is not my native language. Thanks.

Re: foo_input_gsf

Reply #23
Um, you don't need to worry about .gsf or .minigsf. The utility resolves .minigsf files against any .gsflibs that it requires, as long as they're all unpacked to the correct directory structure for an audio player to find the files.

Re: foo_input_gsf

Reply #24
Yes I realized that. I have already converted the .minigsf file, and tested it using mGBA. No sound bugs.
I like sound sources, sound generators, sound chips.

Note that English is not my native language. Thanks.

 
SimplePortal 1.0.0 RC1 © 2008-2019