libsidplayfp  2.0.2
Public Member Functions | Static Public Member Functions | List of all members
reSIDfp::WaveformCalculator Class Reference

#include <WaveformCalculator.h>

Public Member Functions

matrix_tbuildTable (ChipModel model)
 

Static Public Member Functions

static WaveformCalculatorgetInstance ()
 

Detailed Description

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 infamous 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:

Member Function Documentation

◆ buildTable()

matrix_t * reSIDfp::WaveformCalculator::buildTable ( ChipModel  model)

Build waveform tables for use by WaveformGenerator.

Parameters
modelChip model to use
Returns
Waveform table

◆ getInstance()

WaveformCalculator * reSIDfp::WaveformCalculator::getInstance ( )
static

Get the singleton instance.


The documentation for this class was generated from the following files: