VOGONS

Common searches


First post, by Malvineous

User metadata
Rank Oldbie
Rank
Oldbie

Hi everyone,

When looking for specs on the .dro format a few days ago, I found a few threads where people were asking whether they could convert .dro files to a more useful format. In light of this (and because I've been meaning to for a while now), I've written a program that will convert .dro files into .mid files, so that you can load them in your favourite MIDI sequencer.

If you're skeptical as to how well the conversion works then yes, it's far from perfect, but it only requires a little effort to get quite a good MIDI file out of it.

For comparison, here's a capture of the title music from the game Zone 66, along with a conversion to MIDI. This is a bare conversion, so I haven't edited the MIDI file at all - it's exactly what comes out when you run the program:

zone66_001.dro
zone66_001.mid

I didn't define any instruments, which is why they've all been converted as a Grand Piano (MIDI patch #0.)

If you'd like to try out the program, the source is available on its web page. Sorry, you'll need Linux for this one. (It should be pretty portable though, so if anyone wants to compile it under DOS and e-mail me an EXE I'll put it on that page too.) Let me know what you think of it!

Oh, and in case anyone else is looking for .dro specs in the future, I've documented them in a bit more detail now!

Reply 1 of 47, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

Thanks Malvineous - it was a straightforth compile. Here is the Windows port.

For some reason it doesn't produce the exact same zone66_001.mid file as you provided. Mine is 7931 bytes long, while yours is 7889. But it sounds allright.

Attachments

  • Filename
    dro2midi.exe.bz2
    File size
    32.03 KiB
    Downloads
    655 downloads
    File license
    Fair use/fair dealing exception

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 2 of 47, by Malvineous

User metadata
Rank Oldbie
Rank
Oldbie

Great - thanks for that! I've added it to the web page. It's possible the filesize came out differently if you ran it in the directory with all the .reg files - I removed all those when I created zone66_001.mid to get a "bare" conversion.

Reply 6 of 47, by Malvineous

User metadata
Rank Oldbie
Rank
Oldbie

Hi again - I've released a new version of DRO2MIDI (v1.2) which does a slightly better job of the conversion. It also now supports .raw and .imf files, as well as .dro.

If you're in a compiling mood MiniMax, a Win32 version would be much appreciated! 😀

Reply 7 of 47, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

Here you go!

Attachments

  • Filename
    dro2midi-1.2-win32.zip
    File size
    22.66 KiB
    Downloads
    566 downloads
    File comment
    Stripped Win32 executable
    File license
    Fair use/fair dealing exception

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 8 of 47, by Malvineous

User metadata
Rank Oldbie
Rank
Oldbie

Great, thanks! It's on the website now.

Actually, could you try converting this file with the win32 version? It doesn't seem to be working.

I had a bit of trouble with signed char vs unsigned char, and I think it needs to be compiled with bare "char" defaulting to signed char otherwise there could be problems.

Reply 9 of 47, by IIGS_User

User metadata
Rank Oldbie
Rank
Oldbie

Hi, I checked v1.1 some days ago in my MacOS X computer, it works fine unchanged from the source code, as I've dragged your original file "dro2midi" (black unix exe icon) into the Terminal, completing the command line with the options manually.

If I try v1.2, the Terminal tells me "cannot execute binary file.", what's happen? 😕

Klimawandel.

Reply 10 of 47, by MiniMax

User metadata
Rank Moderator
Rank
Moderator
Malvineous wrote:

Actually, could you try converting this file with the win32 version? It doesn't seem to be working.

Correct - it errors out with:

MiniMax@HERMETRIX ~/src
$ ./dro2midi-1.2/dro2midi.exe bash1test.dro bash1test.mid
Warning: This song uses multiple OPL chips - this isn't yet supported!
Assertion failed: ftell(f_) == curpos_ - bufpos_ + buflen_, file midiio.cpp, line 1721

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Let me try re-comping with that char thing...

Edit: Nope - same problem when compiled with -fsigned-char.
Edit: Same problem with -funsigned-char.

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 11 of 47, by =zum=

User metadata
Rank Newbie
Rank
Newbie

I don't get it, when I do the conversion, all it does is reading instruments, and then when it runs out it says that he assumed to have read every instrument.. then what? the midi won't go and it's like 78 bytes!

Reply 12 of 47, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author
#define WRITE_BINARY  "wb"
#define READ_BINARY "rb"
#else
#define WRITE_BINARY "w"
#define READ_BINARY "r"
#endif

Change this so it always uses the MSDOS variant.
Don't know if this fixes the problem though.

Water flows down the stream
How to ask questions the smart way!

Reply 13 of 47, by Malvineous

User metadata
Rank Oldbie
Rank
Oldbie

@Zum: That's one of the problems that MiniMax's compile is exhibiting. I'm not sure either why it's having problems. I'll have a look at the source to see if I can make it a bit more portable.

@IIGS_User: I'm not sure why the new executable is having problems either - I compiled it in the same way as the old version. If you're on OSX though you should be able to recompile it fairly easily.

Reply 14 of 47, by IIGS_User

User metadata
Rank Oldbie
Rank
Oldbie

You're right; for other MacOS X users, here are the steps I performed:

1) Downloaded the source code - v1.1 ran w/o re-compiling, but 1.2 needs further steps, if it won't run on your Mac:

2) Open the Terminal

3) Enter "cd " w/o quotes into the command line, drag the Dro2Midi directory into the Terminal and press enter. -> "cd dro2midi"

4) Enter "make " w/o quotes, drag the file "dro2midi.cpp" and press enter.-> "make dro2midi.cpp"

5) For me, it has been re-compiled and works perfect.
It replaces the original file, but that shouldn't matter.

6) This is the first time I re-compiled something.

Klimawandel.

Reply 15 of 47, by irvoke123

User metadata
Rank Newbie
Rank
Newbie

Hi everyone,

I noticed that this is quite an old thread, but since it's pretty much the only one conserning this DRO2MIDI program, I thought I'd post my question here instead of making a new thread, I hope that's ok.

My question is: Has anyone else had any problems with the MIDIs that come out from this program? I have tried coverting a few DosBox DRO captures from games like Major Stryker and Duke Nukem 2 but everytime I try to open those MIDIs with my sequencer, FLStudio, it's all just messed up. They play fine on WinAmp though. And I've edited MIDIs before with FLStudio so I think (and hope) that the problem isn't in the sequencer. But here's the weird part: When I tried to open the zone66_001.mid (the one Malvineous linked to in this thread) with FLStudio, it opened up just fine. But for some reason all other MIDIs (that I have made) are all messed up (or get messed up in the importing process, I don't really know). Any ideas what might be causing this? Or am I just doing something wrong with the converter?

And at this point one might be asking that what do I mean by "messed up", to which I can only answer that I haven't got the slightest clue on what's going on in there. =P All the notation seems to go into one channel, instead of separate channels like they're supposed to, and when I try to play the file (in FLStudio, that is), nothing can be heard. It's as if the bar that signifies the current playback spot isn't even moving. Now then again, this might be an FLStudio related problem, but I thougt I'd bring this up in case someone else has had the same problem with other sequencers too and/or knows how to fix this.

Reply 16 of 47, by Malvineous

User metadata
Rank Oldbie
Rank
Oldbie

I think the problem is that dro2mid produces Type-0 MIDI files, which is an early format that only has one track. FLStudio would seem not to recognise this format properly. When most MIDI sequencers open a Type-0 file they create a separate track for each channel, so you should end up with around 16 tracks.

The easiest way around your problem is to find another MIDI sequencer that does support Type-0 files (I use Rosegarden), load the files in that program, save them again as normal MIDI files then load them in FLStudio.

Reply 17 of 47, by irvoke123

User metadata
Rank Newbie
Rank
Newbie

But isn't that for Linux only? I'm on Windows XP Home Edition, and I have no experience of Unix based operating systems whatsoever. Actually of no other than Windowses and a bit of MS-DOS. Are there some free sequencers for Windows that you could recommend, that would surely support midi type-0 files? Usually when browsing through specs on a sequencer's home site, there's only mentioned if it supports MIDIs in general or not (and I think these days they all do), but nothing more specific like wheter they support type-0 MIDI files or not, and I'd hate to do this through trial and error since there's quite a few of them out there and it always takes some time to learn a completely new software.

Or then again, is there an easy way of getting Rosegarden to run on Win XP, like a fairly simple and easy-to-use Linux emulator? Or even better: is there a free type-0/type-1 midi converter? Don't know if such even exist, tried googling and only found one called MidToMid but it's not free.

Reply 18 of 47, by irvoke123

User metadata
Rank Newbie
Rank
Newbie

Just for the heck of it, I tried out the MidToMid evaluation version and it seems to work.. to some extent atleast. It does, indeed, convert type-0 MIDI files to type-1, and vice versa, but there's just one problem: All the pitch bend information seems to get lost during the conversion process, so the end result sounds a bit retarded. And this particular song, of which I'm trying to get a MIDI version done, has a bucket-load of bends, so it would be quite of a work load to do add them manually. I might aswell do the whole song from scratch, so no victory for me there. =P

By the way Malvineous, are you planning on adding a feature to DRO2MIDI in the future that would allow converting DRO files into MIDI type-1 files, in addition to just type-0? That would be sweet.