LmCast :: Stay tuned in

DOOM could have had PC Speaker Music

Recorded: Dec. 3, 2025, 3:04 a.m.

Original Summarized

DOOM could have had PC Speaker Music! - LenOwO

LenOwO
Your One-Stop location for all your cursed computing needs.
Skip to content

Search

Advanced search

Quick links

Unanswered topics

Active topics

Search

FAQ

Login

Register

Board index
Software shenanigans

Search

DOOM could have had PC Speaker Music!

A discussion group for the most cursed software ideas out there

Post Reply

Print view

Search

Advanced search

1 post
• Page 1 of 1


minki
Site Admin
Posts: 19 Joined: 2024-03-25
Location: /bin/bash

Contact:

Contact minki

DOOM could have had PC Speaker Music!

Quote

Post

by minki » 2025-12-02

I'm guessing everyone here has played DOOM before, or at least seen someone else play the game.
It would also not be of any news for most here, that DOOM has specific hard-coded sound drivers which directly talk to the sound hardware.
Now, many PCs didn't have a dedicated (let alone supported) sound card for DOOM. What people often overlook is the PC Speaker driver that DOOM comes with. Mostly as it can only play back sound effects (and does so quite poorly too). Many times, it ends up disabled rather than being used.
For a long time, it has been speculated that the PC Speaker driver never supported audio as it would have been too resource intensive to drive the interface in real-time while performing game logic. Now, on a 286, I would totally understand this reasoning, but on a processor as fast as a 486? No chance it wouldn't work!

Introducing: The PC Speaker sndserver patch!
I had decided that the only way to answer the question of if, was to try it. And try it I did:
https://youtu.be/bRHyQPhA_9A

A few weeks ago, I had written a file format for efficiently playing PC Speaker tunes on a 32-bit system, requiring only a few integer operations to turn the data into a valid call for the input/misc/pcspkr device. The format being called pcsp and working as follows:
A song is made up of an array of 32 bit tone cells consisting of
- a 16 bit frequency value in Hz
- a 4 bit duration scale (second*10^-scale)
- a 12 bit duration value

Now, all I really had to do to get PC Speaker music working in DOOM, was to implement a priority mixer for it in sndserver.
The ground work for which already existed in the existing Adlib target.

Surprisingly, running the game with and without the patch showed no noticeable speed differences.

Will this patch become public? Yes, soon.
I do not feel comfortable with publishing it yet as I currently only have the E1M1 soundtrack implemented and also would like to fix a few other issues with the sndserver on modern Linux while I have the chance.
~-~-~ MSD - Making your old devices useful again since 2022! ~-~-~

Top

Post Reply

Print view

1 post
• Page 1 of 1

Return to “Software shenanigans”

Jump to

Cursed Hardware
Software shenanigans

Board index
All times are UTC

Delete cookies

Contact us

1982 style by Ian Bradley

Powered by phpBB® Forum Software © phpBB Limited

Privacy

Terms

The discussion thread, titled “DOOM could have had PC Speaker Music!”, centers on a personal experiment undertaken by minki to integrate the PC Speaker sound driver into the game DOOM. The core premise revolves around the often-overlooked inclusion of this driver within the game’s original code, intended for systems lacking dedicated sound cards prevalent during the late 1980s and early 1990s. The experiment’s motivation stems from the speculation surrounding the driver’s design – whether it was due to the computational demands placed on the hardware, particularly on faster processors like the 486, or simply a conservative architectural choice by the game’s developers.

minki’s investigation began with the realization that many PCs of the era did not possess a sound card capable of effectively supporting DOOM’s initial sound drivers. The PC Speaker driver was present, primarily serving to replicate basic sound effects, and was frequently disabled. The central question became whether the driver could have been utilized for full music playback, even on systems with the processing power of a 486.

To address this, minki developed a patch, specifically a “pcsp” file format, designed to efficiently translate PC Speaker tune data into a format suitable for the input/misc/pcspkr device. This format utilizes a system of 32-bit tone cells, characterized by a 16-bit frequency value in Hertz, a 4-bit duration scale (representing seconds multiplied by 10^-scale), and a 12-bit duration value. This intricate design aimed to minimize processing overhead by optimizing the conversion process.

The implementation involved integrating the “pcsp” format into the sndserver, using a priority mixer derived from the existing Adlib target. Critically, the experiment yielded no noticeable performance difference when running DOOM with and without the patch in place, suggesting that the added complexity did not negatively impact the game’s speed or responsiveness.

Currently, the patch is not publicly available, as minki has only implemented the soundtrack for the E1M1 level. The scope of the project extends beyond simple integration, with minki simultaneously working on resolving existing issues with the sndserver on modern Linux systems, reflecting a broader ambition to make older devices more useful in contemporary computing environments. The project’s core value lies in demonstrating the feasibility of using this forgotten audio driver to reinterpret a classic game, and showcasing the potential for retro-computing initiatives to address contemporary technical challenges.