22 class VDPStatusRegDebug;
23 class VDPPaletteDebug;
24 class VRAMPointerDebug;
26 class CycleInFrameInfo;
27 class LineInFrameInfo;
28 class CycleInLineInfo;
34 class AccessSlotCalculator;
95 return version == TMS99X8A || version == TMS9929A;
102 return version == V9958;
129 return superimposing;
135 return *spriteChecker;
142 return (controlRegs[8] & 0x20) == 0;
149 return controlRegs[7] >> 4;
161 byte reg7 = controlRegs[7];
173 return controlRegs[12] >> 4;
180 return controlRegs[12] & 0x0F;
196 return palette[index];
205 return isDisplayArea && displayEnabled;
213 return displayEnabled && !displayMode.
isTextMode() &&
214 ((controlRegs[8] & 0x02) == 0x00);
222 return displayEnabled && ((controlRegs[8] & 0x02) == 0x00);
229 return controlRegs[23];
238 return controlRegs[27];
247 return controlRegs[26];
256 return (controlRegs[25] & 0x02) != 0;
266 return (controlRegs[25] & 0x01) && (controlRegs[2] & 0x20);
308 return (controlRegs[9] & 4) != 0;
315 return (statusReg2 & 2) != 0;
330 return (((~controlRegs[9] & 4) << 6) | ((statusReg2 & 2) << 7)) &
342 return frameStartTime.
getTime();
348 return ((controlRegs[1] & 2) << 2) + 8;
354 return controlRegs[1] & 1;
361 return (controlRegs[25] & 0x40) != 0;
380 return time >= frameStartTime.
getTime() &&
392 return 100 + 102 + 56
393 + (horizontalAdjust - 7) * 4
438 statusReg0 = (statusReg0 & 0x80) | (value & 0x7F);
445 return (controlRegs[8] & 8) != 0;
470 template<
typename Archive>
471 void serialize(Archive& ar,
unsigned version);
530 inline int getNumberOfLines()
const {
531 return controlRegs[9] & 0x80 ? 212 : 192;
543 inline bool getHR(
int ticksThisFrame)
const {
549 static const int HBLANK_LEN_TXT = 404;
553 static const int HBLANK_LEN_GFX = 312;
557 < (displayMode.
isTextMode() ? HBLANK_LEN_TXT : HBLANK_LEN_GFX);
561 virtual void preVideoSystemChange();
562 virtual void postVideoSystemChange();
631 void createRenderer();
679 const std::unique_ptr<VDPRegDebug> vdpRegDebug;
680 const std::unique_ptr<VDPStatusRegDebug> vdpStatusRegDebug;
681 const std::unique_ptr<VDPPaletteDebug> vdpPaletteDebug;
682 const std::unique_ptr<VRAMPointerDebug> vramPointerDebug;
683 const std::unique_ptr<FrameCountInfo> frameCountInfo;
684 const std::unique_ptr<CycleInFrameInfo> cycleInFrameInfo;
685 const std::unique_ptr<LineInFrameInfo> lineInFrameInfo;
686 const std::unique_ptr<CycleInLineInfo> cycleInLineInfo;
687 const std::unique_ptr<MsxYPosInfo> msxYPosInfo;
688 const std::unique_ptr<MsxX256PosInfo> msxX256PosInfo;
689 const std::unique_ptr<MsxX512PosInfo> msxX512PosInfo;
693 std::unique_ptr<Renderer> renderer;
697 std::unique_ptr<VDPCmdEngine> cmdEngine;
701 std::unique_ptr<SpriteChecker> spriteChecker;
705 std::unique_ptr<VDPVRAM> vram;
761 int horizontalScanOffset;
766 int horizontalAdjust;
770 byte controlRegs[32];
784 byte controlValueMasks[32];
845 bool registerDataStored;
849 bool paletteDataStored;
863 bool cpuVramReqIsRead;
868 bool cpuExtendedVram;
895 : ticks(ticks_), tabLen(tabLen_)
900 idx = std::upper_bound(tab, tab + tabLen, ticks) - 1;
901 assert((idx < tab) || (*idx <= ticks));
905 assert(delta <= 136);
906 auto stop = ticks + delta;
907 do { ++idx; }
while (*idx < stop);
909 if (
unlikely(*idx >= 1368)) idx -= tabLen;
919 const unsigned tabLen;