openMSX
V9990.hh
Go to the documentation of this file.
1 #ifndef V9990_HH
2 #define V9990_HH
3 
4 #include "MSXDevice.hh"
5 #include "Schedulable.hh"
7 #include "IRQHelper.hh"
8 #include "V9990DisplayTiming.hh"
9 #include "V9990ModeEnum.hh"
10 #include "SimpleDebuggable.hh"
11 #include "Clock.hh"
12 #include "serialize_meta.hh"
13 #include "openmsx.hh"
14 #include "one_of.hh"
15 #include "outer.hh"
16 #include "unreachable.hh"
17 #include <memory>
18 
19 namespace openmsx {
20 
21 class PostProcessor;
22 class Display;
23 class V9990VRAM;
24 class V9990CmdEngine;
25 class V9990Renderer;
26 
30 class V9990 final : public MSXDevice, private VideoSystemChangeListener
31 {
32 public:
33  explicit V9990(const DeviceConfig& config);
34  ~V9990() override;
35 
36  // MSXDevice interface:
37  void powerUp(EmuTime::param time) override;
38  void reset(EmuTime::param time) override;
39  byte readIO(word port, EmuTime::param time) override;
40  byte peekIO(word port, EmuTime::param time) const override;
41  void writeIO(word port, byte value, EmuTime::param time) override;
42 
48 
51  inline V9990VRAM& getVRAM() {
52  return *vram;
53  }
54 
58  inline bool isInterlaced() const {
59  return interlaced;
60  }
61 
65  inline bool isEvenOddEnabled() const {
66  return (regs[SCREEN_MODE_1] & 0x04) != 0;
67  }
68 
72  inline bool getEvenOdd() const {
73  return (status & 0x02) != 0;
74  }
75 
81  inline bool isDisplayEnabled() const {
82  return isDisplayArea && displayEnabled;
83  }
84 
88  inline bool spritesEnabled() const {
89  return !(regs[CONTROL] & 0x40);
90  }
91 
97  inline byte getPaletteOffset() const {
98  return (regs[PALETTE_CONTROL] & 0x0F);
99  }
100 
112  void getPalette(int index, byte& r, byte& g, byte& b, bool& ys) const;
113 
118  inline int getUCTicksThisFrame(EmuTime::param time) const {
119  return frameStartTime.getTicksTill_fast(time);
120  }
121 
126  inline bool isPalTiming() const {
127  return palTiming;
128  }
129 
132  inline bool isOverScan() const {
133  return mode == one_of(B0, B2, B4);
134  }
135 
142  inline bool isSuperimposing() const {
143  return superimposing;
144  }
145 
147  void setExternalVideoSource(bool enable) {
148  externalVideoSource = enable;
149  }
150 
155  inline unsigned getCursorYOffset() const {
156  // TODO vertical set-adjust may or may not influence this,
157  // need to investigate that.
158  if (!isOverScan()) return 0;
159  return isPalTiming()
162  }
163 
170  static inline int UCtoX(int ticks, V9990DisplayMode mode) {
171  int x;
173  switch (mode) {
174  case P1: x = ticks / 8; break;
175  case P2: x = ticks / 4; break;
176  case B0: x = ticks /12; break;
177  case B1: x = ticks / 8; break;
178  case B2: x = ticks / 6; break;
179  case B3: x = ticks / 4; break;
180  case B4: x = ticks / 3; break;
181  case B5: x = 1; break;
182  case B6: x = 1; break;
183  case B7: x = ticks / 2; break;
184  default: x = 1;
185  }
186  return x;
187  }
188 
192  return mode;
193  }
194 
198 
206  inline unsigned getColorDepth() const {
207  return regs[SCREEN_MODE_0] & 0x03;
208  }
209 
213  inline byte getBackDropColor() const {
214  return regs[BACK_DROP_COLOR];
215  }
216 
219  inline unsigned getScrollAX() const {
220  return regs[SCROLL_CONTROL_AX0] + 8 * regs[SCROLL_CONTROL_AX1];
221  }
222 
225  inline unsigned getScrollAY() const {
226  return regs[SCROLL_CONTROL_AY0] + 256 * scrollAYHigh;
227  }
228 
231  inline unsigned getScrollBX() const {
232  return regs[SCROLL_CONTROL_BX0] + 8 * regs[SCROLL_CONTROL_BX1];
233  }
234 
237  inline unsigned getScrollBY() const {
238  return regs[SCROLL_CONTROL_BY0] + 256 * scrollBYHigh;
239  }
240 
243  inline unsigned getRollMask(unsigned maxMask) const {
244  static unsigned rollMasks[4] = {
245  0xFFFF, // no rolling (use maxMask)
246  0x00FF,
247  0x01FF,
248  0x00FF // TODO check this (undocumented)
249  };
250  unsigned t = regs[SCROLL_CONTROL_AY1] >> 6;
251  return t ? rollMasks[t] : maxMask;
252  }
253 
256  inline unsigned getImageWidth() const {
257  switch (regs[SCREEN_MODE_0] & 0xC0) {
258  case 0x00: // P1
259  return 256;
260  case 0x40: // P2
261  return 512;
262  case 0x80: // Bx
263  default: // standby TODO check this
264  return (256 << ((regs[SCREEN_MODE_0] & 0x0C) >> 2));
265  }
266  }
269  inline unsigned getLineWidth() const {
270  switch (getDisplayMode()) {
271  case B0: return 213;
272  case P1: case B1: return 320;
273  case B2: return 426;
274  case P2: case B3: return 640;
275  case B4: return 853;
276  case B5: case B6: return 1; // not supported
277  case B7: return 1280;
278  default:
279  UNREACHABLE; return 0;
280  }
281  }
282 
285  inline void cmdReady() {
286  raiseIRQ(CMD_IRQ);
287  }
288 
292  switch (m) {
293  case P1:
294  return (int(regs[SPRITE_PATTERN_ADDRESS] & 0x0E) << 14);
295  case P2:
296  return (int(regs[SPRITE_PATTERN_ADDRESS] & 0x0F) << 15);
297  default:
298  return 0;
299  }
300  }
301 
304  inline byte getSpritePaletteOffset() const {
305  return regs[SPRITE_PALETTE_CONTROL] << 2;
306  }
307 
310  inline const V9990DisplayPeriod& getHorizontalTiming() const {
311  return *horTiming;
312  }
313 
317  inline int getLeftBorder() const {
318  return horTiming->blank + horTiming->border1 +
319  (((regs[DISPLAY_ADJUST] & 0x0F) ^ 7) - 8) * 8;
320  }
324  inline int getRightBorder() const {
325  return getLeftBorder() + horTiming->display;
326  }
327 
330  inline const V9990DisplayPeriod& getVerticalTiming() const {
331  return *verTiming;
332  }
333 
334  inline int getTopBorder() const {
335  return verTiming->blank + verTiming->border1 +
336  (((regs[DISPLAY_ADJUST] >> 4) ^ 7) - 8);
337  }
338  inline int getBottomBorder() const {
339  return getTopBorder() + verTiming->display;
340  }
341 
342  inline unsigned getPriorityControlX() const {
343  unsigned t = regs[PRIORITY_CONTROL] & 0x03;
344  return (t == 0) ? 256 : t << 6;
345  }
346  inline unsigned getPriorityControlY() const {
347  unsigned t = regs[PRIORITY_CONTROL] & 0x0C;
348  return (t == 0) ? 256 : t << 4;
349  }
350 
351  template<typename Archive>
352  void serialize(Archive& ar, unsigned version);
353 
354 private:
355  // VideoSystemChangeListener interface:
356  void preVideoSystemChange() override;
357  void postVideoSystemChange() override;
358 
359  // Scheduler stuff
360  struct SyncBase : Schedulable {
361  explicit SyncBase(V9990& v9990) : Schedulable(v9990.getScheduler()) {}
364  protected:
365  ~SyncBase() = default;
366  };
367 
368  struct SyncVSync final : SyncBase {
369  explicit SyncVSync(V9990& v9990) : SyncBase(v9990) {}
370  void executeUntil(EmuTime::param time) override {
371  auto& v9990 = OUTER(V9990, syncVSync);
372  v9990.execVSync(time);
373  }
374  } syncVSync;
375 
376  struct SyncDisplayStart final : SyncBase {
377  explicit SyncDisplayStart(V9990& v9990) : SyncBase(v9990) {}
378  void executeUntil(EmuTime::param time) override {
379  auto& v9990 = OUTER(V9990, syncDisplayStart);
380  v9990.execDisplayStart(time);
381  }
382  } syncDisplayStart;
383 
384  struct SyncVScan final : SyncBase {
385  explicit SyncVScan(V9990& v9990) : SyncBase(v9990) {}
386  void executeUntil(EmuTime::param time) override {
387  auto& v9990 = OUTER(V9990, syncVScan);
388  v9990.execVScan(time);
389  }
390  } syncVScan;
391 
392  struct SyncHScan final : SyncBase {
393  explicit SyncHScan(V9990& v9990) : SyncBase(v9990) {}
394  void executeUntil(EmuTime::param /*time*/) override {
395  auto& v9990 = OUTER(V9990, syncHScan);
396  v9990.execHScan();
397  }
398  } syncHScan;
399 
400  struct SyncSetMode final : SyncBase {
401  explicit SyncSetMode(V9990& v9990) : SyncBase(v9990) {}
402  void executeUntil(EmuTime::param time) override {
403  auto& v9990 = OUTER(V9990, syncSetMode);
404  v9990.execSetMode(time);
405  }
406  } syncSetMode;
407 
408  struct SyncCmdEnd final : SyncBase {
409  explicit SyncCmdEnd(V9990& v9990) : SyncBase(v9990) {}
410  void executeUntil(EmuTime::param time) override {
411  auto& v9990 = OUTER(V9990, syncCmdEnd);
412  v9990.execCheckCmdEnd(time);
413  }
414  } syncCmdEnd;
415 
416  void execVSync(EmuTime::param time);
417  void execDisplayStart(EmuTime::param time);
418  void execVScan(EmuTime::param time);
419  void execHScan();
420  void execSetMode(EmuTime::param time);
421  void execCheckCmdEnd(EmuTime::param time);
422 
423  // --- types ------------------------------------------------------
424 
427  enum IRQType {
428  VER_IRQ = 1,
429  HOR_IRQ = 2,
430  CMD_IRQ = 4
431  };
432 
435  enum PortId {
436  VRAM_DATA = 0,
437  PALETTE_DATA,
438  COMMAND_DATA,
439  REGISTER_DATA,
440  REGISTER_SELECT,
441  STATUS,
442  INTERRUPT_FLAG,
443  SYSTEM_CONTROL,
444  KANJI_ROM_0,
445  KANJI_ROM_1,
446  KANJI_ROM_2,
447  KANJI_ROM_3,
448  RESERVED_0,
449  RESERVED_1,
450  RESERVED_2,
451  RESERVED_3
452  };
453 
456  enum RegisterId {
457  VRAM_WRITE_ADDRESS_0 = 0,
458  VRAM_WRITE_ADDRESS_1,
459  VRAM_WRITE_ADDRESS_2,
460  VRAM_READ_ADDRESS_0,
461  VRAM_READ_ADDRESS_1,
462  VRAM_READ_ADDRESS_2,
463  SCREEN_MODE_0,
464  SCREEN_MODE_1,
465  CONTROL,
466  INTERRUPT_0,
467  INTERRUPT_1,
468  INTERRUPT_2,
469  INTERRUPT_3,
470  PALETTE_CONTROL,
471  PALETTE_POINTER,
472  BACK_DROP_COLOR,
473  DISPLAY_ADJUST,
474  SCROLL_CONTROL_AY0,
475  SCROLL_CONTROL_AY1,
476  SCROLL_CONTROL_AX0,
477  SCROLL_CONTROL_AX1,
478  SCROLL_CONTROL_BY0,
479  SCROLL_CONTROL_BY1,
480  SCROLL_CONTROL_BX0,
481  SCROLL_CONTROL_BX1,
482  SPRITE_PATTERN_ADDRESS,
483  LCD_CONTROL,
484  PRIORITY_CONTROL,
485  SPRITE_PALETTE_CONTROL,
486  CMD_PARAM_SRC_ADDRESS_0 = 32,
487  CMD_PARAM_SRC_ADDRESS_1,
488  CMD_PARAM_SRC_ADDRESS_2,
489  CMD_PARAM_SRC_ADDRESS_3,
490  CMD_PARAM_DEST_ADDRESS_0,
491  CMD_PARAM_DEST_ADDRESS_1,
492  CMD_PARAM_DEST_ADDRESS_2,
493  CMD_PARAM_DEST_ADDRESS_3,
494  CMD_PARAM_SIZE_0,
495  CMD_PARAM_SIZE_1,
496  CMD_PARAM_SIZE_2,
497  CMD_PARAM_SIZE_3,
498  CMD_PARAM_ARGUMENT,
499  CMD_PARAM_LOGOP,
500  CMD_PARAM_WRITE_MASK_0,
501  CMD_PARAM_WRITE_MASK_1,
502  CMD_PARAM_FONT_COLOR_FC0,
503  CMD_PARAM_FONT_COLOR_FC1,
504  CMD_PARAM_FONT_COLOR_BC0,
505  CMD_PARAM_FONT_COLOR_BC1,
506  CMD_PARAM_OPCODE,
507  CMD_PARAM_BORDER_X_0,
508  CMD_PARAM_BORDER_X_1
509  };
510 
511  // --- members ----------------------------------------------------
512 
513  struct RegDebug final : SimpleDebuggable {
514  explicit RegDebug(V9990& v9990);
515  byte read(unsigned address) override;
516  void write(unsigned address, byte value, EmuTime::param time) override;
517  } v9990RegDebug;
518 
519  struct PalDebug final : SimpleDebuggable {
520  explicit PalDebug(V9990& v9990);
521  byte read(unsigned address) override;
522  void write(unsigned address, byte value, EmuTime::param time) override;
523  } v9990PalDebug;
524 
525  IRQHelper irq;
526 
527  Display& display;
528 
531  std::unique_ptr<V9990VRAM> vram;
532  unsigned vramReadPtr, vramWritePtr;
533  byte vramReadBuffer;
534 
537  std::unique_ptr<V9990CmdEngine> cmdEngine;
538 
541  std::unique_ptr<V9990Renderer> renderer;
542 
545  Clock<V9990DisplayTiming::UC_TICKS_PER_SECOND> frameStartTime;
546 
549  EmuTime hScanSyncTime;
550 
553  const V9990DisplayPeriod* horTiming;
554  const V9990DisplayPeriod* verTiming;
555 
558  V9990DisplayMode mode;
559 
562  byte palette[0x100];
563 
566  byte status;
567 
570  byte pendingIRQs;
571 
574  byte regs[0x40];
575  byte regSelect;
576 
579  bool palTiming;
580 
584  bool interlaced;
585 
588  bool isDisplayArea;
589 
595  bool displayEnabled;
596 
605  byte scrollAYHigh;
606  byte scrollBYHigh;
607 
612  bool systemReset;
613 
618  bool externalVideoSource;
619 
623  bool superimposing;
624 
625  // --- methods ----------------------------------------------------
626 
627  void setHorizontalTiming();
628  void setVerticalTiming();
629 
630  V9990ColorMode getColorMode(byte pal_ctrl) const;
631 
636  inline unsigned getVRAMAddr(RegisterId base) const;
637 
642  inline void setVRAMAddr(RegisterId base, unsigned addr);
643 
649  byte readRegister(byte reg, EmuTime::param time) const;
650 
656  void writeRegister(byte reg, byte val, EmuTime::param time);
657 
663  void writePaletteRegister(byte reg, byte val, EmuTime::param time);
664 
667  void syncAtNextLine(SyncBase& type, EmuTime::param time);
668 
672  void createRenderer(EmuTime::param time);
673 
677  void frameStart(EmuTime::param time);
678 
682  void raiseIRQ(IRQType irqType);
683 
686  void calcDisplayMode();
687 
692  void scheduleHscan(EmuTime::param time);
693 
696  void scheduleCmdEnd(EmuTime::param time);
697 };
699 
700 } // namespace openmsx
701 
702 #endif
openmsx::V9990::isPalTiming
bool isPalTiming() const
Is PAL timing active? This setting is fixed at start of frame.
Definition: V9990.hh:126
openmsx::V9990::getLineWidth
unsigned getLineWidth() const
Return the display width.
Definition: V9990.hh:269
openmsx::V9990VRAM
Video RAM for the V9990.
Definition: V9990VRAM.hh:15
openmsx::MSXDevice
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX.
Definition: MSXDevice.hh:31
one_of.hh
openmsx::V9990DisplayPeriod
A period, either horizontal or vertical, starts with a synchronisation pulse followed by a blank peri...
Definition: V9990DisplayTiming.hh:11
openmsx::V9990::readIO
byte readIO(word port, EmuTime::param time) override
Read a byte from an IO port at a certain time from this device.
Definition: V9990.cc:163
openmsx.hh
openmsx::B3
@ B3
Definition: V9990ModeEnum.hh:8
Clock.hh
openmsx::V9990::isSuperimposing
bool isSuperimposing() const
Should this frame be superimposed? This is a combination of bit 5 (YSE) in R#8 and the presence of an...
Definition: V9990.hh:142
openmsx::V9990::getTopBorder
int getTopBorder() const
Definition: V9990.hh:334
openmsx::B1
@ B1
Definition: V9990ModeEnum.hh:8
openmsx::B5
@ B5
Definition: V9990ModeEnum.hh:8
openmsx::V9990::getPalette
void getPalette(int index, byte &r, byte &g, byte &b, bool &ys) const
Get palette entry.
Definition: V9990.cc:696
V9990ModeEnum.hh
openmsx::P2
@ P2
Definition: V9990ModeEnum.hh:8
openmsx::V9990::getColorDepth
unsigned getColorDepth() const
Return the amount of bits per pixels.
Definition: V9990.hh:206
openmsx::V9990::setExternalVideoSource
void setExternalVideoSource(bool enable)
Is there an external video source available to superimpose on.
Definition: V9990.hh:147
openmsx::MSXDevice::getScheduler
Scheduler & getScheduler() const
Definition: MSXDevice.cc:143
openmsx::DeviceConfig
Definition: DeviceConfig.hh:19
openmsx::IRQHelper
IntHelper< IRQSource > IRQHelper
Definition: IRQHelper.hh:135
serialize_meta.hh
openmsx::V9990DisplayPeriod::border1
const int border1
Definition: V9990DisplayTiming.hh:15
openmsx::V9990::getHorizontalTiming
const V9990DisplayPeriod & getHorizontalTiming() const
Get horizontal display timings.
Definition: V9990.hh:310
openmsx::V9990::getBackDropColor
byte getBackDropColor() const
Return the current back drop color.
Definition: V9990.hh:213
openmsx::V9990DisplayTiming::UC_TICKS_PER_LINE
static constexpr int UC_TICKS_PER_LINE
The number of clockticks per line is independent of the crystal used or the display mode (NTSC/PAL)
Definition: V9990DisplayTiming.hh:36
openmsx::V9990::getRightBorder
int getRightBorder() const
Get the number of VDP clockticks between the start of the line and the end of the right border.
Definition: V9990.hh:324
openmsx::V9990::getScrollBY
unsigned getScrollBY() const
Returns the Y scroll offset for screen B of P1 mode.
Definition: V9990.hh:237
openmsx::V9990ColorMode
V9990ColorMode
Definition: V9990ModeEnum.hh:11
t
TclObject t
Definition: TclObject_test.cc:264
openmsx::Schedulable
Every class that wants to get scheduled at some point must inherit from this class.
Definition: Schedulable.hh:33
Schedulable.hh
openmsx::V9990DisplayTiming::displayNTSC_MCLK
static constexpr auto displayNTSC_MCLK
NTSC display timing, when using MCLK: Normal display mode with borders.
Definition: V9990DisplayTiming.hh:53
openmsx::V9990DisplayTiming::displayPAL_MCLK
static constexpr auto displayPAL_MCLK
PAL display timing, when using MCLK: Normal display mode with borders.
Definition: V9990DisplayTiming.hh:63
openmsx::V9990::cmdReady
void cmdReady()
Command execution ready.
Definition: V9990.hh:285
openmsx::B6
@ B6
Definition: V9990ModeEnum.hh:8
VideoSystemChangeListener.hh
openmsx::V9990::getPriorityControlX
unsigned getPriorityControlX() const
Definition: V9990.hh:342
openmsx::V9990::getRollMask
unsigned getRollMask(unsigned maxMask) const
Returns the vertical roll mask.
Definition: V9990.hh:243
openmsx::V9990::getPostProcessor
PostProcessor * getPostProcessor() const
Used by Video9000 to be able to couple the VDP and V9990 output.
Definition: V9990.cc:112
openmsx::V9990::isInterlaced
bool isInterlaced() const
Get interlace status.
Definition: V9990.hh:58
openmsx::V9990::getScrollBX
unsigned getScrollBX() const
Returns the X scroll offset for screen B of P1 mode.
Definition: V9990.hh:231
openmsx::V9990::getCursorYOffset
unsigned getCursorYOffset() const
In overscan mode the cursor position is still specified with 'normal' (non-overscan) y-coordinates.
Definition: V9990.hh:155
openmsx::SERIALIZE_CLASS_VERSION
SERIALIZE_CLASS_VERSION(CassettePlayer, 2)
openmsx::SimpleDebuggable::read
virtual byte read(unsigned address, EmuTime::param time)
Definition: SimpleDebuggable.cc:39
openmsx::V9990::V9990
V9990(const DeviceConfig &config)
Definition: V9990.cc:54
openmsx::Schedulable::setSyncPoint
void setSyncPoint(EmuTime::param timestamp)
Definition: Schedulable.cc:23
openmsx::V9990::getScrollAX
unsigned getScrollAX() const
Returns the X scroll offset for screen A of P1 and other modes.
Definition: V9990.hh:219
OUTER
#define OUTER(type, member)
Definition: outer.hh:41
UNREACHABLE
#define UNREACHABLE
Definition: unreachable.hh:38
openmsx::V9990
V9990
Definition: V9990.cc:974
openmsx::V9990::spritesEnabled
bool spritesEnabled() const
Are sprites (cursors) enabled?
Definition: V9990.hh:88
openmsx::V9990::getDisplayMode
V9990DisplayMode getDisplayMode() const
Return the current display mode.
Definition: V9990.hh:191
one_of
Definition: one_of.hh:7
openmsx::V9990::serialize
void serialize(Archive &ar, unsigned version)
Definition: V9990.cc:903
openmsx::V9990::getVRAM
V9990VRAM & getVRAM()
Obtain a reference to the V9990's VRAM.
Definition: V9990.hh:51
openmsx::V9990::getScrollAY
unsigned getScrollAY() const
Returns the Y scroll offset for screen A of P1 and other modes.
Definition: V9990.hh:225
openmsx::V9990::getSpritePaletteOffset
byte getSpritePaletteOffset() const
return sprite palette offset
Definition: V9990.hh:304
MSXDevice.hh
openmsx::SimpleDebuggable::write
void write(unsigned address, byte value) override
Definition: SimpleDebuggable.cc:44
openmsx::V9990DisplayMode
V9990DisplayMode
Definition: V9990ModeEnum.hh:6
openmsx::PostProcessor
Abstract base class for post processors.
Definition: PostProcessor.hh:29
openmsx::V9990::getPriorityControlY
unsigned getPriorityControlY() const
Definition: V9990.hh:346
openmsx::B2
@ B2
Definition: V9990ModeEnum.hh:8
SimpleDebuggable.hh
openmsx::B7
@ B7
Definition: V9990ModeEnum.hh:8
openmsx::V9990DisplayPeriod::display
const int display
Definition: V9990DisplayTiming.hh:16
g
int g
Definition: ScopedAssign_test.cc:20
openmsx::P1
@ P1
Definition: V9990ModeEnum.hh:8
outer.hh
openmsx::V9990CmdEngine
V9990CmdEngine
Definition: V9990CmdEngine.cc:1883
openmsx::x
constexpr KeyMatrixPosition x
Keyboard bindings.
Definition: Keyboard.cc:1419
openmsx::V9990::writeIO
void writeIO(word port, byte value, EmuTime::param time) override
Write a byte to a given IO port at a certain time to this device.
Definition: V9990.cc:288
openmsx::V9990::getEvenOdd
bool getEvenOdd() const
Is the even or odd field being displayed?
Definition: V9990.hh:72
openmsx::V9990::powerUp
void powerUp(EmuTime::param time) override
This method is called when MSX is powered up.
Definition: V9990.cc:121
openmsx::V9990::getUCTicksThisFrame
int getUCTicksThisFrame(EmuTime::param time) const
Get the number of elapsed UC ticks in this frame.
Definition: V9990.hh:118
openmsx::word
uint16_t word
16 bit unsigned integer
Definition: openmsx.hh:29
openmsx::V9990::getPaletteOffset
byte getPaletteOffset() const
Get palette offset.
Definition: V9990.hh:97
openmsx::V9990::getBottomBorder
int getBottomBorder() const
Definition: V9990.hh:338
V9990DisplayTiming.hh
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::V9990::isDisplayEnabled
bool isDisplayEnabled() const
Is the display enabled? Note this is simpler than the V99x8 version.
Definition: V9990.hh:81
openmsx::B0
@ B0
Definition: V9990ModeEnum.hh:8
openmsx::V9990::getImageWidth
unsigned getImageWidth() const
Return the image width.
Definition: V9990.hh:256
openmsx::V9990::getSpritePatternAddress
int getSpritePatternAddress(V9990DisplayMode m) const
Return the sprite pattern table base address.
Definition: V9990.hh:291
unreachable.hh
IRQHelper.hh
openmsx::V9990::getColorMode
V9990ColorMode getColorMode() const
Return the current color mode.
Definition: V9990.cc:812
openmsx::V9990::UCtoX
static int UCtoX(int ticks, V9990DisplayMode mode)
Convert UC ticks to V9990 pixel position on a line.
Definition: V9990.hh:170
openmsx::V9990::isEvenOddEnabled
bool isEvenOddEnabled() const
Get even/odd page alternation status.
Definition: V9990.hh:65
openmsx::VideoSystemChangeListener
Definition: VideoSystemChangeListener.hh:6
openmsx::V9990VRAM
V9990VRAM
Definition: V9990VRAM.cc:59
openmsx::V9990::peekIO
byte peekIO(word port, EmuTime::param time) const override
Read a byte from a given IO port.
Definition: V9990.cc:225
openmsx::V9990::reset
void reset(EmuTime::param time) override
This method is called on reset.
Definition: V9990.cc:127
openmsx::V9990::getVerticalTiming
const V9990DisplayPeriod & getVerticalTiming() const
Get vertical display timings.
Definition: V9990.hh:330
openmsx
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:5
openmsx::V9990DisplayPeriod::blank
const int blank
Definition: V9990DisplayTiming.hh:14
openmsx::V9990::getLeftBorder
int getLeftBorder() const
Get the number of VDP clockticks between the start of the line and the end of the left border.
Definition: V9990.hh:317
openmsx::Schedulable::removeSyncPoint
bool removeSyncPoint()
Definition: Schedulable.cc:28
openmsx::V9990::isOverScan
bool isOverScan() const
Returns true iff in overscan mode.
Definition: V9990.hh:132
openmsx::V9990
Implementation of the Yamaha V9990 VDP as used in the GFX9000 cartridge by Sunrise.
Definition: V9990.hh:30
openmsx::V9990::~V9990
~V9990() override
Definition: V9990.cc:107
openmsx::B4
@ B4
Definition: V9990ModeEnum.hh:8