2 * QEMU Motorola 680x0 Macintosh Video Card Emulation
3 * Copyright (c) 2012-2018 Laurent Vivier
5 * some parts from QEMU G364 framebuffer Emulator.
6 * Copyright (c) 2007-2011 Herve Poussineau
8 * This work is licensed under the terms of the GNU GPL, version 2 or later.
9 * See the COPYING file in the top-level directory.
16 #include "qemu/osdep.h"
17 #include "exec/memory.h"
18 #include "ui/console.h"
19 #include "qom/object.h"
21 typedef struct MacfbState
{
22 MemoryRegion mem_vram
;
23 MemoryRegion mem_ctrl
;
27 uint32_t vram_bit_mask
;
28 uint32_t palette_current
;
29 uint8_t color_palette
[256 * 3];
30 uint32_t width
, height
; /* in pixels */
34 #define TYPE_MACFB "sysbus-macfb"
35 OBJECT_DECLARE_SIMPLE_TYPE(MacfbSysBusState
, MACFB
)
37 struct MacfbSysBusState
{
43 #define TYPE_NUBUS_MACFB "nubus-macfb"
44 OBJECT_DECLARE_TYPE(MacfbNubusState
, MacfbNubusDeviceClass
, NUBUS_MACFB
)
46 struct MacfbNubusDeviceClass
{
47 DeviceClass parent_class
;
49 DeviceRealize parent_realize
;
53 struct MacfbNubusState
{