<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Ubixos: ogDisplay_VESA.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.3 -->
<h1>ogDisplay_VESA.h</h1><div class="fragment"><pre>00001 <span class="preprocessor">#ifndef OGDISPLAY_VESA_H</span>
00002 <span class="preprocessor"></span>
00003 <span class="preprocessor">#define OGDISPLAY_VESA_H</span>
00004 <span class="preprocessor"></span>
00005
00006
00007 <span class="preprocessor">#include "objgfx30.h"</span>
00008
00009
00010
00011 <span class="keyword">struct </span>TMode_Rec {
00012
00013 uInt16 ModeAttributes __attribute__((packed));
00014
00015 uInt8 WindowAFlags __attribute__((packed));
00016
00017 uInt8 WindowBFlags __attribute__((packed));
00018
00019 uInt16 Granularity __attribute__((packed));
00020
00021 uInt16 WindowSize __attribute__((packed));
00022
00023 uInt16 WindowASeg __attribute__((packed));
00024
00025 uInt16 WindowBSeg __attribute__((packed));
00026
00027 <span class="keywordtype">void</span>* BankSwitch __attribute__((packed));
00028
00029 uInt16 BytesPerLine __attribute__((packed));
00030
00031 uInt16 xRes __attribute__((packed));
00032
00033 uInt16 yRes __attribute__((packed));
00034
00035 uInt8 CharWidth __attribute__((packed));
00036
00037 uInt8 CharHeight __attribute__((packed));
00038
00039 uInt8 NumBitPlanes __attribute__((packed));
00040
00041 uInt8 BitsPerPixel __attribute__((packed));
00042
00043 uInt8 NumberOfBanks __attribute__((packed));
00044
00045 uInt8 MemoryModel __attribute__((packed));
00046
00047 uInt8 BankSize __attribute__((packed));
00048
00049 uInt8 NumOfImagePages __attribute__((packed));
00050
00051 uInt8 Reserved __attribute__((packed));
00052
00053 <span class="comment">// Direct colour fields (required for Direct/6 and YUV/7 memory models</span>
00054
00055 uInt8 RedMaskSize __attribute__((packed));
00056
00057 uInt8 RedFieldPosition __attribute__((packed));
00058
00059 uInt8 GreenMaskSize __attribute__((packed));
00060
00061 uInt8 GreenFieldPosition __attribute__((packed));
00062
00063 uInt8 BlueMaskSize __attribute__((packed));
00064
00065 uInt8 BlueFieldPosition __attribute__((packed));
00066
00067 uInt8 AlphaMaskSize __attribute__((packed));
00068
00069 uInt8 AlphaFieldPosition __attribute__((packed));
00070
00071 uInt8 DirectColourMode __attribute__((packed));
00072
00073 <span class="comment">// VESA 2.0 specific fields</span>
00074
00075 uInt32 physBasePtr __attribute__((packed));
00076
00077 <span class="keywordtype">void</span>* OffScreenMemOffset __attribute__((packed));
00078
00079 uInt16 OffScreenMemSize __attribute__((packed));
00080
00081 uInt8 paddington[461] __attribute__((packed));
00082
00083 };
00084
00085
00086
00087 <span class="keyword">struct </span>TVESA_Rec {
00088
00089 <span class="keywordtype">char</span> VBESignature[4] __attribute__((packed));
00090
00091 uInt8 minVersion __attribute__((packed));
00092
00093 uInt8 majVersion __attribute__((packed));
00094
00095 uInt32 OEMStringPtr __attribute__((packed));
00096
00097 uInt32 Capabilities __attribute__((packed));
00098
00099 uInt32 VideoModePtr __attribute__((packed));
00100
00101 uInt16 TotalMemory __attribute__((packed));
00102
00103 <span class="comment">// VESA 2.0 specific fields</span>
00104
00105 uInt16 OEMSoftwareRev __attribute__((packed));
00106
00107 uInt32 OEMVendorNamePtr __attribute__((packed));
00108
00109 uInt32 OEMProductNamePtr __attribute__((packed));
00110
00111 uInt32 OEMProductRevPtr __attribute__((packed));
00112
00113 uInt8 paddington[474] __attribute__((packed));
00114
00115 };
00116
00117
00118
00119 <span class="keyword">class </span>ogDisplay_VESA : <span class="keyword">public</span> ogSurface {
00120
00121 <span class="keyword">protected</span>:
00122
00123 uInt16 ScreenSelector;
00124
00125 TVESA_Rec* VESARec;
00126
00127 TMode_Rec* ModeRec;
00128
00129 <span class="keywordtype">bool</span> InGraphics;
00130
00131 uInt16 findMode(uInt32, uInt32, uInt32);
00132
00133 <span class="keywordtype">void</span> getModeInfo(uInt16);
00134
00135 <span class="keywordtype">void</span> getVESAInfo(<span class="keywordtype">void</span>);
00136
00137 <span class="keywordtype">void</span> setMode(uInt16);
00138
00139 <span class="keyword">virtual</span> uInt32 rawGetPixel(uInt32, uInt32);
00140
00141 <span class="keyword">virtual</span> <span class="keywordtype">void</span> rawSetPixel(uInt32, uInt32, uInt32);
00142
00143 <span class="keyword">virtual</span> <span class="keywordtype">void</span> rawLine(uInt32, uInt32, uInt32, uInt32, uInt32);
00144
00145 <span class="keywordtype">void</span> setPal(<span class="keywordtype">void</span>);
00146
00147 <span class="keyword">public</span>:
00148
00149 ogDisplay_VESA(<span class="keywordtype">void</span>);
00150
00151 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> ogAvail(<span class="keywordtype">void</span>);
00152
00153 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> ogAlias(ogSurface&, uInt32, uInt32, uInt32, uInt32);
00154
00155 <span class="keyword">virtual</span> <span class="keywordtype">void</span> ogClear(uInt32);
00156
00157 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> ogClone(ogSurface&);
00158
00159 <span class="keyword">virtual</span> <span class="keywordtype">void</span> ogCopyLineTo(uInt32, uInt32, <span class="keyword">const</span> <span class="keywordtype">void</span> *, uInt32);
00160
00161 <span class="keyword">virtual</span> <span class="keywordtype">void</span> ogCopyLineFrom(uInt32, uInt32, <span class="keywordtype">void</span> *, uInt32);
00162
00163 <span class="keyword">virtual</span> <span class="keywordtype">void</span> ogCopyPal(ogSurface&);
00164
00165 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> ogCreate(uInt32, uInt32, ogPixelFmt);
00166
00167 <span class="keyword">virtual</span> uInt32 ogGetPixel(int32, int32);
00168
00169 <span class="keyword">virtual</span> <span class="keywordtype">void</span> * ogGetPtr(uInt32, uInt32);
00170
00171 <span class="keyword">virtual</span> <span class="keywordtype">void</span> ogHLine(int32, int32, int32, uInt32);
00172
00173 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> ogLoadPal(<span class="keyword">const</span> <span class="keywordtype">char</span> *);
00174
00175 <span class="keyword">virtual</span> <span class="keywordtype">void</span> ogSetPixel(int32, int32, uInt32);
00176
00177 <span class="keyword">virtual</span> <span class="keywordtype">void</span> ogSetRGBPalette(uInt8, uInt8, uInt8, uInt8);
00178
00179 <span class="keyword">virtual</span> <span class="keywordtype">void</span> ogVFlip(<span class="keywordtype">void</span>);
00180
00181 <span class="keyword">virtual</span> <span class="keywordtype">void</span> ogVLine(int32, int32, int32, uInt32);
00182
00183 <span class="keyword">virtual</span> ~ogDisplay_VESA(<span class="keywordtype">void</span>);
00184
00185 }; <span class="comment">// ogDisplay_VESA</span>
00186
00187
00188
00189 <span class="preprocessor">#endif</span>
00190 <span class="preprocessor"></span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Wed Apr 28 17:49:38 2004 for Ubixos by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
</a>1.3.3 </small></address>
</body>
</html>