VOGONS


First post, by ahyeadude

User metadata
Rank Newbie
Rank
Newbie

I've been searching around, but can't seem to find a TSR that reroutes or otherwise mutes the PC Speaker from DOS. Wouldn't it be as simple as intercepting calls to 0x61 and sending them into the void?

Reply 1 of 6, by BitWrangler

User metadata
Rank l33t++
Rank
l33t++

I'm getting nothing in all the usual places, found a snippet of C code that might come in handy...
https://reimagery.com/fsfd/bin/Simtel_DOS_199 … DOS/C/SPEAKER.C

Unicorn herding operations are proceeding, but all the totes of hens teeth and barrels of rocking horse poop give them plenty of hiding spots.

Reply 2 of 6, by reenigne

User metadata
Rank Oldbie
Rank
Oldbie

"Intercepting" is the tricky bit. Port 0x61 is an IO port, not a piece of code that gets called, and the 8086/8088/80286 don't have any mechanism for intercepting and redirecting IO port writes. The 80386 and later do, but it's easier said than done - you have to put the CPU in protected mode, essentially making your TSR a little OS. This would probably also make this TSR incompatible with 32-bit programs that have their own DOS extenders (at least without a lot of extra work). This is not entirely unprecedented - the screenshot program "Screen Thief" had a mode which did this to be able to intercept video accesses if I remember correctly. But I never heard of anyone doing it to silence the speaker. You could write a TSR that hooks the timer interrupt and turns the speaker off 18.2 times per second which would probably take care of most noises but some foreground programs might take over the timer themselves and ignore the previous hook (or turn the speaker back on much more often). If you have any particular pieces of software you want to silence, you could patch them (looking for bytes 0xe6, 0x61 and changing them to 0x90, 0x90 would probably do it).

Reply 3 of 6, by ahyeadude

User metadata
Rank Newbie
Rank
Newbie

Good point reenigne. Looks like this is a similar application for TANDY sound I/O port redirects. The README echos a lot of your points on the limitations of using protected mode for this. Should be easier/cleaner to go down the runtime patcher route.

Reply 4 of 6, by BitWrangler

User metadata
Rank l33t++
Rank
l33t++

What about keeping it busy with a 40khz tone or something?

Unicorn herding operations are proceeding, but all the totes of hens teeth and barrels of rocking horse poop give them plenty of hiding spots.

Reply 6 of 6, by Jo22

User metadata
Rank l33t++
Rank
l33t++

I remember seeing an utility that patches the DOS executable to be mute.
It's a public domain program, I believe.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//