After patching dosbox and playing with various options on my side, the PWM trick worked
I'd say that the playing back is over 90% intelligible and the sound quality, or the richness of the sound, is way above what a simple frequency generator is supposed to be able achieve.
Dosbox turns out to be a capable and fast emulator as well. The ability to precisely control the emulated clock rate also helps with timing. As long as you don't use certain features such as PAE, and be careful about how you handle pagefaults, it works well without much patching.
There is also a fork named Dosbox-x that has a lot more features, including TTF fonts and IDE emulation, but seems to be slightly more buggy.
Gigasoft wrote:
I remember my 3 year old self being impressed by Digger's PWM soundtrack for its novelty, but PC speakers are not known for their high fidelity, so this will generally sound awful. The traditional speakers that were used in very old PCs would do okay but the piezo ones are probably unsuitable due to high distortion and poor frequency response. I once hacked a Java toy robot to do this with its tiny sad beeper and it was pretty much impossible to make out what the words were.
Call me as impressed as a 3 year old
Of course, rather than hifi, this is more like lofi. But it's certainly fun to see (hear) the awesome result of the creativity that people had when working with such limited hardware back then, lively.