There is a big difference between real hardware and emulation, and the better the emulation, the more it will suck CPU horsepowe […]
Show full quote
There is a big difference between real hardware and emulation, and the better the emulation, the more it will suck CPU horsepower to make it more accurate.
The timer that generates the square wave beeps runs at 1.19318 MHz ("sampling rate" if you prefer), not to mention how the mathematical square wave gets converted into analog sound from the speaker, echoing inside the case. It is not simple to reproduce that with a sound card running "only" at 48 kHz sampling rate. So one simulated sound sample contains about 24.8 speaker timer ticks.
The basic way of simulating this is to just calculate for each 48kHz output sample if the speaker bit is currently high or low and live with all the effects like phase jitter on output edges and the generated audio containing ideal steps that have infinite frequencies. Fast but not very high quality.
Mathematically the correct process would be to actually simulate the 1-bit 1.19318 MHz sound stream and resampling with low pass filtering that to 16-bit 48kHz. As that will suck CPU power way too much, it can be faked with band-limited step resposes (bleps).