diff options
author | ovalenti <valentio@free.fr> | 2022-02-27 05:26:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-26 23:26:40 -0500 |
commit | 5b74cad57c25cf43278e1c5b46941aa98c57b9a3 (patch) | |
tree | 01f551f9804425529a218035f25c502ea92c7fad | |
parent | c237161b53aa01a5621ab64006ebde2f285fd738 (diff) |
ef9345: fix quadrichrome color mapping (#9251)
The third byte (A) in quadrichrome mode contains an ordered 4 color set,
referred by index in each of the 4 pairs of bits making a character
slice.
Datasheet: p16 and example at p18
-rw-r--r-- | src/devices/video/ef9345.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/devices/video/ef9345.cpp b/src/devices/video/ef9345.cpp index c78d7d06568..981b40f0c5e 100644 --- a/src/devices/video/ef9345.cpp +++ b/src/devices/video/ef9345.cpp @@ -505,7 +505,11 @@ void ef9345_device::quadrichrome40(uint8_t c, uint8_t b, uint8_t a, uint16_t x, //initialize the color table for(j = 1, n = 0, i = 0; i < 8; i++) { - col[n++] = (a & j) ? i : 7; + col[i] = 7; + + if (a & j) + col[n++] = i; + j <<= 1; } |