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