1 #ifndef P96GFX_P96RTG_H
2 #define P96GFX_P96RTG_H
4 /* Types for RGBFormat used */
6 RGBFB_NONE
, /* no valid RGB format (should not happen) */
7 RGBFB_CLUT
, /* palette mode, set colors when opening screen using
8 tags or use SetRGB32/LoadRGB32(...) */
9 RGBFB_R8G8B8
, /* TrueColor RGB (8 bit each) */
10 RGBFB_B8G8R8
, /* TrueColor BGR (8 bit each) */
11 RGBFB_R5G6B5PC
, /* HiColor16 (5 bit R, 6 bit G, 5 bit B),
12 format: gggbbbbbrrrrrggg */
13 RGBFB_R5G5B5PC
, /* HiColor15 (5 bit each), format: gggbbbbb0rrrrrgg */
14 RGBFB_A8R8G8B8
, /* 4 Byte TrueColor ARGB (A unused alpha channel) */
15 RGBFB_A8B8G8R8
, /* 4 Byte TrueColor ABGR (A unused alpha channel) */
16 RGBFB_R8G8B8A8
, /* 4 Byte TrueColor RGBA (A unused alpha channel) */
17 RGBFB_B8G8R8A8
, /* 4 Byte TrueColor BGRA (A unused alpha channel) */
18 RGBFB_R5G6B5
, /* HiColor16 (5 bit R, 6 bit G, 5 bit B),
19 format: rrrrrggggggbbbbb */
20 RGBFB_R5G5B5
, /* HiColor15 (5 bit each), format: 0rrrrrgggggbbbbb */
21 RGBFB_B5G6R5PC
, /* HiColor16 (5 bit R, 6 bit G, 5 bit B),
22 format: gggrrrrrbbbbbggg */
23 RGBFB_B5G5R5PC
, /* HiColor15 (5 bit each), format: gggrrrrr0bbbbbbgg */
25 /* By now, the following formats are for use with a hardware window only
26 (bitmap operations may be implemented incompletely) */
28 RGBFB_Y4U2V2
, /* 2 Byte TrueColor YUV (CCIR recommendation CCIR601).
29 Each two-pixel unit is stored as one longword
30 containing luminance (Y) for each of the two pixels,
31 and chrominance (U,V) for alternate pixels.
32 The missing chrominance values are generated by
33 interpolation. (Y1-U0-Y0-V0) */
34 RGBFB_Y4U1V1
, /* 1 Byte TrueColor ACCUPAK. Four adjacent pixels form
35 a packet of 5 bits Y (luminance) each pixel and 6 bits
36 U and V (chrominance) shared by the four pixels */
41 #define RGBFF_NONE (1<<RGBFB_NONE)
42 #define RGBFF_CLUT (1<<RGBFB_CLUT)
43 #define RGBFF_R8G8B8 (1<<RGBFB_R8G8B8)
44 #define RGBFF_B8G8R8 (1<<RGBFB_B8G8R8)
45 #define RGBFF_R5G6B5PC (1<<RGBFB_R5G6B5PC)
46 #define RGBFF_R5G5B5PC (1<<RGBFB_R5G5B5PC)
47 #define RGBFF_A8R8G8B8 (1<<RGBFB_A8R8G8B8)
48 #define RGBFF_A8B8G8R8 (1<<RGBFB_A8B8G8R8)
49 #define RGBFF_R8G8B8A8 (1<<RGBFB_R8G8B8A8)
50 #define RGBFF_B8G8R8A8 (1<<RGBFB_B8G8R8A8)
51 #define RGBFF_R5G6B5 (1<<RGBFB_R5G6B5)
52 #define RGBFF_R5G5B5 (1<<RGBFB_R5G5B5)
53 #define RGBFF_B5G6R5PC (1<<RGBFB_B5G6R5PC)
54 #define RGBFF_B5G5R5PC (1<<RGBFB_B5G5R5PC)
55 #define RGBFF_Y4U2V2 (1<<RGBFB_Y4U2V2)
56 #define RGBFF_Y4U1V1 (1<<RGBFB_Y4U1V1)
58 #define RGBMASK_8BIT RGBFF_CLUT
59 #define RGBMASK_16BIT (RGBFF_R5G6B5PC | RGBFF_B5G6R5PC | RGBFF_R5G6B5)
60 #define RGBMASK_15BIT (RGBFF_R5G5B5PC | RGBFF_B5G5R5PC | RGBFF_R5G5B5)
61 #define RGBMASK_24BIT (RGBFF_R8G8B8 | RGBFF_B8G8R8)
62 #define RGBMASK_32BIT (RGBFF_A8R8G8B8 | RGBFF_A8B8G8R8 | RGBFF_R8G8B8A8 | RGBFF_B8G8R8A8)
64 #define RGBFF_PLANAR RGBFF_NONE
65 #define RGBFF_CHUNKY RGBFF_CLUT
67 #define RGBFB_PLANAR RGBFB_NONE
68 #define RGBFB_CHUNKY RGBFB_CLUT
70 #define RGBFB_SUPPORTMASK (RGBFF_CLUT | \
71 RGBFF_A8R8G8B8 | RGBFF_A8B8G8R8 | RGBFF_R8G8B8A8 | RGBFF_B8G8R8A8 | RGBFF_B8G8R8 | RGBFF_R8G8B8 | \
72 RGBFF_R5G6B5 | RGBFF_R5G5B5 | RGBFF_R5G6B5PC | RGBFF_R5G5B5PC | RGBFF_B5G6R5PC | RGBFF_B5G5R5PC)
74 /* BoardInfo hardare flags (set by the driver) */
75 #define BIB_HARDWARESPRITE 0 /* board has hardware sprite */
76 #define BIB_VBLANKINTERRUPT 4 /* board can cause a hardware interrupt on a vertical retrace */
77 #define BIB_BLITTER 15 /* board has blitter */
78 /* BoardInfo user flags (set by the rtg subsystem) */
79 #define BIB_HIRESSPRITE 16 /* mouse sprite has double resolution */
80 #define BIB_BIGSPRITE 17 /* user wants big mouse sprite */
81 #define BIB_NOBLITTER 24 /* disable all blitter functions */
83 #define BIF_HARDWARESPRITE (1 << BIB_HARDWARESPRITE)
84 #define BIF_VBLANKINTERRUPT (1 << BIB_VBLANKINTERRUPT)
85 #define BIF_BLITTER (1 << BIB_BLITTER)
86 #define BIF_HIRESSPRITE (1 << BIB_HIRESSPRITE)
87 #define BIF_BIGSPRITE (1 << BIB_BIGSPRITE)
88 #define BIF_NOBLITTER (1 << BIB_NOBLITTER)
99 #define MAXRESOLUTIONNAMELENGTH 22
101 struct LibResolution
{
104 char Name
[MAXRESOLUTIONNAMELENGTH
];
109 struct ModeInfo
*Modes
[MAXMODES
];
137 UWORD XOffset
, YOffset
;
147 WORD sDelta
, lDelta
, twoSDminusLD
;
154 UWORD Xorigin
, Yorigin
;
187 #define GMB_DOUBLECLOCK 0
188 #define GMB_INTERLACE 1
189 #define GMB_DOUBLESCAN 2
190 #define GMB_HPOLARITY 3
191 #define GMB_VPOLARITY 4
192 #define GMB_COMPATVIDEO 5
193 #define GMB_DOUBLEVERTICAL 6
194 #define GMF_DOUBLECLOCK (1L<<GMB_DOUBLECLOCK)
195 #define GMF_INTERLACE (1L<<GMB_INTERLACE)
196 #define GMF_DOUBLESCAN (1L<<GMB_DOUBLESCAN)
197 #define GMF_HPOLARITY (1L<<GMB_HPOLARITY)
198 #define GMF_VPOLARITY (1L<<GMB_VPOLARITY)
199 #define GMF_COMPATVIDEO (1L<<GMB_COMPATVIDEO)
200 #define GMF_DOUBLEVERTICAL (1L<<GMB_DOUBLEVERTICAL)
202 #define PSSO_BitMapExtra_BoardNode 0
203 #define PSSO_BitMapExtra_HashChain 8 /* BoardNode is 8-bytes */
204 #define PSSO_BitMapExtra_Match 12
205 #define PSSO_BitMapExtra_BitMap 16
206 #define PSSO_BitMapExtra_BoardInfo 20
207 #define PSSO_BitMapExtra_MemChunk 24
208 #define PSSO_BitMapExtra_RenderInfo 28
209 #define PSSO_BitMapExtra_Width 40 /* RenderInfo is 12-bytes */
210 #define PSSO_BitMapExtra_Height 42
211 #define PSSO_BitMapExtra_Flags 44
212 #define PSSO_BitMapExtra_BaseLevel 46
213 #define PSSO_BitMapExtra_CurrentLevel 48
214 #define PSSO_BitMapExtra_CompanionMaster 50
215 #define PSSO_BitMapExtra_Last 54
217 #define PSSO_BoardInfo_RegisterBase 0
218 #define PSSO_BoardInfo_MemoryBase PSSO_BoardInfo_RegisterBase + 4
219 #define PSSO_BoardInfo_MemoryIOBase PSSO_BoardInfo_MemoryBase + 4
220 #define PSSO_BoardInfo_MemorySize PSSO_BoardInfo_MemoryIOBase + 4
221 #define PSSO_BoardInfo_BoardName PSSO_BoardInfo_MemorySize + 4
222 #define PSSO_BoardInfo_VBIName PSSO_BoardInfo_BoardName + 4
223 #define PSSO_BoardInfo_CardBase PSSO_BoardInfo_VBIName + 32
224 #define PSSO_BoardInfo_ChipBase PSSO_BoardInfo_CardBase + 4
225 #define PSSO_BoardInfo_ExecBase PSSO_BoardInfo_ChipBase + 4
226 #define PSSO_BoardInfo_UtilBase PSSO_BoardInfo_ExecBase + 4
227 #define PSSO_BoardInfo_HardInterrupt PSSO_BoardInfo_UtilBase + 4
228 #define PSSO_BoardInfo_SoftInterrupt PSSO_BoardInfo_HardInterrupt + 22 /* The HardInterrupt is 22-bytes */
229 #define PSSO_BoardInfo_BoardLock PSSO_BoardInfo_SoftInterrupt + 22 /* The SoftInterrupt is 22-bytes */
230 #define PSSO_BoardInfo_ResolutionsList PSSO_BoardInfo_BoardLock + 46 /* On the BoardLock, we were having some fun... */
231 #define PSSO_BoardInfo_BoardType PSSO_BoardInfo_ResolutionsList + 12 /* The ResolutionsList is 12-bytes */
232 #define PSSO_BoardInfo_PaletteChipType PSSO_BoardInfo_BoardType + 4
233 #define PSSO_BoardInfo_GraphicsControllerType PSSO_BoardInfo_PaletteChipType + 4
234 #define PSSO_BoardInfo_MoniSwitch PSSO_BoardInfo_GraphicsControllerType + 4
235 #define PSSO_BoardInfo_BitsPerCannon PSSO_BoardInfo_MoniSwitch + 2
236 #define PSSO_BoardInfo_Flags PSSO_BoardInfo_BitsPerCannon + 2
237 #define PSSO_BoardInfo_SoftSpriteFlags PSSO_BoardInfo_Flags + 4
238 #define PSSO_BoardInfo_ChipFlags PSSO_BoardInfo_SoftSpriteFlags + 2
239 #define PSSO_BoardInfo_CardFlags PSSO_BoardInfo_ChipFlags + 2
240 #define PSSO_BoardInfo_BoardNum PSSO_BoardInfo_CardFlags + 4
241 #define PSSO_BoardInfo_RGBFormats PSSO_BoardInfo_BoardNum + 2
242 #define PSSO_BoardInfo_MaxHorValue PSSO_BoardInfo_RGBFormats + 2
243 #define PSSO_BoardInfo_MaxVerValue PSSO_BoardInfo_MaxHorValue + MAXMODES * 2
244 #define PSSO_BoardInfo_MaxHorResolution PSSO_BoardInfo_MaxVerValue + MAXMODES * 2
245 #define PSSO_BoardInfo_MaxVerResolution PSSO_BoardInfo_MaxHorResolution + MAXMODES * 2
246 #define PSSO_BoardInfo_MaxMemorySize PSSO_BoardInfo_MaxVerResolution + MAXMODES * 2
247 #define PSSO_BoardInfo_MaxChunkSize PSSO_BoardInfo_MaxMemorySize + 4
248 #define PSSO_BoardInfo_MemoryClock PSSO_BoardInfo_MaxChunkSize + 4
249 #define PSSO_BoardInfo_PixelClockCount PSSO_BoardInfo_MemoryClock + 4
251 #define PSSO_BoardInfo_AllocCardMem PSSO_BoardInfo_PixelClockCount + MAXMODES * 4
252 #define PSSO_BoardInfo_FreeCardMem PSSO_BoardInfo_AllocCardMem + 4
254 #define PSSO_BoardInfo_SetSwitch PSSO_BoardInfo_FreeCardMem + 4
256 #define PSSO_BoardInfo_SetColorArray PSSO_BoardInfo_SetSwitch + 4
258 #define PSSO_BoardInfo_SetDAC PSSO_BoardInfo_SetColorArray + 4
259 #define PSSO_BoardInfo_SetGC PSSO_BoardInfo_SetDAC + 4
260 #define PSSO_BoardInfo_SetPanning PSSO_BoardInfo_SetGC + 4
261 #define PSSO_BoardInfo_CalculateBytesPerRow PSSO_BoardInfo_SetPanning + 4
262 #define PSSO_BoardInfo_CalculateMemory PSSO_BoardInfo_CalculateBytesPerRow + 4
263 #define PSSO_BoardInfo_GetCompatibleFormats PSSO_BoardInfo_CalculateMemory + 4
264 #define PSSO_BoardInfo_SetDisplay PSSO_BoardInfo_GetCompatibleFormats + 4
266 #define PSSO_BoardInfo_ResolvePixelClock PSSO_BoardInfo_SetDisplay + 4
267 #define PSSO_BoardInfo_GetPixelClock PSSO_BoardInfo_ResolvePixelClock + 4
268 #define PSSO_BoardInfo_SetClock PSSO_BoardInfo_GetPixelClock + 4
270 #define PSSO_BoardInfo_SetMemoryMode PSSO_BoardInfo_SetClock + 4
271 #define PSSO_BoardInfo_SetWriteMask PSSO_BoardInfo_SetMemoryMode + 4
272 #define PSSO_BoardInfo_SetClearMask PSSO_BoardInfo_SetWriteMask + 4
273 #define PSSO_BoardInfo_SetReadPlane PSSO_BoardInfo_SetClearMask + 4
275 #define PSSO_BoardInfo_WaitVerticalSync PSSO_BoardInfo_SetReadPlane + 4
276 #define PSSO_BoardInfo_SetInterrupt PSSO_BoardInfo_WaitVerticalSync + 4
278 #define PSSO_BoardInfo_WaitBlitter PSSO_BoardInfo_SetInterrupt + 4
280 #define PSSO_BoardInfo_ScrollPlanar PSSO_BoardInfo_WaitBlitter + 4
281 #define PSSO_BoardInfo_ScrollPlanarDefault PSSO_BoardInfo_ScrollPlanar + 4
282 #define PSSO_BoardInfo_UpdatePlanar PSSO_BoardInfo_ScrollPlanarDefault + 4
283 #define PSSO_BoardInfo_UpdatePlanarDefault PSSO_BoardInfo_UpdatePlanar + 4
284 #define PSSO_BoardInfo_BlitPlanar2Chunky PSSO_BoardInfo_UpdatePlanarDefault + 4
285 #define PSSO_BoardInfo_BlitPlanar2ChunkyDefault PSSO_BoardInfo_BlitPlanar2Chunky + 4
287 #define PSSO_BoardInfo_FillRect PSSO_BoardInfo_BlitPlanar2ChunkyDefault + 4
288 #define PSSO_BoardInfo_FillRectDefault PSSO_BoardInfo_FillRect + 4
289 #define PSSO_BoardInfo_InvertRect PSSO_BoardInfo_FillRectDefault + 4
290 #define PSSO_BoardInfo_InvertRectDefault PSSO_BoardInfo_InvertRect + 4
291 #define PSSO_BoardInfo_BlitRect PSSO_BoardInfo_InvertRectDefault + 4
292 #define PSSO_BoardInfo_BlitRectDefault PSSO_BoardInfo_BlitRect + 4
293 #define PSSO_BoardInfo_BlitTemplate PSSO_BoardInfo_BlitRectDefault + 4
294 #define PSSO_BoardInfo_BlitTemplateDefault PSSO_BoardInfo_BlitTemplate + 4
295 #define PSSO_BoardInfo_BlitPattern PSSO_BoardInfo_BlitTemplateDefault + 4
296 #define PSSO_BoardInfo_BlitPatternDefault PSSO_BoardInfo_BlitPattern + 4
297 #define PSSO_BoardInfo_DrawLine PSSO_BoardInfo_BlitPatternDefault + 4
298 #define PSSO_BoardInfo_DrawLineDefault PSSO_BoardInfo_DrawLine + 4
299 #define PSSO_BoardInfo_BlitRectNoMaskComplete PSSO_BoardInfo_DrawLineDefault + 4
300 #define PSSO_BoardInfo_BlitRectNoMaskCompleteDefault PSSO_BoardInfo_BlitRectNoMaskComplete + 4
301 #define PSSO_BoardInfo_BlitPlanar2Direct PSSO_BoardInfo_BlitRectNoMaskCompleteDefault + 4
302 #define PSSO_BoardInfo_BlitPlanar2DirectDefault PSSO_BoardInfo_BlitPlanar2Direct + 4
304 #define PSSO_BoardInfo_Reserved0 PSSO_BoardInfo_BlitPlanar2DirectDefault + 4
305 #define PSSO_BoardInfo_Reserved0Default PSSO_BoardInfo_Reserved0 + 4
306 #define PSSO_BoardInfo_Reserved1 PSSO_BoardInfo_Reserved0Default + 4
307 #define PSSO_BoardInfo_Reserved1Default PSSO_BoardInfo_Reserved1 + 4
308 #define PSSO_BoardInfo_Reserved2 PSSO_BoardInfo_Reserved1Default + 4
309 #define PSSO_BoardInfo_Reserved2Default PSSO_BoardInfo_Reserved2 + 4
310 #define PSSO_BoardInfo_Reserved3 PSSO_BoardInfo_Reserved2Default + 4
311 #define PSSO_BoardInfo_Reserved3Default PSSO_BoardInfo_Reserved3 + 4
312 #define PSSO_BoardInfo_Reserved4 PSSO_BoardInfo_Reserved3Default + 4
313 #define PSSO_BoardInfo_Reserved4Default PSSO_BoardInfo_Reserved4 + 4
314 #define PSSO_BoardInfo_Reserved5 PSSO_BoardInfo_Reserved4Default + 4
315 #define PSSO_BoardInfo_Reserved5Default PSSO_BoardInfo_Reserved5 + 4
317 #define PSSO_BoardInfo_SetDPMSLevel PSSO_BoardInfo_Reserved5Default + 4
318 #define PSSO_BoardInfo_ResetChip PSSO_BoardInfo_SetDPMSLevel + 4
320 #define PSSO_BoardInfo_GetFeatureAttrs PSSO_BoardInfo_ResetChip + 4
322 #define PSSO_BoardInfo_AllocBitMap PSSO_BoardInfo_GetFeatureAttrs + 4
323 #define PSSO_BoardInfo_FreeBitMap PSSO_BoardInfo_AllocBitMap + 4
324 #define PSSO_BoardInfo_GetBitMapAttr PSSO_BoardInfo_FreeBitMap + 4
326 #define PSSO_BoardInfo_SetSprite PSSO_BoardInfo_GetBitMapAttr + 4
327 #define PSSO_BoardInfo_SetSpritePosition PSSO_BoardInfo_SetSprite + 4
328 #define PSSO_BoardInfo_SetSpriteImage PSSO_BoardInfo_SetSpritePosition + 4
329 #define PSSO_BoardInfo_SetSpriteColor PSSO_BoardInfo_SetSpriteImage + 4
331 #define PSSO_BoardInfo_CreateFeature PSSO_BoardInfo_SetSpriteColor + 4
332 #define PSSO_BoardInfo_SetFeatureAttrs PSSO_BoardInfo_CreateFeature + 4
333 #define PSSO_BoardInfo_DeleteFeature PSSO_BoardInfo_SetFeatureAttrs + 4
334 #define PSSO_BoardInfo_SpecialFeatures PSSO_BoardInfo_DeleteFeature + 4
336 #define PSSO_BoardInfo_ModeInfo PSSO_BoardInfo_SpecialFeatures + 12 /* SpecialFeatures is 12-bytes */
337 #define PSSO_BoardInfo_RGBFormat PSSO_BoardInfo_ModeInfo + 4
338 #define PSSO_BoardInfo_XOffset PSSO_BoardInfo_RGBFormat + 4
339 #define PSSO_BoardInfo_YOffset PSSO_BoardInfo_XOffset + 2
340 #define PSSO_BoardInfo_Depth PSSO_BoardInfo_YOffset + 2
341 #define PSSO_BoardInfo_ClearMask PSSO_BoardInfo_Depth + 1
342 #define PSSO_BoardInfo_Border PSSO_BoardInfo_ClearMask + 1
343 #define PSSO_BoardInfo_Mask PSSO_BoardInfo_Border + 2 /* BOOL type is only 2-bytes! */
344 #define PSSO_BoardInfo_CLUT PSSO_BoardInfo_Mask + 4
345 #define PSSO_BoardInfo_ViewPort PSSO_BoardInfo_CLUT + 3*256
346 #define PSSO_BoardInfo_VisibleBitMap PSSO_BoardInfo_ViewPort + 4
347 #define PSSO_BoardInfo_BitMapExtra PSSO_BoardInfo_VisibleBitMap + 4
348 #define PSSO_BoardInfo_BitMapList PSSO_BoardInfo_BitMapExtra + 4
349 #define PSSO_BoardInfo_MemList PSSO_BoardInfo_BitMapList + 12 /* BitMapList is 12-bytes */
350 #define PSSO_BoardInfo_MouseX PSSO_BoardInfo_MemList + 12 /* MemList is 12-bytes */
351 #define PSSO_BoardInfo_MouseY PSSO_BoardInfo_MouseX + 2
352 #define PSSO_BoardInfo_MouseWidth PSSO_BoardInfo_MouseY + 2
353 #define PSSO_BoardInfo_MouseHeight PSSO_BoardInfo_MouseWidth + 1
354 #define PSSO_BoardInfo_MouseXOffset PSSO_BoardInfo_MouseHeight + 1
355 #define PSSO_BoardInfo_MouseYOffset PSSO_BoardInfo_MouseXOffset + 1
356 #define PSSO_BoardInfo_MouseImage PSSO_BoardInfo_MouseYOffset + 1
357 #define PSSO_BoardInfo_MousePens PSSO_BoardInfo_MouseImage + 4
358 #define PSSO_BoardInfo_MouseRect PSSO_BoardInfo_MousePens + 4
359 #define PSSO_BoardInfo_MouseChunky PSSO_BoardInfo_MouseRect + 8 /* MouseRect is 8-bytes */
360 #define PSSO_BoardInfo_MouseRendered PSSO_BoardInfo_MouseChunky + 4
361 #define PSSO_BoardInfo_MouseSaveBuffer PSSO_BoardInfo_MouseRendered + 4
363 #define PSSO_BoardInfo_ChipData PSSO_BoardInfo_MouseSaveBuffer + 4
364 #define PSSO_BoardInfo_CardData PSSO_BoardInfo_ChipData + 16 * 4
365 #define PSSO_BoardInfo_MemorySpaceBase PSSO_BoardInfo_CardData + 16 * 4
366 #define PSSO_BoardInfo_MemorySpaceSize PSSO_BoardInfo_MemorySpaceBase + 4
367 #define PSSO_BoardInfo_DoubleBufferList PSSO_BoardInfo_MemorySpaceSize + 4
368 #define PSSO_BoardInfo_SyncTime PSSO_BoardInfo_DoubleBufferList + 4
369 #define PSSO_BoardInfo_SyncPeriod PSSO_BoardInfo_SyncTime + 4
370 #define PSSO_BoardInfo_SoftVBlankPort PSSO_BoardInfo_SyncPeriod + 8
371 #define PSSO_BoardInfo_WaitQ PSSO_BoardInfo_SyncPeriod + 34
372 #define PSSO_BoardInfo_AROSFlag PSSO_BoardInfo_WaitQ + 12
373 #define PSSO_BoardInfo_SizeOf PSSO_BoardInfo_AROSFlag + 4
375 #define P96BoardType_PicassoII 6
376 #define P96BoardType_Piccolo 7
377 #define P96BoardType_RetinaBLT 8
378 #define P96BoardType_PicassoIV 10
379 #define P96BoardType_PiccoloSD64 11
380 #define P96BoardType_A2410 12
381 #define P96BoardType_Pixel64 13
382 #define P96BoardType_UAEGfx 14
383 #define P96BoardType_Vampire 25
385 /* inline access wrappers */
386 static inline APTR
gp(UBYTE
*p
)
388 return ((APTR
*)p
)[0];
390 static inline ULONG
gl(UBYTE
*p
)
392 return ((ULONG
*)p
)[0];
394 static inline UWORD
gw(UBYTE
*p
)
396 return ((UWORD
*)p
)[0];
398 static inline void pp(UBYTE
*p
, APTR a
)
402 static inline void pl(UBYTE
*p
, ULONG l
)
406 static inline void pw(UBYTE
*p
, WORD w
)
410 static inline void pb(UBYTE
*p
, BYTE b
)
415 struct P96GfxBitMapData
;
417 /* RTG Support functions */
418 extern const UBYTE modetable
[16];
420 WORD
P96GFXRTG__GetDepth (ULONG rgbformat
);
421 ULONG
P96GFXRTG__GetFormat(struct p96gfx_staticdata
*csd
, struct p96gfx_carddata
*cid
, OOP_Object
*);
422 void P96GFXRTG__MakeRenderInfo(struct p96gfx_staticdata
*csd
, struct p96gfx_carddata
*cid
, struct RenderInfo
*, struct P96GfxBitMapData
*);
423 struct ModeInfo
*P96GFXRTG__GetModeInfo(struct p96gfx_staticdata
*csd
, struct p96gfx_carddata
*cid
, OOP_Object
*sync
, OOP_Object
*pixfmt
, struct ModeInfo
*modeinfo
);
424 void P96GFXRTG__Init(APTR boardinfo
);
427 BOOL
FindCard(struct p96gfx_carddata
*cid
);
428 BOOL
InitCard(struct p96gfx_carddata
*cid
);
429 BOOL
SetDisplay(struct p96gfx_carddata
*cid
, BOOL state
);
430 BOOL
SetSwitch(struct p96gfx_carddata
*cid
, BOOL state
);
431 void SetColorArray(struct p96gfx_carddata
*cid
, UWORD start
, UWORD count
);
432 void SetDAC(struct p96gfx_carddata
*cid
);
433 void SetGC(struct p96gfx_carddata
*cid
, struct ModeInfo
*mi
, BOOL border
);
434 void SetPanning(struct p96gfx_carddata
*cid
, UBYTE
*video
, UWORD width
, WORD x
, WORD y
);
442 /* Card Render Operation Stubs .. */
443 BOOL
DrawLine(struct p96gfx_carddata
*cid
, struct RenderInfo
*ri
,
444 struct Line
*line
, ULONG rgbformat
);
445 BOOL
BlitRect(struct p96gfx_carddata
*cid
, struct RenderInfo
*ri
,
446 WORD sx
, WORD sy
, WORD dx
, WORD dy
, WORD w
, WORD h
, UBYTE mask
, ULONG rgbformat
);
447 BOOL
FillRect(struct p96gfx_carddata
*cid
, struct RenderInfo
*ri
, WORD x
, WORD y
, WORD w
, WORD h
, ULONG pen
, UBYTE mask
, ULONG rgbformat
);
448 BOOL
InvertRect(struct p96gfx_carddata
*cid
, struct RenderInfo
*ri
, WORD x
, WORD y
, WORD w
, WORD h
, UBYTE mask
, ULONG rgbformat
);
449 BOOL
BlitRectNoMaskComplete(struct p96gfx_carddata
*cid
, struct RenderInfo
*risrc
, struct RenderInfo
*ridst
,
450 WORD sx
, WORD sy
, WORD dx
, WORD dy
, WORD w
, WORD h
, UBYTE opcode
, ULONG rgbformat
);
451 BOOL
BlitPattern(struct p96gfx_carddata
*cid
, struct RenderInfo
*ri
, struct Pattern
*pat
,
452 WORD x
, WORD y
, WORD w
, WORD h
, UBYTE mask
, ULONG rgbformat
);
453 BOOL
BlitTemplate(struct p96gfx_carddata
*cid
, struct RenderInfo
*ri
, struct Template
*tmpl
,
454 WORD x
, WORD y
, WORD w
, WORD h
, UBYTE mask
, ULONG rgbformat
);
462 WORD
CalculateBytesPerRow(struct p96gfx_carddata
*cid
, WORD width
, ULONG rgbformat
);
463 BOOL
SetSprite(struct p96gfx_carddata
*cid
, BOOL activate
);
464 BOOL
SetSpritePosition(struct p96gfx_carddata
*cid
);
465 BOOL
SetSpriteImage(struct p96gfx_carddata
*cid
);
466 BOOL
SetSpriteColor(struct p96gfx_carddata
*cid
, UBYTE idx
, UBYTE r
, UBYTE g
, UBYTE b
);
468 /* Real RTG only card functions */
469 ULONG
GetPixelClock(struct p96gfx_carddata
*cid
, struct ModeInfo
*mi
, ULONG index
, ULONG rgbformat
);
470 ULONG
ResolvePixelClock(struct p96gfx_carddata
*cid
, struct ModeInfo
*mi
, ULONG pixelclock
, ULONG rgbformat
);
471 ULONG
SetClock(struct p96gfx_carddata
*cid
);
472 void SetMemoryMode(struct p96gfx_carddata
*cid
, ULONG rgbformat
);
473 void WaitBlitter(struct p96gfx_carddata
*cid
);
474 void SetInterrupt(struct p96gfx_carddata
*cid
, ULONG state
);