Skip to content

Commit

Permalink
macfb: allow reads from the DAFB_LUT register
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mcayland authored and vivier committed Nov 5, 2023
1 parent ced6425 commit 95f3943
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hw/display/macfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 95f3943

Please sign in to comment.