#include <6581_.h>
Collaboration diagram for sidEmu:
Public Member Functions | |
sbyte | waveCalcMute (struct sidOperator *pVoice) |
sbyte | waveCalcNormal (struct sidOperator *pVoice) |
sbyte | waveCalcRangeCheck (struct sidOperator *pVoice) |
void | sidMode00 (struct sidOperator *pVoice) |
void | sidMode10 (struct sidOperator *pVoice) |
void | sidMode20 (struct sidOperator *pVoice) |
void | sidMode30 (struct sidOperator *pVoice) |
void | sidMode40 (struct sidOperator *pVoice) |
void | sidMode50 (struct sidOperator *pVoice) |
void | sidMode60 (struct sidOperator *pVoice) |
void | sidMode70 (struct sidOperator *pVoice) |
void | sidMode80 (struct sidOperator *pVoice) |
void | sidMode80hp (struct sidOperator *pVoice) |
void | sidModeLock (struct sidOperator *pVoice) |
void | sidMode14 (struct sidOperator *pVoice) |
void | sidMode34 (struct sidOperator *pVoice) |
void | sidMode54 (struct sidOperator *pVoice) |
void | sidMode74 (struct sidOperator *pVoice) |
sidEmu (emuEngine *aEmuEngine) | |
C'tor. | |
virtual | ~sidEmu () |
D'tor. | |
void | calcValuesPerCall () |
void | sidEmuSetReplayingSpeed (int clockMode, uword callsPerSec) |
void | sidEmuSet (struct sidOperator *pVoice, uword sidIndex) |
void | waveCalcFilter (struct sidOperator *pVoice) |
void | sidEmuSet2 (struct sidOperator *pVoice) |
void | sidEmuFillBuffer (emuEngine &thisEmu, sidTune &thistune, void *buffer, udword bufferLen) |
bool | sidEmuFastForwardReplay (int percent) |
void | sidEmuConfigure (const struct emuConfig &aEmuConfig) |
void | initWaveformTables (bool isNewSID) |
bool | sidEmuReset () |
void | clearSidOperator (struct sidOperator *pVoice) |
void | sidEmuResetAutoPanning (int autoPanning) |
void | sidEmuSetVoiceVolume (int voice, uword leftLevel, uword rightLevel, uword total) |
uword | sidEmuReturnVoiceVolume (int voice) |
void | sidEmuUpdateReplayingSpeed () |
void | sidEmuChangeReplayingSpeed () |
void | sidEmuSetClockSpeed (int clockMode) |
Public Attributes | |
sidOperator optr1 optr2 | optr3 |
uword | voice4_gainLeft |
uword | voice4_gainRight |
Voice 4 does not use a sidOperator structure. | |
udword | splitBufferLen |
shared with Mixer class | |
Protected Member Functions | |
void | noiseAdvance (struct sidOperator *pVoice) |
void | noiseAdvanceHp (struct sidOperator *pVoice) |
Private Attributes | |
friend | emuEngine |
friend | Mixer |
friend | Sample |
float | filterTable [0x800] |
float | bandPassParam [0x800] |
float | filterResTable [16] |
ptr2sidVoidFunc | sidModeNormalTable [16] |
MOS-8580, MOS-6581 (no 70). | |
ptr2sidVoidFunc | sidModeRingTable [16] |
MOS-8580, MOS-6581 (no 74). | |
float | filterDy |
float | filterResDy |
float | C64_fClockSpeed |
we don't need to store the default value here | |
uword | calls |
calls per second (here a default) | |
uword | filterValue |
uword | apCount |
uword | fastForwardFactor |
normal speed | |
uword | PCMfreq |
udword | sidtuneClockSpeed |
Song clock speed (PAL or NTSC). Does not affect pitch. | |
udword | PCMsid |
udword | PCMsidNoise |
udword | C64_clockSpeed |
Master clock speed. Affects pitch of SID and CIA samples. | |
bool | filterEnabled |
bool | updateAutoPanning |
bool | doAutoPanning |
ubyte | filterType |
ubyte | filterCurType |
uword | VALUES |
uword | VALUESorg |
udword | VALUESadd |
udword | VALUEScomma |
uword | toFill |
uword | defaultTimer |
uword | timer |
Sample * | iTheSampler |
pointer to the sample. We own this. | |
ubyte * | triangleTable |
ubyte * | sawtoothTable |
ubyte * | squareTable |
ubyte * | waveform50 |
ubyte * | noiseTableMSB |
ubyte * | noiseTableMID |
ubyte * | noiseTableLSB |
Envelope * | iTheEnvelope |
emuEngine * | iTheEmuEngine |
C6510 * | iThe6510 |
ubyte * | c64mem1 |
pointer to 64KB C64-RAM owned by C6510 | |
ubyte * | c64mem2 |
pointer to Basic-ROM, VIC, SID, I/O, Kernal-ROM owned by C6510 |
Definition at line 25 of file 6581_.h.
|
C'tor.
Definition at line 1504 of file 6581_.cpp. References C6510::c64mem1, c64mem1, C6510::c64mem2, c64mem2, CTOR, iThe6510, iTheEnvelope, iTheSampler, noiseTableLSB, noiseTableMID, noiseTableMSB, optr1, optr2, optr3, Sample, sawtoothTable, sidMode00(), sidMode10(), sidMode14(), sidMode20(), sidMode30(), sidMode34(), sidMode40(), sidMode50(), sidMode54(), sidMode60(), sidMode70(), sidMode74(), sidMode80(), sidModeLock(), sidModeNormalTable, sidModeRingTable, squareTable, triangleTable, ubyte, and waveform50. |
|
D'tor.
Definition at line 1589 of file 6581_.cpp. References DTOR, iTheEnvelope, iTheSampler, noiseTableLSB, noiseTableMID, noiseTableMSB, sawtoothTable, squareTable, triangleTable, and waveform50. |
|
Definition at line 71 of file 6581_.cpp. References calls, fastForwardFactor, PCMfreq, udword, VALUES, VALUESadd, VALUEScomma, and VALUESorg. Referenced by sidEmuChangeReplayingSpeed(), sidEmuFastForwardReplay(), sidEmuSetReplayingSpeed(), and sidEmuUpdateReplayingSpeed(). |
|
|
Definition at line 1066 of file 6581_.cpp. References noiseTableLSB, noiseTableMID, noiseTableMSB, sawtoothTable, sidMode00(), sidMode30(), sidMode60(), sidMode70(), sidMode74(), sidModeNormalTable, sidModeRingTable, squareTable, triangleTable, ubyte, udword, uword, and waveform50. Referenced by sidEmuConfigure(). |
|
Definition at line 189 of file 6581_.cpp. References HI, HILO, LO, LOHI, LOLO, sidOperator::noiseOutput, sidOperator::noiseReg, sidOperator::noiseStep, sidOperator::noiseStepAdd, noiseTableLSB, noiseTableMID, and noiseTableMSB. Referenced by sidMode80(). |
|
Definition at line 217 of file 6581_.cpp. References HI, HILO, LO, LOHI, LOLO, sidOperator::noiseOutput, sidOperator::noiseReg, sidOperator::noiseStep, sidOperator::noiseStepAdd, noiseTableLSB, noiseTableMID, noiseTableMSB, and udword. Referenced by sidMode80hp(). |
|
Definition at line 89 of file 6581_.cpp. References calcValuesPerCall(). Referenced by sidEmuConfigure(). |
|
Definition at line 1241 of file 6581_.cpp. References C64_clockSpeed, emuConfig::clockSpeed, emuConfig::emulateFilter, Envelope::enveEmuInit(), filterEnabled, emuConfig::frequency, initWaveformTables(), iTheEnvelope, iTheSampler, emuConfig::measuredVolume, emuConfig::mos8580, PCMfreq, PCMsid, PCMsidNoise, Sample::sampleEmuInit(), sidEmuChangeReplayingSpeed(), sidEmuSetClockSpeed(), and udword. Referenced by emuEngine::configureSID(). |
|
Definition at line 1031 of file 6581_.cpp. References calcValuesPerCall(), fastForwardFactor, HI, VALUES, VALUEScomma, and VALUESorg. |
|
|
Definition at line 1265 of file 6581_.cpp. References sidOperator::carrier, clearSidOperator(), Envelope::enveEmuResetOperator(), filterCurType, filterDy, filterResDy, filterType, filterValue, sidOperator::filtVoiceMask, iThe6510, iTheEnvelope, iTheSampler, sidOperator::modulator, optr1, optr2, optr3, Sample::sampleEmuReset(), C6510::sidKeysOff, C6510::sidKeysOn, and toFill. Referenced by emuEngine::reset(). |
|
Definition at line 1366 of file 6581_.cpp. References apCount, doAutoPanning, sidOperator::gainDest, sidOperator::gainDirec, sidOperator::gainLeft, sidOperator::gainLeftCentered, sidOperator::gainRight, sidOperator::gainRightCentered, sidOperator::gainSource, optr1, optr2, optr3, SIDEMU_NONE, updateAutoPanning, voice4_gainLeft, and voice4_gainRight. Referenced by emuEngine::emuEngine(), and emuEngine::setConfig(). |
|
Definition at line 1465 of file 6581_.cpp. References sidOperator::gainLeft, sidOperator::gainRight, optr1, optr2, optr3, uword, voice4_gainLeft, and voice4_gainRight. Referenced by emuEngine::getVoiceVolume(). |
|
|
|
Definition at line 100 of file 6581_.cpp. References C64_clockSpeed, and C64_fClockSpeed. Referenced by sidEmuConfigure(). |
|
Definition at line 121 of file 6581_.cpp. References c64mem2, calcValuesPerCall(), calls, defaultTimer, readLEword(), sidtuneClockSpeed, timer, and uword. Referenced by sidEmuInitializeSongOld(). |
|
Definition at line 1398 of file 6581_.cpp. References sidOperator::gainDest, sidOperator::gainDirec, sidOperator::gainLeft, sidOperator::gainLeftCentered, sidOperator::gainRight, sidOperator::gainRightCentered, sidOperator::gainSource, optr1, optr2, optr3, uword, voice4_gainLeft, and voice4_gainRight. Referenced by emuEngine::setVoiceVolume(). |
|
Definition at line 161 of file 6581_.cpp. References c64mem2, calcValuesPerCall(), calls, defaultTimer, readLEword(), sidtuneClockSpeed, timer, and uword. Referenced by sidEmuFillBuffer(). |
|
Definition at line 291 of file 6581_.cpp. References sidOperator::filtIO, sidOperator::output, and waveAdvance(). Referenced by initWaveformTables(), and sidEmu(). |
|
Definition at line 303 of file 6581_.cpp. References sidOperator::output, triangle, and waveAdvance(). Referenced by sidEmu(). |
|
Definition at line 365 of file 6581_.cpp. References HI, sidOperator::modulator, sidOperator::output, triangle, waveAdvance(), and sidOperator::waveStep. Referenced by sidEmu(). |
|
Definition at line 308 of file 6581_.cpp. References sidOperator::output, sawtooth, and waveAdvance(). Referenced by sidEmu(). |
|
Definition at line 313 of file 6581_.cpp. References sidOperator::output, sawtooth, triangle, triSaw, and waveAdvance(). Referenced by initWaveformTables(), and sidEmu(). |
|
Definition at line 378 of file 6581_.cpp. References HI, sidOperator::modulator, sidOperator::output, sawtooth, triangle, triSaw, waveAdvance(), and sidOperator::waveStep. Referenced by sidEmu(). |
|
Definition at line 322 of file 6581_.cpp. References sidOperator::output, square, and waveAdvance(). Referenced by sidEmu(). |
|
Definition at line 327 of file 6581_.cpp. References sidOperator::output, and waveAdvance(). Referenced by sidEmu(). |
|
Definition at line 396 of file 6581_.cpp. References HI, sidOperator::modulator, sidOperator::output, waveAdvance(), and sidOperator::waveStep. Referenced by sidEmu(). |
|
Definition at line 332 of file 6581_.cpp. References sidOperator::output, sawSquare, and waveAdvance(). Referenced by initWaveformTables(), and sidEmu(). |
|
Definition at line 337 of file 6581_.cpp. References sidOperator::output, triSawSquare, and waveAdvance(). Referenced by initWaveformTables(), and sidEmu(). |
|
Definition at line 408 of file 6581_.cpp. References HI, sidOperator::modulator, sidOperator::output, triSawSquare, waveAdvance(), and sidOperator::waveStep. Referenced by initWaveformTables(), and sidEmu(). |
|
Definition at line 342 of file 6581_.cpp. References noiseAdvance(), sidOperator::noiseOutput, sidOperator::output, and waveAdvance(). Referenced by sidEmu(), and sidEmuSet2(). |
|
Definition at line 348 of file 6581_.cpp. References noiseAdvanceHp(), sidOperator::noiseOutput, sidOperator::output, and waveAdvance(). Referenced by sidEmuSet2(). |
|
Definition at line 354 of file 6581_.cpp. References sidOperator::filtIO, sidOperator::noiseIsLocked, sidOperator::output, and waveAdvance(). Referenced by sidEmu(). |
|
Definition at line 475 of file 6581_.cpp. References sidOperator::filtEnabled, filterDy, filterResDy, filterType, sidOperator::filtIO, sidOperator::filtLow, sidOperator::filtRef, and sbyte. |
|
Definition at line 541 of file 6581_.cpp. References sidOperator::ADSRproc, sidOperator::filtIO, iTheEnvelope, and sbyte. Referenced by clearSidOperator(), and sidEmuSet2(). |
|
Definition at line 550 of file 6581_.cpp. References sidOperator::ADSRproc, emuEngine::ampMod1x8, sidOperator::cycleLenCount, sidOperator::filtIO, HI, iTheEmuEngine, iTheEnvelope, sidOperator::newPulseIndex, sidOperator::output, sidOperator::pulseIndex, sbyte, sidOperator::SIDctrl, waveCalcCycleLen(), sidOperator::waveProc, and sidOperator::waveStep. Referenced by sidEmuSet2(), Mixer::syncEm(), and waveCalcRangeCheck(). |
|
Definition at line 583 of file 6581_.cpp. References sidOperator::ADSRproc, emuEngine::ampMod1x8, sidOperator::cycleLenCount, sidOperator::filtIO, HI, iTheEmuEngine, iTheEnvelope, sidOperator::outProc, sidOperator::output, sbyte, waveCalcNormal(), sidOperator::waveProc, sidOperator::waveStep, and sidOperator::waveStepOld. Referenced by sidEmuSet2(). |
|
Definition at line 107 of file 6581_.h. Referenced by sidEmuFillBuffer(), and sidEmuResetAutoPanning(). |
|
Definition at line 96 of file 6581_.h. Referenced by emuEngine::filterTableInit(), and sidEmuFillBuffer(). |
|
Master clock speed. Affects pitch of SID and CIA samples.
Definition at line 113 of file 6581_.h. Referenced by Sample::sampleEmuReset(), sidEmuConfigure(), and sidEmuSetClockSpeed(). |
|
we don't need to store the default value here
Definition at line 103 of file 6581_.h. Referenced by sidEmuSetClockSpeed(). |
|
pointer to 64KB C64-RAM owned by C6510
Definition at line 161 of file 6581_.h. Referenced by sidEmu(), and sidEmuFillBuffer(). |
|
pointer to Basic-ROM, VIC, SID, I/O, Kernal-ROM owned by C6510
Definition at line 162 of file 6581_.h. Referenced by sidEmu(), sidEmuFillBuffer(), sidEmuSet(), sidEmuSetReplayingSpeed(), and sidEmuUpdateReplayingSpeed(). |
|
calls per second (here a default)
Definition at line 105 of file 6581_.h. Referenced by calcValuesPerCall(), sidEmuSetReplayingSpeed(), and sidEmuUpdateReplayingSpeed(). |
|
Definition at line 136 of file 6581_.h. Referenced by sidEmuSetReplayingSpeed(), and sidEmuUpdateReplayingSpeed(). |
|
Definition at line 117 of file 6581_.h. Referenced by sidEmuResetAutoPanning(), and sidEmuSet(). |
|
|
|
normal speed
Definition at line 108 of file 6581_.h. Referenced by calcValuesPerCall(), sidEmuFastForwardReplay(), and sidEmuFillBuffer(). |
|
Definition at line 120 of file 6581_.h. Referenced by sidEmuFillBuffer(), and sidEmuReset(). |
|
Definition at line 102 of file 6581_.h. Referenced by sidEmuFillBuffer(), sidEmuReset(), and waveCalcFilter(). |
|
Definition at line 115 of file 6581_.h. Referenced by sidEmuConfigure(), sidEmuFillBuffer(), and sidEmuSet(). |
|
Definition at line 102 of file 6581_.h. Referenced by sidEmuFillBuffer(), sidEmuReset(), and waveCalcFilter(). |
|
Definition at line 97 of file 6581_.h. Referenced by emuEngine::filterTableInit(), and sidEmuFillBuffer(). |
|
Definition at line 95 of file 6581_.h. Referenced by emuEngine::filterTableInit(). |
|
Definition at line 119 of file 6581_.h. Referenced by sidEmuFillBuffer(), sidEmuReset(), and waveCalcFilter(). |
|
Definition at line 106 of file 6581_.h. Referenced by sidEmuFillBuffer(), and sidEmuReset(). |
|
Definition at line 158 of file 6581_.h. Referenced by sidEmu(), sidEmuFillBuffer(), and sidEmuReset(). |
|
Definition at line 157 of file 6581_.h. Referenced by waveCalcNormal(), and waveCalcRangeCheck(). |
|
Definition at line 156 of file 6581_.h. Referenced by sidEmu(), sidEmuConfigure(), sidEmuFillBuffer(), sidEmuReset(), sidEmuSet(), waveCalcMute(), waveCalcNormal(), waveCalcRangeCheck(), and ~sidEmu(). |
|
pointer to the sample. We own this.
Definition at line 139 of file 6581_.h. Referenced by Mixer::Mixer(), emuEngine::resetSampleEmu(), sidEmu(), sidEmuConfigure(), sidEmuFillBuffer(), sidEmuReset(), and ~sidEmu(). |
|
|
|
Definition at line 153 of file 6581_.h. Referenced by initWaveformTables(), noiseAdvance(), noiseAdvanceHp(), sidEmu(), and ~sidEmu(). |
|
Definition at line 152 of file 6581_.h. Referenced by initWaveformTables(), noiseAdvance(), noiseAdvanceHp(), sidEmu(), and ~sidEmu(). |
|
Definition at line 151 of file 6581_.h. Referenced by initWaveformTables(), noiseAdvance(), noiseAdvanceHp(), sidEmu(), and ~sidEmu(). |
|
Definition at line 88 of file 6581_.h. Referenced by sidEmu(), sidEmuFillBuffer(), sidEmuReset(), sidEmuResetAutoPanning(), sidEmuReturnVoiceVolume(), and sidEmuSetVoiceVolume(). |
|
Definition at line 109 of file 6581_.h. Referenced by calcValuesPerCall(), Sample::sampleEmuReset(), and sidEmuConfigure(). |
|
Definition at line 111 of file 6581_.h. Referenced by sidEmuConfigure(), and sidEmuSet2(). |
|
Definition at line 112 of file 6581_.h. Referenced by sidEmuConfigure(), and sidEmuSet2(). |
|
Definition at line 30 of file 6581_.h. Referenced by sidEmu(). |
|
Definition at line 143 of file 6581_.h. Referenced by initWaveformTables(), sidEmu(), and ~sidEmu(). |
|
MOS-8580, MOS-6581 (no 70).
Definition at line 99 of file 6581_.h. Referenced by initWaveformTables(), sidEmu(), and sidEmuSet2(). |
|
MOS-8580, MOS-6581 (no 74).
Definition at line 100 of file 6581_.h. Referenced by initWaveformTables(), sidEmu(), and sidEmuSet2(). |
|
Song clock speed (PAL or NTSC). Does not affect pitch.
Definition at line 110 of file 6581_.h. Referenced by sidEmuSetReplayingSpeed(), and sidEmuUpdateReplayingSpeed(). |
|
shared with Mixer class
Definition at line 90 of file 6581_.h. Referenced by Mixer::fill16bitsplit(), Mixer::fill8bitsplit(), and sidEmuFillBuffer(). |
|
Definition at line 144 of file 6581_.h. Referenced by initWaveformTables(), sidEmu(), and ~sidEmu(). |
|
Definition at line 137 of file 6581_.h. Referenced by sidEmuFillBuffer(), sidEmuSetReplayingSpeed(), and sidEmuUpdateReplayingSpeed(). |
|
Definition at line 129 of file 6581_.h. Referenced by sidEmuFillBuffer(), and sidEmuReset(). |
|
Definition at line 142 of file 6581_.h. Referenced by initWaveformTables(), sidEmu(), and ~sidEmu(). |
|
Definition at line 116 of file 6581_.h. Referenced by sidEmuFillBuffer(), sidEmuResetAutoPanning(), and sidEmuSet(). |
|
Definition at line 125 of file 6581_.h. Referenced by calcValuesPerCall(), sidEmuFastForwardReplay(), and sidEmuFillBuffer(). |
|
Definition at line 126 of file 6581_.h. Referenced by calcValuesPerCall(), and sidEmuFillBuffer(). |
|
Definition at line 126 of file 6581_.h. Referenced by calcValuesPerCall(), sidEmuFastForwardReplay(), and sidEmuFillBuffer(). |
|
Definition at line 125 of file 6581_.h. Referenced by calcValuesPerCall(), and sidEmuFastForwardReplay(). |
|
Definition at line 89 of file 6581_.h. Referenced by sidEmuResetAutoPanning(), sidEmuReturnVoiceVolume(), and sidEmuSetVoiceVolume(). |
|
Voice 4 does not use a sidOperator structure.
Definition at line 89 of file 6581_.h. Referenced by sidEmuResetAutoPanning(), sidEmuReturnVoiceVolume(), and sidEmuSetVoiceVolume(). |
|
Definition at line 145 of file 6581_.h. Referenced by initWaveformTables(), sidEmu(), and ~sidEmu(). |