Skip to content

xm2vgm

2×YMZ280B

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

Moderator: Staff

  • Tom Offline
  • Ragequit Member
    Ragequit Member
  • Posts: 496
  • Joined: 2011-11-30, 17:26:44
  • Location: Italy
  • Contact:

xm2vgm

Post by Tom »

No, I'm not back. I'm making this one and only post since I feel this project is relevant here.

More than a month ago, while vgmrips was down, I made an XM to VGM converter that targets the YMZ280B (2×). It's a quite obscure chip, but ValleyBell suggested that and it's indeed a neat choice. ValleyBell also gets tons of credits for his help since he basically explained me everything about that chip (along with the usual tips about the VGM format itself).

So, how does this work. You take an XM file you like and you can convert up to 16 channels (dual 8 channels) to a VGM file. If you want, nothing prevents you from merging the resulting VGM file with other ones to have many chips in the same file.

Image

Not all the XM effects are supported, once again. But the compatibility list is quite wide.

It runs in Windows 95 or better. Requires msvbvm50.dll

Now, more details.

Compatibility list:
  • Effects
    • 100% supported: 0xx, 1xx, 2xx, 3xx, 5xx, 8xx, 9xx, Axx, Bxx, Cxx, Dxx, E1x, E2x, EAx, EBx, Fxx, X1x, X2x.
    • Partially supported: 6xx (rendered as Axx)
    • Not supported but planned: E5x, E6x, E8x, E9x, ECx, EDx, Txx
    • Not supported and not planned: 4xx, the other half of 6xx, 7xx, E3x, E4x, E7x, EEx, Gxx, Hxx, Kxx, Lxx, Pxx, Rxx
  • Volume Column
    • 100% supported: Set Volume, Volume Slide Up/Down, Fine Volume Slide Up/Down
    • Not supported and not planned: everything else
  • Other known unsupported things:
    • samples with bidirectional loops (the YMZ280B just can't do them, I'd need to alter the sample data by hand, to add a backwards section at the right place)
    • pan and volume envelopes
    • Amiga frequency table (liner frequency table is always used)
    • notes higher than 88200Hz. Don't be surprised, they happen quite often in chiptunes (but not only in them), you just don't notice that because your module player of choice resamples everything; in that case, though, the YMZ280B overflows instead and you get very low notes
Some examples:
Outrun2k (16-channels)
Kefrens Vector (4-channels)
Bub & Bob Shuffle (12-channels)
Heaven Revived (10-channels)
Commercial Rhythm (12-channels)
Dreams (16-channels)
Infinity (9-channels)
I Feel Happy! (16-channels)
Outrun Medley (4-channels)

As you can see, this is far from perfect, and the conversions are a bit rough. Still, it was a nice exercise for me.

Also: I did my best to write the best code possible, and I even commented it. This is unusual for me since my code is unreadable most of the times, but I really wanted to Open Source it this time. You're all encouraged to make improved versions (*cough* ValleyBell *cough*).

Download links:
Win32 executable (RAR file, 24538 bytes).
Visual Basic 5 source code (RAR file, 15188 bytes).

Sayonara~

edit: dropbox'd, imgur'd
Last edited by Tom on 2015-06-26, 17:46:24, edited 4 times in total.
Also known as nineko.
  • User avatar
  • MaliceX Offline
  • Posts: 226
  • Joined: 2012-09-29, 11:45:48
  • Location: Australia
  • Contact:

Post by MaliceX »

Of course the provided examples had to be kickass to show off the potential as a proof-of-concept. :)

Great, thanks for sharing.
-dj.tuBIG/MaliceX
  • User avatar
  • kyusawamura Offline
  • Posts: 33
  • Joined: 2015-06-08, 20:42:22
  • Location: Argentina
  • Contact:

Post by kyusawamura »

Please update the link. The host site is down. :(
  • Tom Offline
  • Ragequit Member
    Ragequit Member
  • Posts: 496
  • Joined: 2011-11-30, 17:26:44
  • Location: Italy
  • Contact:

Post by Tom »

Sorry about that, as you can see in my signature, Libero decided to kill most of my webspace because I violated the terms of use (which I did, but still...)

Instead of reuploading everything on Dropbox at the same time, I do that on a report-by-report basis, as, whenever someone asks me for something, I reupload that. This helps me track down which things are interesting and which things aren't.

EXE: https://dl.dropboxusercontent.com/u/173 ... vgm020.rar
Source: https://dl.dropboxusercontent.com/u/173 ... 20_src.rar

Hence, thanks for showing interest about this.

Best regards.
Also known as nineko.
  • User avatar
  • kyusawamura Offline
  • Posts: 33
  • Joined: 2015-06-08, 20:42:22
  • Location: Argentina
  • Contact:

Post by kyusawamura »

Thank you very much! I'll test this when I get home. :D
  • cmccaff1 Offline
  • Posts: 15
  • Joined: 2021-01-06, 5:20:01

Post by cmccaff1 »

Perhaps I'm several years too late...and I apologize for the necro-bump...but I just wanted to say that this is quite an impressive program.
Though I doubt the OP will see this, I'm definitely thankful to Tom and ValleyBell for making it possible.
While it naturally has its limitations, it's still very well-coded and provides an interesting insight into the YMZ280B's ability to play sequenced music in real-time...a feature that precious few games put to use.

The YMZ280B itself is probably, in terms of its raw capabilities, one of the most underrated chips Yamaha has ever made, though it did get used in its fair share of games.
In some ways, it reminds me of Konami's K054539...both chips can do 4-bit ADPCM and 8/16-bit PCM & support up to 8 simultaneous channels, though that may be where the similarities end for all I know.
The majority of games I know of that use the YMZ280B used it mainly for streaming ADPCM (and it is very good for that, though it's capable of far more).

Thank you for this cool converter!
In the future, if the project is ever resurrected, I'd definitely be glad to serve as a tester in some way.
  • Tom Offline
  • Ragequit Member
    Ragequit Member
  • Posts: 496
  • Joined: 2011-11-30, 17:26:44
  • Location: Italy
  • Contact:

Post by Tom »

Your post made me happy, thank you for your feedback :)
Also known as nineko.
  • denjhang Offline
  • Posts: 95
  • Joined: 2021-03-24, 4:44:34
  • Location: hk

Why is there no sound in the VGM converted from my xm?

Post by denjhang »

:bash:
Post Reply