openMSX
|
#include <CPUClock.hh>
Public Member Functions | |
unsigned | getFreq () const |
Protected Member Functions | |
CPUClock (EmuTime::param time, Scheduler &scheduler) | |
void | add (unsigned ticks) |
void | sync () const |
EmuTime::param | getTime () const |
EmuTime | getTimeFast () const |
EmuTime | getTimeFast (int cc) const |
void | setTime (EmuTime::param time) |
void | setFreq (unsigned freq) |
void | advanceTime (EmuTime::param time) |
EmuTime | calcTime (EmuTime::param time, unsigned ticks) const |
unsigned | advanceHalt (unsigned hltStates, EmuTime::param time) |
Implementation of the HALT instruction timing. | |
void | waitForEvenCycle (int cc) |
R800 runs at 7MHz, but I/O is done over a slower 3.5MHz bus. | |
void | setLimit (EmuTime::param time) |
void | enableLimit () |
void | disableLimit () |
bool | limitReached () const |
template<typename Archive > | |
void | serialize (Archive &ar, unsigned version) |
Definition at line 11 of file CPUClock.hh.
|
protected |
Definition at line 6 of file CPUClock.cc.
|
inlineprotected |
Definition at line 28 of file CPUClock.hh.
Referenced by openmsx::R800TYPE::POST_MEM(), openmsx::R800TYPE::POST_WORD(), openmsx::R800TYPE::PRE_MEM(), openmsx::R800TYPE::PRE_WORD(), openmsx::R800TYPE::R800RefreshSlow(), and waitForEvenCycle().
|
inlineprotected |
Implementation of the HALT instruction timing.
Advances the clock with an integer multiple of 'hltStates' cycles so that it equal or bigger than 'time'. Returns the number of times 'hltStates' needed to be added.
Definition at line 53 of file CPUClock.hh.
References openmsx::DynamicClock::getTicksTillUp(), and sync().
|
protected |
Definition at line 12 of file CPUClock.cc.
References openmsx::DynamicClock::advance(), openmsx::Scheduler::getNext(), and setLimit().
|
inlineprotected |
Definition at line 44 of file CPUClock.hh.
References openmsx::DynamicClock::add().
|
inlineprotected |
Definition at line 107 of file CPUClock.hh.
Referenced by setFreq().
|
inlineprotected |
Definition at line 103 of file CPUClock.hh.
References openmsx::Scheduler::getNext(), and setLimit().
|
inline |
Definition at line 14 of file CPUClock.hh.
References openmsx::DynamicClock::getFreq().
|
inlineprotected |
Definition at line 36 of file CPUClock.hh.
References openmsx::DynamicClock::getTime(), and sync().
|
inlineprotected |
Definition at line 37 of file CPUClock.hh.
References openmsx::DynamicClock::getFastAdd().
Referenced by openmsx::R800TYPE::R800Refresh().
|
inlineprotected |
Definition at line 38 of file CPUClock.hh.
References openmsx::DynamicClock::getFastAdd().
|
inlineprotected |
Definition at line 113 of file CPUClock.hh.
|
protected |
Definition at line 20 of file CPUClock.cc.
References sync().
Referenced by openmsx::R800TYPE::serialize(), and openmsx::Z80TYPE::serialize().
|
inlineprotected |
Definition at line 42 of file CPUClock.hh.
References disableLimit(), openmsx::DynamicClock::setFreq(), and sync().
|
inlineprotected |
Definition at line 93 of file CPUClock.hh.
References openmsx::DynamicClock::getTicksTillUp(), and sync().
Referenced by advanceTime(), and enableLimit().
|
inlineprotected |
Definition at line 41 of file CPUClock.hh.
References openmsx::DynamicClock::reset(), and sync().
Referenced by openmsx::R800TYPE::setTime().
|
inlineprotected |
Definition at line 29 of file CPUClock.hh.
References openmsx::DynamicClock::fastAdd().
Referenced by advanceHalt(), getTime(), serialize(), setFreq(), setLimit(), setTime(), and waitForEvenCycle().
|
inlineprotected |
R800 runs at 7MHz, but I/O is done over a slower 3.5MHz bus.
So sometimes right before I/O it's needed to wait for one cycle so that we're at the start of a clock cycle of the slower bus.
Definition at line 65 of file CPUClock.hh.
References add(), openmsx::DynamicClock::getTotalTicks(), and sync().
Referenced by openmsx::R800TYPE::R800RefreshSlow().