openMSX
CharacterConverter.hh
Go to the documentation of this file.
1 #ifndef CHARACTERCONVERTER_HH
2 #define CHARACTERCONVERTER_HH
3 
4 #include "openmsx.hh"
5 #include <concepts>
6 
7 namespace openmsx {
8 
9 class VDP;
10 class VDPVRAM;
11 class DisplayMode;
12 
13 
16 template<std::unsigned_integral Pixel>
18 {
19 public:
31  CharacterConverter(VDP& vdp, const Pixel* palFg, const Pixel* palBg);
32 
38  void convertLine(Pixel* linePtr, int line);
39 
43  void setDisplayMode(DisplayMode mode);
44 
45 private:
46  inline void renderText1 (Pixel* pixelPtr, int line);
47  inline void renderText1Q (Pixel* pixelPtr, int line);
48  inline void renderText2 (Pixel* pixelPtr, int line);
49  inline void renderGraphic1(Pixel* pixelPtr, int line);
50  inline void renderGraphic2(Pixel* pixelPtr, int line);
51  inline void renderMulti (Pixel* pixelPtr, int line);
52  inline void renderMultiQ (Pixel* pixelPtr, int line);
53  inline void renderBogus (Pixel* pixelPtr);
54  inline void renderBlank (Pixel* pixelPtr);
55  inline void renderMultiHelper(Pixel* pixelPtr, int line,
56  int mask, int patternQuarter);
57 
58  [[nodiscard]] const byte* getNamePtr(int line, int scroll);
59 
60 private:
61  VDP& vdp;
62  VDPVRAM& vram;
63 
64  const Pixel* const palFg;
65  const Pixel* const palBg;
66 
67  unsigned modeBase;
68 };
69 
70 } // namespace openmsx
71 
72 #endif
Utility class for converting VRAM contents to host pixels.
CharacterConverter(VDP &vdp, const Pixel *palFg, const Pixel *palBg)
Create a new bitmap scanline converter.
void setDisplayMode(DisplayMode mode)
Select the display mode to use for scanline conversion.
void convertLine(Pixel *linePtr, int line)
Convert a line of V9938 VRAM to 512 host pixels.
Represents a VDP display mode.
Definition: DisplayMode.hh:16
Manages VRAM contents and synchronizes the various users of the VRAM.
Definition: VDPVRAM.hh:386
Unified implementation of MSX Video Display Processors (VDPs).
Definition: VDP.hh:63
This file implemented 3 utility functions:
Definition: Autofire.cc:9
uint32_t Pixel
constexpr nibble mask[4][13]
Definition: RP5C01.cc:34