Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

emuEngine Class Reference

#include <emucfg.h>

Collaboration diagram for emuEngine:

Collaboration graph
[legend]
List of all members.

Public Member Functions

IMPORT_C emuEngine ()
virtual ~emuEngine ()
IMPORT_C bool setConfig (struct emuConfig &)
 set configuration for SID emulation engine.

IMPORT_C void getConfig (struct emuConfig &)
void returnConfig (emuConfig &inEmuCfg)
void setDefaultFilterStrength ()
bool setVoiceVolume (int voice, ubyte leftLevel, ubyte rightLevel, uword total)
uword getVoiceVolume (int voice)
uword returnVoiceVolume (int voice)
 operator bool ()
bool getStatus ()
bool returnStatus ()
bool reset ()
bool resetSampleEmu ()
void amplifyThreeVoiceTunes (bool isThreeVoiceTune)
IMPORT_C bool verifyEndianess ()
IMPORT_C void FillBuffer (sidTune &thistune, void *buffer, udword bufferLen)
IMPORT_C int getSecondsThisSong ()
IMPORT_C int getSecondsTotal ()
void resetSecondsThisSong ()

Public Attributes

friend sidEmu
C6510iThe6510
 pointer to the 6510 which we own

sidEmuiTheSidEmu
 pointer to the sidEmu (6581) object

MixeriTheMixer
sbyteampMod1x8
emuConfig config
udword bytesCount
 used for fading and duration

int secondsTotal
 listening mileage

int secondsThisSong
 listening mileage

ubyte bufferScale
ubyte playRamRom
ubyte oldValues [numberOfC64addr]
 for the player

ubyte randomSeed
bool MPUstatus
bool isThreeVoiceAmplified
 keep track of current mixer state

bool isThreeVoiceTune
 this toggled from outside

bool isReady

Protected Member Functions

virtual void setRandomSeed ()

Private Member Functions

void MPUreset ()
ubyteMPUreturnRAMbase ()
bool freeMem ()
bool allocMem ()
void configureSID ()
void initMixerEngine ()
void initMixerFunction ()
void setDefaultVoiceVolumes ()
void filterTableInit ()

Friends

bool sidEmuInitializeSongOld (emuEngine &, sidTune &, uword songNum)

Constructor & Destructor Documentation

EXPORT_C emuEngine::emuEngine  ) 
 

Definition at line 13 of file eeconfig.cpp.

References allocMem(), emuConfig::autoPanning, emuConfig::bitsPerSample, bytesCount, C6510::c64memAlloc(), emuConfig::channels, emuConfig::clockSpeed, config, configureSID(), CTOR, emuConfig::digiPlayerScans, emuConfig::emulateFilter, emuConfig::forceSongSpeed, emuConfig::frequency, initMixerEngine(), isReady, isThreeVoiceTune, iThe6510, iTheMixer, iTheSidEmu, emuConfig::measuredVolume, emuConfig::memoryMode, emuConfig::mos8580, MPU_TRANSPARENT_ROM, MPUreset(), MPUstatus, reset(), emuConfig::sampleFormat, secondsThisSong, secondsTotal, setDefaultFilterStrength(), setDefaultVoiceVolumes(), setRandomSeed(), emuConfig::sidChips, sidEmu, SIDEMU_8BIT, SIDEMU_MONO, SIDEMU_NONE, SIDEMU_UNSIGNED_PCM, sidEmu::sidEmuResetAutoPanning(), and emuConfig::volumeControl.

emuEngine::~emuEngine  )  [virtual]
 

Definition at line 74 of file eeconfig.cpp.

References DTOR, freeMem(), iThe6510, iTheMixer, and iTheSidEmu.


Member Function Documentation

bool emuEngine::allocMem  )  [private]
 

Definition at line 368 of file eeconfig.cpp.

References ampMod1x8, freeMem(), iTheMixer, sbyte, Mixer::signedPanMix16, Mixer::signedPanMix8, and sword.

Referenced by emuEngine().

void emuEngine::amplifyThreeVoiceTunes bool  isThreeVoiceTune  ) 
 

Definition at line 447 of file eeconfig.cpp.

References isThreeVoiceTune.

Referenced by sidEmuInitializeSong(), and sidEmuInitializeSongOld().

void emuEngine::configureSID  )  [private]
 

Definition at line 455 of file eeconfig.cpp.

References config, iTheSidEmu, and sidEmu::sidEmuConfigure().

Referenced by emuEngine(), and setConfig().

EXPORT_C void emuEngine::FillBuffer sidTune thistune,
void *  buffer,
udword  bufferLen
 

Definition at line 334 of file eeconfig.cpp.

References buffer, iTheSidEmu, and sidEmu::sidEmuFillBuffer().

Referenced by main(), SidPlayerThread(), and CSidPlayer::Thread().

void emuEngine::filterTableInit  )  [private]
 

Definition at line 752 of file eeconfig.cpp.

References sidEmu::bandPassParam, config, emuConfig::filterFm, emuConfig::filterFs, emuConfig::filterFt, sidEmu::filterResTable, sidEmu::filterTable, iTheSidEmu, and uword.

Referenced by setConfig(), and setDefaultFilterStrength().

bool emuEngine::freeMem  )  [private]
 

Definition at line 354 of file eeconfig.cpp.

References ampMod1x8, iTheMixer, Mixer::signedPanMix16, and Mixer::signedPanMix8.

Referenced by allocMem(), and ~emuEngine().

EXPORT_C void emuEngine::getConfig struct emuConfig  ) 
 

Definition at line 310 of file eeconfig.cpp.

References config.

Referenced by CSidPlayAppUi::HandleCommandL(), CSidPlayer::InitL(), InitMainL(), main(), and returnConfig().

IMPORT_C int emuEngine::getSecondsThisSong  ) 
 

Referenced by CSidPlayerTimeView::Draw().

IMPORT_C int emuEngine::getSecondsTotal  ) 
 

Referenced by CSidPlayerTimeView::Draw().

bool emuEngine::getStatus  )  [inline]
 

Definition at line 290 of file emucfg.h.

References isReady.

Referenced by returnStatus().

uword emuEngine::getVoiceVolume int  voice  ) 
 

Definition at line 814 of file eeconfig.cpp.

References iTheSidEmu, sidEmu::sidEmuReturnVoiceVolume(), and uword.

Referenced by returnVoiceVolume().

void emuEngine::initMixerEngine  )  [private]
 

Definition at line 460 of file eeconfig.cpp.

References ampMod1x8, emuConfig::bitsPerSample, bufferScale, emuConfig::channels, config, emuConfig::digiPlayerScans, ELOG1, emuConfig::emulateFilter, Mixer::fill16bitMono(), Mixer::fill16bitMonoControl(), Mixer::fill16bitsplit(), Mixer::fill16bitStereo(), Mixer::fill16bitStereoControl(), Mixer::fill16bitStereoSurround(), Mixer::fill8bitMono(), Mixer::fill8bitMonoControl(), Mixer::fill8bitsplit(), Mixer::fill8bitStereo(), Mixer::fill8bitStereoControl(), Mixer::fill8bitStereoSurround(), isThreeVoiceAmplified, isThreeVoiceTune, iTheMixer, Mixer::MixerInit(), emuConfig::sampleFormat, sbyte, sdword, SIDEMU_16BIT, SIDEMU_HWMIXING, SIDEMU_MONO, SIDEMU_NONE, SIDEMU_SIGNED_PCM, SIDEMU_STEREO, SIDEMU_STEREOSURROUND, SIDEMU_UNSIGNED_PCM, SIDEMU_VOLCONTROL, Mixer::sidEmuFillFunc, Mixer::signedPanMix16, Mixer::signedPanMix8, sword, ubyte, udword, uword, and emuConfig::volumeControl.

Referenced by emuEngine(), reset(), and setConfig().

void emuEngine::initMixerFunction  )  [private]
 

void emuEngine::MPUreset  )  [private]
 

Definition at line 389 of file eeconfig.cpp.

References C6510::c64memClear(), C6510::c64memReset(), emuConfig::clockSpeed, config, C6510::initInterpreter(), iThe6510, emuConfig::memoryMode, MPUstatus, and randomSeed.

Referenced by emuEngine(), and sidEmuInitializeSongOld().

ubyte * emuEngine::MPUreturnRAMbase  )  [private]
 

Definition at line 399 of file eeconfig.cpp.

References C6510::c64mem1, iThe6510, MPUstatus, and ubyte.

Referenced by sidEmuInitializeSongOld().

emuEngine::operator bool  )  [inline]
 

Definition at line 289 of file emucfg.h.

References isReady.

bool emuEngine::reset  ) 
 

Definition at line 417 of file eeconfig.cpp.

References config, emuConfig::digiPlayerScans, initMixerEngine(), isReady, isThreeVoiceAmplified, isThreeVoiceTune, iTheSidEmu, resetSampleEmu(), and sidEmu::sidEmuReset().

Referenced by emuEngine(), and sidEmuInitializeSongOld().

bool emuEngine::resetSampleEmu  ) 
 

Definition at line 441 of file eeconfig.cpp.

References sidEmu::iTheSampler, iTheSidEmu, and Sample::sampleEmuReset().

Referenced by reset().

void emuEngine::resetSecondsThisSong  )  [inline]
 

Definition at line 307 of file emucfg.h.

References secondsThisSong.

Referenced by sidEmuInitializeSongOld().

void emuEngine::returnConfig emuConfig inEmuCfg  )  [inline]
 

Definition at line 261 of file emucfg.h.

References getConfig().

Referenced by main().

bool emuEngine::returnStatus  )  [inline]
 

Definition at line 291 of file emucfg.h.

References getStatus().

uword emuEngine::returnVoiceVolume int  voice  )  [inline]
 

Definition at line 285 of file emucfg.h.

References getVoiceVolume(), and uword.

EXPORT_C bool emuEngine::setConfig struct emuConfig inCfg  ) 
 

set configuration for SID emulation engine.

Parameters:
inCfg the new configuration
Returns:
true if it was set, false if any problems

Definition at line 86 of file eeconfig.cpp.

References emuConfig::autoPanning, emuConfig::bitsPerSample, emuConfig::channels, emuConfig::clockSpeed, config, configureSID(), emuConfig::digiPlayerScans, emuConfig::emulateFilter, emuConfig::filterFm, emuConfig::filterFs, emuConfig::filterFt, filterTableInit(), emuConfig::forceSongSpeed, emuConfig::frequency, initMixerEngine(), iTheSidEmu, emuConfig::measuredVolume, emuConfig::memoryMode, emuConfig::mos8580, MPU_BANK_SWITCHING, MPU_PLAYSID_ENVIRONMENT, MPU_TRANSPARENT_ROM, emuConfig::sampleFormat, setDefaultVoiceVolumes(), SIDEMU_16BIT, SIDEMU_8BIT, SIDEMU_CENTEREDAUTOPANNING, SIDEMU_FULLPANNING, SIDEMU_HWMIXING, SIDEMU_MONO, SIDEMU_NONE, SIDEMU_SIGNED_PCM, SIDEMU_STEREO, SIDEMU_STEREOSURROUND, SIDEMU_UNSIGNED_PCM, SIDEMU_VOLCONTROL, sidEmu::sidEmuResetAutoPanning(), and emuConfig::volumeControl.

Referenced by CSidPlayer::InitL(), InitMainL(), and main().

void emuEngine::setDefaultFilterStrength  ) 
 

Definition at line 315 of file eeconfig.cpp.

References config, emuConfig::filterFm, emuConfig::filterFs, emuConfig::filterFt, filterTableInit(), SIDEMU_DEFAULTFILTERFM, SIDEMU_DEFAULTFILTERFS, and SIDEMU_DEFAULTFILTERFT.

Referenced by emuEngine().

void emuEngine::setDefaultVoiceVolumes  )  [private]
 

Definition at line 717 of file eeconfig.cpp.

References emuConfig::channels, config, setVoiceVolume(), SIDEMU_MONO, SIDEMU_STEREOSURROUND, and emuConfig::volumeControl.

Referenced by emuEngine(), and setConfig().

void emuEngine::setRandomSeed  )  [protected, virtual]
 

Definition at line 411 of file eeconfig.cpp.

References randomSeed, and ubyte.

Referenced by emuEngine().

bool emuEngine::setVoiceVolume int  voice,
ubyte  leftLevel,
ubyte  rightLevel,
uword  total
 

Definition at line 801 of file eeconfig.cpp.

References emuConfig::channels, config, iTheSidEmu, SIDEMU_MONO, SIDEMU_NONE, sidEmu::sidEmuSetVoiceVolume(), and emuConfig::volumeControl.

Referenced by main(), and setDefaultVoiceVolumes().

EXPORT_C bool emuEngine::verifyEndianess  ) 
 

Definition at line 323 of file eeconfig.cpp.

References readBEword(), ubyte, and writeLEword().

Referenced by CSidPlayer::InitL(), InitMainL(), and main().


Friends And Related Function Documentation

bool sidEmuInitializeSongOld emuEngine thisEmuEngine,
sidTune thisTune,
uword  songNum
[friend]
 

Definition at line 86 of file player.cpp.


Member Data Documentation

sbyte* emuEngine::ampMod1x8
 

Definition at line 332 of file emucfg.h.

Referenced by allocMem(), freeMem(), initMixerEngine(), sidEmu::waveCalcNormal(), and sidEmu::waveCalcRangeCheck().

ubyte emuEngine::bufferScale
 

Definition at line 344 of file emucfg.h.

Referenced by initMixerEngine(), and sidEmu::sidEmuFillBuffer().

udword emuEngine::bytesCount
 

used for fading and duration

Definition at line 339 of file emucfg.h.

Referenced by emuEngine(), and sidEmu::sidEmuFillBuffer().

emuConfig emuEngine::config
 

Definition at line 336 of file emucfg.h.

Referenced by configureSID(), emuEngine(), filterTableInit(), getConfig(), initMixerEngine(), MPUreset(), reset(), setConfig(), setDefaultFilterStrength(), setDefaultVoiceVolumes(), setVoiceVolume(), sidEmu::sidEmuFillBuffer(), sidEmuInitializeSong(), and sidEmuInitializeSongOld().

bool emuEngine::isReady
 

Definition at line 358 of file emucfg.h.

Referenced by emuEngine(), getStatus(), operator bool(), reset(), sidEmu::sidEmuFillBuffer(), and sidEmuInitializeSongOld().

bool emuEngine::isThreeVoiceAmplified
 

keep track of current mixer state

Definition at line 356 of file emucfg.h.

Referenced by initMixerEngine(), and reset().

bool emuEngine::isThreeVoiceTune
 

this toggled from outside

Definition at line 357 of file emucfg.h.

Referenced by amplifyThreeVoiceTunes(), emuEngine(), initMixerEngine(), and reset().

C6510* emuEngine::iThe6510
 

pointer to the 6510 which we own

Definition at line 329 of file emucfg.h.

Referenced by emuEngine(), MPUreset(), MPUreturnRAMbase(), sidEmuInitializeSong(), sidEmuInitializeSongOld(), SidPlayExceptionHandler(), and ~emuEngine().

Mixer* emuEngine::iTheMixer
 

Definition at line 331 of file emucfg.h.

Referenced by allocMem(), emuEngine(), freeMem(), initMixerEngine(), sidEmu::sidEmuFillBuffer(), and ~emuEngine().

sidEmu* emuEngine::iTheSidEmu
 

pointer to the sidEmu (6581) object

Definition at line 330 of file emucfg.h.

Referenced by configureSID(), emuEngine(), FillBuffer(), filterTableInit(), getVoiceVolume(), reset(), resetSampleEmu(), setConfig(), setVoiceVolume(), sidEmuInitializeSongOld(), and ~emuEngine().

bool emuEngine::MPUstatus
 

Definition at line 353 of file emucfg.h.

Referenced by emuEngine(), MPUreset(), and MPUreturnRAMbase().

ubyte emuEngine::oldValues[numberOfC64addr]
 

for the player

Definition at line 347 of file emucfg.h.

Referenced by sidEmuInitializeSong(), and sidEmuInitializeSongOld().

ubyte emuEngine::playRamRom
 

Definition at line 345 of file emucfg.h.

Referenced by sidEmu::sidEmuFillBuffer(), sidEmuInitializeSong(), and sidEmuInitializeSongOld().

ubyte emuEngine::randomSeed
 

Definition at line 352 of file emucfg.h.

Referenced by MPUreset(), and setRandomSeed().

int emuEngine::secondsThisSong
 

listening mileage

Definition at line 341 of file emucfg.h.

Referenced by emuEngine(), resetSecondsThisSong(), and sidEmu::sidEmuFillBuffer().

int emuEngine::secondsTotal
 

listening mileage

Definition at line 340 of file emucfg.h.

Referenced by emuEngine(), and sidEmu::sidEmuFillBuffer().

friend emuEngine::sidEmu
 

Definition at line 266 of file emucfg.h.

Referenced by emuEngine().


The documentation for this class was generated from the following files:
Generated on Tue Feb 8 04:33:28 2005 for Esidplay by doxygen 1.3.3