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 TclCallback;
33 class Display;
34 class RawFrame;
35 class Setting;
36 template<typename> class EnumSetting;
37 namespace VDPAccessSlots {
38  enum Delta : int;
39  class Calculator;
40 }
41 
67 class VDP final : public MSXDevice, public Schedulable
68  , private VideoSystemChangeListener, Observer<Setting>
69 {
70 public:
73  static const int TICKS_PER_SECOND = 3579545 * 6; // 21.5MHz;
75 
78  static const int TICKS_PER_LINE = 1368;
79 
80  explicit VDP(const DeviceConfig& config);
81  ~VDP();
82 
83  void powerUp(EmuTime::param time) override;
84  void reset(EmuTime::param time) override;
85  byte readIO(word port, EmuTime::param time) override;
86  byte peekIO(word port, EmuTime::param time) const override;
87  void writeIO(word port, byte value, EmuTime::param time) override;
88  void executeUntil(EmuTime::param time, int userData) override;
89 
95 
100  inline bool isMSX1VDP() const {
101  return (version & VM_MSX1) != 0;
102  }
103 
107  inline bool isVDPwithPALonly() const {
108  return (version & VM_PAL) != 0;
109  }
110 
114  inline bool vdpLacksMirroring() const {
115  return (version & VM_NO_MIRRORING) != 0;
116  }
117 
121  inline bool vdpHasPatColMirroring() const {
122  return (version & VM_PALCOL_MIRRORING) != 0;
123  }
124 
128  inline bool isVDPwithVRAMremapping() const {
129  return (version & VM_VRAM_REMAPPING) != 0;
130  }
131 
135  inline bool hasToshibaPalette() const {
136  return (version & VM_TOSHIBA_PALETTE) != 0;
137  }
138 
142  inline bool hasYJK() const {
143  return (version & VM_YJK) != 0;
144  }
145 
149  inline DisplayMode getDisplayMode() const {
150  return displayMode;
151  }
152 
155  inline VDPVRAM& getVRAM() {
156  return *vram;
157  }
158 
163  inline const RawFrame* isSuperimposing() const {
164  // Note that bit 0 of r#0 has no effect on an V9938 or higher,
165  // but this bit is masked out. Also note that on an MSX1, if
166  // bit 0 of r#0 is enabled and there is no external video
167  // source, then we lose sync.
168  // Also note that because this property is fixed per frame we
169  // cannot (re)calculate it from register values.
170  return superimposing;
171  }
172 
176  return *spriteChecker;
177  }
178 
182  inline bool getTransparency() const {
183  return (controlRegs[8] & 0x20) == 0;
184  }
185 
189  inline int getForegroundColor() const {
190  return controlRegs[7] >> 4;
191  }
192 
201  inline int getBackgroundColor() const {
202  byte reg7 = controlRegs[7];
203  if (displayMode.getByte() == DisplayMode::GRAPHIC7) {
204  return reg7;
205  } else {
206  return reg7 & 0x0F;
207  }
208  }
209 
213  inline int getBlinkForegroundColor() const {
214  return controlRegs[12] >> 4;
215  }
216 
220  inline int getBlinkBackgroundColor() const {
221  return controlRegs[12] & 0x0F;
222  }
223 
227  inline bool getBlinkState() const {
228  return blinkState;
229  }
230 
236  inline word getPalette(int index) const {
237  return palette[index];
238  }
239 
245  inline bool isDisplayEnabled() const {
246  return isDisplayArea && displayEnabled;
247  }
248 
253  inline bool spritesEnabled() const {
254  return displayEnabled &&
255  (displayMode.getSpriteMode(isMSX1VDP()) != 0) &&
256  ((controlRegs[8] & 0x02) == 0x00);
257  }
258 
262  inline bool spritesEnabledFast() const {
263  assert(displayMode.getSpriteMode(isMSX1VDP()) != 0);
264  return displayEnabled && ((controlRegs[8] & 0x02) == 0x00);
265  }
266 
270  inline bool spritesEnabledRegister() const {
271  return (controlRegs[8] & 0x02) == 0x00;
272  }
273 
277  inline byte getVerticalScroll() const {
278  return controlRegs[23];
279  }
280 
286  inline byte getHorizontalScrollLow() const {
287  return controlRegs[27];
288  }
289 
295  inline byte getHorizontalScrollHigh() const {
296  return controlRegs[26];
297  }
298 
304  inline bool isBorderMasked() const {
305  return (controlRegs[25] & 0x02) != 0;
306  }
307 
314  inline bool isMultiPageScrolling() const {
315  return (controlRegs[25] & 0x01) && (controlRegs[2] & 0x20);
316  }
317 
322  inline int getLineZero() const {
323  return displayStart / TICKS_PER_LINE;
324  }
325 
330  inline bool isPalTiming() const {
331  return palTiming;
332  }
333 
341  inline bool isInterlaced() const {
342  return interlaced;
343  }
344 
356  inline bool isEvenOddEnabled() const {
357  return (controlRegs[9] & 4) != 0;
358  }
359 
363  inline bool getEvenOdd() const {
364  return (statusReg2 & 2) != 0;
365  }
366 
377  inline int getEvenOddMask() const {
378  // TODO: Verify which page is displayed on even fields.
379  return (((~controlRegs[9] & 4) << 6) | ((statusReg2 & 2) << 7)) &
380  (!blinkState << 8);
381  }
382 
386  inline int getTicksThisFrame(EmuTime::param time) const {
387  return frameStartTime.getTicksTill_fast(time);
388  }
389 
391  return frameStartTime.getTime();
392  }
393 
396  inline int getSpriteSize() const {
397  return ((controlRegs[1] & 2) << 2) + 8;
398  }
399 
402  inline bool isSpriteMag() const {
403  return controlRegs[1] & 1;
404  }
405 
409  inline bool getCmdBit() const {
410  return (controlRegs[25] & 0x40) != 0;
411  }
412 
415  inline int getTicksPerFrame() const {
416  return palTiming ? TICKS_PER_LINE * 313 : TICKS_PER_LINE * 262;
417  }
418 
428  inline bool isInsideFrame(EmuTime::param time) const {
429  return time >= frameStartTime.getTime() &&
431  }
432 
436  inline int getHorizontalAdjust() const {
437  return horizontalAdjust;
438  }
439 
447  inline int getLeftSprites() const {
448  return 100 + 102 + 56
449  + (horizontalAdjust - 7) * 4
450  + (displayMode.isTextMode() ? 36 : 0);
451  }
452 
458  inline int getLeftBorder() const {
459  return getLeftSprites() + (isBorderMasked() ? 8 * 4 : 0);
460  }
461 
465  inline int getRightBorder() const {
466  return getLeftSprites()
467  + (displayMode.isTextMode() ? 960 : 1024);
468  }
469 
475  inline int getLeftBackground() const {
476  return getLeftSprites() + getHorizontalScrollLow() * 4;
477  }
478 
482  byte getStatusReg0() const { return statusReg0; }
483 
492  void setSpriteStatus(byte value)
493  {
494  statusReg0 = (statusReg0 & 0x80) | (value & 0x7F);
495  }
496 
500  bool getVRMode() const {
501  return (controlRegs[8] & 8) != 0;
502  }
503 
506  void setExternalVideoSource(const RawFrame* externalSource) {
507  externalVideo = externalSource;
508  }
509 
512  bool getBrokenCmdTiming() const {
513  return brokenCmdTiming;
514  }
515 
519 
530  EmuTime::param time, EmuTime::param limit) const;
531 
533  bool cpuAccessScheduled() const {
534  return pendingCpuAccess; // pendingSyncPoint(CPU_VRAM_ACCESS)
535  }
536 
537  template<typename Archive>
538  void serialize(Archive& ar, unsigned version);
539 
540 private:
541  void initTables();
542 
543  // VdpVersion bitmasks
544  static const unsigned VM_MSX1 = 1; // set-> MSX1, unset-> MSX2 or MSX2+
545  static const unsigned VM_PAL = 2; // set-> fixed PAL, unset-> fixed NTSC or switchable
546  static const unsigned VM_NO_MIRRORING = 4; // set-> no (screen2) mirroring
547  static const unsigned VM_PALCOL_MIRRORING = 8; // set-> pattern/color-table mirroring
548  static const unsigned VM_VRAM_REMAPPING = 16; // set-> 4k,8/16k VRAM remapping
549  static const unsigned VM_TOSHIBA_PALETTE = 32; // set-> has Toshiba palette
550  static const unsigned VM_YJK = 64; // set-> has YJK (MSX2+)
551 
553  enum VdpVersion {
558  TMS99X8A = VM_MSX1 | VM_PALCOL_MIRRORING | VM_VRAM_REMAPPING,
559 
561  TMS9929A = VM_MSX1 | VM_PALCOL_MIRRORING | VM_VRAM_REMAPPING | VM_PAL,
562 
564  TMS9129 = VM_MSX1 | VM_PAL,
565 
567  TMS91X8 = VM_MSX1,
568 
570  T6950PAL = VM_MSX1 | VM_TOSHIBA_PALETTE | VM_NO_MIRRORING | VM_PAL,
571 
573  T6950NTSC = VM_MSX1 | VM_TOSHIBA_PALETTE | VM_NO_MIRRORING,
574 
576  T7937APAL = VM_MSX1 | VM_TOSHIBA_PALETTE | VM_PAL,
577 
579  T7937ANTSC = VM_MSX1 | VM_TOSHIBA_PALETTE,
580 
582  V9938 = 0,
583 
585  V9958 = VM_YJK,
586  };
587 
590  enum SyncType {
592  VSYNC,
594  DISPLAY_START,
596  VSCAN,
598  HSCAN,
600  HOR_ADJUST,
602  SET_MODE,
604  SET_BLANK,
606  CPU_VRAM_ACCESS,
607  };
608 
619  static const int LINE_COUNT_RESET_TICKS = 15 * TICKS_PER_LINE;
620 
624  inline int getNumberOfLines() const {
625  return controlRegs[9] & 0x80 ? 212 : 192;
626  }
627 
637  inline bool getHR(int ticksThisFrame) const {
638  // Note: These constants are located inside this function because
639  // GCC 4.0.x won't link if they are in the class scope.
643  static const int HBLANK_LEN_TXT = 404;
647  static const int HBLANK_LEN_GFX = 312;
648  return
649  ( ticksThisFrame + TICKS_PER_LINE - getRightBorder()
650  ) % TICKS_PER_LINE
651  < (displayMode.isTextMode() ? HBLANK_LEN_TXT : HBLANK_LEN_GFX);
652  }
653 
654  // VideoSystemChangeListener interface:
655  void preVideoSystemChange() override;
656  void postVideoSystemChange() override;
657 
662  void resetInit();
663 
668  void resetMasks(EmuTime::param time);
669 
673  void frameStart(EmuTime::param time);
674 
682  void scheduleDisplayStart(EmuTime::param time);
683 
689  void scheduleVScan(EmuTime::param time);
690 
696  void scheduleHScan(EmuTime::param time);
697 
700  void vramWrite(byte value, EmuTime::param time);
701 
704  byte vramRead(EmuTime::param time);
705 
707  void scheduleCpuVramAccess(bool isRead, byte write, EmuTime::param time);
708  void executeCpuVramAccess(EmuTime::param time);
709 
712  byte peekStatusReg(byte reg, EmuTime::param time) const;
713  byte readStatusReg(byte reg, EmuTime::param time);
714 
717  void changeRegister(byte reg, byte val, EmuTime::param time);
718 
721  void syncAtNextLine(SyncType type, EmuTime::param time);
722 
725  void createRenderer();
726 
730  void updateNameBase(EmuTime::param time);
731 
735  void updateColorBase(EmuTime::param time);
736 
740  void updatePatternBase(EmuTime::param time);
741 
745  void updateSpriteAttributeBase(EmuTime::param time);
746 
750  void updateSpritePatternBase(EmuTime::param time);
751 
755  void updateDisplayMode(DisplayMode newMode, EmuTime::param time);
756 
763  void setPalette(int index, word grb, EmuTime::param time);
764 
765  // Observer<Setting>
766  void update(const Setting& setting) override;
767 
768 private:
769  Display& display;
770  EnumSetting<bool>& cmdTiming;
771  EnumSetting<bool>& tooFastAccess;
772 
773  friend class VDPRegDebug;
774  friend class VDPStatusRegDebug;
775  friend class VDPPaletteDebug;
776  friend class VRAMPointerDebug;
777  friend class FrameCountInfo;
778  const std::unique_ptr<VDPRegDebug> vdpRegDebug;
779  const std::unique_ptr<VDPStatusRegDebug> vdpStatusRegDebug;
780  const std::unique_ptr<VDPPaletteDebug> vdpPaletteDebug;
781  const std::unique_ptr<VRAMPointerDebug> vramPointerDebug;
782  const std::unique_ptr<FrameCountInfo> frameCountInfo;
783  const std::unique_ptr<CycleInFrameInfo> cycleInFrameInfo;
784  const std::unique_ptr<LineInFrameInfo> lineInFrameInfo;
785  const std::unique_ptr<CycleInLineInfo> cycleInLineInfo;
786  const std::unique_ptr<MsxYPosInfo> msxYPosInfo;
787  const std::unique_ptr<MsxX256PosInfo> msxX256PosInfo;
788  const std::unique_ptr<MsxX512PosInfo> msxX512PosInfo;
789 
792  std::unique_ptr<Renderer> renderer;
793 
796  std::unique_ptr<VDPCmdEngine> cmdEngine;
797 
800  std::unique_ptr<SpriteChecker> spriteChecker;
801 
804  std::unique_ptr<VDPVRAM> vram;
805 
809  const RawFrame* externalVideo;
810 
816  const RawFrame* superimposing;
817 
820  VDPClock frameStartTime;
821 
824  OptionalIRQHelper irqVertical;
825 
828  OptionalIRQHelper irqHorizontal;
829 
832  EmuTime displayStartSyncTime;
833 
836  EmuTime vScanSyncTime;
837 
840  EmuTime hScanSyncTime;
841 
842  std::unique_ptr<TclCallback> tooFastCallback;
843 
846  VdpVersion version;
847 
853  int frameCount;
854 
857  int displayStart;
858 
862  int horizontalScanOffset;
863 
867  int horizontalAdjust;
868 
871  byte controlRegs[32];
872 
877  int controlRegMask;
878 
885  byte controlValueMasks[32];
886 
890  int blinkCount;
891 
895  int vramPointer;
896 
899  word palette[16];
900 
903  bool isDisplayArea;
904 
910  bool palTiming;
911 
915  bool interlaced;
916 
921  byte statusReg0;
922 
928  byte statusReg1;
929 
934  byte statusReg2;
935 
938  bool blinkState;
939 
942  byte dataLatch;
943 
946  bool registerDataStored;
947 
950  bool paletteDataStored;
951 
959  byte cpuVramData;
960 
964  bool cpuVramReqIsRead;
965  bool pendingCpuAccess; // always equal to pendingSyncPoint(CPU_VRAM_ACCESS)
966 
970  bool cpuExtendedVram;
971 
977  DisplayMode displayMode;
978 
983  bool displayEnabled;
984 
988  bool warningPrinted;
989 
991  bool brokenCmdTiming;
992  bool allowTooFastAccess;
993 };
995 
996 } // namespace openmsx
997 
998 #endif
int getBlinkBackgroundColor() const
Gets the current blinking color for blinking text.
Definition: VDP.hh:220
bool isInsideFrame(EmuTime::param time) const
Is the given timestamp inside the current frame? Mainly useful for debugging, because relevant timest...
Definition: VDP.hh:428
int getBlinkForegroundColor() const
Gets the current blinking color for blinking text.
Definition: VDP.hh:213
bool isBorderMasked() const
Gets the current border mask setting.
Definition: VDP.hh:304
bool isEvenOddEnabled() const
Get even/odd page alternation status.
Definition: VDP.hh:356
bool vdpHasPatColMirroring() const
Is this a VDP that has pattern/colortable mirroring?
Definition: VDP.hh:121
void setSpriteStatus(byte value)
Should only be used by SpriteChecker.
Definition: VDP.hh:492
bool spritesEnabled() const
Are sprites enabled?
Definition: VDP.hh:253
int getHorizontalAdjust() const
This is a combination of the (horizontal) set adjust register and the YJK-mode bit.
Definition: VDP.hh:436
void powerUp(EmuTime::param time) override
This method is called when MSX is powered up.
Definition: VDP.cc:429
static const int TICKS_PER_LINE
Number of VDP clock ticks per line.
Definition: VDP.hh:78
SpriteChecker & getSpriteChecker()
Get the sprite checker for this VDP.
Definition: VDP.hh:175
bool isMultiPageScrolling() const
Is multi page scrolling enabled? It is considered enabled if both the multi page scrolling flag is en...
Definition: VDP.hh:314
bool vdpLacksMirroring() const
Is this a VDP that lacks mirroring?
Definition: VDP.hh:114
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:948
unsigned char byte
8 bit unsigned integer
Definition: openmsx.hh:27
DisplayMode getDisplayMode() const
Get the display mode the VDP is in.
Definition: VDP.hh:149
int getRightBorder() const
Gets the number of VDP clockticks between start of line and the start of the right border...
Definition: VDP.hh:465
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:415
int getLeftSprites() const
Gets the number of VDP clockticks between start of line and the start of the sprite plane...
Definition: VDP.hh:447
Represents a VDP display mode.
Definition: DisplayMode.hh:14
byte getVerticalScroll() const
Gets the current vertical scroll (line displayed at Y=0).
Definition: VDP.hh:277
byte getHorizontalScrollHigh() const
Gets the current horizontal scroll higher bits.
Definition: VDP.hh:295
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:475
const RawFrame * isSuperimposing() const
Are we currently superimposing? In case of superimpose, returns a pointer to the to-be-superimposed f...
Definition: VDP.hh:163
bool hasToshibaPalette() const
Is this a VDP with a Toshiba palette?
Definition: VDP.hh:135
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: VDP.cc:735
void serialize(Archive &ar, unsigned version)
Definition: VDP.cc:1585
byte readIO(word port, EmuTime::param time) override
Read a byte from an IO port at a certain time from this device.
Definition: VDP.cc:1037
EmuTime::param getFrameStartTime() const
Definition: VDP.hh:390
bool getCmdBit() const
Are commands possible in non Graphic modes? (V9958 only)
Definition: VDP.hh:409
bool getBlinkState() const
Gets the current blink state.
Definition: VDP.hh:227
int getEvenOddMask() const
Expresses the state of even/odd page interchange in a mask on the line number.
Definition: VDP.hh:377
Clock< TICKS_PER_SECOND > VDPClock
Definition: VDP.hh:74
bool isInterlaced() const
Get interlace status.
Definition: VDP.hh:341
bool isSpriteMag() const
Are sprites magnified?
Definition: VDP.hh:402
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:189
bool isVDPwithPALonly() const
Is this a VDP only capable of PAL?
Definition: VDP.hh:107
byte getStatusReg0() const
Should only be used by SpriteChecker.
Definition: VDP.hh:482
bool getTransparency() const
Gets the current transparency setting.
Definition: VDP.hh:182
bool isDisplayEnabled() const
Is the display enabled? Both the regular border and forced blanking by clearing the display enable bi...
Definition: VDP.hh:245
bool isMSX1VDP() const
Is this an MSX1 VDP?
Definition: VDP.hh:100
int getSpriteSize() const
Gets the sprite size in pixels (8/16).
Definition: VDP.hh:396
Thanks to enen for testing this on a real cartridge:
Definition: Autofire.cc:7
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:32
PostProcessor * getPostProcessor() const
Used by Video9000 to be able to couple the VDP and V9990 output.
Definition: VDP.cc:358
VDP(const DeviceConfig &config)
Definition: VDP.cc:225
bool getEvenOdd() const
Is the even or odd field being displayed?
Definition: VDP.hh:363
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:512
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:942
bool isVDPwithVRAMremapping() const
Does this VDP have VRAM remapping when switching from 4k to 8/16k mode?
Definition: VDP.hh:128
Unified implementation of MSX Video Display Processors (VDPs).
Definition: VDP.hh:67
void executeUntil(EmuTime::param time, int userData) override
When the previously registered syncPoint is reached, this method gets called.
Definition: VDP.cc:463
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:386
byte getHorizontalScrollLow() const
Gets the current horizontal scroll lower bits.
Definition: VDP.hh:286
bool cpuAccessScheduled() const
Is there a CPU-VRAM access scheduled.
Definition: VDP.hh:533
bool isPalTiming() const
Is PAL timing active? This setting is fixed at start of frame.
Definition: VDP.hh:330
static const int TICKS_PER_SECOND
Number of VDP clock ticks per second.
Definition: VDP.hh:73
bool hasYJK() const
Does this VDP support YJK display?
Definition: VDP.hh:142
byte peekIO(word port, EmuTime::param time) const override
Read a byte from a given IO port.
Definition: VDP.cc:1057
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:322
bool spritesEnabledRegister() const
Still faster variant (just looks at the sprite-enabled-bit).
Definition: VDP.hh:270
Generic Gang-of-Four Observer class, templatized edition.
Definition: Observer.hh:9
bool getVRMode() const
Returns current VR mode.
Definition: VDP.hh:500
word getPalette(int index) const
Gets a palette entry.
Definition: VDP.hh:236
bool spritesEnabledFast() const
Same as spritesEnabled(), but may only be called in sprite mode 1 or 2.
Definition: VDP.hh:262
void setExternalVideoSource(const RawFrame *externalSource)
Enable superimposing.
Definition: VDP.hh:506
VDPVRAM & getVRAM()
Get the VRAM object for this VDP.
Definition: VDP.hh:155
void reset(EmuTime::param time) override
This method is called on reset.
Definition: VDP.cc:435
int getLeftBorder() const
Gets the number of VDP clockticks between start of line and the end of the left border.
Definition: VDP.hh:458
int getBackgroundColor() const
Gets the current background color.
Definition: VDP.hh:201