From a21c6c696c96039a072d72d427b1692834d4765f Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Thu, 1 Jun 2023 21:33:32 +0100 Subject: Use a better 8-bit to 6-bit conversion --- src/vga.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vga.c') diff --git a/src/vga.c b/src/vga.c index b3ee0a2..a6524bd 100644 --- a/src/vga.c +++ b/src/vga.c @@ -28,5 +28,5 @@ void set_palette(const uint8_t *palette) { outportb(0x3c8, 0); for (int i = 0; i < 768; i++) - outportb(0x3c9, (palette[i] * 63) / 255); + outportb(0x3c9, palette[i] >> 2); } -- cgit v1.2.3