I had a Tandy 2000 when I was a kid. I tried to get polyphonic sound output out of the thing's beeper via PWM, by taking advantage of the fact that the machine's 80186 CPU had three internal very high res timers in addition to the onboard 8253 timer used to drive the speaker (the same timer is used on the PC, but at different I/O locations; the T2K ran DOS but was one of those rare machines that were NOT "100% IBM compatible"). By grabbing a spare timer, programming it, and setting the cpu to halt until it got a timer interrupt and toggle the speaker line when it did, I was able to get a very rough out of tune approximation of multiple tones, as well as rudimentary volume control.
The system clock froze after I ran my experiments but it was worth it... FOR SCIENCE!
I had a Tandy 2000 when I was a kid. I tried to get polyphonic sound output out of the thing's beeper via PWM, by taking advantage of the fact that the machine's 80186 CPU had three internal very high res timers in addition to the onboard 8253 timer used to drive the speaker (the same timer is used on the PC, but at different I/O locations; the T2K ran DOS but was one of those rare machines that were NOT "100% IBM compatible"). By grabbing a spare timer, programming it, and setting the cpu to halt until it got a timer interrupt and toggle the speaker line when it did, I was able to get a very rough out of tune approximation of multiple tones, as well as rudimentary volume control.
The system clock froze after I ran my experiments but it was worth it... FOR SCIENCE!