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<typename 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  [[nodiscard]] const byte* getNamePtr(int line, int scroll);
58 
59 private:
60  VDP& vdp;
61  VDPVRAM& vram;
62 
63  const Pixel* const palFg;
64  const Pixel* const palBg;
65 
66  unsigned modeBase;
67 };
68 
69 } // namespace openmsx
70 
71 #endif
openmsx::VDPVRAM
Manages VRAM contents and synchronises the various users of the VRAM.
Definition: VDPVRAM.hh:387
openmsx::CharacterConverter::CharacterConverter
CharacterConverter(VDP &vdp, const Pixel *palFg, const Pixel *palBg)
Create a new bitmap scanline converter.
Definition: CharacterConverter.cc:24
openmsx.hh
openmsx::VDPVRAM
VDPVRAM
Definition: VDPVRAM.cc:343
openmsx::VDP
Unified implementation of MSX Video Display Processors (VDPs).
Definition: VDP.hh:63
openmsx::CharacterConverter::convertLine
void convertLine(Pixel *linePtr, int line)
Convert a line of V9938 VRAM to 512 host pixels.
Definition: CharacterConverter.cc:39
openmsx::CharacterConverter::setDisplayMode
void setDisplayMode(DisplayMode mode)
Select the display mode to use for scanline conversion.
Definition: CharacterConverter.cc:32
openmsx::DisplayMode
Represents a VDP display mode.
Definition: DisplayMode.hh:16
openmsx::Pixel
uint32_t Pixel
Definition: GLHQLiteScaler.cc:98
openmsx::CharacterConverter
Utility class for converting VRAM contents to host pixels.
Definition: CharacterConverter.hh:17
openmsx::VDP
VDP
Definition: VDP.cc:1918
openmsx::mask
constexpr nibble mask[4][13]
Definition: RP5C01.cc:33
openmsx
This file implemented 3 utility functions:
Definition: Autofire.cc:5