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