openMSX
Classes | Enumerations | Functions | Variables
openmsx::VDPAccessSlots Namespace Reference

Classes

struct  AccessTable
 
class  Calculator
 VDP-VRAM access slot calculator, meant to be used in the inner loops of the VDPCmdEngine commands. More...
 
struct  CycleTable
 
struct  ZeroTable
 

Enumerations

enum class  Delta : int {
  D0 = 0 * TICKS , D1 = 1 * TICKS , D16 = 2 * TICKS , D24 = 3 * TICKS ,
  D28 = 4 * TICKS , D32 = 5 * TICKS , D40 = 6 * TICKS , D48 = 7 * TICKS ,
  D64 = 8 * TICKS , D72 = 9 * TICKS , D88 = 10 * TICKS , D104 = 11 * TICKS ,
  D120 = 12 * TICKS , D128 = 13 * TICKS , D136 = 14 * TICKS
}
 

Functions

EmuTime getAccessSlot (EmuTime::param frame, EmuTime::param time, Delta delta, const VDP &vdp)
 Return the time of the next available access slot that is at least 'delta' cycles later than 'time'.
 
Calculator getCalculator (EmuTime::param frame, EmuTime::param time, EmuTime::param limit, const VDP &vdp)
 When many calls to getAccessSlot() are needed, it's more efficient to instead use this function.
 

Variables

constexpr int TICKS = VDP::TICKS_PER_LINE
 

Enumeration Type Documentation

◆ Delta

enum class openmsx::VDPAccessSlots::Delta : int
strong
Enumerator
D0 
D1 
D16 
D24 
D28 
D32 
D40 
D48 
D64 
D72 
D88 
D104 
D120 
D128 
D136 

Definition at line 14 of file VDPAccessSlots.hh.

Function Documentation

◆ getAccessSlot()

EmuTime openmsx::VDPAccessSlots::getAccessSlot ( EmuTime::param  frame,
EmuTime::param  time,
Delta  delta,
const VDP vdp 
)

Return the time of the next available access slot that is at least 'delta' cycles later than 'time'.

The start of the current 'frame' is needed for reference.

Definition at line 226 of file VDPAccessSlots.cc.

References openmsx::Clock< TICKS_PER_SECOND >::duration(), openmsx::Clock< FREQ_NUM, FREQ_DENOM >::getTicksTill_fast(), TICKS, and to_underlying().

Referenced by openmsx::VDP::getAccessSlot().

◆ getCalculator()

Calculator openmsx::VDPAccessSlots::getCalculator ( EmuTime::param  frame,
EmuTime::param  time,
EmuTime::param  limit,
const VDP vdp 
)

When many calls to getAccessSlot() are needed, it's more efficient to instead use this function.

Definition at line 236 of file VDPAccessSlots.cc.

Referenced by openmsx::VDP::getAccessSlotCalculator().

Variable Documentation

◆ TICKS

constexpr int openmsx::VDPAccessSlots::TICKS = VDP::TICKS_PER_LINE
inlineconstexpr