Skip to content

VGMPlay / in_vgm

Last update: 2023-12-31 (v0.51.1)

Technical discussion about the VGM format, and all the software you need to handle VGM files.

Moderator: Staff

Post by ZekeSulastin »

Hi! On the subject of "Things I Probably Should Have Asked About First But Got Over-Excited ..."

Earlier today, I made an Arch Linux AUR package for VGMPlay. In it, however, I made some changes not included from the provided source:
  • Converted/tweaked VGMPlay.txt into a manpage vgmplay.1
  • Replaced zlib/zlib.h with just zlib.h (probably a distro specific thing ...)
  • Added a launcher script that:
    1. Provides output for --help/-h/-?, --version, and no options/arguments at all
    2. Works around requiring VGMPlay.ini in the current working directory
    3. Sets the title to "VGMPlay" if $TERM=xterm*|rxvt*
    4. Launches VGMPlay with padsp if pulseaudio is running (personal bias >.>)
Also in the PKGBUILD, I set the version as today's date since I got somewhat lost trying to find the release date (technically incorrect, but it's too late to set it back to whenever the last release was without bumping epoch ._.) and set the license as GPL due to the license of included emulator cores.

Is there anything I can do with this thing to better reflect your will of the package, including giving one of you guys maintainership? I know I need to work out a .desktop file of some sort for drag-onto-icon playback functionality, at least ...
Last edited by ZekeSulastin on 2012-11-11, 6:46:34, edited 1 time in total.
  • User avatar
  • tails_ Offline
  • Posts: 170
  • Joined: 2012-03-18, 16:59:23
  • Location: Tomsk, Russia
  • Contact:

Post by tails_ »

Cool! May I now ask you for sources so I can compile this on my Debian-based phone? :P

P.S. How hard will it be to switch to libao instead of hardcoding support for PA or OSS?

P.P.S
I just noticed that you described GPL license in PKGBUILD, but this is wrong.
VGMPlay and some of chip emulators included with it may be GPL'ed but most of chip emulators are taken from MAME (with minor optimizations) which has it's own license.

I don't know Arch Linux policy but when somebody ported YM2612 emulator to Rockbox (Open Source player firmware released under GPL) it was rejected due to license issues.
Last edited by tails_ on 2012-11-11, 8:40:44, edited 1 time in total.
  • User avatar
  • RichterEX2 Offline
  • Posts: 191
  • Joined: 2012-03-30, 9:28:37
  • Location: Georgia, USA

Post by RichterEX2 »

Does this mean we're that much closer to something that'll work on Android OS? Because that would be rather neat. :D

Post by ZekeSulastin »

tails_ wrote:Cool! May I now ask you for sources so I can compile this on my Debian-based phone? :P

P.S. How hard will it be to switch to libao instead of hardcoding support for PA or OSS?
Err, I got the source (and thus the link in the PKGBUILD) from the OP of this very thread :D {edit: unless you meant source for the script etc. - you can get that from the tarball on the AUR page or from my aurpkgs github repo} It shouldn't be too hard to build on other distros, as the required dependencies are minimal:

Code: Select all

$ ldd ./VGMPlay
	linux-vdso.so.1 (0x00007fff00bff000)
	libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f8b82ebb000)
	libm.so.6 => /usr/lib/libm.so.6 (0x00007f8b82bc1000)
	librt.so.1 => /usr/lib/librt.so.1 (0x00007f8b829b9000)
	libz.so.1 => /usr/lib/libz.so.1 (0x00007f8b827a3000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007f8b823fc000)
	/lib/ld-linux-x86-64.so.2 (0x00007f8b830d7000)
I can't really help with libao as I'm no C programmer; I just did what I could with bash to fix possible issues in a packaged version (hence adding the config workaround and --help output and such). As far as audio, the program itself only outputs to OSS; ALSA has kernel modules that emulate OSS (hence me not mentioning them in the launcher), whereas pulse has the padsp script that is used if needed. Doing it all in a bash wrapper is indeed not ideal, but I'd personally rather show something that works rather than pleading to Valley Bell while showing no work :)
tails_ wrote:I just noticed that you described GPL license in PKGBUILD ...
As mentioned, it was a best-guess sort of thing - since I found nothing in VGMPlay itself I looked at the licenses of a bunch of the emulator cores mentioned in the readme. The least permissive of what I saw was Gens-GS's core: Gens-GS is under the GPL, which (as far as I understand) propagates to the standard VGMPlay build itself as long as that core is included. The other stuff I looked at was GPL-compatible so I went with it, but I can go through and add each individual license later ...

There's no overarching free/not-free restrictions in Arch as long as a work can be redistributed in repo form (especially in the AUR, which includes PKGBUILDs for things that specifically cannot be redistributed - they instead rely on you providing a copy of the data in question to construct the package. My own fs2-open_data package is an example of such a construction), and I didn't see anything blocking any redistribution. If I missed something or completely misinterpreted the licensing, oops and mea culpa ._.
RichterEX2 wrote:Does this mean we're that much closer to something that'll work on Android OS? Because that would be rather neat.
I have no idea - there are a few "VGM" players on the Android market, but none that support everything this does. Kinda disappointing, really ...
Last edited by ZekeSulastin on 2012-11-11, 13:57:34, edited 4 times in total.

Post by JFD62780 »

ZekeSulastin wrote:...There are a few "VGM" players on the Android market, but none that support everything this does. Kinda disappointing, really ...
Next objective: Get the programmer of DroidSound to update the VGM portion to the current specs. >;)
Until next post...
  • User avatar
  • tails_ Offline
  • Posts: 170
  • Joined: 2012-03-18, 16:59:23
  • Location: Tomsk, Russia
  • Contact:

Post by tails_ »

ZekeSulastin

My bad, never knew about padsp tool. Sadly it doesn't works on N900

Post by ZekeSulastin »

What audio system are you using on the N900 (guessing that's your Debian phone)? If you're using alsa, you need to a) have the kernel modules snd_seq_oss, snd_pcm_oss, and snd_mixer_oss loaded or b) use the 'aoss' script provided by alsa-oss.

TBH, I didn't realize alsa had such a script until I went looking for a possible answer to your issue; the next update will include a bit that checks if aoss exists and tries to use it if available (as there's really no other reason to have it) :)
Last edited by ZekeSulastin on 2012-11-11, 16:20:32, edited 1 time in total.
  • User avatar
  • ValleyBell Offline
  • Posts: 4767
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

It's great to see people interested in making VGMPlay work better under Linux.

It's really nice to see a manpage for VGMPlay, btw. Since don't use Linux very often, I never thought of even making one.

About that zlib/zlib.h vs. zlib.h - that's something I should fix indeed.

I'll see if I can add libao support sometime.

Sorry about the lack of license files. IIRC MAME's license is the most restrictive one of all of them. (All other emulators use GPL or LGPL.)


Anyway, ZekeSulastin keep up the work and feel free to ask me, if you want to know something.

Post by ZekeSulastin »

Thanks for your kindness and for writing/maintaining this system. Having this running is especially nice on Linux, where your typical options for vgm playback involve audacious, vlc, or similar ._.

for tails_ and co., I did tweak the wrapper script a bit - it now checks for alsa-oss and uses it if available. In my quick test it worked fine, but I didn't do much in the way of testing past "yep PA is dead and yep I hear things w00t". Remember to change the path to VGMPlay in said wrapper if you don't have it at /usr/bin/VGMPlay.

Valley Bell, You've pretty much covered the only requests I have; as it stands, things work. The main informational request I have is to make a post whenever you push a vgmplay update so I can go update the version and md5sum in the PKGBUILD :p

Aside from that, my next personal target regarding this is to polish the wrapper and manpage to the point where I can feel confident asking you to include them (and a makefile with an install target) in the actual VGMPlay_src.rar to make cross-distro packaging and use much easier; also that .desktop file I mentioned. (Well, and learn C well enough to be able to make meaningful contributions that don't start with a shebang, but...)
  • User avatar
  • neologix Offline
  • Posts: 211
  • Joined: 2012-04-22, 4:03:45
  • Location: New York, NY, USA

Post by neologix »

Re Android players, DeaDBeeF Player (Google Play link) is another good one that needs to have its VGM capabilities updated to reflect 1.61 spec. Since it seems to be tied to GameMusicEmu, tho, we might need to tell Blargg to update GME first, THEN GME-based players can update their versions of GME.
Last edited by neologix on 2012-11-12, 20:27:18, edited 2 times in total.
  • User avatar
  • RichterEX2 Offline
  • Posts: 191
  • Joined: 2012-03-30, 9:28:37
  • Location: Georgia, USA

Post by RichterEX2 »

Actually, Kode54 seems to be making his own updates to Game Music Emu as far as adding chips and such. Check his sources.

https://github.com/kode54/Game_Music_Emu/commits/master
  • User avatar
  • neologix Offline
  • Posts: 211
  • Joined: 2012-04-22, 4:03:45
  • Location: New York, NY, USA

Post by neologix »

Oh, ok, I was wondering how GME was getting updated since Blargg's site lists his last version as being from years ago.

Post by ZekeSulastin »

More spam \o/

tl;dr: worked on script moar, need testers https://github.com/zekesulastin/aurpkgs ... ay/vgmplay

I've been poking at that wrapper a bit - while its main intent is still to be in the user's $PATH as part of a vgmplay package, it should be much more widly applicable now. It now supports binaries in either $PWD, $PATH, or via -b/--binary argument; configs in $PWD, XDG basedir spec, or via -c/--config argument; the ability to force padsp, aoss, or plain oss audio with -p/--padsp -a/--aoss and -o/--oss respectively; specification of a pulseaudio server via -s/--paserver or the globally-respected env var $PULSE_SERVER; -h/--help output; and of course autodetection of which oss wrapper to use if any. Oh, and it SHOULD be portable now too instead of relying on bash - in my tests, it worked with bash, dash (I hate you Debian), and zsh ...

Can any of the other Linux users here grab the script from the link above and test it a bit? While it works on my Arch box, I lack VMs of other distros to fully test cross-distro compatability (and my Debian box is unable to use VGMPlay at all due to lol-ppc-architecture). If it works, great! If it doesn't work, run it with `sh (or bash or dash or w/e) -x /path/to/script/vgmplay [options] filename` and paste the output to something like http://gist.github.com or http://ix.io (and/or submit fixes if I did something dumb like a typo :p).

Thanks!
  • User avatar
  • 2ch-H Offline
  • Posts: 280
  • Joined: 2012-01-03, 2:10:28

Post by 2ch-H »

Problem of Fatal Fury Special.

vgm that output does not play properly, Has occurred in the all songs.

vgm sample : Fatal Fury Special - Player Select
Edit : I deleted the file

mp3 sample : Fatal Fury Special - Player Select
Edit : I deleted the file


Fatal Fury 2 there is no problem in the same song.
Last edited by 2ch-H on 2012-11-26, 10:27:34, edited 1 time in total.
  • User avatar
  • ValleyBell Offline
  • Posts: 4767
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

Yeah - that's a bug in the DeltaT emulation. I found and fixed it some weeks ago thanks to Tom.

You can trim and compress these VGMs, the tools won't break them.
Post Reply