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 |
| bool | isStereo () const override |
Public Member Functions inherited from CMS::CMS | |
| virtual bool | init ()=0 |
| virtual void | reset ()=0 |
| virtual void | write (int a, int v)=0 |
| virtual void | writeReg (int r, int v)=0 |
| void | start (TimerCallback *callback) |
Public Member Functions inherited from Audio::Chip | |
| void | start (TimerCallback *callback, int timerFrequency) |
| void | stop () |
| virtual void | setCallbackFrequency (int timerFrequency)=0 |
Public Member Functions inherited from Audio::EmulatedChip | |
| void | setCallbackFrequency (int timerFrequency) override |
| int | readBuffer (int16 *buffer, const int numSamples) override |
| int | getRate () const override |
| bool | endOfData () const override |
Protected Member Functions | |
| void | generateSamples (int16 *buffer, int numSamples) override |
| virtual void | startCallbacks (int timerFrequency)=0 |
| virtual void | stopCallbacks ()=0 |
Protected Member Functions inherited from Audio::EmulatedChip | |
| void | startCallbacks (int timerFrequency) override final |
| void | stopCallbacks () override final |
| virtual void | generateSamples (int16 *buffer, int numSamples)=0 |
Protected Member Functions inherited from Audio::AudioStream | |
| virtual int | readBuffer (int16 *buffer, const int numSamples)=0 |
| virtual bool | isStereo () const =0 |
| virtual int | getRate () const =0 |
| virtual bool | endOfData () const =0 |
| virtual bool | endOfStream () const |
Additional Inherited Members | |
Public Types inherited from Audio::Chip | |
| typedef Common::Functor0< void > | TimerCallback |
Static Public Attributes inherited from CMS::CMS | |
| static const int | DEFAULT_CALLBACK_FREQUENCY = 250 |
Protected Attributes inherited from Audio::Chip | |
| Common::ScopedPtr< TimerCallback > | _callback |
Static Protected Attributes inherited from Audio::EmulatedChip | |
| static const int | FIXP_SHIFT = 16 |
|
overridevirtual |
|
overridevirtual |
Reinitializes the CMS emulator
Implements CMS::CMS.
|
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
| a | port address |
| v | value, which will be written |
Implements CMS::CMS.
|
overridevirtual |
Function to directly write to a specific CMS register. We allow writing to secondary CMS chip registers by using register values >= 0x100.
| r | hardware register number to write to |
| v | value, which will be written |
Implements CMS::CMS.
|
inlineoverridevirtual |
Check whether this is a stereo stream.
Implements Audio::AudioStream.
|
overrideprotectedvirtual |
Read up to 'length' samples.
Data will be in native endianess, 16 bit per sample, signed. For stereo chips, buffer will be filled with interleaved left and right channel samples, starting with a left sample. Furthermore, the samples in the left and right are summed up. So if you request 4 samples from a stereo chip, you will get a total of two left channel and two right channel samples.
Implements Audio::EmulatedChip.