Skip to content

Commit

Permalink
macfb: rename DAFB_RESET to DAFB_LUT_INDEX
Browse files Browse the repository at this point in the history
When A/UX uses the MacOS Device Manager Status (GetEntries) call to read the
contents of the CLUT, it is easy to see that the requested index is written to
the DAFB_RESET register. Update the palette_current index with the requested
value, and rename it to DAFB_LUT_INDEX to reflect its true purpose.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-ID: <20231026085650.917663-3-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 a24fe90 commit 2fca4e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hw/display/macfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#define DAFB_INTR_MASK 0x104
#define DAFB_INTR_STAT 0x108
#define DAFB_INTR_CLEAR 0x10c
#define DAFB_RESET 0x200
#define DAFB_LUT_INDEX 0x200
#define DAFB_LUT 0x213

#define DAFB_INTR_VBL 0x4
Expand Down Expand Up @@ -583,8 +583,8 @@ static void macfb_ctrl_write(void *opaque,
s->regs[DAFB_INTR_STAT >> 2] &= ~DAFB_INTR_VBL;
macfb_update_irq(s);
break;
case DAFB_RESET:
s->palette_current = 0;
case DAFB_LUT_INDEX:
s->palette_current = (val & 0xff) * 3;
break;
case DAFB_LUT:
s->color_palette[s->palette_current] = val;
Expand Down

0 comments on commit 2fca4e7

Please sign in to comment.