openMSX
VDP.hh
Go to the documentation of this file.
1 #ifndef VDP_HH
2 #define VDP_HH
3 
4 #include "MSXDevice.hh"
5 #include "Schedulable.hh"
7 #include "IRQHelper.hh"
8 #include "Clock.hh"
9 #include "DisplayMode.hh"
10 #include "Observer.hh"
11 #include "openmsx.hh"
12 #include <memory>
13 
14 namespace openmsx {
15 
16 class PostProcessor;
17 class Renderer;
18 class VDPCmdEngine;
19 class VDPVRAM;
20 class SpriteChecker;
21 class VDPRegDebug;
22 class VDPStatusRegDebug;
23 class VDPPaletteDebug;
24 class VRAMPointerDebug;
25 class FrameCountInfo;
26 class CycleInFrameInfo;
27 class LineInFrameInfo;
28 class CycleInLineInfo;
29 class MsxYPosInfo;
30 class MsxX256PosInfo;
31 class MsxX512PosInfo;
32 class Display;
33 class RawFrame;
34 class Setting;
35 template<typename> class EnumSetting;
36 namespace VDPAccessSlots {
37  enum Delta : int;
38  class Calculator;
39 }
40 
66 class VDP : public MSXDevice, public Schedulable,
67  private VideoSystemChangeListener, Observer<Setting>
68 {
69 public:
72  static const int TICKS_PER_SECOND = 3579545 * 6; // 21.5MHz;
74 
77  static const int TICKS_PER_LINE = 1368;
78 
79  explicit VDP(const DeviceConfig& config);
80  virtual ~VDP();
81 
82  virtual void powerUp(EmuTime::param time);
83  virtual void reset(EmuTime::param time);
84  virtual byte readIO(word port, EmuTime::param time);
85  virtual byte peekIO(word port, EmuTime::param time) const;
86  virtual void writeIO(word port, byte value, EmuTime::param time);
87  virtual void executeUntil(EmuTime::param time, int userData);
88 
94 
99  inline bool isMSX1VDP() const {
100  return (version & VM_MSX1) != 0;
101  }
102 
106  inline bool isVDPwithPALonly() const {
107  return (version & VM_PAL) != 0;
108  }
109 
113  inline bool vdpLacksMirroring() const {
114  return (version & VM_NO_MIRRORING) != 0;
115  }
116 
120  inline bool vdpHasPatColMirroring() const {
121  return (version & VM_PALCOL_MIRRORING) != 0;
122  }
123 
127  inline bool isVDPwithVRAMremapping() const {
128  return (version & VM_VRAM_REMAPPING) != 0;
129  }
130 
134  inline bool hasToshibaPalette() const {
135  return (version & VM_TOSHIBA_PALETTE) != 0;
136  }
137 
141  inline bool hasYJK() const {
142  return (version & VM_YJK) != 0;
143  }
144 
148  inline DisplayMode getDisplayMode() const {
149  return displayMode;
150  }
151 
154  inline VDPVRAM& getVRAM() {
155  return *vram;
156  }
157 
162  inline const RawFrame* isSuperimposing() const {
163  // Note that bit 0 of r#0 has no effect on an V9938 or higher,
164  // but this bit is masked out. Also note that on an MSX1, if
165  // bit 0 of r#0 is enabled and there is no external video
166  // source, then we lose sync.
167  // Also note that because this property is fixed per frame we
168  // cannot (re)calculate it from register values.
169  return superimposing;
170  }
171 
175  return *spriteChecker;
176  }
177 
181  inline bool getTransparency() const {
182  return (controlRegs[8] & 0x20) == 0;
183  }
184 
188  inline int getForegroundColor() const {
189  return controlRegs[7] >> 4;
190  }
191 
200  inline int getBackgroundColor() const {
201  byte reg7 = controlRegs[7];
202  if (displayMode.getByte() == DisplayMode::GRAPHIC7) {
203  return reg7;
204  } else {
205  return reg7 & 0x0F;
206  }
207  }
208 
212  inline int getBlinkForegroundColor() const {
213  return controlRegs[12] >> 4;
214  }
215 
219  inline int getBlinkBackgroundColor() const {
220  return controlRegs[12] & 0x0F;
221  }
222 
226  inline bool getBlinkState() const {
227  return blinkState;
228  }
229 
235  inline word getPalette(int index) const {
236  return palette[index];
237  }
238 
244  inline bool isDisplayEnabled() const {
245  return isDisplayArea && displayEnabled;
246  }
247 
252  inline bool spritesEnabled() const {
253  return displayEnabled &&
254  (displayMode.getSpriteMode(isMSX1VDP()) != 0) &&
255  ((controlRegs[8] & 0x02) == 0x00);
256  }
257 
261  inline bool spritesEnabledFast() const {
262  assert(displayMode.getSpriteMode(isMSX1VDP()) != 0);
263  return displayEnabled && ((controlRegs[8] & 0x02) == 0x00);
264  }
265 
269  inline bool spritesEnabledRegister() const {
270  return (controlRegs[8] & 0x02) == 0x00;
271  }
272 
276  inline byte getVerticalScroll() const {
277  return controlRegs[23];
278  }
279 
285  inline byte getHorizontalScrollLow() const {
286  return controlRegs[27];
287  }
288 
294  inline byte getHorizontalScrollHigh() const {
295  return controlRegs[26];
296  }
297 
303  inline bool isBorderMasked() const {
304  return (controlRegs[25] & 0x02) != 0;
305  }
306 
313  inline bool isMultiPageScrolling() const {
314  return (controlRegs[25] & 0x01) && (controlRegs[2] & 0x20);
315  }
316 
321  inline int getLineZero() const {
322  return displayStart / TICKS_PER_LINE;
323  }
324 
329  inline bool isPalTiming() const {
330  return palTiming;
331  }
332 
340  inline bool isInterlaced() const {
341  return interlaced;
342  }
343 
355  inline bool isEvenOddEnabled() const {
356  return (controlRegs[9] & 4) != 0;
357  }
358 
362  inline bool getEvenOdd() const {
363  return (statusReg2 & 2) != 0;
364  }
365 
376  inline int getEvenOddMask() const {
377  // TODO: Verify which page is displayed on even fields.
378  return (((~controlRegs[9] & 4) << 6) | ((statusReg2 & 2) << 7)) &
379  (!blinkState << 8);
380  }
381 
385  inline int getTicksThisFrame(EmuTime::param time) const {
386  return frameStartTime.getTicksTill_fast(time);
387  }
388 
390  return frameStartTime.getTime();
391  }
392 
395  inline int getSpriteSize() const {
396  return ((controlRegs[1] & 2) << 2) + 8;
397  }
398 
401  inline bool isSpriteMag() const {
402  return controlRegs[1] & 1;
403  }
404 
408  inline bool getCmdBit() const {
409  return (controlRegs[25] & 0x40) != 0;
410  }
411 
414  inline int getTicksPerFrame() const {
415  return palTiming ? TICKS_PER_LINE * 313 : TICKS_PER_LINE * 262;
416  }
417 
427  inline bool isInsideFrame(EmuTime::param time) const {
428  return time >= frameStartTime.getTime() &&
430  }
431 
435  inline int getHorizontalAdjust() const {
436  return horizontalAdjust;
437  }
438 
446  inline int getLeftSprites() const {
447  return 100 + 102 + 56
448  + (horizontalAdjust - 7) * 4
449  + (displayMode.isTextMode() ? 36 : 0);
450  }
451 
457  inline int getLeftBorder() const {
458  return getLeftSprites() + (isBorderMasked() ? 8 * 4 : 0);
459  }
460 
464  inline int getRightBorder() const {
465  return getLeftSprites()
466  + (displayMode.isTextMode() ? 960 : 1024);
467  }
468 
474  inline int getLeftBackground() const {
475  return getLeftSprites() + getHorizontalScrollLow() * 4;
476  }
477 
481  byte getStatusReg0() const { return statusReg0; }
482 
491  void setSpriteStatus(byte value)
492  {
493  statusReg0 = (statusReg0 & 0x80) | (value & 0x7F);
494  }
495 
499  bool getVRMode() const {
500  return (controlRegs[8] & 8) != 0;
501  }
502 
505  void setExternalVideoSource(const RawFrame* externalSource);
506 
509  bool getBrokenCmdTiming() const {
510  return brokenCmdTiming;
511  }
512 
516 
527  EmuTime::param time, EmuTime::param limit) const;
528 
530  bool cpuAccessScheduled() const;
531 
532  template<typename Archive>
533  void serialize(Archive& ar, unsigned version);
534 
535 private:
536  void initTables();
537 
538  // VdpVersion bitmasks
539  static const unsigned VM_MSX1 = 1; // set-> MSX1, unset-> MSX2 or MSX2+
540  static const unsigned VM_PAL = 2; // set-> fixed PAL, unset-> fixed NTSC or switchable
541  static const unsigned VM_NO_MIRRORING = 4; // set-> no (screen2) mirroring
542  static const unsigned VM_PALCOL_MIRRORING = 8; // set-> pattern/color-table mirroring
543  static const unsigned VM_VRAM_REMAPPING = 16; // set-> 4k,8/16k VRAM remapping
544  static const unsigned VM_TOSHIBA_PALETTE = 32; // set-> has Toshiba palette
545  static const unsigned VM_YJK = 64; // set-> has YJK (MSX2+)
546 
548  enum VdpVersion {
553  TMS99X8A = VM_MSX1 | VM_PALCOL_MIRRORING | VM_VRAM_REMAPPING,
554 
556  TMS9929A = VM_MSX1 | VM_PALCOL_MIRRORING | VM_VRAM_REMAPPING | VM_PAL,
557 
559  TMS9129 = VM_MSX1 | VM_PAL,
560 
562  TMS91X8 = VM_MSX1,
563 
565  T6950PAL = VM_MSX1 | VM_TOSHIBA_PALETTE | VM_NO_MIRRORING | VM_PAL,
566 
568  T6950NTSC = VM_MSX1 | VM_TOSHIBA_PALETTE | VM_NO_MIRRORING,
569 
571  T7937APAL = VM_MSX1 | VM_TOSHIBA_PALETTE | VM_PAL,
572 
574  T7937ANTSC = VM_MSX1 | VM_TOSHIBA_PALETTE,
575 
577  V9938 = 0,
578 
580  V9958 = VM_YJK,
581  };
582 
585  enum SyncType {
587  VSYNC,
589  DISPLAY_START,
591  VSCAN,
593  HSCAN,
595  HOR_ADJUST,
597  SET_MODE,
599  SET_BLANK,
601  CPU_VRAM_ACCESS,
602  };
603 
614  static const int LINE_COUNT_RESET_TICKS = 15 * TICKS_PER_LINE;
615 
619  inline int getNumberOfLines() const {
620  return controlRegs[9] & 0x80 ? 212 : 192;
621  }
622 
632  inline bool getHR(int ticksThisFrame) const {
633  // Note: These constants are located inside this function because
634  // GCC 4.0.x won't link if they are in the class scope.
638  static const int HBLANK_LEN_TXT = 404;
642  static const int HBLANK_LEN_GFX = 312;
643  return
644  ( ticksThisFrame + TICKS_PER_LINE - getRightBorder()
645  ) % TICKS_PER_LINE
646  < (displayMode.isTextMode() ? HBLANK_LEN_TXT : HBLANK_LEN_GFX);
647  }
648 
649  // VideoSystemChangeListener interface:
650  virtual void preVideoSystemChange();
651  virtual void postVideoSystemChange();
652 
657  void resetInit();
658 
663  void resetMasks(EmuTime::param time);
664 
668  void frameStart(EmuTime::param time);
669 
677  void scheduleDisplayStart(EmuTime::param time);
678 
684  void scheduleVScan(EmuTime::param time);
685 
691  void scheduleHScan(EmuTime::param time);
692 
695  void vramWrite(byte value, EmuTime::param time);
696 
699  byte vramRead(EmuTime::param time);
700 
702  void scheduleCpuVramAccess(bool isRead, byte write, EmuTime::param time);
703  void executeCpuVramAccess(EmuTime::param time);
704 
707  byte peekStatusReg(byte reg, EmuTime::param time) const;
708  byte readStatusReg(byte reg, EmuTime::param time);
709 
712  void changeRegister(byte reg, byte val, EmuTime::param time);
713 
716  void syncAtNextLine(SyncType type, EmuTime::param time);
717 
720  void createRenderer();
721 
725  void updateNameBase(EmuTime::param time);
726 
730  void updateColorBase(EmuTime::param time);
731 
735  void updatePatternBase(EmuTime::param time);
736 
740  void updateSpriteAttributeBase(EmuTime::param time);
741 
745  void updateSpritePatternBase(EmuTime::param time);
746 
750  void updateDisplayMode(DisplayMode newMode, EmuTime::param time);
751 
758  void setPalette(int index, word grb, EmuTime::param time);
759 
760  // Observer<Setting>
761  virtual void update(const Setting& setting);
762 
763 private:
764  Display& display;
765  EnumSetting<bool>& cmdTiming;
766  EnumSetting<bool>& tooFastAccess;
767 
768  friend class VDPRegDebug;
769  friend class VDPStatusRegDebug;
770  friend class VDPPaletteDebug;
771  friend class VRAMPointerDebug;
772  friend class FrameCountInfo;
773  const std::unique_ptr<VDPRegDebug> vdpRegDebug;
774  const std::unique_ptr<VDPStatusRegDebug> vdpStatusRegDebug;
775  const std::unique_ptr<VDPPaletteDebug> vdpPaletteDebug;
776  const std::unique_ptr<VRAMPointerDebug> vramPointerDebug;
777  const std::unique_ptr<FrameCountInfo> frameCountInfo;
778  const std::unique_ptr<CycleInFrameInfo> cycleInFrameInfo;
779  const std::unique_ptr<LineInFrameInfo> lineInFrameInfo;
780  const std::unique_ptr<CycleInLineInfo> cycleInLineInfo;
781  const std::unique_ptr<MsxYPosInfo> msxYPosInfo;
782  const std::unique_ptr<MsxX256PosInfo> msxX256PosInfo;
783  const std::unique_ptr<MsxX512PosInfo> msxX512PosInfo;
784 
787  std::unique_ptr<Renderer> renderer;
788 
791  std::unique_ptr<VDPCmdEngine> cmdEngine;
792 
795  std::unique_ptr<SpriteChecker> spriteChecker;
796 
799  std::unique_ptr<VDPVRAM> vram;
800 
804  const RawFrame* externalVideo;
805 
811  const RawFrame* superimposing;
812 
815  VDPClock frameStartTime;
816 
819  IRQHelper irqVertical;
820 
823  IRQHelper irqHorizontal;
824 
827  EmuTime displayStartSyncTime;
828 
831  EmuTime vScanSyncTime;
832 
835  EmuTime hScanSyncTime;
836 
839  VdpVersion version;
840 
846  int frameCount;
847 
850  int displayStart;
851 
855  int horizontalScanOffset;
856 
860  int horizontalAdjust;
861 
864  byte controlRegs[32];
865 
870  int controlRegMask;
871 
878  byte controlValueMasks[32];
879 
883  int blinkCount;
884 
888  int vramPointer;
889 
892  word palette[16];
893 
896  bool isDisplayArea;
897 
903  bool palTiming;
904 
908  bool interlaced;
909 
914  byte statusReg0;
915 
921  byte statusReg1;
922 
927  byte statusReg2;
928 
931  bool blinkState;
932 
935  byte dataLatch;
936 
939  bool registerDataStored;
940 
943  bool paletteDataStored;
944 
952  byte cpuVramData;
953 
957  bool cpuVramReqIsRead;
958  bool pendingCpuAccess; // always equal to pendingSyncPoint(CPU_VRAM_ACCESS)
959  unsigned cpuVramReqAddr;
960 
964  bool cpuExtendedVram;
965 
971  DisplayMode displayMode;
972 
977  bool displayEnabled;
978 
982  bool warningPrinted;
983 
985  bool brokenCmdTiming;
986  bool allowTooFastAccess;
987 };
989 
990 } // namespace openmsx
991 
992 #endif
int getBlinkBackgroundColor() const
Gets the current blinking color for blinking text.
Definition: VDP.hh:219
bool isInsideFrame(EmuTime::param time) const
Is the given timestamp inside the current frame? Mainly useful for debugging, because relevant timest...
Definition: VDP.hh:427
int getBlinkForegroundColor() const
Gets the current blinking color for blinking text.
Definition: VDP.hh:212
bool isBorderMasked() const
Gets the current border mask setting.
Definition: VDP.hh:303
bool isEvenOddEnabled() const
Get even/odd page alternation status.
Definition: VDP.hh:355
bool vdpHasPatColMirroring() const
Is this a VDP that has pattern/colortable mirroring?
Definition: VDP.hh:120
void setSpriteStatus(byte value)
Should only be used by SpriteChecker.
Definition: VDP.hh:491
bool spritesEnabled() const
Are sprites enabled?
Definition: VDP.hh:252
int getHorizontalAdjust() const
This is a combination of the (horizontal) set adjust register and the YJK-mode bit.
Definition: VDP.hh:435
static const int TICKS_PER_LINE
Number of VDP clock ticks per line.
Definition: VDP.hh:77
SpriteChecker & getSpriteChecker()
Get the sprite checker for this VDP.
Definition: VDP.hh:174
virtual void reset(EmuTime::param time)
This method is called on reset.
Definition: VDP.cc:430
bool isMultiPageScrolling() const
Is multi page scrolling enabled? It is considered enabled if both the multi page scrolling flag is en...
Definition: VDP.hh:313
bool vdpLacksMirroring() const
Is this a VDP that lacks mirroring?
Definition: VDP.hh:113
VDPAccessSlots::Calculator getAccessSlotCalculator(EmuTime::param time, EmuTime::param limit) const
Same as getAccessSlot(), but it can be much faster for repeated calls, e.g.
Definition: VDP.cc:929
unsigned char byte
8 bit unsigned integer
Definition: openmsx.hh:33
DisplayMode getDisplayMode() const
Get the display mode the VDP is in.
Definition: VDP.hh:148
int getRightBorder() const
Gets the number of VDP clockticks between start of line and the start of the right border...
Definition: VDP.hh:464
int getSpriteMode(bool isMSX1) const
Get the sprite mode of this display mode.
Definition: DisplayMode.hh:176
int getTicksPerFrame() const
Gets the number of VDP clockticks (21MHz) per frame.
Definition: VDP.hh:414
int getLeftSprites() const
Gets the number of VDP clockticks between start of line and the start of the sprite plane...
Definition: VDP.hh:446
Represents a VDP display mode.
Definition: DisplayMode.hh:14
virtual void writeIO(word port, byte value, EmuTime::param time)
Write a byte to a given IO port at a certain time to this device.
Definition: VDP.cc:733
byte getVerticalScroll() const
Gets the current vertical scroll (line displayed at Y=0).
Definition: VDP.hh:276
byte getHorizontalScrollHigh() const
Gets the current horizontal scroll higher bits.
Definition: VDP.hh:294
int getLeftBackground() const
Gets the number of VDP clockticks between start of line and the time when the background pixel with X...
Definition: VDP.hh:474
const RawFrame * isSuperimposing() const
Are we currently superimposing? In case of superimpose, returns a pointer to the to-be-superimposed f...
Definition: VDP.hh:162
bool hasToshibaPalette() const
Is this a VDP with a Toshiba palette?
Definition: VDP.hh:134
void serialize(Archive &ar, unsigned version)
Definition: VDP.cc:1566
virtual byte peekIO(word port, EmuTime::param time) const
Read a byte from a given IO port.
Definition: VDP.cc:1038
EmuTime::param getFrameStartTime() const
Definition: VDP.hh:389
bool getCmdBit() const
Are commands possible in non Graphic modes? (V9958 only)
Definition: VDP.hh:408
bool getBlinkState() const
Gets the current blink state.
Definition: VDP.hh:226
virtual ~VDP()
Definition: VDP.cc:327
int getEvenOddMask() const
Expresses the state of even/odd page interchange in a mask on the line number.
Definition: VDP.hh:376
Clock< TICKS_PER_SECOND > VDPClock
Definition: VDP.hh:73
bool isInterlaced() const
Get interlace status.
Definition: VDP.hh:340
bool isSpriteMag() const
Are sprites magnified?
Definition: VDP.hh:401
Every class that wants to get scheduled at some point must inherit from this class.
Definition: Schedulable.hh:16
A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are ap...
Definition: RawFrame.hh:25
SERIALIZE_CLASS_VERSION(CassettePlayer, 2)
bool isTextMode() const
Is the current mode a text mode? Text1 and Text2 are text modes.
Definition: DisplayMode.hh:138
int getForegroundColor() const
Gets the current foreground color.
Definition: VDP.hh:188
virtual void executeUntil(EmuTime::param time, int userData)
When the previously registered syncPoint is reached, this method gets called.
Definition: VDP.cc:458
bool isVDPwithPALonly() const
Is this a VDP only capable of PAL?
Definition: VDP.hh:106
byte getStatusReg0() const
Should only be used by SpriteChecker.
Definition: VDP.hh:481
bool getTransparency() const
Gets the current transparency setting.
Definition: VDP.hh:181
virtual byte readIO(word port, EmuTime::param time)
Read a byte from an IO port at a certain time from this device.
Definition: VDP.cc:1018
bool isDisplayEnabled() const
Is the display enabled? Both the regular border and forced blanking by clearing the display enable bi...
Definition: VDP.hh:244
bool isMSX1VDP() const
Is this an MSX1 VDP?
Definition: VDP.hh:99
int getSpriteSize() const
Gets the sprite size in pixels (8/16).
Definition: VDP.hh:395
const EmuTime & param
Definition: EmuTime.hh:20
An MSXDevice is an emulated hardware component connected to the bus of the emulated MSX...
Definition: MSXDevice.hh:32
unsigned short word
16 bit unsigned integer
Definition: openmsx.hh:38
PostProcessor * getPostProcessor() const
Used by Video9000 to be able to couple the VDP and V9990 output.
Definition: VDP.cc:353
VDP(const DeviceConfig &config)
Definition: VDP.cc:224
bool getEvenOdd() const
Is the even or odd field being displayed?
Definition: VDP.hh:362
byte getByte() const
Get the dispay mode as a byte: YAE YJK M5..M1 combined.
Definition: DisplayMode.hh:109
bool getBrokenCmdTiming() const
Value of the cmdTiming setting, true means commands have infinite speed.
Definition: VDP.hh:509
VDP-VRAM access slot calculator, meant to be used in the inner loops of the VDPCmdEngine commands...
EmuTime getAccessSlot(EmuTime::param time, VDPAccessSlots::Delta delta) const
Get the earliest access slot that is at least 'delta' cycles in the future.
Definition: VDP.cc:923
bool isVDPwithVRAMremapping() const
Does this VDP have VRAM remapping when switching from 4k to 8/16k mode?
Definition: VDP.hh:127
Unified implementation of MSX Video Display Processors (VDPs).
Definition: VDP.hh:66
Abstract base class for post processors.
int getTicksThisFrame(EmuTime::param time) const
Gets the number of VDP clock ticks (21MHz) elapsed between a given time and the start of this frame...
Definition: VDP.hh:385
byte getHorizontalScrollLow() const
Gets the current horizontal scroll lower bits.
Definition: VDP.hh:285
EmuTime::param getTime() const
Gets the time at which the last clock tick occurred.
Definition: Clock.hh:46
bool cpuAccessScheduled() const
Is there a CPU-VRAM access scheduled.
Definition: VDP.cc:918
bool isPalTiming() const
Is PAL timing active? This setting is fixed at start of frame.
Definition: VDP.hh:329
static const int TICKS_PER_SECOND
Number of VDP clock ticks per second.
Definition: VDP.hh:72
bool hasYJK() const
Does this VDP support YJK display?
Definition: VDP.hh:141
Manages VRAM contents and synchronises the various users of the VRAM.
Definition: VDPVRAM.hh:383
int getLineZero() const
Get the absolute line number of display line zero.
Definition: VDP.hh:321
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
bool spritesEnabledRegister() const
Still faster variant (just looks at the sprite-enabled-bit).
Definition: VDP.hh:269
Generic Gang-of-Four Observer class, templatized edition.
Definition: Observer.hh:9
bool getVRMode() const
Returns current VR mode.
Definition: VDP.hh:499
word getPalette(int index) const
Gets a palette entry.
Definition: VDP.hh:235
bool spritesEnabledFast() const
Same as spritesEnabled(), but may only be called in sprite mode 1 or 2.
Definition: VDP.hh:261
void setExternalVideoSource(const RawFrame *externalSource)
Enable superimposing.
Definition: VDP.cc:1449
VDPVRAM & getVRAM()
Get the VRAM object for this VDP.
Definition: VDP.hh:154
virtual void powerUp(EmuTime::param time)
This method is called when MSX is powered up.
Definition: VDP.cc:424
int getLeftBorder() const
Gets the number of VDP clockticks between start of line and the end of the left border.
Definition: VDP.hh:457
int getBackgroundColor() const
Gets the current background color.
Definition: VDP.hh:200