openMSX
|
VDP-VRAM access slot calculator, meant to be used in the inner loops of the VDPCmdEngine commands. More...
#include <VDPAccessSlots.hh>
Public Member Functions | |
Calculator (EmuTime::param frame, EmuTime::param time, EmuTime::param limit_, std::span< const uint8_t, NUM_DELTAS *TICKS > tab_) | |
This shouldn't be called directly, instead use getCalculator(). | |
bool | limitReached () const |
Has 'time' advanced to or past 'limit'? | |
EmuTime | getTime () const |
Get the current time. | |
void | next (Delta delta) |
Advance time to the earliest access slot that is at least 'delta' ticks later than the current time. | |
VDP-VRAM access slot calculator, meant to be used in the inner loops of the VDPCmdEngine commands.
Code optimized for the case that:
Definition at line 38 of file VDPAccessSlots.hh.
|
inline |
This shouldn't be called directly, instead use getCalculator().
Definition at line 42 of file VDPAccessSlots.hh.
References openmsx::Clock< FREQ_NUM, FREQ_DENOM >::getTicksTill_fast(), and openmsx::VDPAccessSlots::TICKS.
|
inline |
Get the current time.
Initially this will return the 'time' constructor parameter. Each call to next() will increase this value.
Definition at line 67 of file VDPAccessSlots.hh.
References openmsx::Clock< FREQ_NUM, FREQ_DENOM >::getFastAdd().
|
inline |
Has 'time' advanced to or past 'limit'?
Definition at line 60 of file VDPAccessSlots.hh.
|
inline |
Advance time to the earliest access slot that is at least 'delta' ticks later than the current time.
Definition at line 73 of file VDPAccessSlots.hh.
References openmsx::VDPAccessSlots::TICKS, and to_underlying().