-
Notifications
You must be signed in to change notification settings - Fork 43
Description
The Intel 8254 programmable interval timer powered PC speaker music for thousands of video game titles for decades, and I think it would be a useful addition. (The original PC and XT had the 8253, but they're functionally identical except for a new 'read-back' command, VGM would only need the 8254)
Although it is not itself a sound chip, the 8254 operates in a very similar way to most sound chips, functioning as a 16-bit, three channel frequency divisor. On the IBM PC, the speaker was more or less connected directly to the output of the 8253's channel #2, via a low pass filter and amplification circuit. 6-bit PWM audio was possible via bit-banging.
The 8254 has a number of selectable timer modes, each with their own quirks, and had three gate control inputs that could externally control counter operation depending on mode.
There are some "PC Speaker" VGM packs but they are essentially translations to another sound chip such as the AY-3-8910. I'd like to add VGM recording to my PC emulator but feel that native support would really be the ideal solution.
I have very accurate 8253 emulation I'd be willing to contribute. It is in rust but could be trivially translated to C/C++.