openMSX
R800.hh
Go to the documentation of this file.
1 #ifndef R800_HH
2 #define R800_HH
3 
4 #include "CPUClock.hh"
5 #include "CPURegs.hh"
6 #include "Clock.hh"
7 #include "likely.hh"
8 #include "inline.hh"
9 #include "one_of.hh"
10 
11 namespace openmsx {
12 
13 class R800TYPE : public CPUClock
14 {
15 public:
16  void updateVisiblePage(byte page, byte primarySlot, byte secondarySlot)
17  {
18  extraMemoryDelay[page] =
19  extraMemoryDelays[page][primarySlot][secondarySlot];
20  }
21  void setDRAMmode(bool dram)
22  {
23  // TODO currently hardcoded, move to config file?
24  unsigned val = dram ? 0 : 1;
25  extraMemoryDelays[0][0][0] = val; // BIOS
26  extraMemoryDelays[1][0][0] = val; // BASIC
27  extraMemoryDelays[0][3][1] = val; // SUB-ROM
28  extraMemoryDelays[1][3][1] = val; // KANJI-DRIVER
29  }
30 
31 protected:
32  template<bool B> struct Normalize { static constexpr bool value = B; };
33 
34  static constexpr int CLOCK_FREQ = 7159090;
35 
36  ALWAYS_INLINE unsigned haltStates() const { return 1; } // TODO check this
37  ALWAYS_INLINE bool isR800() const { return true; }
38 
39  R800TYPE(EmuTime::param time, Scheduler& scheduler_)
40  : CPUClock(time, scheduler_)
41  , lastRefreshTime(time)
42  {
44 
45  // TODO currently hardcoded, move to config file?
46  for (int page = 0; page < 4; ++page) {
47  for (int prim = 0; prim < 4; ++prim) {
48  for (int sec = 0; sec < 4; ++sec) {
49  unsigned val;
50  if (prim == one_of(1, 2)) {
51  // external slot
52  val = 2;
53  } else if ((prim == 3) && (sec == 0)) {
54  // internal RAM
55  val = 0;
56  } else {
57  // internal ROM
58  val = 1;
59  }
60  extraMemoryDelays[page][prim][sec] = val;
61  }
62  }
63  }
64  for (int page = 0; page < 4; ++page) {
65  extraMemoryDelay[page] = extraMemoryDelays[page][0][0];
66  }
67  }
68 
70  {
71  lastPage = -1;
72  }
73 
74  template <bool PRE_PB, bool POST_PB>
75  ALWAYS_INLINE void PRE_MEM(unsigned address)
76  {
77  int newPage = address >> 8;
78  if (PRE_PB) {
79  // there is a statically predictable page break at this
80  // point -> 'add(1)' moved to static cost table
81  } else {
82  if (unlikely(newPage != lastPage) ||
83  unlikely(extraMemoryDelay[address >> 14])) {
84  add(1);
85  }
86  }
87  if (!POST_PB) {
88  lastPage = newPage;
89  }
90  }
91  template <bool POST_PB>
92  ALWAYS_INLINE void POST_MEM(unsigned address)
93  {
94  add(extraMemoryDelay[address >> 14]);
95  if (POST_PB) {
97  }
98  }
99  template <bool PRE_PB, bool POST_PB>
100  ALWAYS_INLINE void PRE_WORD(unsigned address)
101  {
102  int newPage = address >> 8;
103  if (PRE_PB) {
104  // there is a statically predictable page break at this
105  // point -> 'add(1)' moved to static cost table
106  if (unlikely(extraMemoryDelay[address >> 14])) {
107  add(1);
108  }
109  } else {
110  if (unlikely(extraMemoryDelay[address >> 14])) {
111  add(2);
112  } else if (unlikely(newPage != lastPage)) {
113  add(1);
114  }
115  }
116  if (!POST_PB) {
117  lastPage = newPage;
118  }
119  }
120  template <bool POST_PB>
121  ALWAYS_INLINE void POST_WORD(unsigned address)
122  {
123  add(2 * extraMemoryDelay[address >> 14]);
124  if (POST_PB) {
126  }
127  }
128 
130  {
131  // atoc documentation says refresh every 222 clocks
132  // duration: 256/1024KB 13.5 clocks
133  // 512KB 21.5 clocks
134  // But 26/210 matches measurements much better
135  // (loosly based on old measurements by Jon on his analogue scope)
136  EmuTime time = getTimeFast();
137  if (unlikely(lastRefreshTime.getTicksTill_fast(time) >= 210)) {
138  R800RefreshSlow(time, R); // slow-path not inline
139  }
140  }
141  NEVER_INLINE void R800RefreshSlow(EmuTime::param time, CPURegs& R)
142  {
143  do {
144  lastRefreshTime += 210;
145  } while (unlikely(lastRefreshTime.getTicksTill_fast(time) >= 210));
146  waitForEvenCycle(0);
147  add(25);
148  R800ForcePageBreak(); // TODO check this
149  R.incR(1);
150  }
151 
152  void setTime(EmuTime::param time)
153  {
154  // Base class implementation.
155  CPUClock::setTime(time);
156 
157  // Otherwise advance_fast() in R800Refresh() above, gets a too
158  // large time interval.
159  lastRefreshTime.reset(time);
160  }
161 
162  ALWAYS_INLINE void setMemPtr(unsigned /*x*/) { /* nothing*/ }
163  ALWAYS_INLINE unsigned getMemPtr() const { return 0; } // dummy value
164 
165  static constexpr int I = 6; // cycles for an I/O operation
166  static constexpr int O = 1; // wait for one cycle and wait for next even
167  // clock cycle (to sync with slower IO bus)
168  // the latter part must be implemented
169  // dynamically (not here in static tables)
170  static constexpr int P = 1; // cycles for a (statically known) page-break
171 
172  static constexpr int
179  CC_LD_R_XIX = 3+P+1, CC_LD_R_XIX_1 = 1, CC_LD_R_XIX_2 = 3+P, // +1
184  CC_LD_XIX_R = 3+P+1, CC_LD_XIX_R_1 = 1, CC_LD_XIX_R_2 = 3+P, // +1
185  CC_LD_XIX_N = 3+P+1, CC_LD_XIX_N_1 = 1, CC_LD_XIX_N_2 = 3+P, // +1
190 
191  CC_CP_R = 1,
192  CC_CP_N = 2, CC_CP_N_1 = 1,
193  CC_CP_XHL = 1+P+1, CC_CP_XHL_1 = 1+P,
194  CC_CP_XIX = 3+P+1, CC_CP_XIX_1 = 1, CC_CP_XIX_2 = 3+P, // +1
195  CC_INC_R = 1,
196  CC_INC_XHL = 1+P+2+P+1, CC_INC_XHL_1 = 1, CC_INC_XHL_2 = 1+P+2+P,
197  CC_INC_XIX = 3+P+2+P+1, CC_INC_XIX_1 = 1, EE_INC_XIX = 2, // +1
201 
202  CC_LDI = 2+P+1+P+1, CC_LDI_1 = 2+P, CC_LDI_2 = 2+P+1+P,
203  CC_LDIR = 2+P+1+P+1,
204  CC_CPI = 2+P+2, CC_CPI_1 = 2+P,
205  CC_CPIR = 2+P+3, // TODO check
206 
207  CC_PUSH = 2+P+2, CC_PUSH_1 = 2+P,
208  CC_POP = 1+P+2, CC_POP_1 = 1+P,
209  CC_CALL = 3+P+2, CC_CALL_1 = 1, EE_CALL = 1,
210  CC_CALL_A = 3+P+2, CC_CALL_B = 3,
211  CC_RST = 2+P+2, // TODO check
212  CC_RET_A = 1+P+2, CC_RET_B = 1, EE_RET_C = 0,
213  CC_RETN = 2+P+2, EE_RETN = 1, // TODO check
214  CC_JP_A = 4, CC_JP_B = 3, CC_JP_1 = 1,
215  CC_JP_HL = 2,
216  CC_JR_A = 3, CC_JR_B = 2, CC_JR_1 = 1,
217  CC_DJNZ = 3, EE_DJNZ = 0,
218 
220 
221  CC_BIT_R = 2,
223  CC_BIT_XIX = 3+P+1, CC_BIT_XIX_1 = 3+P, // +1
224  CC_SET_R = 2,
225  CC_SET_XHL = 2+P+2+P+1, CC_SET_XHL_1 = 2+P, CC_SET_XHL_2 = 2+P+2+P,
226  CC_SET_XIX = 3+P+2+P+1, EE_SET_XIX = 1, // +1
227 
228  CC_RLA = 1,
229  CC_RLD = 2+P+2+P+1, CC_RLD_1 = 2+P, CC_RLD_2 = 2+P+2+P,
230 
233  CC_INI = 2+O+I+P+1, CC_INI_1 = 2+O, CC_INI_2 = 2+O+I+P,
234  CC_INIR = 2+O+I+P+1, // TODO check
237  CC_OUTI = 2+P+1+O+I, CC_OUTI_1 = 2+P, CC_OUTI_2 = 2+P+1+O,
238  CC_OTIR = 2+P+1+O+I, // TODO check
239 
240  CC_EX = 1,
241  CC_NOP = 1,
242  CC_CCF = 1,
243  CC_SCF = 1,
244  CC_DAA = 1,
245  CC_NEG = 2,
246  CC_CPL = 1,
247  CC_DI = 2,
248  CC_EI = 1,
249  CC_HALT = 1, // TODO check
250  CC_IM = 3,
251 
252  CC_MULUB = 14,
253  CC_MULUW = 36,
254 
255  CC_NMI = 1+P+2, EE_NMI_1 = -1, // TODO check
256  CC_IRQ0 = 1+P+2, EE_IRQ0_1 = -1, // TODO check
257  CC_IRQ1 = 1+P+2, EE_IRQ1_1 = -1, // TODO check
258  CC_IRQ2 = 1+P+2+P+2, EE_IRQ2_1 = -1, CC_IRQ2_2 = 1+P+2+P, // TODO check
259 
260  CC_MAIN = 0,
261  CC_DD = 1,
263  CC_DD_CB = 1, // +1
264  EE_ED = 1,
265  CC_RDMEM = 1,
266  CC_WRMEM = 2;
267 
268  template<typename Archive>
269  void serialize(Archive& ar, unsigned version)
270  {
271  CPUClock::serialize(ar, version);
272  ar.serialize("lastRefreshTime", lastRefreshTime,
273  "lastPage", lastPage,
274  "extraMemoryDelay", extraMemoryDelay);
275 
276  // don't serialize 'extraMemoryDelays', is initialized in
277  // constructor and setDRAMmode()
278  }
279 
280 private:
281  Clock<CLOCK_FREQ> lastRefreshTime;
282  int lastPage;
283 
284  unsigned extraMemoryDelays[4][4][4];
285  unsigned extraMemoryDelay[4];
286 };
287 
288 } // namespace openmsx
289 
290 #endif
one_of.hh
openmsx::R800TYPE::EE_ED
static constexpr int EE_ED
Definition: R800.hh:264
openmsx::R800TYPE::CC_RET_B
static constexpr int CC_RET_B
Definition: R800.hh:212
openmsx::R800TYPE::CC_LD_XIX_R_1
static constexpr int CC_LD_XIX_R_1
Definition: R800.hh:184
openmsx::R800TYPE::CC_LD_R_XIX_1
static constexpr int CC_LD_R_XIX_1
Definition: R800.hh:179
openmsx::R800TYPE::CC_MULUB
static constexpr int CC_MULUB
Definition: R800.hh:252
openmsx::R800TYPE::CC_JR_A
static constexpr int CC_JR_A
Definition: R800.hh:216
Clock.hh
openmsx::R800TYPE::CC_IN_R_C_1
static constexpr int CC_IN_R_C_1
Definition: R800.hh:232
openmsx::Scheduler
Definition: Scheduler.hh:34
openmsx::R800TYPE::EE_IRQ2_1
static constexpr int EE_IRQ2_1
Definition: R800.hh:258
ALWAYS_INLINE
#define ALWAYS_INLINE
Definition: inline.hh:16
unlikely
#define unlikely(x)
Definition: likely.hh:15
openmsx::R800TYPE::CC_EI
static constexpr int CC_EI
Definition: R800.hh:248
openmsx::R800TYPE::CC_RETN
static constexpr int CC_RETN
Definition: R800.hh:213
openmsx::R800TYPE::CC_BIT_XIX_1
static constexpr int CC_BIT_XIX_1
Definition: R800.hh:223
openmsx::R800TYPE::CC_INC_XHL_2
static constexpr int CC_INC_XHL_2
Definition: R800.hh:196
openmsx::B
@ B
Definition: CPUCore.cc:204
inline.hh
openmsx::R800TYPE::CC_LD_NN_A_1
static constexpr int CC_LD_NN_A_1
Definition: R800.hh:183
openmsx::R800TYPE::CC_LD_XX_HL_2
static constexpr int CC_LD_XX_HL_2
Definition: R800.hh:189
openmsx::R800TYPE::serialize
void serialize(Archive &ar, unsigned version)
Definition: R800.hh:269
openmsx::R800TYPE::CC_JR_B
static constexpr int CC_JR_B
Definition: R800.hh:216
openmsx::R800TYPE::CC_PUSH
static constexpr int CC_PUSH
Definition: R800.hh:207
openmsx::R800TYPE::CC_NEG
static constexpr int CC_NEG
Definition: R800.hh:245
openmsx::R800TYPE::CC_INC_XHL
static constexpr int CC_INC_XHL
Definition: R800.hh:196
openmsx::R800TYPE::CC_CP_XHL
static constexpr int CC_CP_XHL
Definition: R800.hh:193
openmsx::CPUClock::add
void add(unsigned ticks)
Definition: CPUClock.hh:27
openmsx::R
constexpr auto R
Definition: MSXMixer.cc:297
openmsx::R800TYPE::CC_LDI_1
static constexpr int CC_LDI_1
Definition: R800.hh:202
openmsx::R800TYPE::CC_INI_2
static constexpr int CC_INI_2
Definition: R800.hh:233
openmsx::R800TYPE::CC_SCF
static constexpr int CC_SCF
Definition: R800.hh:243
openmsx::R800TYPE::CC_HALT
static constexpr int CC_HALT
Definition: R800.hh:249
openmsx::R800TYPE::EE_INC_XIX
static constexpr int EE_INC_XIX
Definition: R800.hh:197
openmsx::R800TYPE::CC_OUT_N_A_2
static constexpr int CC_OUT_N_A_2
Definition: R800.hh:235
openmsx::R800TYPE::CC_CPIR
static constexpr int CC_CPIR
Definition: R800.hh:205
openmsx::R800TYPE::CC_LD_HL_N_2
static constexpr int CC_LD_HL_N_2
Definition: R800.hh:181
openmsx::R800TYPE::CC_LD_XX_HL
static constexpr int CC_LD_XX_HL
Definition: R800.hh:189
openmsx::R800TYPE::EE_RET_C
static constexpr int EE_RET_C
Definition: R800.hh:212
openmsx::R800TYPE::CC_POP_1
static constexpr int CC_POP_1
Definition: R800.hh:208
openmsx::CPUClock::setTime
void setTime(EmuTime::param time)
Definition: CPUClock.hh:40
openmsx::R800TYPE::EE_DJNZ
static constexpr int EE_DJNZ
Definition: R800.hh:217
openmsx::R800TYPE::CC_MAIN
static constexpr int CC_MAIN
Definition: R800.hh:260
openmsx::R800TYPE::CC_CALL_A
static constexpr int CC_CALL_A
Definition: R800.hh:210
NEVER_INLINE
#define NEVER_INLINE
Definition: inline.hh:17
openmsx::R800TYPE::CC_OUTI_1
static constexpr int CC_OUTI_1
Definition: R800.hh:237
openmsx::R800TYPE::CC_LD_XX_HL_1
static constexpr int CC_LD_XX_HL_1
Definition: R800.hh:189
openmsx::R800TYPE::CC_LD_A_NN_1
static constexpr int CC_LD_A_NN_1
Definition: R800.hh:174
openmsx::R800TYPE::POST_WORD
ALWAYS_INLINE void POST_WORD(unsigned address)
Definition: R800.hh:121
openmsx::R800TYPE::CC_OTIR
static constexpr int CC_OTIR
Definition: R800.hh:238
openmsx::R800TYPE::CC_LD_R_XIX_2
static constexpr int CC_LD_R_XIX_2
Definition: R800.hh:179
openmsx::R800TYPE::CC_LD_NN_A
static constexpr int CC_LD_NN_A
Definition: R800.hh:183
openmsx::R800TYPE::CC_EX_SP_HL
static constexpr int CC_EX_SP_HL
Definition: R800.hh:219
openmsx::R800TYPE::CC_LD_XIX_N_1
static constexpr int CC_LD_XIX_N_1
Definition: R800.hh:185
openmsx::R800TYPE::CC_JP_HL
static constexpr int CC_JP_HL
Definition: R800.hh:215
openmsx::R800TYPE::Normalize
Definition: R800.hh:32
openmsx::R800TYPE::CC_ADC_HL_SS
static constexpr int CC_ADC_HL_SS
Definition: R800.hh:200
openmsx::R800TYPE::CC_LD_A_SS_1
static constexpr int CC_LD_A_SS_1
Definition: R800.hh:173
openmsx::R800TYPE::EE_CALL
static constexpr int EE_CALL
Definition: R800.hh:209
openmsx::R800TYPE::R800ForcePageBreak
ALWAYS_INLINE void R800ForcePageBreak()
Definition: R800.hh:69
openmsx::R800TYPE::CC_LD_XIX_R_2
static constexpr int CC_LD_XIX_R_2
Definition: R800.hh:184
openmsx::R800TYPE::R800TYPE
R800TYPE(EmuTime::param time, Scheduler &scheduler_)
Definition: R800.hh:39
openmsx::R800TYPE::CC_IRQ2_2
static constexpr int CC_IRQ2_2
Definition: R800.hh:258
openmsx::R800TYPE::CC_CP_N
static constexpr int CC_CP_N
Definition: R800.hh:192
likely.hh
openmsx::R800TYPE::CC_SET_R
static constexpr int CC_SET_R
Definition: R800.hh:224
openmsx::R800TYPE::CC_JP_A
static constexpr int CC_JP_A
Definition: R800.hh:214
openmsx::R800TYPE::CC_JR_1
static constexpr int CC_JR_1
Definition: R800.hh:216
openmsx::R800TYPE::CC_OUT_C_R
static constexpr int CC_OUT_C_R
Definition: R800.hh:236
openmsx::CPUClock::getTimeFast
EmuTime getTimeFast() const
Definition: CPUClock.hh:36
openmsx::R800TYPE::CC_IN_A_N_2
static constexpr int CC_IN_A_N_2
Definition: R800.hh:231
openmsx::R800TYPE::CC_INC_R
static constexpr int CC_INC_R
Definition: R800.hh:195
openmsx::R800TYPE::CC_LDI
static constexpr int CC_LDI
Definition: R800.hh:202
openmsx::R800TYPE::CC_LD_R_N_1
static constexpr int CC_LD_R_N_1
Definition: R800.hh:177
openmsx::R800TYPE::I
static constexpr int I
Definition: R800.hh:165
openmsx::R800TYPE::CC_IRQ2
static constexpr int CC_IRQ2
Definition: R800.hh:258
openmsx::R800TYPE::getMemPtr
ALWAYS_INLINE unsigned getMemPtr() const
Definition: R800.hh:163
openmsx::R800TYPE::CC_CALL_1
static constexpr int CC_CALL_1
Definition: R800.hh:209
openmsx::R800TYPE::CC_LD_R_XIX
static constexpr int CC_LD_R_XIX
Definition: R800.hh:179
openmsx::R800TYPE::CC_RLD_1
static constexpr int CC_RLD_1
Definition: R800.hh:229
openmsx::R800TYPE::CC_LD_HL_XX
static constexpr int CC_LD_HL_XX
Definition: R800.hh:186
openmsx::R800TYPE::CC_CP_XIX
static constexpr int CC_CP_XIX
Definition: R800.hh:194
openmsx::R800TYPE::CC_LD_SS_NN_1
static constexpr int CC_LD_SS_NN_1
Definition: R800.hh:188
openmsx::R800TYPE::CC_OUTI
static constexpr int CC_OUTI
Definition: R800.hh:237
openmsx::R800TYPE::CC_LD_R_N
static constexpr int CC_LD_R_N
Definition: R800.hh:177
openmsx::R800TYPE::CC_MULUW
static constexpr int CC_MULUW
Definition: R800.hh:253
openmsx::R800TYPE::CC_LD_HL_N
static constexpr int CC_LD_HL_N
Definition: R800.hh:181
openmsx::R800TYPE::CC_LD_R_R
static constexpr int CC_LD_R_R
Definition: R800.hh:176
openmsx::R800TYPE::POST_MEM
ALWAYS_INLINE void POST_MEM(unsigned address)
Definition: R800.hh:92
openmsx::R800TYPE::CC_BIT_XIX
static constexpr int CC_BIT_XIX
Definition: R800.hh:223
openmsx::R800TYPE::haltStates
ALWAYS_INLINE unsigned haltStates() const
Definition: R800.hh:36
openmsx::R800TYPE::CC_INC_SS
static constexpr int CC_INC_SS
Definition: R800.hh:198
openmsx::R800TYPE::CC_RDMEM
static constexpr int CC_RDMEM
Definition: R800.hh:265
openmsx::R800TYPE::CC_PUSH_1
static constexpr int CC_PUSH_1
Definition: R800.hh:207
one_of
Definition: one_of.hh:7
openmsx::R800TYPE::CC_NMI
static constexpr int CC_NMI
Definition: R800.hh:255
openmsx::R800TYPE::CC_DI
static constexpr int CC_DI
Definition: R800.hh:247
openmsx::R800TYPE::CC_INI
static constexpr int CC_INI
Definition: R800.hh:233
openmsx::R800TYPE::CC_LD_A_SS
static constexpr int CC_LD_A_SS
Definition: R800.hh:173
openmsx::R800TYPE::CC_IN_A_N
static constexpr int CC_IN_A_N
Definition: R800.hh:231
openmsx::R800TYPE::CC_DJNZ
static constexpr int CC_DJNZ
Definition: R800.hh:217
openmsx::R800TYPE::CC_CP_XIX_1
static constexpr int CC_CP_XIX_1
Definition: R800.hh:194
openmsx::R800TYPE::CC_INC_XIX_1
static constexpr int CC_INC_XIX_1
Definition: R800.hh:197
openmsx::R800TYPE::CC_LD_XIX_N
static constexpr int CC_LD_XIX_N
Definition: R800.hh:185
openmsx::R800TYPE::CC_RLD_2
static constexpr int CC_RLD_2
Definition: R800.hh:229
openmsx::R800TYPE::CC_OUT_N_A
static constexpr int CC_OUT_N_A
Definition: R800.hh:235
openmsx::R800TYPE::Normalize::value
static constexpr bool value
Definition: R800.hh:32
openmsx::R800TYPE::CC_LD_XIX_N_2
static constexpr int CC_LD_XIX_N_2
Definition: R800.hh:185
openmsx::R800TYPE::CC_OUT_N_A_1
static constexpr int CC_OUT_N_A_1
Definition: R800.hh:235
openmsx::R800TYPE::R800Refresh
ALWAYS_INLINE void R800Refresh(CPURegs &R)
Definition: R800.hh:129
openmsx::R800TYPE::CLOCK_FREQ
static constexpr int CLOCK_FREQ
Definition: R800.hh:34
openmsx::R800TYPE::CC_CALL_B
static constexpr int CC_CALL_B
Definition: R800.hh:210
openmsx::R800TYPE::setTime
void setTime(EmuTime::param time)
Definition: R800.hh:152
openmsx::R800TYPE::CC_LD_R_HL_1
static constexpr int CC_LD_R_HL_1
Definition: R800.hh:178
openmsx::R800TYPE::isR800
ALWAYS_INLINE bool isR800() const
Definition: R800.hh:37
openmsx::R800TYPE::CC_DAA
static constexpr int CC_DAA
Definition: R800.hh:244
openmsx::R800TYPE::PRE_WORD
ALWAYS_INLINE void PRE_WORD(unsigned address)
Definition: R800.hh:100
CPUClock.hh
openmsx::R800TYPE::CC_IRQ1
static constexpr int CC_IRQ1
Definition: R800.hh:257
openmsx::R800TYPE::CC_LDI_2
static constexpr int CC_LDI_2
Definition: R800.hh:202
openmsx::R800TYPE::CC_LD_A_NN
static constexpr int CC_LD_A_NN
Definition: R800.hh:174
openmsx::R800TYPE::CC_RLA
static constexpr int CC_RLA
Definition: R800.hh:228
openmsx::R800TYPE::updateVisiblePage
void updateVisiblePage(byte page, byte primarySlot, byte secondarySlot)
Definition: R800.hh:16
openmsx::R800TYPE::CC_OUT_C_R_1
static constexpr int CC_OUT_C_R_1
Definition: R800.hh:236
openmsx::R800TYPE::CC_ADD_HL_SS
static constexpr int CC_ADD_HL_SS
Definition: R800.hh:199
openmsx::R800TYPE::CC_BIT_R
static constexpr int CC_BIT_R
Definition: R800.hh:221
openmsx::R800TYPE::CC_JP_B
static constexpr int CC_JP_B
Definition: R800.hh:214
openmsx::R800TYPE::CC_CPI_1
static constexpr int CC_CPI_1
Definition: R800.hh:204
openmsx::Clock::reset
constexpr void reset(EmuTime::param e)
Reset the clock to start ticking at the given time.
Definition: Clock.hh:102
openmsx::R800TYPE::CC_WRMEM
static constexpr int CC_WRMEM
Definition: R800.hh:266
openmsx::R800TYPE::CC_INC_XIX
static constexpr int CC_INC_XIX
Definition: R800.hh:197
openmsx::R800TYPE::CC_PREFIX
static constexpr int CC_PREFIX
Definition: R800.hh:262
openmsx::R800TYPE::CC_CCF
static constexpr int CC_CCF
Definition: R800.hh:242
openmsx::R800TYPE::CC_LD_SP_HL
static constexpr int CC_LD_SP_HL
Definition: R800.hh:187
openmsx::R800TYPE::CC_EX
static constexpr int CC_EX
Definition: R800.hh:240
openmsx::R800TYPE::CC_INIR
static constexpr int CC_INIR
Definition: R800.hh:234
openmsx::R800TYPE::CC_INI_1
static constexpr int CC_INI_1
Definition: R800.hh:233
openmsx::R800TYPE::CC_LDIR
static constexpr int CC_LDIR
Definition: R800.hh:203
openmsx::R800TYPE::CC_IN_A_N_1
static constexpr int CC_IN_A_N_1
Definition: R800.hh:231
openmsx::R800TYPE::EE_IRQ1_1
static constexpr int EE_IRQ1_1
Definition: R800.hh:257
openmsx::R800TYPE::CC_OUTI_2
static constexpr int CC_OUTI_2
Definition: R800.hh:237
openmsx::R800TYPE::CC_RLD
static constexpr int CC_RLD
Definition: R800.hh:229
openmsx::R800TYPE::CC_LD_HL_XX_1
static constexpr int CC_LD_HL_XX_1
Definition: R800.hh:186
openmsx::R800TYPE::CC_LD_SS_A_1
static constexpr int CC_LD_SS_A_1
Definition: R800.hh:182
openmsx::R800TYPE::CC_LD_HL_N_1
static constexpr int CC_LD_HL_N_1
Definition: R800.hh:181
openmsx::R800TYPE::CC_LD_A_I
static constexpr int CC_LD_A_I
Definition: R800.hh:175
openmsx::R800TYPE::CC_CPI
static constexpr int CC_CPI
Definition: R800.hh:204
openmsx::R800TYPE::CC_DD_CB
static constexpr int CC_DD_CB
Definition: R800.hh:263
openmsx::R800TYPE::CC_CP_N_1
static constexpr int CC_CP_N_1
Definition: R800.hh:192
openmsx::R800TYPE::R800RefreshSlow
NEVER_INLINE void R800RefreshSlow(EmuTime::param time, CPURegs &R)
Definition: R800.hh:141
openmsx::R800TYPE::CC_CP_R
static constexpr int CC_CP_R
Definition: R800.hh:191
openmsx::CPUClock::serialize
void serialize(Archive &ar, unsigned version)
Definition: CPUClock.cc:21
openmsx::R800TYPE::CC_POP
static constexpr int CC_POP
Definition: R800.hh:208
openmsx::R800TYPE::setMemPtr
ALWAYS_INLINE void setMemPtr(unsigned)
Definition: R800.hh:162
openmsx::Clock::getTicksTill_fast
constexpr unsigned getTicksTill_fast(EmuTime::param e) const
Same as above, only faster, Though the time interval may not be too large.
Definition: Clock.hh:70
openmsx::R800TYPE::CC_CP_XIX_2
static constexpr int CC_CP_XIX_2
Definition: R800.hh:194
openmsx::R800TYPE::CC_INC_XHL_1
static constexpr int CC_INC_XHL_1
Definition: R800.hh:196
openmsx::R800TYPE::EE_IRQ0_1
static constexpr int EE_IRQ0_1
Definition: R800.hh:256
openmsx::R800TYPE::CC_IN_R_C
static constexpr int CC_IN_R_C
Definition: R800.hh:232
openmsx::R800TYPE
Definition: R800.hh:14
openmsx::R800TYPE::PRE_MEM
ALWAYS_INLINE void PRE_MEM(unsigned address)
Definition: R800.hh:75
openmsx::R800TYPE::CC_LD_HL_R
static constexpr int CC_LD_HL_R
Definition: R800.hh:180
openmsx::R800TYPE::CC_BIT_XHL_1
static constexpr int CC_BIT_XHL_1
Definition: R800.hh:222
openmsx::R800TYPE::CC_DD
static constexpr int CC_DD
Definition: R800.hh:261
openmsx::R800TYPE::CC_IRQ0
static constexpr int CC_IRQ0
Definition: R800.hh:256
openmsx::R800TYPE::CC_NOP
static constexpr int CC_NOP
Definition: R800.hh:241
openmsx::R800TYPE::CC_LD_HL_R_1
static constexpr int CC_LD_HL_R_1
Definition: R800.hh:180
openmsx::R800TYPE::CC_RET_A
static constexpr int CC_RET_A
Definition: R800.hh:212
CPURegs.hh
openmsx::R800TYPE::CC_EX_SP_HL_2
static constexpr int CC_EX_SP_HL_2
Definition: R800.hh:219
openmsx::R800TYPE::CC_CALL
static constexpr int CC_CALL
Definition: R800.hh:209
openmsx::R800TYPE::CC_LD_NN_A_2
static constexpr int CC_LD_NN_A_2
Definition: R800.hh:183
openmsx::CPURegs
Definition: CPURegs.hh:20
openmsx::R800TYPE::CC_SET_XIX
static constexpr int CC_SET_XIX
Definition: R800.hh:226
openmsx::R800TYPE::CC_LD_R_HL
static constexpr int CC_LD_R_HL
Definition: R800.hh:178
openmsx::R800TYPE::CC_IM
static constexpr int CC_IM
Definition: R800.hh:250
openmsx::R800TYPE::CC_SET_XHL_2
static constexpr int CC_SET_XHL_2
Definition: R800.hh:225
openmsx::R800TYPE::CC_LD_HL_XX_2
static constexpr int CC_LD_HL_XX_2
Definition: R800.hh:186
openmsx::R800TYPE::setDRAMmode
void setDRAMmode(bool dram)
Definition: R800.hh:21
openmsx::R800TYPE::CC_SET_XHL
static constexpr int CC_SET_XHL
Definition: R800.hh:225
openmsx::R800TYPE::EE_NMI_1
static constexpr int EE_NMI_1
Definition: R800.hh:255
openmsx::R800TYPE::CC_EX_SP_HL_1
static constexpr int CC_EX_SP_HL_1
Definition: R800.hh:219
openmsx::R800TYPE::CC_LD_A_NN_2
static constexpr int CC_LD_A_NN_2
Definition: R800.hh:174
openmsx::R800TYPE::CC_BIT_XHL
static constexpr int CC_BIT_XHL
Definition: R800.hh:222
openmsx::R800TYPE::CC_SET_XHL_1
static constexpr int CC_SET_XHL_1
Definition: R800.hh:225
openmsx::Clock< CLOCK_FREQ >
openmsx::R800TYPE::CC_RST
static constexpr int CC_RST
Definition: R800.hh:211
openmsx::R800TYPE::CC_CP_XHL_1
static constexpr int CC_CP_XHL_1
Definition: R800.hh:193
openmsx::R800TYPE::EE_RETN
static constexpr int EE_RETN
Definition: R800.hh:213
openmsx::R800TYPE::CC_LD_SS_A
static constexpr int CC_LD_SS_A
Definition: R800.hh:182
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5
openmsx::R800TYPE::O
static constexpr int O
Definition: R800.hh:166
openmsx::R800TYPE::CC_JP_1
static constexpr int CC_JP_1
Definition: R800.hh:214
openmsx::CPUClock::waitForEvenCycle
void waitForEvenCycle(int cc)
R800 runs at 7MHz, but I/O is done over a slower 3.5MHz bus.
Definition: CPUClock.hh:64
openmsx::R800TYPE::CC_CPL
static constexpr int CC_CPL
Definition: R800.hh:246
openmsx::R800TYPE::CC_LD_XIX_R
static constexpr int CC_LD_XIX_R
Definition: R800.hh:184
openmsx::R800TYPE::P
static constexpr int P
Definition: R800.hh:170
openmsx::R800TYPE::EE_SET_XIX
static constexpr int EE_SET_XIX
Definition: R800.hh:226
openmsx::R800TYPE::CC_LD_SS_NN
static constexpr int CC_LD_SS_NN
Definition: R800.hh:188
openmsx::CPUClock
Definition: CPUClock.hh:11