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. More... | |
void | waitForEvenCycle (int cc) |
R800 runs at 7MHz, but I/O is done over a slower 3.5MHz bus. More... | |
void | setLimit (EmuTime::param time) |
void | enableLimit () |
void | disableLimit () |
bool | limitReached () const |
template<typename Archive > | |
void | serialize (Archive &ar, unsigned version) |
Definition at line 10 of file CPUClock.hh.
|
protected |
Definition at line 6 of file CPUClock.cc.
|
inlineprotected |
Definition at line 27 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 52 of file CPUClock.hh.
References openmsx::DynamicClock::getTicksTillUp(), and sync().
|
protected |
Definition at line 13 of file CPUClock.cc.
References openmsx::DynamicClock::advance(), openmsx::Scheduler::getNext(), and setLimit().
|
inlineprotected |
Definition at line 43 of file CPUClock.hh.
References openmsx::DynamicClock::add().
|
inlineprotected |
Definition at line 106 of file CPUClock.hh.
|
inlineprotected |
Definition at line 102 of file CPUClock.hh.
References openmsx::Scheduler::getNext(), and setLimit().
|
inline |
Definition at line 13 of file CPUClock.hh.
References openmsx::DynamicClock::getFreq().
|
inlineprotected |
Definition at line 35 of file CPUClock.hh.
References openmsx::DynamicClock::getTime(), and sync().
|
inlineprotected |
Definition at line 36 of file CPUClock.hh.
References openmsx::DynamicClock::getFastAdd().
Referenced by openmsx::R800TYPE::R800Refresh().
|
inlineprotected |
Definition at line 37 of file CPUClock.hh.
References openmsx::DynamicClock::getFastAdd().
|
inlineprotected |
Definition at line 112 of file CPUClock.hh.
|
protected |
Definition at line 21 of file CPUClock.cc.
References sync().
Referenced by openmsx::R800TYPE::serialize(), and openmsx::Z80TYPE::serialize().
|
inlineprotected |
Definition at line 41 of file CPUClock.hh.
References openmsx::DynamicClock::setFreq().
|
inlineprotected |
Definition at line 92 of file CPUClock.hh.
References openmsx::DynamicClock::getTicksTillUp(), and sync().
Referenced by advanceTime(), and enableLimit().
|
inlineprotected |
Definition at line 40 of file CPUClock.hh.
References openmsx::DynamicClock::reset(), and sync().
Referenced by openmsx::R800TYPE::setTime().
|
inlineprotected |
Definition at line 28 of file CPUClock.hh.
References openmsx::DynamicClock::fastAdd().
Referenced by advanceHalt(), getTime(), serialize(), 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 64 of file CPUClock.hh.
References add(), openmsx::DynamicClock::getTotalTicks(), and sync().
Referenced by openmsx::R800TYPE::R800RefreshSlow().