2019-10-26 19:45:43 +03:00
|
|
|
/*
|
|
|
|
* QEMU Motorola 680x0 Macintosh Video Card Emulation
|
|
|
|
* Copyright (c) 2012-2018 Laurent Vivier
|
|
|
|
*
|
|
|
|
* some parts from QEMU G364 framebuffer Emulator.
|
|
|
|
* Copyright (c) 2007-2011 Herve Poussineau
|
|
|
|
*
|
|
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
|
|
* See the COPYING file in the top-level directory.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MACFB_H
|
|
|
|
#define MACFB_H
|
|
|
|
|
|
|
|
#include "exec/memory.h"
|
|
|
|
#include "ui/console.h"
|
2020-09-03 23:43:22 +03:00
|
|
|
#include "qom/object.h"
|
2019-10-26 19:45:43 +03:00
|
|
|
|
|
|
|
typedef struct MacfbState {
|
|
|
|
MemoryRegion mem_vram;
|
|
|
|
MemoryRegion mem_ctrl;
|
|
|
|
QemuConsole *con;
|
|
|
|
|
|
|
|
uint8_t *vram;
|
|
|
|
uint32_t vram_bit_mask;
|
|
|
|
uint32_t palette_current;
|
|
|
|
uint8_t color_palette[256 * 3];
|
|
|
|
uint32_t width, height; /* in pixels */
|
|
|
|
uint8_t depth;
|
|
|
|
} MacfbState;
|
|
|
|
|
|
|
|
#define TYPE_MACFB "sysbus-macfb"
|
2020-09-16 21:25:19 +03:00
|
|
|
OBJECT_DECLARE_SIMPLE_TYPE(MacfbSysBusState, MACFB)
|
2019-10-26 19:45:43 +03:00
|
|
|
|
2020-09-03 23:43:22 +03:00
|
|
|
struct MacfbSysBusState {
|
2019-10-26 19:45:43 +03:00
|
|
|
SysBusDevice busdev;
|
|
|
|
|
|
|
|
MacfbState macfb;
|
2020-09-03 23:43:22 +03:00
|
|
|
};
|
2019-10-26 19:45:43 +03:00
|
|
|
|
2020-09-03 23:43:22 +03:00
|
|
|
#define TYPE_NUBUS_MACFB "nubus-macfb"
|
2020-09-16 21:25:18 +03:00
|
|
|
OBJECT_DECLARE_TYPE(MacfbNubusState, MacfbNubusDeviceClass, NUBUS_MACFB)
|
2019-10-26 19:45:43 +03:00
|
|
|
|
2020-09-03 23:43:22 +03:00
|
|
|
struct MacfbNubusDeviceClass {
|
2019-10-26 19:45:43 +03:00
|
|
|
DeviceClass parent_class;
|
|
|
|
|
|
|
|
DeviceRealize parent_realize;
|
2020-09-03 23:43:22 +03:00
|
|
|
};
|
2019-10-26 19:45:43 +03:00
|
|
|
|
|
|
|
|
2020-09-03 23:43:22 +03:00
|
|
|
struct MacfbNubusState {
|
2019-10-26 19:45:43 +03:00
|
|
|
NubusDevice busdev;
|
|
|
|
|
|
|
|
MacfbState macfb;
|
2020-09-03 23:43:22 +03:00
|
|
|
};
|
2019-10-26 19:45:43 +03:00
|
|
|
|
|
|
|
#endif
|