4 #ifndef LIBRARIES_PICASSO96_H
5 #include <libraries/Picasso96.h>
8 #ifndef EXEC_INTERRUPTS_H
9 #include <exec/interrupts.h>
12 #ifndef EXEC_LIBRARIES_H
13 #include <exec/libraries.h>
16 #ifndef EXEC_SEMAPHORES_H
17 #include <exec/semaphores.h>
20 #ifndef GRAPHICS_GFX_H
21 #include <graphics/gfx.h>
24 #ifndef GRAPHICS_VIEW_H
25 #include <graphics/view.h>
28 #ifndef DEVICES_TIMER_H
29 #include <devices/timer.h>
36 /* registerized parameters */
43 #define __REGD0(x) x __asm("d0")
44 #define __REGD1(x) x __asm("d1")
45 #define __REGD2(x) x __asm("d2")
46 #define __REGD3(x) x __asm("d3")
47 #define __REGD4(x) x __asm("d4")
48 #define __REGD5(x) x __asm("d5")
49 #define __REGD6(x) x __asm("d6")
50 #define __REGD7(x) x __asm("d7")
51 #define __REGA0(x) x __asm("a0")
52 #define __REGA1(x) x __asm("a1")
53 #define __REGA2(x) x __asm("a2")
54 #define __REGA3(x) x __asm("a3")
55 #define __REGA4(x) x __asm("a4")
56 #define __REGA5(x) x __asm("a5")
57 #define __REGA6(x) x __asm("a6")
58 #define __REGA7(x) x __asm("a7")
61 #define __REGD0(x) __reg("d0") x
62 #define __REGD1(x) __reg("d1") x
63 #define __REGD2(x) __reg("d2") x
64 #define __REGD3(x) __reg("d3") x
65 #define __REGD4(x) __reg("d4") x
66 #define __REGD5(x) __reg("d5") x
67 #define __REGD6(x) __reg("d6") x
68 #define __REGD7(x) __reg("d7") x
69 #define __REGA0(x) __reg("a0") x
70 #define __REGA1(x) __reg("a1") x
71 #define __REGA2(x) __reg("a2") x
72 #define __REGA3(x) __reg("a3") x
73 #define __REGA4(x) __reg("a4") x
74 #define __REGA5(x) __reg("a5") x
75 #define __REGA6(x) __reg("a6") x
76 #define __REGA7(x) __reg("a7") x
80 /************************************************************************/
82 #define MAXSPRITEWIDTH 32
83 #define MAXSPRITEHEIGHT 48
85 /************************************************************************/
87 #define DI_P96_INVALID 0x1000
88 #define DI_P96_MONITOOL 0x2000
90 /************************************************************************/
91 /* Types for BoardType Identification
125 /************************************************************************/
126 /* Types for PaletteChipType Identification
130 PCT_S11483, // Sierra S11483: HiColor 15 bit, oMniBus, Domino
131 PCT_S15025, // Sierra S15025: TrueColor 32 bit, oMniBus
132 PCT_CirrusGD542x, // Cirrus GD542x internal: TrueColor 24 bit
133 PCT_Domino, // is in fact a Sierra S11483
134 PCT_BT482, // BrookTree BT482: TrueColor 32 bit, Merlin
135 PCT_Music, // Music MU9C4910: TrueColor 24 bit, oMniBus
136 PCT_ICS5300, // ICS 5300: ...., Retina BLT Z3
137 PCT_CirrusGD5446, // Cirrus GD5446 internal: TrueColor 24 bit
138 PCT_CirrusGD5434, // Cirrus GD5434 internal: TrueColor 32 bit
139 PCT_S3Trio64, // S3 Trio64 internal: TrueColor 32 bit
140 PCT_A2410_xxx, // A2410 DAC, *type unknown*
141 PCT_S3ViRGE, // S3 ViRGE internal: TrueColor 32 bit
142 PCT_3dfxVoodoo, // 3dfx Voodoo internal
143 PCT_TIPermedia2, // TexasInstruments TVP4020 Permedia2 internal
144 PCT_ATIRV100, // ATI Technologies Radeon/Radeon 7000 internal
149 PCT_MaxPaletteChipTypes
152 /************************************************************************/
153 /* Types for GraphicsControllerType Identification
173 GCT_MaxGraphicsControllerTypes
176 /************************************************************************/
178 #define RGBFF_PLANAR RGBFF_NONE
179 #define RGBFF_CHUNKY RGBFF_CLUT
181 #define RGBFB_PLANAR RGBFB_NONE
182 #define RGBFB_CHUNKY RGBFB_CLUT
184 /************************************************************************/
187 DPMS_ON, /* Full operation */
188 DPMS_STANDBY, /* Optional state of minimal power reduction */
189 DPMS_SUSPEND, /* Significant reduction of power consumption */
190 DPMS_OFF /* Lowest level of power consumption */
193 /************************************************************************/
201 struct ColorIndexMapping {
206 /************************************************************************/
215 /************************************************************************/
220 UBYTE XOffset; // 0 <= XOffset <= 15
226 /************************************************************************/
230 UWORD XOffset, YOffset;
232 UBYTE Size; // Width: 16, Height: (1<<pat_Size)
236 /************************************************************************/
242 WORD sDelta, lDelta, twoSDminusLD;
249 UWORD Xorigin, Yorigin;
252 /************************************************************************/
255 struct MinNode BoardNode;
256 struct BitMapExtra *HashChain;
258 struct BitMap *BitMap;
259 struct BoardInfo *BoardInfo;
261 struct RenderInfo RenderInfo;
265 WORD BaseLevel, CurrentLevel;
266 struct BitMapExtra *CompanionMaster;
269 /* BitMapExtra flags */
270 #define BMEF_ONBOARD 0x0001
271 #define BMEF_SPECIAL 0x0002
272 #define BMEF_VISIBLE 0x0800
273 #define BMEF_DISPLAYABLE 0x1000
274 #define BMEF_SPRITESAVED 0x2000
275 #define BMEF_CHECKSPRITE 0x4000
276 #define BMEF_INUSE 0x8000
278 /************************************************************************/
280 struct SpecialFeature {
282 struct BoardInfo *BoardInfo;
283 struct BitMap *BitMap;
289 SFT_INVALID, SFT_FLICKERFIXER, SFT_VIDEOCAPTURE, SFT_VIDEOWINDOW, SFT_MEMORYWINDOW
292 #define FA_Restore (TAG_USER+0) /* becomes visible again */
293 #define FA_Onboard (TAG_USER+1)
294 #define FA_Active (TAG_USER+2)
295 #define FA_Left (TAG_USER+3)
296 #define FA_Top (TAG_USER+4)
297 #define FA_Width (TAG_USER+5)
298 #define FA_Height (TAG_USER+6)
299 #define FA_Format (TAG_USER+7)
300 #define FA_Color (TAG_USER+8)
301 #define FA_Occlusion (TAG_USER+9)
302 #define FA_SourceWidth (TAG_USER+10)
303 #define FA_SourceHeight (TAG_USER+11)
304 #define FA_MinWidth (TAG_USER+12)
305 #define FA_MinHeight (TAG_USER+13)
306 #define FA_MaxWidth (TAG_USER+14)
307 #define FA_MaxHeight (TAG_USER+15)
308 #define FA_Interlace (TAG_USER+16)
309 #define FA_PAL (TAG_USER+17)
310 #define FA_BitMap (TAG_USER+18)
311 #define FA_Brightness (TAG_USER+19)
312 #define FA_ModeInfo (TAG_USER+20)
313 #define FA_ModeFormat (TAG_USER+21)
314 #define FA_Colors (TAG_USER+22)
315 #define FA_Colors32 (TAG_USER+23)
316 #define FA_NoMemory (TAG_USER+24)
317 #define FA_RenderFunc (TAG_USER+25)
318 #define FA_SaveFunc (TAG_USER+26)
319 #define FA_UserData (TAG_USER+27)
320 #define FA_Alignment (TAG_USER+28)
321 #define FA_ConstantBytesPerRow (TAG_USER+29)
322 #define FA_DoubleBuffer (TAG_USER+30)
323 #define FA_Pen (TAG_USER+31)
324 #define FA_ModeMemorySize (TAG_USER+32)
325 #define FA_ClipLeft (TAG_USER+33)
326 #define FA_ClipTop (TAG_USER+34)
327 #define FA_ClipWidth (TAG_USER+35)
328 #define FA_ClipHeight (TAG_USER+36)
329 #define FA_ConstantByteSwapping (TAG_USER+37)
331 /************************************************************************/
333 /* Tags for bi->AllocBitMap() */
335 #define ABMA_Friend (TAG_USER+0)
336 #define ABMA_Depth (TAG_USER+1)
337 #define ABMA_RGBFormat (TAG_USER+2)
338 #define ABMA_Clear (TAG_USER+3)
339 #define ABMA_Displayable (TAG_USER+4)
340 #define ABMA_Visible (TAG_USER+5)
341 #define ABMA_NoMemory (TAG_USER+6)
342 #define ABMA_NoSprite (TAG_USER+7)
343 #define ABMA_Colors (TAG_USER+8)
344 #define ABMA_Colors32 (TAG_USER+9)
345 #define ABMA_ModeWidth (TAG_USER+10)
346 #define ABMA_ModeHeight (TAG_USER+11)
347 #define ABMA_RenderFunc (TAG_USER+12)
348 #define ABMA_SaveFunc (TAG_USER+13)
349 #define ABMA_UserData (TAG_USER+14)
350 #define ABMA_Alignment (TAG_USER+15)
351 #define ABMA_ConstantBytesPerRow (TAG_USER+16)
352 #define ABMA_UserPrivate (TAG_USER+17)
353 #define ABMA_ConstantByteSwapping (TAG_USER+18)
355 * THOR: New for V45 Gfx/Intuiton
356 * "by accident", this is identically to SA_DisplayID of intuition
357 * resp. SA_Behind, SA_Colors, SA_Colors32
359 #define ABMA_DisplayID (TAG_USER + 32 + 0x12)
360 #define ABMA_BitmapInvisible (TAG_USER + 32 + 0x17)
361 #define ABMA_BitmapColors (TAG_USER + 32 + 0x09)
362 #define ABMA_BitmapColors32 (TAG_USER + 32 + 0x23)
364 /************************************************************************/
366 /* Tags for bi->GetBitMapAttr() */
368 #define GBMA_MEMORY (TAG_USER+0)
369 #define GBMA_BASEMEMORY (TAG_USER+1)
370 #define GBMA_BYTESPERROW (TAG_USER+2)
371 #define GBMA_BYTESPERPIXEL (TAG_USER+3)
372 #define GBMA_BITSPERPIXEL (TAG_USER+4)
373 #define GBMA_RGBFORMAT (TAG_USER+6)
374 #define GBMA_WIDTH (TAG_USER+7)
375 #define GBMA_HEIGHT (TAG_USER+8)
376 #define GBMA_DEPTH (TAG_USER+9)
378 /************************************************************************/
381 UBYTE *RegisterBase, *MemoryBase, *MemoryIOBase;
383 char *BoardName,VBIName[32];
384 struct CardBase *CardBase;
385 struct ChipBase *ChipBase;
386 struct ExecBase *ExecBase;
387 struct Library *UtilBase;
388 struct Interrupt HardInterrupt;
389 struct Interrupt SoftInterrupt;
390 struct SignalSemaphore BoardLock;
391 struct MinList ResolutionsList;
393 PCTYPE PaletteChipType;
394 GCTYPE GraphicsControllerType;
398 UWORD SoftSpriteFlags;
399 UWORD ChipFlags; // private, chip specific, not touched by RTG
400 ULONG CardFlags; // private, card specific, not touched by RTG
402 UWORD BoardNum; // set by rtg.library
405 UWORD MaxHorValue[MAXMODES];
406 UWORD MaxVerValue[MAXMODES];
407 UWORD MaxHorResolution[MAXMODES];
408 UWORD MaxVerResolution[MAXMODES];
409 ULONG MaxMemorySize, MaxChunkSize;
413 ULONG PixelClockCount[MAXMODES];
415 APTR ASM (*AllocCardMem)(__REGA0(struct BoardInfo *bi), __REGD0(ULONG size), __REGD1(BOOL force), __REGD2(BOOL system));
416 BOOL ASM (*FreeCardMem)(__REGA0(struct BoardInfo *bi), __REGA1(APTR membase));
418 BOOL ASM (*SetSwitch)(__REGA0(struct BoardInfo *), __REGD0(BOOL));
420 void ASM (*SetColorArray)(__REGA0(struct BoardInfo *), __REGD0(UWORD), __REGD1(UWORD));
422 void ASM (*SetDAC)(__REGA0(struct BoardInfo *), __REGD7(RGBFTYPE));
423 void ASM (*SetGC)(__REGA0(struct BoardInfo *), __REGA1(struct ModeInfo *), __REGD0(BOOL));
424 void ASM (*SetPanning)(__REGA0(struct BoardInfo *), __REGA1(UBYTE *), __REGD0(UWORD), __REGD1(WORD), __REGD2(WORD), __REGD7(RGBFTYPE));
425 UWORD ASM (*CalculateBytesPerRow)(__REGA0(struct BoardInfo *), __REGD0(UWORD), __REGD7(RGBFTYPE));
426 APTR ASM (*CalculateMemory)(__REGA0(struct BoardInfo *), __REGA1(APTR), __REGD7(RGBFTYPE));
427 ULONG ASM (*GetCompatibleFormats)(__REGA0(struct BoardInfo *), __REGD7(RGBFTYPE));
428 BOOL ASM (*SetDisplay)(__REGA0(struct BoardInfo *), __REGD0(BOOL));
430 LONG ASM (*ResolvePixelClock)(__REGA0(struct BoardInfo *), __REGA1(struct ModeInfo *), __REGD0(ULONG), __REGD7(RGBFTYPE));
431 ULONG ASM (*GetPixelClock)(__REGA0(struct BoardInfo *bi), __REGA1(struct ModeInfo *), __REGD0(ULONG), __REGD7(RGBFTYPE));
432 void ASM (*SetClock)(__REGA0(struct BoardInfo *));
434 void ASM (*SetMemoryMode)(__REGA0(struct BoardInfo *), __REGD7(RGBFTYPE));
435 void ASM (*SetWriteMask)(__REGA0(struct BoardInfo *), __REGD0(UBYTE));
436 void ASM (*SetClearMask)(__REGA0(struct BoardInfo *), __REGD0(UBYTE));
437 void ASM (*SetReadPlane)(__REGA0(struct BoardInfo *), __REGD0(UBYTE));
439 void ASM (*WaitVerticalSync)(__REGA0(struct BoardInfo *), __REGD0(BOOL));
440 BOOL ASM (*SetInterrupt)(__REGA0(struct BoardInfo *), __REGD0(BOOL));
442 void ASM (*WaitBlitter)(__REGA0(struct BoardInfo *));
444 void ASM (*ScrollPlanar)(__REGA0(struct BoardInfo *), __REGA1(struct RenderInfo *), __REGD0(UWORD), __REGD1(UWORD), __REGD2(UWORD), __REGD3(UWORD), __REGD4(UWORD), __REGD5(UWORD), __REGD6(UBYTE));
445 void ASM (*ScrollPlanarDefault)(__REGA0(struct BoardInfo *), __REGA1(struct RenderInfo *), __REGD0(UWORD), __REGD1(UWORD), __REGD2(UWORD), __REGD3(UWORD), __REGD4(UWORD), __REGD5(UWORD), __REGD6(UBYTE));
446 void ASM (*UpdatePlanar)(__REGA0(struct BoardInfo *), __REGA1(struct BitMap *), __REGA2(struct RenderInfo *), __REGD0(SHORT), __REGD1(SHORT), __REGD2(SHORT), __REGD3(SHORT), __REGD4(UBYTE));
447 void ASM (*UpdatePlanarDefault)(__REGA0(struct BoardInfo *), __REGA1(struct BitMap *), __REGA2(struct RenderInfo *), __REGD0(SHORT), __REGD1(SHORT), __REGD2(SHORT), __REGD3(SHORT), __REGD4(UBYTE));
448 void ASM (*BlitPlanar2Chunky)(__REGA0(struct BoardInfo *), __REGA1(struct BitMap *), __REGA2(struct RenderInfo *), __REGD0(SHORT), __REGD1(SHORT), __REGD2(SHORT), __REGD3(SHORT), __REGD4(SHORT), __REGD5(SHORT), __REGD6(UBYTE), __REGD7(UBYTE));
449 void ASM (*BlitPlanar2ChunkyDefault)(__REGA0(struct BoardInfo *), __REGA1(struct BitMap *), __REGA2(struct RenderInfo *), __REGD0(SHORT), __REGD1(SHORT), __REGD2(SHORT), __REGD3(SHORT), __REGD4(SHORT), __REGD5(SHORT), __REGD6(UBYTE), __REGD7(UBYTE));
451 void ASM (*FillRect)(__REGA0(struct BoardInfo *), __REGA1(struct RenderInfo *), __REGD0(WORD), __REGD1(WORD), __REGD2(WORD), __REGD3(WORD), __REGD4(ULONG), __REGD5(UBYTE), __REGD7(RGBFTYPE));
452 void ASM (*FillRectDefault)(__REGA0(struct BoardInfo *), __REGA1(struct RenderInfo *), __REGD0(WORD), __REGD1(WORD), __REGD2(WORD), __REGD3(WORD), __REGD4(ULONG), __REGD5(UBYTE), __REGD7(RGBFTYPE));
453 void ASM (*InvertRect)(__REGA0(struct BoardInfo *), __REGA1(struct RenderInfo *), __REGD0(WORD), __REGD1(WORD), __REGD2(WORD), __REGD3(WORD), __REGD4(UBYTE), __REGD7(RGBFTYPE));
454 void ASM (*InvertRectDefault)(__REGA0(struct BoardInfo *), __REGA1(struct RenderInfo *), __REGD0(WORD), __REGD1(WORD), __REGD2(WORD), __REGD3(WORD), __REGD4(UBYTE), __REGD7(RGBFTYPE));
455 void ASM (*BlitRect)(__REGA0(struct BoardInfo *), __REGA1(struct RenderInfo *), __REGD0(WORD), __REGD1(WORD), __REGD2(WORD), __REGD3(WORD), __REGD4(WORD), __REGD5(WORD), __REGD6(UBYTE), __REGD7(RGBFTYPE));
456 void ASM (*BlitRectDefault)(__REGA0(struct BoardInfo *), __REGA1(struct RenderInfo *), __REGD0(WORD), __REGD1(WORD), __REGD2(WORD), __REGD3(WORD), __REGD4(WORD), __REGD5(WORD), __REGD6(UBYTE), __REGD7(RGBFTYPE));
457 void ASM (*BlitTemplate)(__REGA0(struct BoardInfo *), __REGA1(struct RenderInfo *), __REGA2(struct Template *), __REGD0(WORD), __REGD1(WORD), __REGD2(WORD), __REGD3(WORD), __REGD4(UBYTE), __REGD7(RGBFTYPE));
458 void ASM (*BlitTemplateDefault)(__REGA0(struct BoardInfo *), __REGA1(struct RenderInfo *), __REGA2(struct Template *), __REGD0(WORD), __REGD1(WORD), __REGD2(WORD), __REGD3(WORD), __REGD4(UBYTE), __REGD7(RGBFTYPE));
459 void ASM (*BlitPattern)(__REGA0(struct BoardInfo *), __REGA1(struct RenderInfo *), __REGA2(struct Pattern *), __REGD0(WORD), __REGD1(WORD), __REGD2(WORD), __REGD3(WORD), __REGD4(UBYTE), __REGD7(RGBFTYPE));
460 void ASM (*BlitPatternDefault)(__REGA0(struct BoardInfo *), __REGA1(struct RenderInfo *), __REGA2(struct Pattern *), __REGD0(WORD), __REGD1(WORD), __REGD2(WORD), __REGD3(WORD), __REGD4(UBYTE), __REGD7(RGBFTYPE));
461 void ASM (*DrawLine)(__REGA0(struct BoardInfo *), __REGA1(struct RenderInfo *), __REGA2(struct Line *), __REGD0(UBYTE), __REGD7(RGBFTYPE));
462 void ASM (*DrawLineDefault)(__REGA0(struct BoardInfo *), __REGA1(struct RenderInfo *), __REGA2(struct Line *), __REGD0(UBYTE), __REGD7(RGBFTYPE));
463 void ASM (*BlitRectNoMaskComplete)(__REGA0(struct BoardInfo *), __REGA1(struct RenderInfo *), __REGA2(struct RenderInfo *), __REGD0(WORD), __REGD1(WORD), __REGD2(WORD), __REGD3(WORD), __REGD4(WORD), __REGD5(WORD), __REGD6(UBYTE), __REGD7(RGBFTYPE));
464 void ASM (*BlitRectNoMaskCompleteDefault)(__REGA0(struct BoardInfo *), __REGA1(struct RenderInfo *), __REGA2(struct RenderInfo *), __REGD0(WORD), __REGD1(WORD), __REGD2(WORD), __REGD3(WORD), __REGD4(WORD), __REGD5(WORD), __REGD6(UBYTE), __REGD7(RGBFTYPE));
465 void ASM (*BlitPlanar2Direct)(__REGA0(struct BoardInfo *), __REGA1(struct BitMap *), __REGA2(struct RenderInfo *), __REGA3(struct ColorIndexMapping *), __REGD0(SHORT), __REGD1(SHORT), __REGD2(SHORT), __REGD3(SHORT), __REGD4(SHORT), __REGD5(SHORT), __REGD6(UBYTE), __REGD7(UBYTE));
466 void ASM (*BlitPlanar2DirectDefault)(__REGA0(struct BoardInfo *), __REGA1(struct BitMap *), __REGA2(struct RenderInfo *), __REGA3(struct ColorIndexMapping *), __REGD0(SHORT), __REGD1(SHORT), __REGD2(SHORT), __REGD3(SHORT), __REGD4(SHORT), __REGD5(SHORT), __REGD6(UBYTE), __REGD7(UBYTE));
467 BOOL ASM (*EnableSoftSprite)(__REGA0(struct BoardInfo *),__REGD0(ULONG formatflags),__REGA1(struct ModeInfo *));
468 BOOL ASM (*EnableSoftSpriteDefault)(__REGA0(struct BoardInfo *),__REGD0(ULONG formatflags),__REGA1(struct ModeInfo *));
469 APTR ASM (*AllocCardMemAbs)(__REGA0(struct BoardInfo *),__REGD0(ULONG size), __REGA1(char *target));
470 void ASM (*SetSplitPosition)(__REGA0(struct BoardInfo *),__REGD0(SHORT));
471 void ASM (*ReInitMemory)(__REGA0(struct BoardInfo *),__REGD0(RGBFTYPE));
472 void ASM (*Reserved2Default)(__REGA0(struct BoardInfo *));
473 void ASM (*Reserved3)(__REGA0(struct BoardInfo *));
474 void ASM (*Reserved3Default)(__REGA0(struct BoardInfo *));
476 int ASM (*WriteYUVRect)(__REGA0(struct BoardInfo *), __REGA1(APTR), __REGD0(SHORT), __REGD1(SHORT), __REGA2(struct RenderInfo *), __REGD2(SHORT), __REGD3(SHORT), __REGD4(SHORT), __REGD5(SHORT), __REGA3(struct TagItem *));
477 int ASM (*WriteYUVRectDefault)(__REGA0(struct BoardInfo *), __REGA1(APTR), __REGD0(SHORT), __REGD1(SHORT), __REGA2(struct RenderInfo *), __REGD2(SHORT), __REGD3(SHORT), __REGD4(SHORT), __REGD5(SHORT), __REGA3(struct TagItem *));
479 BOOL ASM (*GetVSyncState)(__REGA0(struct BoardInfo *), __REGD0(BOOL));
480 ULONG ASM (*GetVBeamPos)(__REGA0(struct BoardInfo *));
481 void ASM (*SetDPMSLevel)(__REGA0(struct BoardInfo *), __REGD0(ULONG));
482 void ASM (*ResetChip)(__REGA0(struct BoardInfo *));
483 ULONG ASM (*GetFeatureAttrs)(__REGA0(struct BoardInfo *), __REGA1(APTR), __REGD0(ULONG), __REGA2(struct TagItem *));
485 struct BitMap * ASM (*AllocBitMap)(__REGA0(struct BoardInfo *), __REGD0(ULONG), __REGD1(ULONG), __REGA1(struct TagItem *));
486 BOOL ASM (*FreeBitMap)(__REGA0(struct BoardInfo *), __REGA1(struct BitMap *), __REGA2(struct TagItem *));
487 ULONG ASM (*GetBitMapAttr)(__REGA0(struct BoardInfo *), __REGA1(struct BitMap *), __REGD0(ULONG));
489 BOOL ASM (*SetSprite)(__REGA0(struct BoardInfo *), __REGD0(BOOL), __REGD7(RGBFTYPE));
490 void ASM (*SetSpritePosition)(__REGA0(struct BoardInfo *), __REGD0(WORD), __REGD1(WORD), __REGD7(RGBFTYPE));
491 void ASM (*SetSpriteImage)(__REGA0(struct BoardInfo *), __REGD7(RGBFTYPE));
492 void ASM (*SetSpriteColor)(__REGA0(struct BoardInfo *), __REGD0(UBYTE), __REGD1(UBYTE), __REGD2(UBYTE), __REGD3(UBYTE), __REGD7(RGBFTYPE));
494 APTR ASM (*CreateFeature)(__REGA0(struct BoardInfo *), __REGD0(ULONG), __REGA1(struct TagItem *));
495 ULONG ASM (*SetFeatureAttrs)(__REGA0(struct BoardInfo *), __REGA1(APTR), __REGD0(ULONG), __REGA2(struct TagItem *));
496 BOOL ASM (*DeleteFeature)(__REGA0(struct BoardInfo *), __REGA1(APTR), __REGD0(ULONG));
497 struct MinList SpecialFeatures;
499 struct ModeInfo *ModeInfo; /* Chip Settings Stuff */
507 struct CLUTEntry CLUT[256];
509 struct ViewPort *ViewPort; /* ViewPort Stuff */
510 struct BitMap *VisibleBitMap;
511 struct BitMapExtra *BitMapExtra;
512 struct MinList BitMapList;
513 struct MinList MemList;
516 WORD MouseY; /* Sprite Stuff */
523 struct Rectangle MouseRect;
525 UWORD *MouseRendered;
526 UBYTE *MouseSaveBuffer;
528 ULONG ChipData[16]; /* for chip driver needs */
529 ULONG CardData[16]; /* for card driver needs */
531 APTR MemorySpaceBase; /* the base address of the board memory address space */
532 ULONG MemorySpaceSize; /* size of that area */
534 APTR DoubleBufferList; /* chain of dbinfos being notified on vblanks */
536 struct timeval SyncTime; /* system time when screen was set up, used for pseudo vblanks */
537 ULONG SyncPeriod; /* length of one frame in micros */
538 struct MsgPort SoftVBlankPort; /* MsgPort for software emulation of board interrupt */
540 struct MinList WaitQ; /* for WaitTOF and WaitBOVP, all elements will be signaled on VBlank */
542 LONG EssentialFormats; /* these RGBFormats will be used when user does not choose "all"
543 will be filled by InitBoard() */
544 UBYTE *MouseImageBuffer; /* rendered to the destination color format */
545 /* Additional viewport stuff */
546 struct ViewPort *backViewPort; /* The view port visible on the screen behind */
547 struct BitMap *backBitMap; /* Its bitmap */
548 struct BitMapExtra *backExtra; /* its bitmapExtra */
550 ULONG MaxPlanarMemory; /* Size of a bitplane if planar. If left blank, MemorySize>>2 */
551 ULONG MaxBMWidth; /* Maximum width of a bitmap */
552 ULONG MaxBMHeight; /* Maximum height of a bitmap */
555 /* BoardInfo flags */
556 /* 0-15: hardware flags */
557 /* 16-31: user flags */
558 #define BIB_HARDWARESPRITE 0 /* board has hardware sprite */
559 #define BIB_NOMEMORYMODEMIX 1 /* board does not support modifying planar bitmaps while displaying chunky and vice versa */
560 #define BIB_NEEDSALIGNMENT 2 /* bitmaps have to be aligned (not yet supported!) */
561 #define BIB_CACHEMODECHANGE 3 /* board memory may be set to Imprecise (060) or Nonserialised (040) */
562 #define BIB_VBLANKINTERRUPT 4 /* board can cause a hardware interrupt on a vertical retrace */
563 #define BIB_HASSPRITEBUFFER 5 /* board has allocated memory for software sprite image and save buffer */
565 #define BIB_VGASCREENSPLIT 6 /* has a screen B with fixed screen position for split-screens */
567 #define BIB_DBLSCANDBLSPRITEY 8 /* hardware sprite y position is doubled on doublescan display modes */
568 #define BIB_ILACEHALFSPRITEY 9 /* hardware sprite y position is halved on interlace display modes */
569 #define BIB_ILACEDBLROWOFFSET 10 /* doubled row offset in interlaced display modes needs additional horizontal bit */
570 #define BIB_INTERNALMODESONLY 11 /* board creates its resolutions and modes automatically and does not support user setting files (UAE) */
571 #define BIB_FLICKERFIXER 12 /* board can flicker fix Amiga RGB signal */
572 #define BIB_VIDEOCAPTURE 13 /* board can capture video data to a memory area */
573 #define BIB_VIDEOWINDOW 14 /* board can display a second mem area as a pip */
574 #define BIB_BLITTER 15 /* board has blitter */
576 #define BIB_HIRESSPRITE 16 /* mouse sprite has double resolution */
577 #define BIB_BIGSPRITE 17 /* user wants big mouse sprite */
578 #define BIB_BORDEROVERRIDE 18 /* user wants to override system overscan border prefs */
579 #define BIB_BORDERBLANK 19 /* user wants border blanking */
580 #define BIB_INDISPLAYCHAIN 20 /* board switches Amiga signal */
581 #define BIB_QUIET 21 /* not yet implemented */
582 #define BIB_NOMASKBLITS 22 /* perform blits without taking care of mask */
583 #define BIB_NOP2CBLITS 23 /* use CPU for planar to chunky conversions */
584 #define BIB_NOBLITTER 24 /* disable all blitter functions */
585 #define BIB_SYSTEM2SCREENBLITS 25 /* allow data to be written to screen memory for cpu as blitter source */
586 #define BIB_GRANTDIRECTACCESS 26 /* all data on the board can be accessed at any time without bi->SetMemoryMode() */
588 #define BIB_OVERCLOCK 31 /* enable overclocking for some boards */
590 #define BIB_IGNOREMASK BIB_NOMASKBLITS
592 #define BIF_HARDWARESPRITE (1<<BIB_HARDWARESPRITE)
593 #define BIF_NOMEMORYMODEMIX (1<<BIB_NOMEMORYMODEMIX)
594 #define BIF_NEEDSALIGNMENT (1<<BIB_NEEDSALIGNMENT)
595 #define BIF_CACHEMODECHANGE (1<<BIB_CACHEMODECHANGE)
596 #define BIF_VBLANKINTERRUPT (1<<BIB_VBLANKINTERRUPT)
597 #define BIF_HASSPRITEBUFFER (1<<BIB_HASSPRITEBUFFER)
598 #define BIF_VGASCREENSPLIT (1<<BIB_VGASCREENSPLIT)
599 #define BIF_DBLSCANDBLSPRITEY (1<<BIB_DBLSCANDBLSPRITEY)
600 #define BIF_ILACEHALFSPRITEY (1<<BIB_ILACEHALFSPRITEY)
601 #define BIF_ILACEDBLROWOFFSET (1<<BIB_ILACEDBLROWOFFSET)
602 #define BIF_INTERNALMODESONLY (1<<BIB_INTERNALMODESONLY)
603 #define BIF_FLICKERFIXER (1<<BIB_FLICKERFIXER)
604 #define BIF_VIDEOCAPTURE (1<<BIB_VIDEOCAPTURE)
605 #define BIF_VIDEOWINDOW (1<<BIB_VIDEOWINDOW)
606 #define BIF_BLITTER (1<<BIB_BLITTER)
607 #define BIF_HIRESSPRITE (1<<BIB_HIRESSPRITE)
608 #define BIF_BIGSPRITE (1<<BIB_BIGSPRITE)
609 #define BIF_BORDEROVERRIDE (1<<BIB_BORDEROVERRIDE)
610 #define BIF_BORDERBLANK (1<<BIB_BORDERBLANK)
611 #define BIF_INDISPLAYCHAIN (1<<BIB_INDISPLAYCHAIN)
612 #define BIF_QUIET (1<<BIB_QUIET)
613 #define BIF_NOMASKBLITS (1<<BIB_NOMASKBLITS)
614 #define BIF_NOP2CBLITS (1<<BIB_NOP2CBLITS)
615 #define BIF_NOBLITTER (1<<BIB_NOBLITTER)
616 #define BIF_SYSTEM2SCREENBLITS (1<<BIB_SYSTEM2SCREENBLITS)
617 #define BIF_GRANTDIRECTACCESS (1<<BIB_GRANTDIRECTACCESS)
618 #define BIF_OVERCLOCK (1<<BIB_OVERCLOCK)
620 #define BIF_IGNOREMASK BIF_NOMASKBLITS
622 /* write errors, continued for historical reasons... :-) */
623 #define BIB_NOC2PBLITS BIB_NOP2CBLITS
624 #define BIF_NOC2PBLITS BIF_NOP2CBLITS
626 /************************************************************************/
629 struct Library LibBase;
633 struct ExecBase *ExecBase;
634 struct Library *ExpansionBase;
641 struct Library LibBase;
645 struct ExecBase *ExecBase;
650 /************************************************************************/
652 #define P96BD_BoardType (P96BD_Dummy+0x101)
653 #define P96BD_ChipType (P96BD_Dummy+0x102)
654 #define P96BD_DACType (P96BD_Dummy+0x103)
655 #define P96BD_CurrentScreenBitMap (P96BD_Dummy+0x104)
657 /************************************************************************/