ScummVM API documentation
DOSBoxCMS Class Reference
Inheritance diagram for DOSBoxCMS:
CMS::EmulatedCMS CMS::CMS Audio::AudioStream

Public Member Functions

 DOSBoxCMS (uint32 basePort=0x220)
 
bool init () override
 
void reset () override
 
void write (int a, int v) override
 
void writeReg (int r, int v) override
 
- Public Member Functions inherited from CMS::EmulatedCMS
void setCallbackFrequency (int timerFrequency) override
 
int readBuffer (int16 *buffer, const int numSamples) override
 
int getRate () const override
 
bool endOfData () const override
 
bool isStereo () const override
 
- Public Member Functions inherited from CMS::CMS
void start (TimerCallback *callback, int timerFrequency=DEFAULT_CALLBACK_FREQUENCY)
 
void stop ()
 

Protected Member Functions

void generateSamples (int16 *buffer, int numSamples) override
 
- Protected Member Functions inherited from CMS::EmulatedCMS
void startCallbacks (int timerFrequency) override
 
void stopCallbacks () override
 
- Protected Member Functions inherited from Audio::AudioStream
virtual bool endOfStream () const
 

Additional Inherited Members

- Static Public Attributes inherited from CMS::CMS
static const int DEFAULT_CALLBACK_FREQUENCY = 250
 
- Protected Attributes inherited from CMS::CMS
Common::ScopedPtr< TimerCallback_callback
 
- Static Protected Attributes inherited from CMS::EmulatedCMS
static const int FIXP_SHIFT = 16
 

Member Function Documentation

◆ init()

bool DOSBoxCMS::init ( )
overridevirtual

Initializes the CMS emulator.

Returns
true on success, false on failure

Implements CMS::CMS.

◆ reset()

void DOSBoxCMS::reset ( )
overridevirtual

Reinitializes the CMS emulator

Implements CMS::CMS.

◆ write()

void DOSBoxCMS::write ( int  a,
int  v 
)
overridevirtual

Writes a byte to the given I/O port. CMS responds to 2 sets of 2 ports: 0x220/0x222 - value for the 1st/2nd chip (channels 0-5/6-B) 0x221/0x223 - register for the 1st/2nd chip

Parameters
aport address
vvalue, which will be written

Implements CMS::CMS.

◆ writeReg()

void DOSBoxCMS::writeReg ( int  r,
int  v 
)
overridevirtual

Function to directly write to a specific CMS register. We allow writing to secondary CMS chip registers by using register values >= 0x100.

Parameters
rhardware register number to write to
vvalue, which will be written

Implements CMS::CMS.

◆ generateSamples()

void DOSBoxCMS::generateSamples ( int16 *  buffer,
int  numSamples 
)
overrideprotectedvirtual

Read up to 'length' samples.

Data will be in native endianess, 16 bit per sample, signed. buffer will be filled with interleaved left and right channel samples, starting with a left sample. The requested number of samples is stereo samples, so if you request 2 samples, you will get a total of two left channel and two right channel samples.

Implements CMS::EmulatedCMS.


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