libsidplayfp 2.15.0
|
#include <WaveformCalculator.h>
Public Member Functions | |
matrix_t * | getWaveTable () |
matrix_t * | buildPulldownTable (ChipModel model, CombinedWaveforms cws) |
Static Public Member Functions | |
static WaveformCalculator * | getInstance () |
Combined waveform calculator for WaveformGenerator. By combining waveforms, the bits of each waveform are effectively short circuited, a zero bit in one waveform will result in a zero output bit, thus the claim that the waveforms are AND'ed. However, a zero bit in one waveform may also affect the neighboring bits in the output.
Example:
1 1 Bit # 1 0 9 8 7 6 5 4 3 2 1 0 ----------------------- Sawtooth 0 0 0 1 1 1 1 1 1 0 0 0 Triangle 0 0 1 1 1 1 1 1 0 0 0 0 AND 0 0 0 1 1 1 1 1 0 0 0 0 Output 0 0 0 0 1 1 1 0 0 0 0 0
Re-vectorized die photographs reveal the mechanism behind this behavior. Each waveform selector bit acts as a switch, which directly connects internal outputs into the waveform DAC inputs as follows:
We can thus draw the following conclusions:
Also in the 6581 the MSB of the oscillator, used as input for the triangle xor logic and the pulse adder's last bit, is connected directly to the waveform selector, while in the 8580 it is latched at sid_clk2 before being forwarded to the selector. Thus in the 6581 if the sawtooth MSB is pulled down it might affect the oscillator's adder driving the top bit low.
matrix_t * reSIDfp::WaveformCalculator::buildPulldownTable | ( | ChipModel | model, |
CombinedWaveforms | cws | ||
) |
Build pulldown table for use by WaveformGenerator.
model | Chip model to use |
cws | strength of combined waveforms |
|
static |
Get the singleton instance.
|
inline |
Get the waveform table for use by WaveformGenerator.