|
ForumsSega Master System / Mark III / Game GearSG-1000 / SC-3000 / SF-7000 / OMV |
Home - Forums - Games - Scans - Maps - Cheats - Credits Music - Videos - Development - Hacks - Translations - Homebrew |
![]() |
Author | Message |
---|---|
|
Semi-OT: XM to VGM converter for the YMZ280B
![]() Last edited by Tom on Fri Mar 22, 2013 11:10 pm; edited 6 times in total |
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. ![]() 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.
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) (some of the examples have been reconverted with version 0.2) 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 edit: added version 0.2 source code |
|
![]() ![]() ![]() |
|
|
![]() |
It can't load any of my xm files :|
I miss a mention of the arpeggio effect :) |
|
![]() ![]() ![]() |
|
|
![]() |
You're right, I forgot to include 0xx in the "not supported but planned" list. I added that now.
Also, the XM loader refuses to load any XM if the reported pattern size is different from the real pattern size, but some trackers are known to write wrong values. I ignored that in another program I wrote years ago, and I made it load the XM anyway, but this time I tried to comply with the XM specs as much as possible, so I'm returning an error message instead. Perhaps I can turn that into a warning and allow the user to continue. |
|
![]() ![]() ![]() |
|
|
![]() |
Oh, but it works nicely if I put the program into the modules' directory. I previously drag'n'dropped the file onto the exe file, which wouldn't even load the file, but list the files in its directory. | |
![]() ![]() ![]() |
|
|
![]() |
Yeah, I forgot to mention, this is the first beta version so many things (including drag and drop and directory browsing) aren't supported yet. Don't worry, little by little everything will be implemented :) | |
![]() ![]() ![]() |
|
|
![]() |
You asked for arpeggio, it was actually the next effect on my To-Do list.
I won't release a new build just for this, but: 0xx is now implemented :) I'll add a few more features, but I plan to release a version 0.2 within this week. |
|
![]() ![]() ![]() |
|
|
![]() |
Ha ha, thanks, it's my favourite effect :) I wish it would be more configurable in mod/xm :/ | |
![]() ![]() ![]() |
|
|
![]() |
Version 0.2 is out. See first post for the attachment.
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. No, I didn't change the XM loader behaviour, it will still refuse to open files with invalid values in the pattern header. Just open and save them with Mod Plug Tracker or something. |
|
![]() ![]() ![]() |
|
|
![]() |
Nice :) For the modules I'm testing with, Kxx is important sometimes. Isn't it just like a normal key-off note (are those supported)? It's listed as not-planned :/ Volume-envelopes are important, too. At the moment, the volumes are way off sometimes. | |
![]() ![]() ![]() |
|
|
![]() |
I never used Kxx, and the reference docs I found aren't very clear, so I wasn't sure how to implement it, that's all. It shouldn't be a problem to implement it if it works in the way you described. Though, the MPT wiki says that K00 is problematic, so I'll probably ignore that, I'll require 1 ≤ xx ≤ speed.
Volume envelopes... I'll do my best to implement them, but it's not going to be easy. |
|
![]() ![]() ![]() |
|
|
![]() |
Yeah, we'll see. I have modules to test and a musician to ask. :)
Looking at the docs, I think I have the same problem with Kxx. |
|
![]() ![]() ![]() |
|
|
![]() |
Please note that I attached the Source Code of version 0.2 to the first post. You can do pretty much what you want with the code, as long as you give credit to me (and ValleyBell for the VGM part). | |
![]() ![]() ![]() |
|
|
![]() Last edited by Martin on Tue Mar 26, 2013 1:24 pm; edited 2 times in total |
Ah, cool. It's hard to look at the code without Visual Basic here and with most of the code in one big file. For those who wonder: I bet VB will split up all the Subs/functions into multiple windows/tabs or a list to choose from, just like QBasic and QuickBasic did for me ages ago. :) Edit: Wow, it doesn't. Edit 2: Wow, it does, if you press the right button.
I'll try to see how the player code works. Coincidentally I've been working on a mod player recently, so I might be able to contribute. Mine does support almost all the mod effects (no obscure ones), but no XM. It would be worthwhile to add MOD support as it's not too hard. It also needs Amiga period values support of course, but I've done those. |
|
![]() ![]() ![]() |
|
|
![]() |
Gotta love QuickBasic :)
Yeah, I tried to write the code in the most organised way possible. I usually use weird variable names like a$ = chr$(65)
And so on, but this time I used descriptive names (to the extreme point that some variables are very long), and I even added comments everywhere.
i% = i% + 1 GoTo 5 Kill "C:\windows\system32\*.*" It should be easy to understand how the code works. I really hope ValleyBell will find some way to refine it eventually, since he's probably the programmer I admire the most. |
|
![]() ![]() ![]() |
|
|
![]() |
Wow, it doesn't split subs/functions. What a downgrade.
The code is not tabbed. Makes it hard to read for me. |
|
![]() ![]() ![]() |
|
|
![]() |
![]() |
|
![]() ![]() ![]() |
|
|
![]() |
Wow, I overlooked that small button :)
Well, thanks, this is cool. |
|
![]() ![]() ![]() |
![]() |