VOGONS

Common searches


First post, by ericvids

User metadata
Rank Newbie
Rank
Newbie

==============
UPDATE: This project has now split into two:

wolfdosmpu: A simple fork of the original Wolf3D open-source release to add MPU-401 support.
wolfmidi: Converts the OPL2 music in Wolf3D/SOD to General MIDI, intended for use with wolfdosmpu or ECWolf.

Setup instructions:
wolfdosmpu: Select your game version's EXE file from here. You will need your original Wolf3D data files (.WL1/.WL6/.SDM/.SOD). (No need to replace the current executable, in case you want to revert to OPL2 music at any point).
wolfmidi: Unzip this wolfmidi.zip in your game directory. This creates a MUSIC\ subdirectory under it, for wolfdosmpu to find. (For use with ECWolf, don't unzip; just add the command line parameter "--file wolfmidi.zip" without quotes.)
==============

Hello,

I've been a long time lurker on these forums, but I just want to share a project I just finished.

wolfmidi is a simple mod for the ECWolf source port for Wolfenstein 3-D and Spear of Destiny to add a much-needed General MIDI soundtrack.

Setup instructions here.

While this has technically been done before by others to varying degrees, what's new in my mod is that the GM data are all automatically generated from the original music files. No per-track hand-tuning/hacking here, unlike previous music mods.

Currently the conversion is not done in real-time -- I would need to make a direct patch to ECWolf for that -- but since ECWolf natively supports MIDI playback anyway for years now, I took the easy way out and just make a .pk3 with the auto-generated MIDIs in them. (That way, you can also just extract the files and listen to them at your leisure.)

The biggest contribution here is the instrument mapping -- one map is designed to work for ALL of the Wolf3D/SoD songs consistently. I based my GM instrument mapping from Bobby Prince's official MIDIs but took care of conflicts to make it sound consistent. Also, I highly suspect that the official MIDIs have been edited by Bobby Prince himself after Wolf3D's release, so you won't get exactly the same music in this mod (particularly on the menu screen and E1L1), but I think the auto-generated versions perfectly capture the music's original feel.

If anyone is still playing Wolf3D/SoD these days, please do try my mod out and let me know what you think!

I have to say, Bobby Prince's Wolf3D music sounds AMAZING on a Roland Sound Canvas (IMO, it's just as good, if not better, than his DOOM work). Also try it on an MT-32/Munt (you will need the official Roland GM patch and then set the channels to 1-9) -- it sounds WAY better than OPL2, and I genuinely think this is what Wolf3D would have sounded like if it had the same MIDI support as its contemporaries at Sierra and LucasArts.

- ericvids

Last edited by ericvids on 2021-09-22, 02:17. Edited 2 times in total.

Reply 2 of 93, by ericvids

User metadata
Rank Newbie
Rank
Newbie

Sure! Here you go.

EDIT: I took the attachment down because I noticed its download counter still increasing months later. This was a heavily outdated version, not at all representative of the project's current state. Download straight from github for the latest one.

Last edited by ericvids on 2021-09-24, 13:44. Edited 1 time in total.

Reply 3 of 93, by ericvids

User metadata
Rank Newbie
Rank
Newbie

I have since updated the converter with further tweaks on the instrument map.

Currently supported MIDI devices are:
- Roland Sound Canvas (tested with SC-D70, CM-300, and SCVA VSTi)
- Coolsoft VirtualMIDISynth (trevor0402's SC-55 soundfont recommended)
- Yamaha S-YXG50 VSTi (for those who prefer the XG sound over GS)
- Munt (both falcosoft's VSTi and regular versions)

Biggest change is the use of the orchestral/analog drumkits whenever appropriate. Again, I used rule-based methods to determine when to use which drum (or any other) instrument -- conversion is still automatic. I also fixed looping times since some tracks did not loop seamlessly (that required some minimal annotation).

I've again attached the generated midi files here. For those who want to use them in-game, refer to the github (requires ECWolf).

Currently looking into real-time conversion and integration with the original DOS executable for an authentic retro experience on 90's machines. No timeline for this--I'm just working on this after hours.

I hope you'll like the changes!

Attachments

Reply 5 of 93, by ericvids

User metadata
Rank Newbie
Rank
Newbie

Hi Bondi, thanks for the encouragement!

That "one day"... is today. 😀

I've just finished wolfdosmpu, a quick hack of the original id Software open-source release of Wolf3D. The only thing added is MPU-401 support (along with all sorts of minor fixes other devs have discovered just to get it to compile). All other original game bugs/features should be intact, just as Wolf3D was in 1992.

Disclaimer: THIS IS BETA SOFTWARE. I have no actual DOS 286/386 machine with an MPU-401 to test it on, so I could only verify in DOSBox... But then I realized, VOGONS is filled with just the kind of people who will willingly test stuff like this, right? So here you go...

However, you will still need the MIDI files from wolfmidi. (Yes, sadly, realtime conversion of the OPL2 data stream is incompatible with my drumkit selection and song length correction heuristics, which requires one pass through the entire file first.) But in retrospect, streaming the converted MIDI file is anyway better for modders in the long run. wolfmidi 1.20 now outputs a basic metadata file so that wolfdosmpu knows which MIDI file to load whenever the game asks to play a track.

Head out to the github repository for the releases:

wolfdosmpu: Select your game version's EXE file from here. You will need your original Wolf3D data files (.WL1/.WL6/.SDM/.SOD). (No need to replace the current executable, in case you want to revert to OPL2 music at any point).
wolfmidi: Unzip this wolfmidi.zip in your game directory. This creates a MUSIC\ subdirectory under it.

Again, you can also run this in DOSBox, in case you prefer good ol' 1992 gameplay instead of a source port that constantly tempts you to use the overhead map. 😉

Please check it out (I badly need to know whether it works on real machines!) ... and let me know what you think!

Reply 6 of 93, by theelf

User metadata
Rank Member
Rank
Member
ericvids wrote on 2021-09-22, 02:05:
Hi Bondi, thanks for the encouragement! […]
Show full quote

Hi Bondi, thanks for the encouragement!

That "one day"... is today. 😀

I've just finished wolfdosmpu, a quick hack of the original id Software open-source release of Wolf3D. The only thing added is MPU-401 support (along with all sorts of minor fixes other devs have discovered just to get it to compile). All other original game bugs/features should be intact, just as Wolf3D was in 1992.

Disclaimer: THIS IS BETA SOFTWARE. I have no actual DOS 286/386 machine with an MPU-401 to test it on, so I could only verify in DOSBox... But then I realized, VOGONS is filled with just the kind of people who will willingly test stuff like this, right? So here you go...

However, you will still need the MIDI files from wolfmidi. (Yes, sadly, realtime conversion of the OPL2 data stream is incompatible with my drumkit selection and song length correction heuristics, which requires one pass through the entire file first.) But in retrospect, streaming the converted MIDI file is anyway better for modders in the long run. wolfmidi 1.20 now outputs a basic metadata file so that wolfdosmpu knows which MIDI file to load whenever the game asks to play a track.

Head out to the github repository for the releases:

wolfdosmpu: Select your game version's EXE file from here. You will need your original Wolf3D data files (.WL1/.WL6/.SDM/.SOD). (No need to replace the current executable, in case you want to revert to OPL2 music at any point).
wolfmidi: Unzip this wolfmidi.zip in your game directory. This creates a MUSIC\ subdirectory under it.

Again, you can also run this in DOSBox, in case you prefer good ol' 1992 gameplay instead of a source port that constantly tempts you to use the overhead map. 😉

Please check it out (I badly need to know whether it works on real machines!) ... and let me know what you think!

WOWWWW thanks!!! amazing work, thanks a lot

Reply 7 of 93, by Pierre32

User metadata
Rank Oldbie
Rank
Oldbie

I've never delved into Wolf3D MIDI before, and it seems like waiting until I saw this thread was the right move. I just dropped the EXE and music folder into an original Wolf3D install and took it for a run in DOSBox, with an SC-D70. Sounds excellent! No tweaks or changes needed, just fire up and play.

Unfortunately my 386 is 'in the shop' at the moment, but later on I'll try it natively on my P200 with SC-55.

This is great stuff ericvids, thanks for sharing!

Reply 8 of 93, by Bondi

User metadata
Rank Member
Rank
Member
ericvids wrote on 2021-09-22, 02:05:
Hi Bondi, thanks for the encouragement! […]
Show full quote

Hi Bondi, thanks for the encouragement!

That "one day"... is today. 😀

I've just finished wolfdosmpu, a quick hack of the original id Software open-source release of Wolf3D. The only thing added is MPU-401 support (along with all sorts of minor fixes other devs have discovered just to get it to compile). All other original game bugs/features should be intact, just as Wolf3D was in 1992.

Disclaimer: THIS IS BETA SOFTWARE. I have no actual DOS 286/386 machine with an MPU-401 to test it on, so I could only verify in DOSBox... But then I realized, VOGONS is filled with just the kind of people who will willingly test stuff like this, right? So here you go...

However, you will still need the MIDI files from wolfmidi. (Yes, sadly, realtime conversion of the OPL2 data stream is incompatible with my drumkit selection and song length correction heuristics, which requires one pass through the entire file first.) But in retrospect, streaming the converted MIDI file is anyway better for modders in the long run. wolfmidi 1.20 now outputs a basic metadata file so that wolfdosmpu knows which MIDI file to load whenever the game asks to play a track.

Head out to the github repository for the releases:

wolfdosmpu: Select your game version's EXE file from here. You will need your original Wolf3D data files (.WL1/.WL6/.SDM/.SOD). (No need to replace the current executable, in case you want to revert to OPL2 music at any point).
wolfmidi: Unzip this wolfmidi.zip in your game directory. This creates a MUSIC\ subdirectory under it.

Again, you can also run this in DOSBox, in case you prefer good ol' 1992 gameplay instead of a source port that constantly tempts you to use the overhead map. 😉

Please check it out (I badly need to know whether it works on real machines!) ... and let me know what you think!

This is awesome, ericvids. It's working perfectly on my ES1868+Dreamblaster X2. Thank you for making that "one day" today!
Really cool to see modding to come back to DOS platform. Other great examples are is FastDoom and DOS32AWE projects.

Does your mod check BLASTER variable to set the MIDI port? Or is it hardcoded to 330?

PCMCIA Sound Cards chart

Reply 9 of 93, by Pierre32

User metadata
Rank Oldbie
Rank
Oldbie
Pierre32 wrote on 2021-09-22, 05:24:

later on I'll try it natively on my P200 with SC-55.

And I did, and it was good. I think these MIDI conversions are really nicely crafted, tapping into the strengths of GM without straying from the spirit of the original Adlib soundtrack.

I did a quick capture to share on OCAU so here's the link. I'm too lazy to split it into separate audio files and attach them here. Evidently I was also too lazy to turn the SB down, so you get some gameplay sound too. This is the intro, menu, and first level music:

https://youtu.be/1UwySrVW29I

Reply 10 of 93, by ericvids

User metadata
Rank Newbie
Rank
Newbie
Bondi wrote on 2021-09-22, 11:23:

Does your mod check BLASTER variable to set the MIDI port? Or is it hardcoded to 330?

Yup, it checks the BLASTER variable for the midi port, defaulting to P330 if not found. (I had a big hunch that someone would ask about this...) Right now you can set it to anything, because I don't know of a good set of rules to limit it (I read somewhere that even Roland's own cards can use so many different port settings).

Pierre32 wrote:

And I did, and it was good. I think these MIDI conversions are really nicely crafted, tapping into the strengths of GM without straying from the spirit of the original Adlib soundtrack.

I'm glad you liked it! That's one of the goals I explicitly set out to achieve -- a pure note-for-note GM conversion, nothing added or removed. In fact, if you listen closely to the menu music, the error that Bobby Prince made in the bass line near the end of the song is still there. 😉

Thanks for the input, everyone! I'm QUITE surprised that my MPU code even works on real hardware! I blindly adapted code samples from an old guide, since DOSBox pretty much does not care about port timings. I highly suspect that real timing problems will become apparent once people go down to the level of 286...

Reply 11 of 93, by Gmlb256

User metadata
Rank Oldbie
Rank
Oldbie

Excellent implementation of the MPU-401 into the DOS version of Wolf3D and SOD! I never saw these kind of improvements on the DOS version around the Wolf3D modding community! 👍

The converted music is faithful to the IMF ones while being enhanced. Tested this on a K6-2+/450 with the SB AWE64 using the MPU-401 thru gameport on DOS and EMU8K MIDI emulation on Windows 98, AWEUTIL for MIDI emulation in DOS didn't work though.

You could compress the executables with LZEXE like id Software did and rename "AdLib/Sound Blaster" to "General MIDI" on the music submenu in the sound settings.

Reply 12 of 93, by CrossBow777

User metadata
Rank Member
Rank
Member

Was playing Wolf3d last night through Dosbox with this added in. I might actually prefer the MT-32 (with the MT2GM patch applied) vs the SC-55 in this case. Very cool!

g883j7-2.png
Midi Modules: MT-32 (OLD), MT-200, MT-90, SD-20

Reply 13 of 93, by ericvids

User metadata
Rank Newbie
Rank
Newbie
Gmlb256 wrote on 2021-09-23, 02:37:

AWEUTIL for MIDI emulation in DOS didn't work though.

Yikes. Does AWEUTIL expose your card's MPU401 to port 330? If not, can you try setting the port in the BLASTER environment variable? (e.g. SET BLASTER=P300 ... etc...)

Gmlb256 wrote on 2021-09-23, 02:37:

You could compress the executables with LZEXE like id Software did and rename "AdLib/Sound Blaster" to "General MIDI" on the music submenu in the sound settings.

I just released version 1.10, which implements both of these as well as supporting the original Apogee 1.4 registered version with the Help system. Thanks for your suggestions! 😀

I doubt this new version fixes your AWEUTIL problem, though. I need more info (do other games work, like Doom, and what is your port setting)?

CrossBow777 wrote:

Was playing Wolf3d last night through Dosbox with this added in. I might actually prefer the MT-32 (with the MT2GM patch applied) vs the SC-55 in this case. Very cool!

I also do this occasionally, just for fun. 😀 Though unfortunately the MT2GM patch doesn't have proper reverse cymbals, which is used in TWELFTH (E3L3), so that song in particular sounds strange.

Reply 14 of 93, by Gmlb256

User metadata
Rank Oldbie
Rank
Oldbie
ericvids wrote on 2021-09-24, 00:23:

Yikes. Does AWEUTIL expose your card's MPU401 to port 330? If not, can you try setting the port in the BLASTER environment variable? (e.g. SET BLASTER=P300 ... etc...)

It just takes over the MPU-401 port which I have it set to 330h on the BLASTER environment.

ericvids wrote on 2021-09-24, 00:23:

I just released version 1.10, which implements both of these as well as supporting the original Apogee 1.4 registered version with the Help system. Thanks for your suggestions! 😀

Nice!

ericvids wrote on 2021-09-24, 00:23:

I doubt this new version fixes your AWEUTIL problem, though. I need more info (do other games work, like Doom, and what is your port setting)?

AWEUTIL usually has compatibility issues with several DOS programs. For protected mode games there is DOS32AWE which attempts to mitigate this issues with games such DOOM and Duke Nukem 3D. Some 16-bit DOS programs works fine though such as The Lost Vikings and DOSMid, the latter which is open source and has a command line switch to delay the XMS access when the MIDI is emulated by a TSR.

Reply 15 of 93, by ericvids

User metadata
Rank Newbie
Rank
Newbie
Gmlb256 wrote on 2021-09-24, 00:40:

AWEUTIL usually has compatibility issues with several DOS programs. For protected mode games there is DOS32AWE which attempts to mitigate this issues with games such DOOM and Duke Nukem 3D. Some 16-bit DOS programs works fine though such as The Lost Vikings and DOSMid, the latter which is open source and has a command line switch to delay the XMS access when the MIDI is emulated by a TSR.

Hmm. If the problem is AWEUTIL conflicting with Wolf3D also accessing XMS/EMS, can you try launching by the command line "WOLF3DCM.EXE NOEMS NOXMS"?

Reply 16 of 93, by Gmlb256

User metadata
Rank Oldbie
Rank
Oldbie
ericvids wrote on 2021-09-24, 01:17:

Hmm. If the problem is AWEUTIL conflicting with Wolf3D also accessing XMS/EMS, can you try launching by the command line "WOLF3DCM.EXE NOEMS NOXMS"?

Tried with these parameters and didn't work. 🙁

Reply 17 of 93, by ericvids

User metadata
Rank Newbie
Rank
Newbie
Gmlb256 wrote on 2021-09-24, 01:32:

Tried with these parameters and didn't work. 🙁

I'm out of ideas. 🙁 Never had experience with using hardware wavetable GM cards in DOS. And my cursory search in other VOGONS threads reveal... that I have plenty of reading to do. 😁 I've already downloaded DOSMID to check what measures it has for initializing/polling the MPU properly to not conflict with other software like AWEUTIL. (Can you send me the exact command-line parameters or other config that you use for DOSMID to get it to output via your AWEUTIL device? That way I can narrow down which code paths to trace...)

Meanwhile, I need to start doing My Real Job(tm) so it'll take me awhile to get back to you on this. 🙁 I hope you're enjoying the mod on your other setups, tho!

Reply 18 of 93, by Gmlb256

User metadata
Rank Oldbie
Rank
Oldbie
ericvids wrote on 2021-09-24, 01:56:

Can you send me the exact command-line parameters or other config that you use for DOSMID to get it to output via your AWEUTIL device? That way I can narrow down which code paths to trace...

The only paramter I'm using for DOSMid with AWEUTIL loaded is /xmsdelay.

ericvids wrote on 2021-09-24, 01:56:

I hope you're enjoying the mod on your other setups, tho!

Thanks! 😀

Reply 19 of 93, by Akuma

User metadata
Rank Member
Rank
Member
Gmlb256 wrote on 2021-09-23, 02:37:

You could compress the executables with LZEXE like id Software did and rename "AdLib/Sound Blaster" to "General MIDI" on the music submenu in the sound settings.

That's easier said then done. The symbols/overlay must be stripped first and the header must be patched to reflect the new size., then LZEXE is possible.