Forum Archive

Go Back   3D Realms Forums > 3D Realms Topics > Other Apogee/3D Realms Games
Blogs FAQ Community Calendar

Notices

 
 
Thread Tools
Old 03-15-2013, 04:39 AM   #1
King Duke

King Duke's Avatar
"hidden" PC Speaker option in Wolfenstein 3-D
While I was implementing a PC speaker emulator for the Wolf4SDL port of Wolfenstein 3-D, I noticed there were routines in the original Wolf3D source code that could play digitized sounds via the PC Speaker.

Unfortunately, there is no menu option to select the PC Speaker as the device for digitized sounds, but as it turns out, you can enable the PC Speaker option by hacking the config file with a hex editor.

Long story short: It works!

I haven't been able to test it on a real DOS PC, but it works fine with the DOSBox emulator. If you want to test it yourself, edit your config file with a hex editor and set the value at offset 0x01D2 to 1. Or download a modified version of the config file here.

I wish I had known this back in the days of my old 80386...
King Duke is offline  
Old 03-15-2013, 07:00 AM   #2
Mikko_P
Re: "hidden" PC Speaker option in Wolfenstein 3-D
Quote:
Originally Posted by King Duke View Post
While I was implementing a PC speaker emulator for the Wolf4SDL port of Wolfenstein 3-D, I noticed there were routines in the original Wolf3D source code that could play digitized sounds via the PC Speaker.

Unfortunately, there is no menu option to select the PC Speaker as the device for digitized sounds, but as it turns out, you can enable the PC Speaker option by hacking the config file with a hex editor.

Long story short: It works!

I haven't been able to test it on a real DOS PC, but it works fine with the DOSBox emulator. If you want to test it yourself, edit your config file with a hex editor and set the value at offset 0x01D2 to 1. Or download a modified version of the config file here.

I wish I had known this back in the days of my old 80386...
uh, the "PC Speaker" option may only be found on DOS version of Wolfenstein 3D
Mikko_P is offline  
Old 03-15-2013, 11:27 AM   #3
Frenkel

Frenkel's Avatar
Re: "hidden" PC Speaker option in Wolfenstein 3-D
It's mentioned in this old version of the Wolfenstein 3D and Spear of Destiny Frequently Asked Questions:

Code:
- wolfspk4.exe  [All versions]  - This little utility will redirect digitised
                  sounds in the game to the PC speaker.
                  (For all of you people with no soundcard!)
                  Some sounds come out a bit dodgy but all the
                  shooting & screaming is audible. This file
                  also works with Spear of Destiny. Note: there
                  are other files like this e.g. wolfspk3.exe,
                  wolfspk.exe, wolf1spk.exe, but wolfspk4.exe
                  supercedes them.
                  To revert back to PC squicker sounds
                  delete CONFIG.WL? file.
I used this method to play Wolfenstein 3D on my 286 computer, because I didn't have a sound card back then. I even had a radio near the computer that somehow received the sound effects and it would play them better than the speaker in my pc.

I also had a driver for Windows 3.0 that played digitized sound through the pc speaker.
__________________
Groeten van Frenkel
Visit us at the Official S&F Prod. Homepage
Frenkel is offline  
Old 03-17-2013, 02:07 PM   #4
Malvineous

Malvineous's Avatar
Re: "hidden" PC Speaker option in Wolfenstein 3-D
Oh wow, interesting find! Funny they built it into the game but there were also utilities to do the same thing?

I wish I'd known about it too when the game first came out, but then I'm not sure my old 286 would've had the power to play the game *and* play PCM through the PC speaker - IIRC most methods of doing this need a fair amount of CPU time to make it sound any good.
Malvineous is offline  
Old 03-17-2013, 03:30 PM   #5
Frenkel

Frenkel's Avatar
Re: "hidden" PC Speaker option in Wolfenstein 3-D
I tried changing the config file of Blake Stone: Aliens of Gold, Corridor 7: Alien Invasion, Operation: Body Count and Super 3D Noah's Ark, but I didn't get digitized sound effects through the PC speaker.
__________________
Groeten van Frenkel
Visit us at the Official S&F Prod. Homepage
Frenkel is offline  
Old 03-18-2013, 08:10 AM   #6
MrFlibble

MrFlibble's Avatar
Re: "hidden" PC Speaker option in Wolfenstein 3-D
Wow, this certainly is cool

Quote:
Originally Posted by Malvineous View Post
Oh wow, interesting find! Funny they built it into the game but there were also utilities to do the same thing?
My understanding is that the utility just edits the config file much like King Duke did manually.

Quote:
Originally Posted by Frenkel View Post
I tried changing the config file of Blake Stone: Aliens of Gold, Corridor 7: Alien Invasion, Operation: Body Count and Super 3D Noah's Ark, but I didn't get digitized sound effects through the PC speaker.
Perhaps this option was dropped/removed from the code at some point in the development? Seeing as how it was actually unused in the original game anyway (probably because of system resource considerations and/or possible compatibility issues).
__________________
It's time to go retro and play old games. Come get some!
MrFlibble is offline  
Old 03-19-2013, 03:30 AM   #7
King Duke

King Duke's Avatar
Re: "hidden" PC Speaker option in Wolfenstein 3-D
Quote:
Originally Posted by Frenkel View Post
I tried changing the config file of Blake Stone: Aliens of Gold, Corridor 7: Alien Invasion, Operation: Body Count and Super 3D Noah's Ark, but I didn't get digitized sound effects through the PC speaker.
I tried that, too (see the readme.txt in the zip file). Seems like id Software removed the code from the version of the engine they licensed to other developers, or at least they added a fix that picks the default digi device if the PC Speaker option is selected in the config file.

All these games seem to use the same numbers to select "None", "SoundBlaster" and "SoundSource", leaving the number 1 (PC Speaker) unused. Wolf3D uses the following enumeration type:

Code:
typedef	enum	{
		sds_Off,sds_PC,sds_SoundSource,sds_SoundBlaster
		}	SDSMode;
So they don't seem to have removed the PC Speaker option entirely. Either that, or they just kept the old mapping for compatibility.

Edit: Flaose posted this on the PCKF: http://youtu.be/1BtlsjJRnFU
Last edited by King Duke; 03-19-2013 at 03:54 AM.
King Duke is offline  
Old 03-20-2013, 05:15 AM   #8
MrFlibble

MrFlibble's Avatar
Re: "hidden" PC Speaker option in Wolfenstein 3-D
My experience with modding Dune II suggests that this kind of leftover sound-related material was not uncommon back then. The Dune II executable lists various drivers that are neither used nor included in the game files, and there are also corresponding sound device selection options that are still there but cannot be activated because a code chunk elsewhere overrides these selections (more info here if someone's interested).

On top of that, the default setup programme for Dune II forces a single sound device selection for three separate processes: music playback, sound effects playback and digitized sounds playback. Later Westwood Studios released a version of the setup programme that allows to pick different sound devices for each of these types of sound playback. Apparently, this was the original intent of the developers but they decided to play safe with the final release and disable separate sound device selection, most probably to avoid compatibility issues.
__________________
It's time to go retro and play old games. Come get some!
MrFlibble is offline  
 

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 02:46 PM.

Page generated in 0.11956310 seconds (100.00% PHP - 0% MySQL) with 16 queries

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

Website is ©1987-2014 Apogee Software, Ltd.
Ideas and messages posted here become property of Apogee Software Ltd.