1#ifndef BITMAPCONVERTER_HH
2#define BITMAPCONVERTER_HH
19template<std::
unsigned_
integral Pixel>
45 std::span<const Pixel, 256> palette256,
46 std::span<const Pixel, 32768> palette32768);
56 void convertLine(std::span<Pixel> buf, std::span<const byte, 128> vramPtr);
68 std::span<const byte, 128> vramPtr0,
69 std::span<const byte, 128> vramPtr1);
83 dPaletteValid =
false;
89 inline void renderGraphic4(std::span<Pixel, 256> buf,
90 std::span<const byte, 128> vramPtr0);
91 inline void renderGraphic5(std::span<Pixel, 512> buf,
92 std::span<const byte, 128> vramPtr0);
93 inline void renderGraphic6(std::span<Pixel, 512> buf,
94 std::span<const byte, 128> vramPtr0,
95 std::span<const byte, 128> vramPtr1);
96 inline void renderGraphic7(std::span<Pixel, 256> buf,
97 std::span<const byte, 128> vramPtr0,
98 std::span<const byte, 128> vramPtr1);
99 inline void renderYJK( std::span<Pixel, 256> buf,
100 std::span<const byte, 128> vramPtr0,
101 std::span<const byte, 128> vramPtr1);
102 inline void renderYAE( std::span<Pixel, 256> buf,
103 std::span<const byte, 128> vramPtr0,
104 std::span<const byte, 128> vramPtr1);
105 inline void renderBogus( std::span<Pixel, 256> buf);
108 std::span<const Pixel, 16 * 2> palette16;
109 std::span<const Pixel, 256> palette256;
110 std::span<const Pixel, 32768> palette32768;
113 std::array<DPixel, 16 * 16> dPalette;
115 bool dPaletteValid =
false;
Utility class for converting VRAM contents to host pixels.
void convertLine(std::span< Pixel > buf, std::span< const byte, 128 > vramPtr)
Convert a line of V9938 VRAM to 256 or 512 host pixels.
void setDisplayMode(DisplayMode mode_)
Select the display mode to use for scanline conversion.
void convertLinePlanar(std::span< Pixel > buf, std::span< const byte, 128 > vramPtr0, std::span< const byte, 128 > vramPtr1)
Convert a line of V9938 VRAM to 256 or 512 host pixels.
BitmapConverter(std::span< const Pixel, 16 *2 > palette16, std::span< const Pixel, 256 > palette256, std::span< const Pixel, 32768 > palette32768)
Create a new bitmap scanline converter.
void palette16Changed()
Inform this class about changes in the palette16 array.
Represents a VDP display mode.
This file implemented 3 utility functions: