Skip to content

Web version of vgmPlay

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

Moderator: Staff

  • User avatar
  • ValleyBell Offline
  • Posts: 4767
  • Joined: 2011-12-01, 20:20:07
  • Location: Germany

Post by ValleyBell »

Okay... after some trouble with compiling it with MinGW/MSYS, I got it to build and found a few bugs.
  1. The #ifdef-block in ChipMapper.c ends below of the RF5C164 command handler, which prevents MegaCD PCM from working.
  2. In VGMPlay.c, the commands 0x90-0x95 are excluded by the #ifdef-block, which prevents optimized PWM VGMs from working.
    (Those commands always have to be processed, even if you shouldn't need them, because they use nonstandard command lengths.)
  3. You also need to include dac_control.h and compile dac_control.c for PWM VGMs. They are resposible for streaming PCM samples to chips (they don't do actual sound emulation) and should always be included, IMO.
  4. I don't think vampi wants SegaPCM or MultiPCM. (those are different chips than the PCM chip present in Sega MegaCD, which is called "RF5C164")

Post by vampirefrog »

Sounds like you got served, wothke!

Also, yes, I only need Master System, Genesis/Mega Drive, 32X and MegaCD/Sega CD, so SN76489, YM2612, PWM and RF5C164.

Thanks VB.

VB edit: Removed fullquote. There is a "Post Reply" button, you know...
  • tinyrsid Offline
  • Posts: 35
  • Joined: 2015-05-19, 22:03:39

Post by tinyrsid »

here is the fixed/stripped version: www.wothke.ch/download/backend_vgm.js

hope this works better..

Post by vampirefrog »

It works perfectly, have a look: http://chiptune.ninja/tools/p2612/player.php

Gosh, you're so productive, how do you do it?

Also, is the same JS interface available for the full version?
  • tinyrsid Offline
  • Posts: 35
  • Joined: 2015-05-19, 22:03:39

Post by tinyrsid »

yes, it is exactly the same interface

Post by vampirefrog »

And so modest.
  • tinyrsid Offline
  • Posts: 35
  • Joined: 2015-05-19, 22:03:39

Post by tinyrsid »

Well, ValleyBell did all the work of pinpointing the necessary changes... I just had to recompile :-)
  • Tom Offline
  • Ragequit Member
    Ragequit Member
  • Posts: 496
  • Joined: 2011-11-30, 17:26:44
  • Location: Italy
  • Contact:

Post by Tom »

vampirefrog wrote:It works perfectly, have a look: http://chiptune.ninja/tools/p2612/player.php
Which browser does it require? I'm trying it in Chrome, but when I select a song, it offers to download a vgz file, and nothing plays. The vgz file is downloaded just fine though.

edit: I just tried the AS3 player again, which used to work fine for me, and now that one offers me to download files as well. Maybe you broke some MIME types?
Also known as nineko.

Post by vampirefrog »

Tom, try again now. It was a JS error. I've improved the player a bit anyway, but if you get strange behavior, please look in the console and tell me what errors you are getting.
  • Tom Offline
  • Ragequit Member
    Ragequit Member
  • Posts: 496
  • Joined: 2011-11-30, 17:26:44
  • Location: Italy
  • Contact:

Post by Tom »

Code: Select all

Assertion failed: JS engine does not provide full typed array support  backend_vgm.js:7
Assertion failed: JS engine does not provide full typed array support  backend_vgm.js:7
Uncaught abort() at Error                                              backend_vgm.js:4
    at Error (unknown source)
    at Da (http://chiptune.ninja/tools/p2612/backend_vgm.js:29:21)
    at z (http://chiptune.ninja/tools/p2612/backend_vgm.js:291:217)
    at y (http://chiptune.ninja/tools/p2612/backend_vgm.js:18:379)
    at http://chiptune.ninja/tools/p2612/backend_vgm.js:30:1
    at http://chiptune.ninja/tools/p2612/backend_vgm.js:296:2
Uncaught ReferenceError: VgmBackendAdapter is not defined              player.php:68
But at least it doesn't download files anymore.
Also known as nineko.

Post by vampirefrog »

Tom, OS version, browser version and CPU architecture (32/64b).

Post by Kaminari »

I have no issue in Chrome 43 64-bit (Win7-64).

Post by vampirefrog »

Thank you for checking!

Post by vampirefrog »

I've added the player to the project2612 details pages, here is an example: http://project2612.org/details.php?id=53

Just click on the vgz files.

Now to add a pause/play button, a seek bar and a volume bar.

Also, is there a way to get the full GD3 info? ie Japanese composer names and whatnot?
  • tinyrsid Offline
  • Posts: 35
  • Joined: 2015-05-19, 22:03:39

Post by tinyrsid »

Nice :-)

so far the player only used 4 attributes:
const wchar_t* TitleTag= GetTagStrEJ(VGMTag.strTrackNameE, VGMTag.strTrackNameJ);
const wchar_t* GameTag = GetTagStrEJ(VGMTag.strGameNameE, VGMTag.strGameNameJ);
const wchar_t* AuthorTag = GetTagStrEJ(VGMTag.strAuthorNameE, VGMTag.strAuthorNameJ);
const wchar_t* SystemTag = GetTagStrEJ(VGMTag.strSystemNameE, VGMTag.strSystemNameJ);

just add whatever other attributes you want in:
extern const char** EMSCRIPTEN_KEEPALIVE emu_get_track_info() { ... }
Post Reply