macfb: implement mode sense to allow display type to be detected
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Thu, 7 Oct 2021 22:12:47 +0000 (23:12 +0100)
committerLaurent Vivier <laurent@vivier.eu>
Fri, 8 Oct 2021 11:31:03 +0000 (13:31 +0200)
commite6108b96363bda0704ca69e5dfdb4b07dc589336
tree2009220bd32b19b97ce4950567586a506dd05b69
parent4ec27073fd0e5a82a87b1122dfdca7a820cb1561
macfb: implement mode sense to allow display type to be detected

The MacOS toolbox ROM uses the monitor sense to detect the display type and then
offer a fixed set of resolutions and colour depths accordingly. Implement the
monitor sense using information found in Apple Technical Note HW26: "Macintosh
Quadra Built-In Video" along with some local experiments.

Since the default configuration is 640 x 480 with 8-bit colour then hardcode
the sense register to return MACFB_DISPLAY_VGA for now.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20211007221253.29024-8-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
hw/display/macfb.c
hw/display/trace-events
include/hw/display/macfb.h