ScummVM API documentation
CMS::CMS Class Referenceabstract
Inheritance diagram for CMS::CMS:
CMS::EmulatedCMS DOSBoxCMS

Public Member Functions

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, int timerFrequency=DEFAULT_CALLBACK_FREQUENCY)
 
void stop ()
 
virtual void setCallbackFrequency (int timerFrequency)=0
 

Static Public Attributes

static const int DEFAULT_CALLBACK_FREQUENCY = 250
 

Protected Member Functions

virtual void startCallbacks (int timerFrequency)=0
 
virtual void stopCallbacks ()=0
 

Protected Attributes

Common::ScopedPtr< TimerCallback_callback
 

Member Function Documentation

◆ init()

virtual bool CMS::CMS::init ( )
pure virtual

Initializes the CMS emulator.

Returns
true on success, false on failure

Implemented in DOSBoxCMS.

◆ reset()

virtual void CMS::CMS::reset ( )
pure virtual

Reinitializes the CMS emulator

Implemented in DOSBoxCMS.

◆ write()

virtual void CMS::CMS::write ( int  a,
int  v 
)
pure virtual

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

Implemented in DOSBoxCMS.

◆ writeReg()

virtual void CMS::CMS::writeReg ( int  r,
int  v 
)
pure virtual

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

Implemented in DOSBoxCMS.

◆ start()

void CMS::CMS::start ( TimerCallback callback,
int  timerFrequency = DEFAULT_CALLBACK_FREQUENCY 
)

Start the CMS with callbacks.

◆ stop()

void CMS::CMS::stop ( )

Stop the CMS

◆ setCallbackFrequency()

virtual void CMS::CMS::setCallbackFrequency ( int  timerFrequency)
pure virtual

Change the callback frequency. This must only be called from a timer proc.

Implemented in CMS::EmulatedCMS.

◆ startCallbacks()

virtual void CMS::CMS::startCallbacks ( int  timerFrequency)
protectedpure virtual

Start the callbacks.

Implemented in CMS::EmulatedCMS.

◆ stopCallbacks()

virtual void CMS::CMS::stopCallbacks ( )
protectedpure virtual

Stop the callbacks.

Implemented in CMS::EmulatedCMS.

Member Data Documentation

◆ _callback

Common::ScopedPtr<TimerCallback> CMS::CMS::_callback
protected

The functor for callbacks.


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