PC Speaker sounds dos lemmings

Started by EricLang, July 02, 2006, 08:21:44 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

EricLang

Does anyone know how I can program the pc-speaker sounds of the dos-lemmings?
I think the original dos-procedure was an interrupt which you could give the parameters Pitch (Herz) and Duration (Milliseconds).

0xdeadbeef

That was the BIOS function for simple beeps. I would guess that would be enough for very annoyingmusic. I think that some games also took direct control of the hardware to output sampled stuff.
Then again, I wonder who really would want speaker sound???

EricLang

Beeps indeed. It's not for music. It's for a few sound effects, like job-assigning, exiting etc.
I want the speaker sound for 2 reasons.
1) I always played the dos-lemmings with this sounds, so my lemming-feeling-memory-brain-tissue is triggered when I hear this sounds.
2) For the sake of compatibility in my dos-clone I'm working on in Lemmix.

0xdeadbeef

Generally, I would vote for emulating speaker sound with the sound card (e.g. by producing a square wave with the appropriate sample frequency) as I think speaker sound is pretty annyoing (especially since you can't really change the volume and it comes from "below the table" for tower users like me).
I did something similar in Lemmini for the increase/decrease output speed. I'm using a sample which I shift in pitch by moving the sample points. I just don't need accurate frequencies there, but I think you wouldn't need that either if it's not for the music.

ccexplore

Quote from: EricLang on July 02, 2006, 08:21:44 PM
Does anyone know how I can program the pc-speaker sounds of the dos-lemmings?
I think the original dos-procedure was an interrupt which you could give the parameters Pitch (Herz) and Duration (Milliseconds).

Actually, even DOS Lemmings is sophisticated enough not to use the PC speaker even for sound effects (it uses Adlib FM Synthesis).

If you want DOS Lemmings sound effects your best bet is to use DOSBox to capture sound effects as WAV files, then use either the PlaySound Windows API function or the DirectSound APIs for playback in Lemmix.

covox

Quote from: ccexplore on July 03, 2006, 09:00:12 PM
Actually, even DOS Lemmings is sophisticated enough not to use the PC speaker even for sound effects (it uses Adlib FM Synthesis).

DOS Lemmings does support outputting PC speaker sound effects when it cannot find an Adlib/Sound Blaster card (easy to replicate, starting Lemmings in DOSBox at well above 2000 cycles will make the program fail to autodetect the Sound Blaster, forcing it to revert to the PC speaker for sound effects).

ccexplore

Hmm you're right!  I always thought you get silence, but now that I actually played through a level apparently it's just that many of the sound effects are missing in PC-speaker mode.

I believe I only got the following sounds:

-exiting
-exploding (the sound after the oh-no which is missing)
-skill selection
-last 3 build brick warning (same sound as skill selection it seems)

I don't know if I miss a few others but that's all I heard so far.  Sound effects for things like entrances, traps, water, etc. are all missing it seems.

So my suggestion still holds:  it's probably easiest to just capture via DOSBox these sounds as WAV files.  That way the difference between adlib and PC-speaker (plus whatever else is supported) is simply using different WAV files.