diff options
author | Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> | 2023-10-26 09:56:50 +0100 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2023-11-05 15:48:36 +0100 |
commit | 95f3943210416e054751bc230d4cec7d87995525 (patch) | |
tree | ddb4c4eccee3b10fe2c3b413461474a591e2e203 | |
parent | ced64254d66c28e18e669318aaffa0338df6ae3a (diff) | |
download | qemu-95f3943210416e054751bc230d4cec7d87995525.zip qemu-95f3943210416e054751bc230d4cec7d87995525.tar.gz qemu-95f3943210416e054751bc230d4cec7d87995525.tar.bz2 |
macfb: allow reads from the DAFB_LUT register
This enables A/UX to correctly retrieve the LUT entries when used with
applications that use the MacOS Device Manager Status (GetEntries) call.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-ID: <20231026085650.917663-5-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
-rw-r--r-- | hw/display/macfb.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/display/macfb.c b/hw/display/macfb.c index 4a1c75d..d61541c 100644 --- a/hw/display/macfb.c +++ b/hw/display/macfb.c @@ -537,6 +537,11 @@ static uint64_t macfb_ctrl_read(void *opaque, case DAFB_MODE_SENSE: val = macfb_sense_read(s); break; + case DAFB_LUT ... DAFB_LUT + 3: + val = s->color_palette[s->palette_current]; + s->palette_current = (s->palette_current + 1) % + ARRAY_SIZE(s->color_palette); + break; default: if (addr < MACFB_CTRL_TOPADDR) { val = s->regs[addr >> 2]; |