XM to VGM converter (YMZ280B)

Discussion in 'Utilities' started by nineko, Mar 18, 2013.

Thread Status:
Not open for further replies.
  1. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    After mid2vgm, I felt that xm2vgm was another nice thing to have. ValleyBell suggested me to target the YMZ280B chip, and so I did. Therefore you'll need one of his players to replay VGM files created with my converter. For the record, ValleyBell gets tons of credits and special thanks, for all the tips he gave me while I was programming, he basically explained me everything about the YMZ280B chip, amongst other things.


    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.

    [​IMG]


    Not all the XM effects are supported, once again. Compared to xm3smps, though, the compatibility list is much wider.


    But first, the template.


    Tool Name: xm2vgm


    Build: 0.2


    OS: Windows 95 or better. Requires msvbvm50.dll


    Author(s): nineko


    Description: takes an XM files and returns a VGM file.


    Download: here (RAR file, 24538 bytes).


    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 player of choice resamples everything; in that case, though, the YMZ280B overflows instead and you get very low notes
    Some examples:Outrun2k (16-channels) (updated)

    Kefrens Vector (4-channels)

    Bub & Bob Shuffle (12-channels) (updated)

    Heaven Revived (10-channels) (updated)

    Commercial Rhythm (12-channels) (updated)

    Dreams (16-channels)

    Infinity (9-channels)

    I Feel Happy! (16-channels) (updated)


    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. I really plan to Open Source this at a certain point, if anything because the XM Loader is quite nice.


    edit: version 0.2 released. Some of the example VGM files were updated accordingly.
     
    Last edited by a moderator: Mar 22, 2013
  2. Ivan YO

    Ivan YO Well-Known Member Member

    Joined:
    Jan 23, 2012
    Messages:
    63
    Wow, this is a very good thing. I will try this.   ^_^

    it would be even better if it was vgm2xm for ym2612 only
     
  3. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    I won't release a new build just for this, but: 0xx (arpeggio) is now implemented :)


    I'll add a few more features, but I plan to release a version 0.2 within this week.
     
    Last edited by a moderator: Mar 20, 2013
  4. Crash

    Crash Well-Known Member Member

    Joined:
    Jul 15, 2010
    Messages:
    302
    Location:
    Australia
  5. ValleyBell

    ValleyBell Well-Known Member Member

    Joined:
    Dec 23, 2011
    Messages:
    166
    Yes, it's a quite unpopular arcade chip. Most of the time it is used to stream music, but the 2 packs on vgmrips that use it do it better.
     
  6. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    Version 0.2 is out.


    What's new: 0xx and 9xx support, better 3xx handling, hopefully fixed the bug with the wrong notes after a loop. Also a proper drive/directory/file selector for the XM files.
     
  7. ThomasThePencil

    ThomasThePencil resident psycho Member

    Joined:
    Jan 29, 2013
    Messages:
    910
    Location:
    the united states. where else?
    The link for ValleyBell's players is broken :(
     
  8. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    That website is down because of some technical difficulties on the server. If you use Winamp you can get in_vgm 0.40 from smspower.


    By the way, this is the source code of version 0.2; you can do pretty much what you want with it, as long as you give credit to me (and ValleyBell for the VGM part). As I said, it's quite well commented unlike my usual, so it's possible that someone will find it useful.
     
    Last edited by a moderator: Mar 22, 2013
Thread Status:
Not open for further replies.