]>
Commit | Line | Data |
---|---|---|
8ac919a0 LV |
1 | /* |
2 | * QEMU Motorola 680x0 Macintosh Video Card Emulation | |
3 | * Copyright (c) 2012-2018 Laurent Vivier | |
4 | * | |
5 | * some parts from QEMU G364 framebuffer Emulator. | |
6 | * Copyright (c) 2007-2011 Herve Poussineau | |
7 | * | |
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. | |
10 | * | |
11 | */ | |
12 | ||
13 | #ifndef MACFB_H | |
14 | #define MACFB_H | |
15 | ||
16 | #include "qemu/osdep.h" | |
17 | #include "exec/memory.h" | |
18 | #include "ui/console.h" | |
db1015e9 | 19 | #include "qom/object.h" |
8ac919a0 LV |
20 | |
21 | typedef struct MacfbState { | |
22 | MemoryRegion mem_vram; | |
23 | MemoryRegion mem_ctrl; | |
24 | QemuConsole *con; | |
25 | ||
26 | uint8_t *vram; | |
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 */ | |
31 | uint8_t depth; | |
32 | } MacfbState; | |
33 | ||
34 | #define TYPE_MACFB "sysbus-macfb" | |
8063396b | 35 | OBJECT_DECLARE_SIMPLE_TYPE(MacfbSysBusState, MACFB) |
8ac919a0 | 36 | |
db1015e9 | 37 | struct MacfbSysBusState { |
8ac919a0 LV |
38 | SysBusDevice busdev; |
39 | ||
40 | MacfbState macfb; | |
db1015e9 | 41 | }; |
8ac919a0 | 42 | |
db1015e9 | 43 | #define TYPE_NUBUS_MACFB "nubus-macfb" |
a489d195 | 44 | OBJECT_DECLARE_TYPE(MacfbNubusState, MacfbNubusDeviceClass, NUBUS_MACFB) |
8ac919a0 | 45 | |
db1015e9 | 46 | struct MacfbNubusDeviceClass { |
8ac919a0 LV |
47 | DeviceClass parent_class; |
48 | ||
49 | DeviceRealize parent_realize; | |
db1015e9 | 50 | }; |
8ac919a0 | 51 | |
8ac919a0 | 52 | |
db1015e9 | 53 | struct MacfbNubusState { |
8ac919a0 LV |
54 | NubusDevice busdev; |
55 | ||
56 | MacfbState macfb; | |
db1015e9 | 57 | }; |
8ac919a0 LV |
58 | |
59 | #endif |