Updated PCI IDs to latest snapshot.
[tangerine.git] / arch / common / hidd.vmwaresvga / vmwaresvgahardware.h
blobe503e112955661a0dd0721ee819c69ef3bbe71ec
1 #ifndef _VMWARESVGA_HARDWARE_H
2 #define _VMWARESVGA_HARDWARE_H
4 #include <exec/libraries.h>
5 #include <hidd/pci.h>
6 #include <oop/oop.h>
7 #include "vmwaresvgabitmap.h"
8 #include "vmwaresvgamouse.h"
9 #include "svga_reg.h"
11 #define VENDOR_VMWARE 0x15ad
12 #define DEVICE_VMWARE0710 0x0710
13 #define DEVICE_VMWARE0405 0x0405
15 struct HWData {
16 UWORD indexReg;
17 UWORD valueReg;
18 ULONG depth;
19 ULONG redmask;
20 ULONG greenmask;
21 ULONG bluemask;
22 ULONG redshift;
23 ULONG greenshift;
24 ULONG blueshift;
25 ULONG bytesperpixel;
26 ULONG bitsperpixel;
27 ULONG bytesperline;
28 ULONG vramsize;
29 APTR vrambase;
30 ULONG maxwidth;
31 ULONG maxheight;
32 ULONG displaycount;
33 ULONG mmiosize;
34 APTR mmiobase;
35 ULONG fboffset; /* last byte in framebuffer of current screen mode */
36 ULONG pseudocolor;
37 ULONG capabilities;
40 #define clearCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
41 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_CLEAR)
42 #define andCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
43 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_AND)
44 #define andReverseCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
45 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_AND_REVERSE)
46 #define copyCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
47 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_COPY)
48 #define andInvertedCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
49 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_AND_INVERTED)
50 #define noOpCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
51 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_NOOP)
52 #define xorCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
53 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_XOR)
54 #define orCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
55 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_OR)
56 #define norCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
57 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_NOR)
58 #define equivCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
59 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_EQUIV)
60 #define invertCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
61 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_INVERT)
62 #define orReverseCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
63 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_OR_REVERSE)
64 #define copyInvertedCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
65 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_COPY_INVERTED)
66 #define orInvertedCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
67 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_OR_INVERTED)
68 #define nandCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
69 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_NAND)
70 #define setCopyVMWareSVGA(d, sx, sy, dx, dy, w, h) \
71 ropCopyVMWareSVGA(d, sx, sy, dx, dy, w, h, SVGA_ROP_SET)
73 #define clearFillVMWareSVGA(d, c, x, y, w, h) \
74 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_CLEAR)
75 #define andFillVMWareSVGA(d, c, x, y, w, h) \
76 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_AND)
77 #define andReverseFillVMWareSVGA(d, c, x, y, w, h) \
78 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_AND_REVERSE)
79 #define copyFillVMWareSVGA(d, c, x, y, w, h) \
80 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_COPY)
81 #define andInvertedFillVMWareSVGA(d, c, x, y, w, h) \
82 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_AND_INVERTED)
83 #define noOpFillVMWareSVGA(d, c, x, y, w, h) \
84 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_NOOP)
85 #define xorFillVMWareSVGA(d, c, x, y, w, h) \
86 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_XOR)
87 #define orFillVMWareSVGA(d, c, x, y, w, h) \
88 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_OR)
89 #define norFillVMWareSVGA(d, c, x, y, w, h) \
90 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_NOR)
91 #define equivFillVMWareSVGA(d, c, x, y, w, h) \
92 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_EQUIV)
93 #define invertFillVMWareSVGA(d, c, x, y, w, h) \
94 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_INVERT)
95 #define orReverseFillVMWareSVGA(d, c, x, y, w, h) \
96 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_OR_REVERSE)
97 #define copyInvertedFillVMWareSVGA(d, c, x, y, w, h) \
98 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_COPY_INVERTED)
99 #define orInvertedFillVMWareSVGA(d, c, x, y, w, h) \
100 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_OR_INVERTED)
101 #define nandFillVMWareSVGA(d, c, x, y, w, h) \
102 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_NAND)
103 #define setFillVMWareSVGA(d, c, x, y, w, h) \
104 ropFillVMWareSVGA(d, c, x, y, w, h, SVGA_ROP_SET)
107 void vmwareWriteReg(struct HWData *, ULONG, ULONG);
108 VOID writeVMWareSVGAFIFO(struct HWData *, ULONG);
109 VOID syncVMWareSVGAFIFO(struct HWData *);
110 BOOL initVMWareSVGAHW(struct HWData *, OOP_Object *);
111 VOID setModeVMWareSVGA(struct HWData *, ULONG, ULONG);
112 VOID refreshAreaVMWareSVGA(struct HWData *, struct Box *);
113 VOID rectFillVMWareSVGA(struct HWData *, ULONG, LONG, LONG, LONG, LONG);
114 VOID ropFillVMWareSVGA(struct HWData *, ULONG, LONG, LONG, LONG, LONG, ULONG);
115 VOID ropCopyVMWareSVGA(struct HWData *, LONG, LONG, LONG, LONG, ULONG, ULONG, ULONG);
116 VOID defineCursorVMWareSVGA(struct HWData *, struct MouseData *);
117 VOID displayCursorVMWareSVGA(struct HWData *, LONG);
118 VOID moveCursorVMWareSVGA(struct HWData *, LONG, LONG);
120 #endif /* _VMWARESVGA_HARDWARE_H */