VOGONS


First post, by megatron-uk

User metadata
Rank Oldbie
Rank
Oldbie

Writing a multi-platform RPG game at the moment (SDL2/Linux/MacOS/Windows, MSX2, Atari and DOS - hopefully X68000 and PC-98 in the near future), and for most targets I have a number of audio playback options (music and effects) available.

For SDL2 I have native support for digitised audio, MIDI and tracker files via libSDL2 built-ins.

For MSX I have access to ptplayer and a number of other YM/AY3/SCC music and effect api's as part of the MSXgl sdk.

For DOS I have the option of going with something like Allegro, which will ease the efforts to do most of the heavy lifting with graphics, but appears to only support digital effects and MIDI, but not Adlib/FM or tracker files (which would have to be an add-on). The Miles/AIL drivers seem to offer a bit more flexibility, but documentation seems thin on the ground and I have no idea whether they will build against something modern like OpenWatcom or a current DJGPP.

For anyone who has written any DOS games/applications in the last couple of decades, what have you used for sampled effects, MIDI, FM or tracker-style music?

My collection database and technical wiki:
https://www.target-earth.net

Reply 1 of 5, by ViTi95

User metadata
Rank Member
Rank
Member

I've been using Apogee Sound System for FastDoom as a external library, and ended up including the whole library in the game code and hand optimize it, also add support for new devices and remove not needed code for the project. No tracker-style music support though.

Edit: Maybe you can take a look at the JUDAS library (https://github.com/volkertb/JUDAS), it supports new hardware and tracker-style music, and documentation is good. And it supports Watcom and DJGPP.

https://www.youtube.com/@viti95

Reply 2 of 5, by megatron-uk

User metadata
Rank Oldbie
Rank
Oldbie

Brilliant. That's exactly the type of info I was looking for. I'll look at both of those options.

My collection database and technical wiki:
https://www.target-earth.net

Reply 3 of 5, by gerwin

User metadata
Rank l33t
Rank
l33t
megatron-uk wrote on 2022-11-25, 09:28:

For DOS I have the option of going with something like Allegro, which will ease the efforts to do most of the heavy lifting with graphics, but appears to only support digital effects and MIDI, but not Adlib/FM or tracker files (which would have to be an add-on).

Allegro 3 and 4 support OPL3 FM in DOS.
I worked on the sound drivers in Allegro 3 for Doom MBF 2.04. I am pretty sure that modified Allegro 3 there, is the most compatible variant of Allegro. It is because I fixed a lot of bugs in general, and besides that, had to add workarounds for real sound cards, which often have interfacing-peculiarities. That is the benefit of messing with it, when it is already vintage, which allowed me to stock so many old sound cards to test like never before. 😀 You can compile a library version of Allegro without all the graphics routines and such, making it much lighter.

The other driver packages mentioned can be fine too. And may be a better match when not using DJGPP. Especially the latest Miles library contains the most complete, tuned and fixed-up drivers for DOS in existence. These miles drivers had to keep most commercial games working throughout the sound hardware mess of the 90s. But they are written in assembly, not really open-sourced like Allegro either.

--> ISA Soundcard Overview // Doom MBF 2.04 // SetMul

Reply 4 of 5, by megatron-uk

User metadata
Rank Oldbie
Rank
Oldbie

Downloaded and had a play with the judas library. Got it compiling with OpenWatcom after fixing all of the filenames and bringing the makefiles into a little more order.

Compiles fine and plays the tracker files okay. The little demo with the sound effects and tracker music also works - so I'll definitely have a look at using it. I do want MIDI support as well, so I'll likely have to put some configuration into the game engine to enable switching out Allegro fx/midi/fm to Judas fx/tracker music.

Long way off that yet though; only integrating music and effects into the SDL version right now.

My collection database and technical wiki:
https://www.target-earth.net

Reply 5 of 5, by megatron-uk

User metadata
Rank Oldbie
Rank
Oldbie

The teeny little player included with judas seems to indicate that it's a fairly well optimised library. With dosbox cycles set to a fixed 5000, I can play pretty much any tracker file up to around 22 tracks (that's with 8bit stereo, 22KHz and no interpolation - easily good enough quality for background music), with a 32 track xm it just starts to stutter when all channels are playing.

By my estimation and the Dosbox docs, that should be equivalent to something like a 386 33 or thereabouts, which bodes well.

My collection database and technical wiki:
https://www.target-earth.net