aboutsummaryrefslogtreecommitdiff
path: root/hw/m68k/q800.c
diff options
context:
space:
mode:
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>2021-10-07 23:12:48 +0100
committerLaurent Vivier <laurent@vivier.eu>2021-10-08 13:31:03 +0200
commit4317c518618adcd5d41637c849be17e94cecf003 (patch)
tree2a493d478cbe6672666903dfee5b552e5bc69905 /hw/m68k/q800.c
parente6108b96363bda0704ca69e5dfdb4b07dc589336 (diff)
downloadqemu-4317c518618adcd5d41637c849be17e94cecf003.zip
qemu-4317c518618adcd5d41637c849be17e94cecf003.tar.gz
qemu-4317c518618adcd5d41637c849be17e94cecf003.tar.bz2
macfb: add qdev property to specify display type
Since the available resolutions and colour depths are determined by the attached display type, add a qdev property to allow the display type to be specified. The main resolutions of interest are high resolution 1152x870 with 8-bit colour and SVGA resolution up to 800x600 with 24-bit colour so update the q800 machine to allow high resolution mode if specified and otherwise fall back to SVGA. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-Id: <20211007221253.29024-9-mark.cave-ayland@ilande.co.uk> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw/m68k/q800.c')
-rw-r--r--hw/m68k/q800.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c
index 09b3366..5223b88 100644
--- a/hw/m68k/q800.c
+++ b/hw/m68k/q800.c
@@ -421,6 +421,11 @@ static void q800_init(MachineState *machine)
qdev_prop_set_uint32(dev, "width", graphic_width);
qdev_prop_set_uint32(dev, "height", graphic_height);
qdev_prop_set_uint8(dev, "depth", graphic_depth);
+ if (graphic_width == 1152 && graphic_height == 870 && graphic_depth == 8) {
+ qdev_prop_set_uint8(dev, "display", MACFB_DISPLAY_APPLE_21_COLOR);
+ } else {
+ qdev_prop_set_uint8(dev, "display", MACFB_DISPLAY_VGA);
+ }
qdev_realize_and_unref(dev, BUS(nubus), &error_fatal);
cs = CPU(cpu);