1 #ifndef _VMWARESVGA_HARDWARE_H
2 #define _VMWARESVGA_HARDWARE_H
4 #include <exec/libraries.h>
5 #include <exec/tasks.h>
8 #include "vmwaresvgabitmap.h"
9 #include "vmwaresvgamouse.h"
12 #define VENDOR_VMWARE 0x15ad
13 #define DEVICE_VMWARE0710 0x0710
14 #define DEVICE_VMWARE0405 0x0405
36 ULONG fboffset
; /* last byte in framebuffer of current screen mode */
43 struct Box delta_damage
;
44 struct Task
*render_task
;
45 struct SignalSemaphore damage_control
;
48 #define clearCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
49 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_CLEAR)
50 #define andCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
51 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_AND)
52 #define andReverseCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
53 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_AND_REVERSE)
54 #define copyCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
55 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_COPY)
56 #define andInvertedCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
57 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_AND_INVERTED)
58 #define noOpCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
59 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_NOOP)
60 #define xorCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
61 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_XOR)
62 #define orCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
63 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_OR)
64 #define norCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
65 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_NOR)
66 #define equivCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
67 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_EQUIV)
68 #define invertCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
69 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_INVERT)
70 #define orReverseCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
71 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_OR_REVERSE)
72 #define copyInvertedCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
73 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_COPY_INVERTED)
74 #define orInvertedCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
75 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_OR_INVERTED)
76 #define nandCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
77 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_NAND)
78 #define setCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
79 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_SET)
81 #define clearFillVMWareSVGA(d, c, x, y, w, h) \
82 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_CLEAR)
83 #define andFillVMWareSVGA(d, c, x, y, w, h) \
84 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_AND)
85 #define andReverseFillVMWareSVGA(d, c, x, y, w, h) \
86 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_AND_REVERSE)
87 #define copyFillVMWareSVGA(d, c, x, y, w, h) \
88 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_COPY)
89 #define andInvertedFillVMWareSVGA(d, c, x, y, w, h) \
90 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_AND_INVERTED)
91 #define noOpFillVMWareSVGA(d, c, x, y, w, h) \
92 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_NOOP)
93 #define xorFillVMWareSVGA(d, c, x, y, w, h) \
94 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_XOR)
95 #define orFillVMWareSVGA(d, c, x, y, w, h) \
96 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_OR)
97 #define norFillVMWareSVGA(d, c, x, y, w, h) \
98 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_NOR)
99 #define equivFillVMWareSVGA(d, c, x, y, w, h) \
100 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_EQUIV)
101 #define invertFillVMWareSVGA(d, c, x, y, w, h) \
102 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_INVERT)
103 #define orReverseFillVMWareSVGA(d, c, x, y, w, h) \
104 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_OR_REVERSE)
105 #define copyInvertedFillVMWareSVGA(d, c, x, y, w, h) \
106 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_COPY_INVERTED)
107 #define orInvertedFillVMWareSVGA(d, c, x, y, w, h) \
108 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_OR_INVERTED)
109 #define nandFillVMWareSVGA(d, c, x, y, w, h) \
110 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_NAND)
111 #define setFillVMWareSVGA(d, c, x, y, w, h) \
112 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_SET)
114 ULONG
vmwareReadReg(struct HWData
*data
, ULONG reg
);
115 void vmwareWriteReg(struct HWData
*, ULONG
, ULONG
);
116 VOID
writeVMWareSVGAFIFO(struct HWData
*, ULONG
);
117 VOID
syncVMWareSVGAFIFO(struct HWData
*);
118 BOOL
initVMWareSVGAHW(struct HWData
*, OOP_Object
*);
119 VOID
setModeVMWareSVGA(struct HWData
*, ULONG
, ULONG
);
120 VOID
refreshAreaVMWareSVGA(struct HWData
*, struct Box
*);
121 VOID
rectFillVMWareSVGA(struct HWData
*, ULONG
, LONG
, LONG
, LONG
, LONG
);
122 VOID
ropFillVMWareSVGA(struct HWData
*, ULONG
, LONG
, LONG
, LONG
, LONG
, ULONG
);
123 VOID
ropCopyVMWareSVGA(struct HWData
*, LONG
, LONG
, LONG
, LONG
, ULONG
, ULONG
, ULONG
);
124 VOID
defineCursorVMWareSVGA(struct HWData
*, struct MouseData
*);
125 VOID
displayCursorVMWareSVGA(struct HWData
*, LONG
);
126 VOID
moveCursorVMWareSVGA(struct HWData
*, LONG
, LONG
);
128 VOID
VMWareSVGA_Damage_Reset(struct HWData
*hwdata
);
129 VOID
VMWareSVGA_Damage_DeltaAdd(struct HWData
*hwdata
, struct Box box
);
130 VOID
VMWareSVGA_RestartRenderTask(struct HWData
*hwdata
);
132 #endif /* _VMWARESVGA_HARDWARE_H */