Writing a synthesizer for old IBM PCs is...
-
Writing a synthesizer for old IBM PCs is... awkward. The IBM PC came out in 1981 and all you had, practically, was the PC speaker for several years. The first mass market sound card with digital audio (Sound Blaster) didn't hit the shelves until 1989. So, for 8 years, the PC speaker was really the only way to get digital audio, but that approach monopolizes the CPU, especially on the 4.77 MHz 8088 in the original IBM PC and clones.
1/n -
In order to support digital audio on an original IBM PC (1981) with no sound card, I'd have to do what the 8088MPH demo folks did and write precisely timed code that doesn't rely on interrupts for timing. That code, like the 8088MPH demo, would only work on a stock IBM PC 5150 with no forward compatibility. Alternatively, I could just use interrupts which would require at least a 286 PC (1984), or an original 5150 with 8088 CPU or clone (1981) with a Sound Blaster (1989).
2/n -
In order to write a program that generates digital audio and actually would work on a 1981 PC (in 1981 before sound cards existed) and would be forward compatible, it would have to detect CPU speed, and have hand-timed code for 4.77 MHz 8088 machines, and interrupt-driven code for anything faster. I think I'll start with the interrupt-driven code for my own sanity, then support Sound Blaster (which would run on any speed machine), then think about writing hand-timed code. n/n
-
Gregreplied to thezerobit last edited by [email protected]
@thezerobit Are you opposed to a Covox Speech Thing / Disney Sound Source-style parallel port DAC? Sending a byte to the parallel port may be less resources than handholding the PC speaker...
EDIT: trixter in 2014 mentioned that 8088 Domination would use about 95% of available CPU time doing PC speaker work, vs about 80% for the Covox
https://trixter.oldskool.org/2014/06/17/8088-domination/#comment-21140 -
@greg
I'm not opposed, and almost certainly will support it (probably add support after Sound Blaster). However, the Covox Speech Thing didn't hit the market until 1987, so it doesn't really cover the case of supporting an period-correct 1981 PC. Also, unfortunately, you have to bang the samples into the parallel port with the same precise timing, so it has the same problem as the PC speaker (requiring interrupts or precise timing). It does sound better than the PC speaker, which is something. -
@thezerobit Ah I didn't realize it was so late in the lifecycle! Maybe people didn't bother making better sound hardware until the CPU was fast enough to actually drive it