2
This file is part of the Free Pascal run time library.
4
A file in Amiga system run time library.
5
Copyright (c) 1998-2003 by Nils Sjoholm
6
member of the Amiga RTL development team.
8
See the file COPYING.FPC, included in this distribution,
9
for details about the copyright.
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15
**********************************************************************}
26
They all had one argument(array_) defined as pchar,
27
should be pointer, fixed.
30
InitTmpRas had wrong define for the buffer arg.
31
Changed from pchar to PLANEPTR.
34
Compiler had problems with Text, changed to GText.
37
Added functions and procedures with array of const.
38
For use with fpc 1.0.7. They are in systemvartags.
41
Added the defines use_amiga_smartlink and
45
Update for AmifaOS 3.9.
46
Changed start code for unit.
47
Bugs in ChangeSprite, GetRGB32, LoadRGB32,
48
LoadRGB4 and PolyDraw, fixed.
51
Changed integer > smallint,
55
nils.sjoholm@mailbox.swipnet.se
59
{$I useamigasmartlink.inc}
60
{$ifdef use_amiga_smartlink}
62
{$endif use_amiga_smartlink}
68
uses exec, hardware, utility;
79
pRectangle = ^tRectangle;
105
Planes : Array [0..7] of PLANEPTR;
107
{* flags for AllocBitMap, etc. *}
115
BMF_CLEAR = (1 shl BMB_CLEAR);
116
BMF_DISPLAYABLE = (1 shl BMB_DISPLAYABLE);
117
BMF_INTERLEAVED = (1 shl BMB_INTERLEAVED);
118
BMF_STANDARD = (1 shl BMB_STANDARD);
119
BMF_MINPLANES = (1 shl BMB_MINPLANES);
121
{* the following are for GetBitMapAttr() *}
128
{ structures used by and constructed by windowlib.a }
129
{ understood by rom software }
131
pClipRect = ^tClipRect;
133
Next : pClipRect; { roms used to find next ClipRect }
134
prev : pClipRect; { ignored by roms, used by windowlib }
135
lobs : Pointer; { ignored by roms, used by windowlib (LayerPtr)}
137
bounds : tRectangle; { set up by windowlib, used by roms }
139
_p2 : Pointer; { system reserved }
140
reserved : Longint; { system use }
141
Flags : Longint; { only exists in layer allocation }
147
back : pLayer; { ignored by roms }
148
ClipRect : pClipRect; { read by roms to find first cliprect }
149
rp : Pointer; { (RastPortPtr) ignored by roms, I hope }
150
bounds : tRectangle; { ignored by roms }
151
reserved : Array [0..3] of Byte;
152
priority : Word; { system use only }
153
Flags : Word; { obscured ?, Virtual BitMap? }
154
SuperBitMap : pBitMap;
155
SuperClipRect : pClipRect; { super bitmap cliprects if
157
{ else damage cliprect list for refresh }
158
Window : Pointer; { reserved for user interface use }
163
crnew : pClipRect; { used by dedice }
164
SuperSaveClipRects : pClipRect; { preallocated cr's }
165
cliprects : pClipRect; { system use during refresh }
166
LayerInfo : Pointer; { points to head of the list }
167
Lock : tSignalSemaphore;
170
ClipRegion : Pointer;
171
saveClipRects : Pointer; { used to back out when in trouble}
174
reserved2 : Array [0..17] of Byte;
175
{ this must stay here }
176
DamageList : Pointer; { list of rectangles to refresh
182
{ internal cliprect flags }
184
CR_NEEDS_NO_CONCEALED_RASTERS = 1;
185
CR_NEEDS_NO_LAYERBLIT_DAMAGE = 2;
188
{ defines for code values for getcode }
196
{------ Font Styles ------------------------------------------------}
198
FS_NORMAL = 0; { normal text (no style bits set) }
199
FSB_EXTENDED = 3; { extended face (wider than normal) }
201
FSB_ITALIC = 2; { italic (slanted 1:2 right) }
203
FSB_BOLD = 1; { bold face text (ORed w/ shifted) }
205
FSB_UNDERLINED = 0; { underlined (under baseline) }
208
FSB_COLORFONT = 6; { this uses ColorTextFont structure }
210
FSB_TAGGED = 7; { the TextAttr is really an TTextAttr, }
214
{------ Font Flags -------------------------------------------------}
215
FPB_ROMFONT = 0; { font is in rom }
217
FPB_DISKFONT = 1; { font is from diskfont.library }
219
FPB_REVPATH = 2; { designed path is reversed (e.g. left) }
221
FPB_TALLDOT = 3; { designed for hires non-interlaced }
223
FPB_WIDEDOT = 4; { designed for lores interlaced }
225
FPB_PROPORTIONAL = 5; { character sizes can vary from nominal }
226
FPF_PROPORTIONAL = 32;
227
FPB_DESIGNED = 6; { size is "designed", not constructed }
229
FPB_REMOVED = 7; { the font has been removed }
232
{***** TextAttr node, matches text attributes in RastPort *********}
236
pTextAttr = ^tTextAttr;
238
ta_Name : STRPTR; { name of the font }
239
ta_YSize : Word; { height of the font }
240
ta_Style : Byte; { intrinsic font style }
241
ta_Flags : Byte; { font preferences and flags }
244
pTTextAttr = ^tTTextAttr;
246
tta_Name : STRPTR; { name of the font }
247
tta_YSize : Word; { height of the font }
248
tta_Style : Byte; { intrinsic font style }
249
tta_Flags : Byte; { font preferences AND flags }
250
tta_Tags : pTagItem; { extended attributes }
253
{***** Text Tags **************************************************}
255
TA_DeviceDPI = (1+TAG_USER); { Tag value is Point union: }
256
{ Hi Longint XDPI, Lo Longint YDPI }
258
MAXFONTMATCHWEIGHT = 32767; { perfect match from WeighTAMatch }
262
{***** TextFonts node *********************************************}
265
pTextFont = ^tTextFont;
267
tf_Message : tMessage; { reply message for font removal }
268
{ font name in LN \ used in this }
269
tf_YSize : Word; { font height | order to best }
270
tf_Style : Byte; { font style | match a font }
271
tf_Flags : Byte; { preferences and flags / request. }
272
tf_XSize : Word; { nominal font width }
273
tf_Baseline : Word; { distance from the top of char to baseline }
274
tf_BoldSmear : Word; { smear to affect a bold enhancement }
276
tf_Accessors : Word; { access count }
278
tf_LoChar : Byte; { the first character described here }
279
tf_HiChar : Byte; { the last character described here }
280
tf_CharData : Pointer; { the bit character data }
282
tf_Modulo : Word; { the row modulo for the strike font data }
283
tf_CharLoc : Pointer; { ptr to location data for the strike font }
284
{ 2 words: bit offset then size }
285
tf_CharSpace : Pointer; { ptr to words of proportional spacing data }
286
tf_CharKern : Pointer; { ptr to words of kerning data }
290
{----- tfe_Flags0 (partial definition) ----------------------------}
292
TE0B_NOREMFONT = 0; { disallow RemFont for this font }
293
TE0F_NOREMFONT = $01;
297
pTextFontExtension = ^tTextFontExtension;
298
tTextFontExtension = record { this structure is read-only }
299
tfe_MatchWord : Word; { a magic cookie for the extension }
300
tfe_Flags0 : Byte; { (system private flags) }
301
tfe_Flags1 : Byte; { (system private flags) }
302
tfe_BackPtr : pTextFont; { validation of compilation }
303
tfe_OrigReplyPort : pMsgPort; { original value in tf_Extension }
304
tfe_Tags : pTagItem; { Text Tags for the font }
305
tfe_OFontPatchS, { (system private use) }
306
tfe_OFontPatchK : Pointer; { (system private use) }
307
{ this space is reserved for future expansion }
310
{***** ColorTextFont node *****************************************}
311
{----- ctf_Flags --------------------------------------------------}
313
CT_COLORMASK = $000F; { mask to get to following color styles }
314
CT_COLORFONT = $0001; { color map contains designer's colors }
315
CT_GREYFONT = $0002; { color map describes even-stepped }
316
{ brightnesses from low to high }
317
CT_ANTIALIAS = $0004; { zero background thru fully saturated char }
319
CTB_MAPCOLOR = 0; { map ctf_FgColor to the rp_FgPen IF it's }
320
CTF_MAPCOLOR = $0001; { is a valid color within ctf_Low..ctf_High }
322
{----- ColorFontColors --------------------------------------------}
324
pColorFontColors = ^tColorFontColors;
325
tColorFontColors = record
326
cfc_Reserved, { *must* be zero }
327
cfc_Count : Word; { number of entries in cfc_ColorTable }
328
cfc_ColorTable : Pointer; { 4 bit per component color map packed xRGB }
331
{----- ColorTextFont ----------------------------------------------}
333
pColorTextFont = ^tColorTextFont;
334
tColorTextFont = record
336
ctf_Flags : Word; { extended flags }
337
ctf_Depth, { number of bit planes }
338
ctf_FgColor, { color that is remapped to FgPen }
339
ctf_Low, { lowest color represented here }
340
ctf_High, { highest color represented here }
341
ctf_PlanePick, { PlanePick ala Images }
342
ctf_PlaneOnOff : Byte; { PlaneOnOff ala Images }
343
ctf_ColorFontColors : pColorFontColors; { colors for font }
344
ctf_CharData : Array[0..7] of APTR; {pointers to bit planes ala tf_CharData }
347
{***** TextExtent node ********************************************}
349
pTextExtent = ^tTextExtent;
351
te_Width, { same as TextLength }
352
te_Height : Word; { same as tf_YSize }
353
te_Extent : tRectangle; { relative to CP }
359
COPPER_MOVE = 0; { pseude opcode for move #XXXX,dir }
360
COPPER_WAIT = 1; { pseudo opcode for wait y,x }
361
CPRNXTBUF = 2; { continue processing with next buffer }
362
CPR_NT_LOF = $8000; { copper instruction only for Longint frames }
363
CPR_NT_SHT = $4000; { copper instruction only for long frames }
364
CPR_NT_SYS = $2000; { copper user instruction only }
367
{ Note: The combination VWaitAddr and HWaitAddr replace a three way
368
union in C. The three possibilities are:
370
nxtList : CopListPtr; or
373
HWaitPos : Longint; or
381
OpCode : smallint; { 0 = move, 1 = wait }
382
VWaitAddr : smallint; { vertical or horizontal wait position }
383
HWaitData : smallint; { destination Pointer or data to send }
386
{ structure of cprlist that points to list that hardware actually executes }
388
pcprlist = ^tcprlist;
391
start : psmallint; { start of copper list }
392
MaxCount : smallint; { number of long instructions }
395
pCopList = ^tCopList;
397
Next : pCopList; { next block for this copper list }
398
CopList : pCopList; { system use }
399
ViewPort : Pointer; { system use }
400
CopIns : pCopIns; { start of this block }
401
CopPtr : pCopIns; { intermediate ptr }
402
CopLStart : psmallint; { mrgcop fills this in for Long Frame}
403
CopSStart : psmallint; { mrgcop fills this in for Longint Frame}
404
Count : smallint; { intermediate counter }
405
MaxCount : smallint; { max # of copins for this block }
406
DyOffset : smallint; { offset this copper list vertical waits }
411
pUCopList = ^tUCopList;
414
FirstCopList : pCopList; { head node of this copper list }
415
CopList : pCopList; { node in use }
418
pcopinit = ^tcopinit;
420
vsync_hblank : array [0..1] of word;
421
diagstrt : Array [0..11] of word;
422
fm0 : array [0..1] of word;
423
diwstart : array [0..9] of word;
424
bplcon2 : array [0..1] of word;
425
sprfix : array [0..(2*8)] of word;
426
sprstrtup : Array [0..(2*8*2)] of Word;
427
wait14 : array [0..1] of word;
428
norm_hblank : array [0..1] of word;
429
jump : array [0..1] of word;
430
wait_forever : array [0..5] of word;
431
sprstop : Array [0..7] of Word;
436
pAreaInfo = ^tAreaInfo;
438
VctrTbl : Pointer; { ptr to start of vector table }
439
VctrPtr : Pointer; { ptr to current vertex }
440
FlagTbl : Pointer; { ptr to start of vector flag table }
441
FlagPtr : Pointer; { ptrs to areafill flags }
442
Count : smallint; { number of vertices in list }
443
MaxCount : smallint; { AreaMove/Draw will not allow Count>MaxCount}
445
FirstY : smallint; { first point for this polygon }
454
{ unoptimized for 32bit alignment of pointers }
456
pGelsInfo = ^tGelsInfo;
458
sprRsrvd : Shortint; { flag of which sprites to reserve from
460
Flags : Byte; { system use }
462
gelTail : Pointer; { (VSpritePtr) dummy vSprites for list management}
464
{ pointer to array of 8 WORDS for sprite available lines }
468
{ pointer to array of 8 pointers for color-last-assigned to vSprites }
471
collHandler : Pointer; { (collTablePtr) Pointeres of collision routines }
475
bottommost : smallint;
477
lastBlissObj : Pointer; { system use only }
480
pRastPort = ^tRastPort;
482
Layer : pLayer; { LayerPtr }
483
BitMap : pBitMap; { BitMapPtr }
484
AreaPtrn : Pointer; { ptr to areafill pattern }
486
AreaInfo : pAreaInfo;
487
GelsInfo : pGelsInfo;
488
Mask : Byte; { write mask for this raster }
489
FgPen : Shortint; { foreground pen for this raster }
490
BgPen : Shortint; { background pen }
491
AOlPen : Shortint; { areafill outline pen }
492
DrawMode : Shortint; { drawing mode for fill, lines, and text }
493
AreaPtSz : Shortint; { 2^n words for areafill pattern }
494
linpatcnt : Shortint; { current line drawing pattern preshift }
496
Flags : Word; { miscellaneous control bits }
497
LinePtrn : Word; { 16 bits for textured lines }
499
cp_y : smallint; { current pen position }
500
minterms : Array [0..7] of Byte;
502
PenHeight : smallint;
503
Font : pTextFont; { (TextFontPtr) current font Pointer }
504
AlgoStyle : Byte; { the algorithmically generated style }
505
TxFlags : Byte; { text specific flags }
506
TxHeight : Word; { text height }
507
TxWidth : Word; { text nominal width }
508
TxBaseline : Word; { text baseline }
509
TxSpacing : smallint; { text spacing (per character) }
511
longreserved : Array [0..1] of ULONG;
512
wordreserved : Array [0..6] of Word; { used to be a node }
513
reserved : Array [0..7] of Byte; { for future use }
520
JAM1 = 0; { jam 1 color into raster }
521
JAM2 = 1; { jam 2 colors into raster }
522
COMPLEMENT = 2; { XOR bits into raster }
523
INVERSVID = 4; { inverse video for drawing modes }
525
{ these are the flag bits for RastPort flags }
527
FRST_DOT = $01; { draw the first dot of this line ? }
528
ONE_DOT = $02; { use one dot mode for drawing lines }
529
DBUFFER = $04; { flag set when RastPorts are double-buffered }
531
{ only used for bobs }
533
AREAOUTLINE = $08; { used by areafiller }
534
NOCROSSFILL = $20; { areafills have no crossovers }
536
{ there is only one style of clipping: raster clipping }
537
{ this preserves the continuity of jaggies regardless of clip window }
538
{ When drawing into a RastPort, if the ptr to ClipRect is nil then there }
539
{ is no clipping done, this is dangerous but useful for speed }
546
BltClearWait = 1; { Waits for blit to finish }
547
BltClearXY = 2; { Use Row/Bytes per row method }
551
StraightCopy = $C0; { Vanilla copy }
552
InvertAndCopy = $30; { Invert the source before copy }
553
InvertDest = $50; { Forget source, invert dest }
556
{ mode coercion definitions }
559
{ These flags are passed (in combination) to CoerceMode() to determine the
560
* type of coercion required.
563
{ Ensure that the mode coerced to can display just as many colours as the
564
* ViewPort being coerced.
568
{ Ensure that the mode coerced to is not interlaced. }
571
{ Coercion should ignore monitor compatibility issues. }
575
BIDTAG_COERCE = 1; { Private }
580
{ user-set VSprite flags: }
582
SUSERFLAGS = $00FF; { mask of all user-settable VSprite-flags }
583
VSPRITE_f = $0001; { set if VSprite, clear if Bob }
584
{ VSPRITE had to be changed for name conflict }
585
SAVEBACK = $0002; { set if background is to be saved/restored }
586
OVERLAY = $0004; { set to mask image of Bob onto background }
587
MUSTDRAW = $0008; { set if VSprite absolutely must be drawn }
589
{ system-set VSprite flags: }
591
BACKSAVED = $0100; { this Bob's background has been saved }
592
BOBUPDATE = $0200; { temporary flag, useless to outside world }
593
GELGONE = $0400; { set if gel is completely clipped (offscreen) }
594
VSOVERFLOW = $0800; { VSprite overflow (if MUSTDRAW set we draw!) }
597
{ these are the user flag bits }
599
BUSERFLAGS = $00FF; { mask of all user-settable Bob-flags }
600
SAVEBOB = $0001; { set to not erase Bob }
601
BOBISCOMP = $0002; { set to identify Bob as AnimComp }
603
{ these are the system flag bits }
605
BWAITING = $0100; { set while Bob is waiting on 'after' }
606
BDRAWN = $0200; { set when Bob is drawn this DrawG pass}
607
BOBSAWAY = $0400; { set to initiate removal of Bob }
608
BOBNIX = $0800; { set when Bob is completely removed }
609
SAVEPRESERVE = $1000; { for back-restore during double-buffer}
610
OUTSTEP = $2000; { for double-clearing if double-buffer }
612
{ defines for the animation procedures }
619
{ UserStuff definitions
620
* the user can define these to be a single variable or a sub-structure
621
* if undefined by the user, the system turns these into innocuous variables
622
* see the manual for a thorough definition of the UserStuff definitions
628
VUserStuff = smallint; { Sprite user stuff }
629
BUserStuff = smallint; { Bob user stuff }
630
AUserStuff = smallint; { AnimOb user stuff }
632
{********************** GEL STRUCTURES **********************************}
634
pVSprite = ^tVSprite;
637
{ --------------------- SYSTEM VARIABLES ------------------------------- }
638
{ GEL linked list forward/backward pointers sorted by y,x value }
640
NextVSprite : pVSprite;
641
PrevVSprite : pVSprite;
643
{ GEL draw list constructed in the order the Bobs are actually drawn, then
644
* list is copied to clear list
645
* must be here in VSprite for system boundary detection
648
DrawPath : pVSprite; { pointer of overlay drawing }
649
ClearPath : pVSprite; { pointer for overlay clearing }
651
{ the VSprite positions are defined in (y,x) order to make sorting
652
* sorting easier, since (y,x) as a long Longint
655
OldY, OldX : smallint; { previous position }
657
{ --------------------- COMMON VARIABLES --------------------------------- }
659
Flags : smallint; { VSprite flags }
662
{ --------------------- USER VARIABLES ----------------------------------- }
663
{ the VSprite positions are defined in (y,x) order to make sorting
664
* sorting easier, since (y,x) as a long Longint
667
Y, X : smallint; { screen position }
670
Width : smallint; { number of words per row of image data }
671
Depth : smallint; { number of planes of data }
673
MeMask : smallint; { which types can collide with this VSprite}
674
HitMask : smallint; { which types this VSprite can collide with}
676
ImageData : Pointer; { pointer to VSprite image }
678
{ borderLine is the one-dimensional logical OR of all
679
* the VSprite bits, used for fast collision detection of edge
682
BorderLine : Pointer; { logical OR of all VSprite bits }
683
CollMask : Pointer; { similar to above except this is a matrix }
685
{ pointer to this VSprite's color definitions (not used by Bobs) }
689
VSBob : Pointer; { (BobPtr) points home if this VSprite
692
{ planePick flag: set bit selects a plane from image, clear bit selects
693
* use of shadow mask for that plane
694
* OnOff flag: if using shadow mask to fill plane, this bit (corresponding
695
* to bit in planePick) describes whether to fill with 0's or 1's
696
* There are two uses for these flags:
697
* - if this is the VSprite of a Bob, these flags describe how the Bob
698
* is to be drawn into memory
699
* - if this is a simple VSprite and the user intends on setting the
700
* MUSTDRAW flag of the VSprite, these flags must be set too to describe
701
* which color registers the user wants for the image
704
PlanePick : Shortint;
705
PlaneOnOff : Shortint;
707
VUserExt : VUserStuff; { user definable: see note above }
713
{ dBufPacket defines the values needed to be saved across buffer to buffer
714
* when in double-buffer mode
717
pDBufPacket = ^tDBufPacket;
720
BufX : Word; { save other buffers screen coordinates }
721
BufPath : pVSprite; { carry the draw path over the gap }
723
{ these pointers must be filled in by the user }
724
{ pointer to other buffer's background save buffer }
737
{ --------------------- SYSTEM VARIABLES --------------------------------- }
739
{ --------------------- COMMON VARIABLES --------------------------------- }
741
Flags : smallint; { general purpose flags (see definitions below) }
743
{ --------------------- USER VARIABLES ----------------------------------- }
745
SaveBuffer : Pointer; { pointer to the buffer for background save }
747
{ used by Bobs for "cookie-cutting" and multi-plane masking }
749
ImageShadow : Pointer;
751
{ pointer to BOBs for sequenced drawing of Bobs
752
* for correct overlaying of multiple component animations
754
Before : pBob; { draw this Bob before Bob pointed to by before }
755
After : pBob; { draw this Bob after Bob pointed to by after }
757
BobVSprite : pVSprite; { this Bob's VSprite definition }
759
BobComp : Pointer; { (AnimCompPtr) pointer to this Bob's AnimComp def }
761
DBuffer : Pointer; { pointer to this Bob's dBuf packet }
763
BUserExt : BUserStuff; { Bob user extension }
766
pAnimComp = ^tAnimComp;
769
{ --------------------- SYSTEM VARIABLES --------------------------------- }
771
{ --------------------- COMMON VARIABLES --------------------------------- }
773
Flags : smallint; { AnimComp flags for system & user }
775
{ timer defines how long to keep this component active:
776
* if set non-zero, timer decrements to zero then switches to nextSeq
777
* if set to zero, AnimComp never switches
782
{ --------------------- USER VARIABLES ----------------------------------- }
783
{ initial value for timer when the AnimComp is activated by the system }
787
{ pointer to next and previous components of animation object }
789
NextComp : pAnimComp;
790
PrevComp : pAnimComp;
792
{ pointer to component component definition of next image in sequence }
797
AnimCRoutine : Pointer; { Pointer of special animation procedure }
799
YTrans : smallint; { initial y translation (if this is a component) }
800
XTrans : smallint; { initial x translation (if this is a component) }
802
HeadOb : Pointer; { AnimObPtr }
810
{ --------------------- SYSTEM VARIABLES --------------------------------- }
815
{ number of calls to Animate this AnimOb has endured }
820
AnOldX : smallint; { old y,x coordinates }
822
{ --------------------- COMMON VARIABLES --------------------------------- }
825
AnX : smallint; { y,x coordinates of the AnimOb }
827
{ --------------------- USER VARIABLES ----------------------------------- }
830
XVel : smallint; { velocities of this object }
832
XAccel : smallint; { accelerations of this object }
835
RingXTrans : smallint; { ring translation values }
837
AnimORoutine : Pointer; { Pointer of special animation
840
HeadComp : pAnimComp; { pointer to first component }
842
AUserExt : AUserStuff; { AnimOb user extension }
848
{ ************************************************************************ }
856
{ ************************************************************************ }
860
{ a structure to contain the 16 collision procedure addresses }
862
collTable = Array [0..15] of Pointer;
863
pcollTable = ^collTable;
867
{ These bit descriptors are used by the GEL collide routines.
868
* These bits are set in the hitMask and meMask variables of
869
* a GEL to describe whether or not these types of collisions
870
* can affect the GEL. BNDRY_HIT is described further below;
871
* this bit is permanently assigned as the boundary-hit flag.
872
* The other bit GEL_HIT is meant only as a default to cover
873
* any GEL hitting any other; the user may redefine this bit.
878
{ These bit descriptors are used by the GEL boundry hit routines.
879
* When the user's boundry-hit routine is called (via the argument
880
* set by a call to SetCollision) the first argument passed to
881
* the user's routine is the Pointer of the GEL involved in the
882
* boundry-hit, and the second argument has the appropriate bit(s)
883
* set to describe which boundry was surpassed
892
pExtendedNode = ^tExtendedNode;
893
tExtendedNode = record
899
xln_Subsystem : Byte;
901
xln_Library : Longint;
909
VIEWPORT_EXTRA_TYPE = 2;
910
SPECIAL_MONITOR_TYPE = 3;
911
MONITOR_SPEC_TYPE = 4;
915
{ structure used by AddTOFTask }
917
pIsrvstr = ^tIsrvstr;
920
Iptr : pIsrvstr; { passed to srvr by os }
927
pAnalogSignalInterval = ^tAnalogSignalInterval;
928
tAnalogSignalInterval = record
933
pSpecialMonitor = ^tSpecialMonitor;
934
tSpecialMonitor = record
935
spm_Node : tExtendedNode;
944
vsync : tAnalogSignalInterval;
948
pMonitorSpec = ^tMonitorSpec;
949
tMonitorSpec = record
950
ms_Node : tExtendedNode;
956
DeniseMaxDisplayColumn,
959
ms_Special : pSpecialMonitor;
966
ms_LegalView : tRectangle;
967
ms_maxoscan, { maximum legal overscan }
968
ms_videoscan : Pointer; { video display overscan }
969
DeniseMinDisplayColumn : Word;
970
DisplayCompatible : ULONG;
971
DisplayInfoDataBase : tList;
972
DisplayInfoDataBaseSemaphore : tSignalSemaphore;
975
ms_KillView : Longint;
981
STANDARD_XOFFSET = 9;
982
STANDARD_YOFFSET = 0;
984
MSB_REQUEST_NTSC = 0;
986
MSB_REQUEST_SPECIAL = 2;
987
MSB_REQUEST_A2024 = 3;
988
MSB_DOUBLE_SPRITES = 4;
989
MSF_REQUEST_NTSC = 1;
991
MSF_REQUEST_SPECIAL = 4;
992
MSF_REQUEST_A2024 = 8;
993
MSF_DOUBLE_SPRITES = 16;
996
{ obsolete, v37 compatible definitions follow }
1002
DEFAULT_MONITOR_NAME : PChar = 'default.monitor';
1003
NTSC_MONITOR_NAME : PChar = 'ntsc.monitor';
1004
PAL_MONITOR_NAME : PChar = 'pal.monitor';
1005
STANDARD_MONITOR_MASK = ( REQUEST_NTSC OR REQUEST_PAL ) ;
1007
STANDARD_NTSC_ROWS = 262;
1008
STANDARD_PAL_ROWS = 312;
1009
STANDARD_COLORCLOCKS = 226;
1010
STANDARD_DENISE_MAX = 455;
1011
STANDARD_DENISE_MIN = 93 ;
1012
STANDARD_NTSC_BEAMCON = $0000;
1013
STANDARD_PAL_BEAMCON = DISPLAYPAL ;
1015
SPECIAL_BEAMCON = ( VARVBLANK OR LOLDIS OR VARVSYNC OR VARHSYNC OR VARBEAM OR CSBLANK OR VSYNCTRUE);
1019
STANDARD_VIEW_X = $81 ;
1020
STANDARD_VIEW_Y = $2C ;
1021
STANDARD_HBSTRT = $06 ;
1022
STANDARD_HSSTRT = $0B ;
1023
STANDARD_HSSTOP = $1C ;
1024
STANDARD_HBSTOP = $2C ;
1025
STANDARD_VBSTRT = $0122;
1026
STANDARD_VSSTRT = $02A6;
1027
STANDARD_VSSTOP = $03AA;
1028
STANDARD_VBSTOP = $1066;
1030
VGA_COLORCLOCKS = (STANDARD_COLORCLOCKS/2);
1031
VGA_TOTAL_ROWS = (STANDARD_NTSC_ROWS*2);
1032
VGA_DENISE_MIN = 59 ;
1043
VGA_MONITOR_NAME : PChar = 'vga.monitor';
1045
{ NOTE: VGA70 definitions are obsolete - a VGA70 monitor has never been
1048
VGA70_COLORCLOCKS = (STANDARD_COLORCLOCKS/2) ;
1049
VGA70_TOTAL_ROWS = 449;
1050
VGA70_DENISE_MIN = 59;
1051
MIN_VGA70_ROW = 35 ;
1052
VGA70_HBSTRT = $08 ;
1053
VGA70_HSSTRT = $0E ;
1054
VGA70_HSSTOP = $1C ;
1055
VGA70_HBSTOP = $1E ;
1056
VGA70_VBSTRT = $0000;
1057
VGA70_VSSTRT = $02A6;
1058
VGA70_VSSTOP = $0388;
1059
VGA70_VBSTOP = $0F73;
1061
VGA70_BEAMCON = (SPECIAL_BEAMCON XOR VSYNCTRUE);
1062
VGA70_MONITOR_NAME : PChar = 'vga70.monitor';
1064
BROADCAST_HBSTRT = $01 ;
1065
BROADCAST_HSSTRT = $06 ;
1066
BROADCAST_HSSTOP = $17 ;
1067
BROADCAST_HBSTOP = $27 ;
1068
BROADCAST_VBSTRT = $0000;
1069
BROADCAST_VSSTRT = $02A6;
1070
BROADCAST_VSSTOP = $054C;
1071
BROADCAST_VBSTOP = $1C40;
1072
BROADCAST_BEAMCON = ( LOLDIS OR CSBLANK );
1073
RATIO_FIXEDPART = 4;
1079
pRasInfo = ^tRasInfo;
1080
tRasInfo = record { used by callers to and InitDspC() }
1081
Next : pRasInfo; { used for dualpf }
1084
RyOffset : smallint; { scroll offsets in this BitMap }
1090
ViewPort : Pointer; { ViewPortPtr }
1091
LOFCprList : pcprlist; { used for interlaced and noninterlaced }
1092
SHFCprList : pcprlist; { only used during interlace }
1094
DxOffset : smallint; { for complete View positioning }
1095
{ offsets are +- adjustments to standard #s }
1096
Modes : WORD; { such as INTERLACE, GENLOC }
1099
{ these structures are obtained via GfxNew }
1100
{ and disposed by GfxFree }
1102
pViewExtra = ^tViewExtra;
1105
View : pView; { backwards link } { view in C-Includes }
1106
Monitor : pMonitorSpec; { monitors for this view }
1111
pViewPort = ^tViewPort;
1114
ColorMap : Pointer; { table of colors for this viewport } { ColorMapPtr }
1115
{ if this is nil, MakeVPort assumes default values }
1116
DspIns : pCopList; { user by MakeView() }
1117
SprIns : pCopList; { used by sprite stuff }
1118
ClrIns : pCopList; { used by sprite stuff }
1119
UCopIns : pUCopList; { User copper list }
1123
DyOffset : smallint;
1125
SpritePriorities : Byte; { used by makevp }
1131
{ this structure is obtained via GfxNew }
1132
{ and disposed by GfxFree }
1134
pViewPortExtra = ^tViewPortExtra;
1135
tViewPortExtra = record
1137
ViewPort : pViewPort; { backwards link } { ViewPort in C-Includes }
1138
DisplayClip : tRectangle; { makevp display clipping information }
1139
{ These are added for V39 }
1140
VecTable : Pointer; { Private }
1141
DriverData : Array[0..1] of Pointer;
1143
Origin : Array[0..1] of tPoint; { First visible point relative to the DClip.
1144
* One for each possible playfield.
1146
cop1ptr, { private }
1147
cop2ptr : ULONG; { private }
1151
pColorMap = ^tColorMap;
1154
CType : Byte; { This is "Type" in C includes }
1156
ColorTable : Pointer;
1157
cm_vpe : pViewPortExtra;
1158
LowColorBits : Pointer;
1163
cm_vp : pViewPort; { ViewPortPtr }
1165
CoerceDisplayInfo : Pointer;
1166
cm_batch_items : pTagItem;
1175
{ if Type == 0 then ColorMap is V1.2/V1.3 compatible }
1176
{ if Type != 0 then ColorMap is V36 compatible }
1177
{ the system will never create other than V39 type colormaps when running V39 }
1180
COLORMAP_TYPE_V1_2 = $00;
1181
COLORMAP_TYPE_V1_4 = $01;
1182
COLORMAP_TYPE_V36 = COLORMAP_TYPE_V1_4; { use this definition }
1183
COLORMAP_TYPE_V39 = $02;
1187
COLORMAP_TRANSPARENCY = $01;
1188
COLORPLANE_TRANSPARENCY = $02;
1189
BORDER_BLANKING = $04;
1190
BORDER_NOTRANSPARENCY = $08;
1191
VIDEOCONTROL_BATCH = $10;
1192
USER_COPPER_CLIP = $20;
1196
EXTEND_VSTRUCT = $1000; { unused bit in Modes field of View }
1199
{ defines used for Modes in IVPargs }
1202
GENLOCK_VIDEO = $0002;
1206
EXTRA_HALFBRITE= $0080;
1207
GENLOCK_AUDIO = $0100;
1210
EXTENDED_MODE = $1000;
1219
BORDERSPRITES = $40;
1228
{ ^140ns, except in 35ns viewport, where it is 70ns. }
1229
SPRITERESN_140NS = 1;
1230
SPRITERESN_70NS = 2;
1231
SPRITERESN_35NS = 3;
1232
SPRITERESN_DEFAULT = -1;
1235
CMAB_FULLPALETTE = 0;
1236
CMAF_FULLPALETTE = 1;
1237
CMAB_NO_INTERMED_UPDATE = 1;
1238
CMAF_NO_INTERMED_UPDATE = 2;
1239
CMAB_NO_COLOR_LOAD = 2;
1240
CMAF_NO_COLOR_LOAD = 4;
1241
CMAB_DUALPF_DISABLE = 3;
1242
CMAF_DUALPF_DISABLE = 8;
1245
pPaletteExtra = ^tPaletteExtra;
1246
tPaletteExtra = record { structure may be extended so watch out! }
1247
pe_Semaphore : tSignalSemaphore; { shared semaphore for arbitration }
1248
pe_FirstFree, { *private* }
1249
pe_NFree, { number of free colors }
1250
pe_FirstShared, { *private* }
1251
pe_NShared : WORD; { *private* }
1252
pe_RefCnt : Pointer; { *private* }
1253
pe_AllocList : Pointer; { *private* }
1254
pe_ViewPort : pViewPort; { back pointer to viewport }
1255
pe_SharableColors : WORD; { the number of sharable colors. }
1257
{ flags values for ObtainPen }
1260
PENB_NO_SETCOLOR = 1;
1263
PENF_NO_SETCOLOR = 2;
1265
{ obsolete names for PENF_xxx flags: }
1267
PEN_EXCLUSIVE = PENF_EXCLUSIVE;
1268
PEN_NO_SETCOLOR = PENF_NO_SETCOLOR;
1270
{ precision values for ObtainBestPen : }
1272
PRECISION_EXACT = -1;
1273
PRECISION_IMAGE = 0;
1274
PRECISION_ICON = 16;
1278
{ tags for ObtainBestPen: }
1279
OBP_Precision = $84000000;
1280
OBP_FailIfBad = $84000001;
1282
{ From V39, MakeVPort() will return an error if there is not enough memory,
1283
* or the requested mode cannot be opened with the requested depth with the
1284
* given bitmap (for higher bandwidth alignments).
1287
MVP_OK = 0; { you want to see this one }
1288
MVP_NO_MEM = 1; { insufficient memory for intermediate workspace }
1289
MVP_NO_VPE = 2; { ViewPort does not have a ViewPortExtra, and
1290
* insufficient memory to allocate a temporary one.
1292
MVP_NO_DSPINS = 3; { insufficient memory for intermidiate copper
1295
MVP_NO_DISPLAY = 4; { BitMap data is misaligned for this viewport's
1296
* mode and depth - see AllocBitMap().
1298
MVP_OFF_BOTTOM = 5; { PRIVATE - you will never see this. }
1300
{ From V39, MrgCop() will return an error if there is not enough memory,
1301
* or for some reason MrgCop() did not need to make any copper lists.
1304
MCOP_OK = 0; { you want to see this one }
1305
MCOP_NO_MEM = 1; { insufficient memory to allocate the system
1308
MCOP_NOP = 2; { MrgCop() did not merge any copper lists
1309
* (eg, no ViewPorts in the list, or all marked as
1313
pDBufInfo = ^tDBufInfo;
1315
dbi_Link1 : Pointer;
1317
dbi_SafeMessage : tMessage; { replied to when safe to write to old bitmap }
1318
dbi_UserData1 : Pointer; { first user data }
1320
dbi_Link2 : Pointer;
1322
dbi_DispMessage : tMessage; { replied to when new bitmap has been displayed at least
1324
dbi_UserData2 : Pointer; { second user data }
1325
dbi_MatchLong : ULONG;
1328
dbi_CopPtr3 : Pointer;
1330
dbi_BeamPos2 : WORD;
1335
{ include define file for graphics display mode IDs. }
1342
{ With all the new modes that are available under V38 and V39, it is highly
1343
* recommended that you use either the asl.library screenmode requester,
1344
* and/or the V39 graphics.library function BestModeIDA().
1346
* DO NOT interpret the any of the bits in the ModeID for its meaning. For
1347
* example, do not interpret bit 3 ($4) as meaning the ModeID is interlaced.
1348
* Instead, use GetDisplayInfoData() with DTAG_DISP, and examine the DIPF_...
1349
* flags to determine a ModeID's characteristics. The only exception to
1350
* this rule is that bit 7 ($80) will always mean the ModeID is
1351
* ExtraHalfBright, and bit 11 ($800) will always mean the ModeID is HAM.
1354
{ normal identifiers }
1356
MONITOR_ID_MASK = $FFFF1000;
1358
DEFAULT_MONITOR_ID = $00000000;
1359
NTSC_MONITOR_ID = $00011000;
1360
PAL_MONITOR_ID = $00021000;
1362
{ the following 22 composite keys are for Modes on the default Monitor.
1363
* NTSC & PAL "flavors" of these particular keys may be made by or'ing
1364
* the NTSC or PAL MONITOR_ID with the desired MODE_KEY...
1366
* For example, to specifically open a PAL HAM interlaced ViewPort
1367
* (or intuition screen), you would use the modeid of
1368
* (PAL_MONITOR_ID OR HAMLACE_KEY)
1371
LORES_KEY = $00000000;
1372
HIRES_KEY = $00008000;
1373
SUPER_KEY = $00008020;
1374
HAM_KEY = $00000800;
1375
LORESLACE_KEY = $00000004;
1376
HIRESLACE_KEY = $00008004;
1377
SUPERLACE_KEY = $00008024;
1378
HAMLACE_KEY = $00000804;
1379
LORESDPF_KEY = $00000400;
1380
HIRESDPF_KEY = $00008400;
1381
SUPERDPF_KEY = $00008420;
1382
LORESLACEDPF_KEY = $00000404;
1383
HIRESLACEDPF_KEY = $00008404;
1384
SUPERLACEDPF_KEY = $00008424;
1385
LORESDPF2_KEY = $00000440;
1386
HIRESDPF2_KEY = $00008440;
1387
SUPERDPF2_KEY = $00008460;
1388
LORESLACEDPF2_KEY = $00000444;
1389
HIRESLACEDPF2_KEY = $00008444;
1390
SUPERLACEDPF2_KEY = $00008464;
1391
EXTRAHALFBRITE_KEY = $00000080;
1392
EXTRAHALFBRITELACE_KEY = $00000084;
1393
{ New for AA ChipSet (V39) }
1394
HIRESHAM_KEY = $00008800;
1395
SUPERHAM_KEY = $00008820;
1396
HIRESEHB_KEY = $00008080;
1397
SUPEREHB_KEY = $000080a0;
1398
HIRESHAMLACE_KEY = $00008804;
1399
SUPERHAMLACE_KEY = $00008824;
1400
HIRESEHBLACE_KEY = $00008084;
1401
SUPEREHBLACE_KEY = $000080a4;
1402
{ Added for V40 - may be useful modes for some games or animations. }
1403
LORESSDBL_KEY = $00000008;
1404
LORESHAMSDBL_KEY = $00000808;
1405
LORESEHBSDBL_KEY = $00000088;
1406
HIRESHAMSDBL_KEY = $00008808;
1411
VGA_MONITOR_ID = $00031000;
1413
VGAEXTRALORES_KEY = $00031004;
1414
VGALORES_KEY = $00039004;
1415
VGAPRODUCT_KEY = $00039024;
1416
VGAHAM_KEY = $00031804;
1417
VGAEXTRALORESLACE_KEY = $00031005;
1418
VGALORESLACE_KEY = $00039005;
1419
VGAPRODUCTLACE_KEY = $00039025;
1420
VGAHAMLACE_KEY = $00031805;
1421
VGAEXTRALORESDPF_KEY = $00031404;
1422
VGALORESDPF_KEY = $00039404;
1423
VGAPRODUCTDPF_KEY = $00039424;
1424
VGAEXTRALORESLACEDPF_KEY = $00031405;
1425
VGALORESLACEDPF_KEY = $00039405;
1426
VGAPRODUCTLACEDPF_KEY = $00039425;
1427
VGAEXTRALORESDPF2_KEY = $00031444;
1428
VGALORESDPF2_KEY = $00039444;
1429
VGAPRODUCTDPF2_KEY = $00039464;
1430
VGAEXTRALORESLACEDPF2_KEY = $00031445;
1431
VGALORESLACEDPF2_KEY = $00039445;
1432
VGAPRODUCTLACEDPF2_KEY = $00039465;
1433
VGAEXTRAHALFBRITE_KEY = $00031084;
1434
VGAEXTRAHALFBRITELACE_KEY = $00031085;
1435
{ New for AA ChipSet (V39) }
1436
VGAPRODUCTHAM_KEY = $00039824;
1437
VGALORESHAM_KEY = $00039804;
1438
VGAEXTRALORESHAM_KEY = VGAHAM_KEY;
1439
VGAPRODUCTHAMLACE_KEY = $00039825;
1440
VGALORESHAMLACE_KEY = $00039805;
1441
VGAEXTRALORESHAMLACE_KEY = VGAHAMLACE_KEY;
1442
VGAEXTRALORESEHB_KEY = VGAEXTRAHALFBRITE_KEY;
1443
VGAEXTRALORESEHBLACE_KEY = VGAEXTRAHALFBRITELACE_KEY;
1444
VGALORESEHB_KEY = $00039084;
1445
VGALORESEHBLACE_KEY = $00039085;
1446
VGAEHB_KEY = $000390a4;
1447
VGAEHBLACE_KEY = $000390a5;
1448
{ These ModeIDs are the scandoubled equivalents of the above, with the
1449
* exception of the DualPlayfield modes, as AA does not allow for scandoubling
1452
VGAEXTRALORESDBL_KEY = $00031000;
1453
VGALORESDBL_KEY = $00039000;
1454
VGAPRODUCTDBL_KEY = $00039020;
1455
VGAEXTRALORESHAMDBL_KEY = $00031800;
1456
VGALORESHAMDBL_KEY = $00039800;
1457
VGAPRODUCTHAMDBL_KEY = $00039820;
1458
VGAEXTRALORESEHBDBL_KEY = $00031080;
1459
VGALORESEHBDBL_KEY = $00039080;
1460
VGAPRODUCTEHBDBL_KEY = $000390a0;
1462
{ a2024 identifiers }
1464
A2024_MONITOR_ID = $00041000;
1466
A2024TENHERTZ_KEY = $00041000;
1467
A2024FIFTEENHERTZ_KEY = $00049000;
1469
{ prototype identifiers (private) }
1471
PROTO_MONITOR_ID = $00051000;
1474
{ These monitors and modes were added for the V38 release. }
1476
EURO72_MONITOR_ID = $00061000;
1478
EURO72EXTRALORES_KEY = $00061004;
1479
EURO72LORES_KEY = $00069004;
1480
EURO72PRODUCT_KEY = $00069024;
1481
EURO72HAM_KEY = $00061804;
1482
EURO72EXTRALORESLACE_KEY = $00061005;
1483
EURO72LORESLACE_KEY = $00069005;
1484
EURO72PRODUCTLACE_KEY = $00069025;
1485
EURO72HAMLACE_KEY = $00061805;
1486
EURO72EXTRALORESDPF_KEY = $00061404;
1487
EURO72LORESDPF_KEY = $00069404;
1488
EURO72PRODUCTDPF_KEY = $00069424;
1489
EURO72EXTRALORESLACEDPF_KEY = $00061405;
1490
EURO72LORESLACEDPF_KEY = $00069405;
1491
EURO72PRODUCTLACEDPF_KEY = $00069425;
1492
EURO72EXTRALORESDPF2_KEY = $00061444;
1493
EURO72LORESDPF2_KEY = $00069444;
1494
EURO72PRODUCTDPF2_KEY = $00069464;
1495
EURO72EXTRALORESLACEDPF2_KEY = $00061445;
1496
EURO72LORESLACEDPF2_KEY = $00069445;
1497
EURO72PRODUCTLACEDPF2_KEY = $00069465;
1498
EURO72EXTRAHALFBRITE_KEY = $00061084;
1499
EURO72EXTRAHALFBRITELACE_KEY = $00061085;
1500
{ New AA modes (V39) }
1501
EURO72PRODUCTHAM_KEY = $00069824;
1502
EURO72PRODUCTHAMLACE_KEY = $00069825;
1503
EURO72LORESHAM_KEY = $00069804;
1504
EURO72LORESHAMLACE_KEY = $00069805;
1505
EURO72EXTRALORESHAM_KEY = EURO72HAM_KEY;
1506
EURO72EXTRALORESHAMLACE_KEY = EURO72HAMLACE_KEY ;
1507
EURO72EXTRALORESEHB_KEY = EURO72EXTRAHALFBRITE_KEY;
1508
EURO72EXTRALORESEHBLACE_KEY = EURO72EXTRAHALFBRITELACE_KEY;
1509
EURO72LORESEHB_KEY = $00069084;
1510
EURO72LORESEHBLACE_KEY = $00069085;
1511
EURO72EHB_KEY = $000690a4;
1512
EURO72EHBLACE_KEY = $000690a5;
1513
{ These ModeIDs are the scandoubled equivalents of the above, with the
1514
* exception of the DualPlayfield modes, as AA does not allow for scandoubling
1517
EURO72EXTRALORESDBL_KEY = $00061000;
1518
EURO72LORESDBL_KEY = $00069000;
1519
EURO72PRODUCTDBL_KEY = $00069020;
1520
EURO72EXTRALORESHAMDBL_KEY = $00061800;
1521
EURO72LORESHAMDBL_KEY = $00069800;
1522
EURO72PRODUCTHAMDBL_KEY = $00069820;
1523
EURO72EXTRALORESEHBDBL_KEY = $00061080;
1524
EURO72LORESEHBDBL_KEY = $00069080;
1525
EURO72PRODUCTEHBDBL_KEY = $000690a0;
1528
EURO36_MONITOR_ID = $00071000;
1530
{ Euro36 modeids can be ORed with the default modeids a la NTSC and PAL.
1531
* For example, Euro36 SuperHires is
1532
* (EURO36_MONITOR_ID OR SUPER_KEY)
1535
SUPER72_MONITOR_ID = $00081000;
1537
{ Super72 modeids can be ORed with the default modeids a la NTSC and PAL.
1538
* For example, Super72 SuperHiresLace (80$600) is
1539
* (SUPER72_MONITOR_ID OR SUPERLACE_KEY).
1540
* The following scandoubled Modes are the exception:
1542
SUPER72LORESDBL_KEY = $00081008;
1543
SUPER72HIRESDBL_KEY = $00089008;
1544
SUPER72SUPERDBL_KEY = $00089028;
1545
SUPER72LORESHAMDBL_KEY = $00081808;
1546
SUPER72HIRESHAMDBL_KEY = $00089808;
1547
SUPER72SUPERHAMDBL_KEY = $00089828;
1548
SUPER72LORESEHBDBL_KEY = $00081088;
1549
SUPER72HIRESEHBDBL_KEY = $00089088;
1550
SUPER72SUPEREHBDBL_KEY = $000890a8;
1553
{ These monitors and modes were added for the V39 release. }
1555
DBLNTSC_MONITOR_ID = $00091000;
1557
DBLNTSCLORES_KEY = $00091000;
1558
DBLNTSCLORESFF_KEY = $00091004;
1559
DBLNTSCLORESHAM_KEY = $00091800;
1560
DBLNTSCLORESHAMFF_KEY = $00091804;
1561
DBLNTSCLORESEHB_KEY = $00091080;
1562
DBLNTSCLORESEHBFF_KEY = $00091084;
1563
DBLNTSCLORESLACE_KEY = $00091005;
1564
DBLNTSCLORESHAMLACE_KEY = $00091805;
1565
DBLNTSCLORESEHBLACE_KEY = $00091085;
1566
DBLNTSCLORESDPF_KEY = $00091400;
1567
DBLNTSCLORESDPFFF_KEY = $00091404;
1568
DBLNTSCLORESDPFLACE_KEY = $00091405;
1569
DBLNTSCLORESDPF2_KEY = $00091440;
1570
DBLNTSCLORESDPF2FF_KEY = $00091444;
1571
DBLNTSCLORESDPF2LACE_KEY = $00091445;
1572
DBLNTSCHIRES_KEY = $00099000;
1573
DBLNTSCHIRESFF_KEY = $00099004;
1574
DBLNTSCHIRESHAM_KEY = $00099800;
1575
DBLNTSCHIRESHAMFF_KEY = $00099804;
1576
DBLNTSCHIRESLACE_KEY = $00099005;
1577
DBLNTSCHIRESHAMLACE_KEY = $00099805;
1578
DBLNTSCHIRESEHB_KEY = $00099080;
1579
DBLNTSCHIRESEHBFF_KEY = $00099084;
1580
DBLNTSCHIRESEHBLACE_KEY = $00099085;
1581
DBLNTSCHIRESDPF_KEY = $00099400;
1582
DBLNTSCHIRESDPFFF_KEY = $00099404;
1583
DBLNTSCHIRESDPFLACE_KEY = $00099405;
1584
DBLNTSCHIRESDPF2_KEY = $00099440;
1585
DBLNTSCHIRESDPF2FF_KEY = $00099444;
1586
DBLNTSCHIRESDPF2LACE_KEY = $00099445;
1587
DBLNTSCEXTRALORES_KEY = $00091200;
1588
DBLNTSCEXTRALORESHAM_KEY = $00091a00;
1589
DBLNTSCEXTRALORESEHB_KEY = $00091280;
1590
DBLNTSCEXTRALORESDPF_KEY = $00091600;
1591
DBLNTSCEXTRALORESDPF2_KEY = $00091640;
1592
DBLNTSCEXTRALORESFF_KEY = $00091204;
1593
DBLNTSCEXTRALORESHAMFF_KEY = $00091a04;
1594
DBLNTSCEXTRALORESEHBFF_KEY = $00091284;
1595
DBLNTSCEXTRALORESDPFFF_KEY = $00091604;
1596
DBLNTSCEXTRALORESDPF2FF_KEY = $00091644;
1597
DBLNTSCEXTRALORESLACE_KEY = $00091205;
1598
DBLNTSCEXTRALORESHAMLACE_KEY = $00091a05;
1599
DBLNTSCEXTRALORESEHBLACE_KEY = $00091285;
1600
DBLNTSCEXTRALORESDPFLACE_KEY = $00091605;
1601
DBLNTSCEXTRALORESDPF2LACE_KEY = $00091645;
1603
DBLPAL_MONITOR_ID = $000a1000;
1605
DBLPALLORES_KEY = $000a1000;
1606
DBLPALLORESFF_KEY = $000a1004;
1607
DBLPALLORESHAM_KEY = $000a1800;
1608
DBLPALLORESHAMFF_KEY = $000a1804;
1609
DBLPALLORESEHB_KEY = $000a1080;
1610
DBLPALLORESEHBFF_KEY = $000a1084;
1611
DBLPALLORESLACE_KEY = $000a1005;
1612
DBLPALLORESHAMLACE_KEY = $000a1805;
1613
DBLPALLORESEHBLACE_KEY = $000a1085;
1614
DBLPALLORESDPF_KEY = $000a1400;
1615
DBLPALLORESDPFFF_KEY = $000a1404;
1616
DBLPALLORESDPFLACE_KEY = $000a1405;
1617
DBLPALLORESDPF2_KEY = $000a1440;
1618
DBLPALLORESDPF2FF_KEY = $000a1444;
1619
DBLPALLORESDPF2LACE_KEY = $000a1445;
1620
DBLPALHIRES_KEY = $000a9000;
1621
DBLPALHIRESFF_KEY = $000a9004;
1622
DBLPALHIRESHAM_KEY = $000a9800;
1623
DBLPALHIRESHAMFF_KEY = $000a9804;
1624
DBLPALHIRESLACE_KEY = $000a9005;
1625
DBLPALHIRESHAMLACE_KEY = $000a9805;
1626
DBLPALHIRESEHB_KEY = $000a9080;
1627
DBLPALHIRESEHBFF_KEY = $000a9084;
1628
DBLPALHIRESEHBLACE_KEY = $000a9085;
1629
DBLPALHIRESDPF_KEY = $000a9400;
1630
DBLPALHIRESDPFFF_KEY = $000a9404;
1631
DBLPALHIRESDPFLACE_KEY = $000a9405;
1632
DBLPALHIRESDPF2_KEY = $000a9440;
1633
DBLPALHIRESDPF2FF_KEY = $000a9444;
1634
DBLPALHIRESDPF2LACE_KEY = $000a9445;
1635
DBLPALEXTRALORES_KEY = $000a1200;
1636
DBLPALEXTRALORESHAM_KEY = $000a1a00;
1637
DBLPALEXTRALORESEHB_KEY = $000a1280;
1638
DBLPALEXTRALORESDPF_KEY = $000a1600;
1639
DBLPALEXTRALORESDPF2_KEY = $000a1640;
1640
DBLPALEXTRALORESFF_KEY = $000a1204;
1641
DBLPALEXTRALORESHAMFF_KEY = $000a1a04;
1642
DBLPALEXTRALORESEHBFF_KEY = $000a1284;
1643
DBLPALEXTRALORESDPFFF_KEY = $000a1604;
1644
DBLPALEXTRALORESDPF2FF_KEY = $000a1644;
1645
DBLPALEXTRALORESLACE_KEY = $000a1205;
1646
DBLPALEXTRALORESHAMLACE_KEY = $000a1a05;
1647
DBLPALEXTRALORESEHBLACE_KEY = $000a1285;
1648
DBLPALEXTRALORESDPFLACE_KEY = $000a1605;
1649
DBLPALEXTRALORESDPF2LACE_KEY = $000a1645;
1652
{ Use these tags for passing to BestModeID() (V39) }
1654
SPECIAL_FLAGS = $100E;
1656
SPECIAL_FLAGS = DIPF_IS_DUALPF OR DIPF_IS_PF2PRI OR DIPF_IS_HAM OR DIPF_IS_EXTRAHALFBRITE;
1657
( Mu?te aufgrund eines Fehler in PCQ ge?ndert werden )
1661
BIDTAG_DIPFMustHave = $80000001; { mask of the DIPF_ flags the ModeID must have }
1663
BIDTAG_DIPFMustNotHave = $80000002; { mask of the DIPF_ flags the ModeID must not have }
1664
{ Default - SPECIAL_FLAGS }
1665
BIDTAG_ViewPort = $80000003; { ViewPort for which a ModeID is sought. }
1667
BIDTAG_NominalWidth = $80000004; { \ together make the aspect ratio and }
1668
BIDTAG_NominalHeight = $80000005; { / override the vp->Width/Height. }
1669
{ Default - SourceID NominalDimensionInfo,
1670
* or vp->DWidth/Height, or (640 * 200),
1671
* in that preferred order.
1673
BIDTAG_DesiredWidth = $80000006; { \ Nominal Width and Height of the }
1674
BIDTAG_DesiredHeight = $80000007; { / returned ModeID. }
1675
{ Default - same as Nominal }
1676
BIDTAG_Depth = $80000008; { ModeID must support this depth. }
1677
{ Default - vp->RasInfo->BitMap->Depth or 1 }
1678
BIDTAG_MonitorID = $80000009; { ModeID must use this monitor. }
1679
{ Default - use best monitor available }
1680
BIDTAG_SourceID = $8000000a; { instead of a ViewPort. }
1681
{ Default - VPModeID(vp) if BIDTAG_ViewPort is
1682
* specified, else leave the DIPFMustHave and
1683
* DIPFMustNotHave values untouched.
1685
BIDTAG_RedBits = $8000000b; { \ }
1686
BIDTAG_BlueBits = $8000000c; { > Match up from the database }
1687
BIDTAG_GreenBits = $8000000d; { / }
1689
BIDTAG_GfxPrivate = $8000000e; { Private }
1697
PLNCNTMSK = $7; { how many bit planes? }
1698
{ 0 = none, 1->6 = 1->6, 7 = reserved }
1699
PLNCNTSHFT = 12; { bits to shift for bplcon0 }
1700
PF2PRI = $40; { bplcon2 bit }
1701
COLORON = $0200; { disable color burst }
1704
INTERLACE = 4; { interlace mode for 400 }
1708
PFA_FINE_SCROLL = $F;
1709
PFB_FINE_SCROLL_SHIFT = 4;
1710
PF_FINE_SCROLL_MASK = $F;
1712
{ display window start and stop defines }
1714
DIW_HORIZ_POS = $7F; { horizontal start/stop }
1715
DIW_VRTCL_POS = $1FF; { vertical start/stop }
1716
DIW_VRTCL_POS_SHIFT = $7;
1718
{ Data fetch start/stop horizontal position }
1726
{ include define file for displayinfo database }
1728
{ the "public" handle to a DisplayInfoRecord }
1731
DisplayInfoHandle = APTR;
1733
{ datachunk type identifiers }
1736
DTAG_DISP = $80000000;
1737
DTAG_DIMS = $80001000;
1738
DTAG_MNTR = $80002000;
1739
DTAG_NAME = $80003000;
1740
DTAG_VEC = $80004000; { internal use only }
1744
pQueryHeader = ^tQueryHeader;
1745
tQueryHeader = record
1746
tructID, { datachunk type identifier }
1747
DisplayID, { copy of display record key }
1748
SkipID, { TAG_SKIP -- see tagitems.h }
1749
Length : ULONG; { length of local data in double-longwords }
1752
pDisplayInfo = ^tDisplayInfo;
1753
tDisplayInfo = record
1754
Header : tQueryHeader;
1755
NotAvailable : Word; { IF NULL available, else see defines }
1756
PropertyFlags : ULONG; { Properties of this mode see defines }
1757
Resolution : tPoint; { ticks-per-pixel X/Y }
1758
PixelSpeed : Word; { aproximation in nanoseconds }
1759
NumStdSprites : Word; { number of standard amiga sprites }
1760
PaletteRange : Word; { distinguishable shades available }
1761
SpriteResolution : tPoint; { std sprite ticks-per-pixel X/Y }
1762
pad : Array[0..3] of Byte;
1766
pad2 : array [0..4] of Byte;
1767
reserved : Array[0..1] of ULONG; { terminator }
1773
DI_AVAIL_NOCHIPS =$0001;
1774
DI_AVAIL_NOMONITOR =$0002;
1775
DI_AVAIL_NOTWITHGENLOCK =$0004;
1779
DIPF_IS_LACE = $00000001;
1780
DIPF_IS_DUALPF = $00000002;
1781
DIPF_IS_PF2PRI = $00000004;
1782
DIPF_IS_HAM = $00000008;
1784
DIPF_IS_ECS = $00000010; { note: ECS modes (SHIRES, VGA, AND **
1785
PRODUCTIVITY) do not support **
1786
attached sprites. **
1788
DIPF_IS_AA = $00010000; { AA modes - may only be available
1789
** if machine has correct memory
1790
** type to support required
1791
** bandwidth - check availability.
1794
DIPF_IS_PAL = $00000020;
1795
DIPF_IS_SPRITES = $00000040;
1796
DIPF_IS_GENLOCK = $00000080;
1798
DIPF_IS_WB = $00000100;
1799
DIPF_IS_DRAGGABLE = $00000200;
1800
DIPF_IS_PANELLED = $00000400;
1801
DIPF_IS_BEAMSYNC = $00000800;
1803
DIPF_IS_EXTRAHALFBRITE = $00001000;
1805
{ The following DIPF_IS_... flags are new for V39 }
1806
DIPF_IS_SPRITES_ATT = $00002000; { supports attached sprites }
1807
DIPF_IS_SPRITES_CHNG_RES = $00004000; { supports variable sprite resolution }
1808
DIPF_IS_SPRITES_BORDER = $00008000; { sprite can be displayed in the border }
1809
DIPF_IS_SCANDBL = $00020000; { scan doubled }
1810
DIPF_IS_SPRITES_CHNG_BASE = $00040000;
1811
{ can change the sprite base colour }
1812
DIPF_IS_SPRITES_CHNG_PRI = $00080000;
1813
{ can change the sprite priority
1814
** with respect to the playfield(s).
1816
DIPF_IS_DBUFFER = $00100000; { can support double buffering }
1817
DIPF_IS_PROGBEAM = $00200000; { is a programmed beam-sync mode }
1818
DIPF_IS_FOREIGN = $80000000; { this mode is not native to the Amiga }
1821
pDimensionInfo =^tDimensionInfo;
1822
tDimensionInfo = record
1823
Header : tQueryHeader;
1824
MaxDepth, { log2( max number of colors ) }
1825
MinRasterWidth, { minimum width in pixels }
1826
MinRasterHeight, { minimum height in pixels }
1827
MaxRasterWidth, { maximum width in pixels }
1828
MaxRasterHeight : Word; { maximum height in pixels }
1829
Nominal, { "standard" dimensions }
1830
MaxOScan, { fixed, hardware dependant }
1831
VideoOScan, { fixed, hardware dependant }
1832
TxtOScan, { editable via preferences }
1833
StdOScan : tRectangle; { editable via preferences }
1834
pad : Array[0..13] of Byte;
1835
reserved : Array[0..1] of Longint; { terminator }
1838
pMonitorInfo = ^tMonitorInfo;
1839
tMonitorInfo = record
1840
Header : tQueryHeader;
1841
Mspc : pMonitorSpec; { pointer to monitor specification }
1842
ViewPosition, { editable via preferences }
1843
ViewResolution : tPoint; { standard monitor ticks-per-pixel }
1844
ViewPositionRange : tRectangle; { fixed, hardware dependant }
1845
TotalRows, { display height in scanlines }
1846
TotalColorClocks, { scanline width in 280 ns units }
1847
MinRow : Word; { absolute minimum active scanline }
1848
Compatibility : smallint; { how this coexists with others }
1849
pad : Array[0..31] of Byte;
1850
MouseTicks : tPoint;
1851
DefaultViewPosition : tPoint;
1852
PreferredModeID : ULONG;
1853
reserved : Array[0..1] of ULONG; { terminator }
1856
{ monitor compatibility }
1859
MCOMPAT_MIXED = 0; { can share display with other MCOMPAT_MIXED }
1860
MCOMPAT_SELF = 1; { can share only within same monitor }
1861
MCOMPAT_NOBODY= -1; { only one viewport at a time }
1863
DISPLAYNAMELEN = 32;
1866
pNameInfo = ^tNameInfo;
1868
Header : tQueryHeader;
1869
Name : Array[0..DISPLAYNAMELEN-1] of Char;
1870
reserved : Array[0..1] of ULONG; { terminator }
1874
{****************************************************************************}
1876
{ The following VecInfo structure is PRIVATE, for our use only
1877
* Touch these, and burn! (V39)
1880
pVecInfo = ^tVecInfo;
1882
Header : tQueryHeader;
1885
vi_Type : WORD; { Type in C Includes }
1886
pad : Array[0..2] of WORD;
1887
reserved : Array[0..1] of ULONG;
1892
VTAG_END_CM = $00000000;
1893
VTAG_CHROMAKEY_CLR = $80000000;
1894
VTAG_CHROMAKEY_SET = $80000001;
1895
VTAG_BITPLANEKEY_CLR = $80000002;
1896
VTAG_BITPLANEKEY_SET = $80000003;
1897
VTAG_BORDERBLANK_CLR = $80000004;
1898
VTAG_BORDERBLANK_SET = $80000005;
1899
VTAG_BORDERNOTRANS_CLR = $80000006;
1900
VTAG_BORDERNOTRANS_SET = $80000007;
1901
VTAG_CHROMA_PEN_CLR = $80000008;
1902
VTAG_CHROMA_PEN_SET = $80000009;
1903
VTAG_CHROMA_PLANE_SET = $8000000A;
1904
VTAG_ATTACH_CM_SET = $8000000B;
1905
VTAG_NEXTBUF_CM = $8000000C;
1906
VTAG_BATCH_CM_CLR = $8000000D;
1907
VTAG_BATCH_CM_SET = $8000000E;
1908
VTAG_NORMAL_DISP_GET = $8000000F;
1909
VTAG_NORMAL_DISP_SET = $80000010;
1910
VTAG_COERCE_DISP_GET = $80000011;
1911
VTAG_COERCE_DISP_SET = $80000012;
1912
VTAG_VIEWPORTEXTRA_GET = $80000013;
1913
VTAG_VIEWPORTEXTRA_SET = $80000014;
1914
VTAG_CHROMAKEY_GET = $80000015;
1915
VTAG_BITPLANEKEY_GET = $80000016;
1916
VTAG_BORDERBLANK_GET = $80000017;
1917
VTAG_BORDERNOTRANS_GET = $80000018;
1918
VTAG_CHROMA_PEN_GET = $80000019;
1919
VTAG_CHROMA_PLANE_GET = $8000001A;
1920
VTAG_ATTACH_CM_GET = $8000001B;
1921
VTAG_BATCH_CM_GET = $8000001C;
1922
VTAG_BATCH_ITEMS_GET = $8000001D;
1923
VTAG_BATCH_ITEMS_SET = $8000001E;
1924
VTAG_BATCH_ITEMS_ADD = $8000001F;
1925
VTAG_VPMODEID_GET = $80000020;
1926
VTAG_VPMODEID_SET = $80000021;
1927
VTAG_VPMODEID_CLR = $80000022;
1928
VTAG_USERCLIP_GET = $80000023;
1929
VTAG_USERCLIP_SET = $80000024;
1930
VTAG_USERCLIP_CLR = $80000025;
1931
{ The following tags are V39 specific. They will be ignored (returing error -3) by
1933
VTAG_PF1_BASE_GET = $80000026;
1934
VTAG_PF2_BASE_GET = $80000027;
1935
VTAG_SPEVEN_BASE_GET = $80000028;
1936
VTAG_SPODD_BASE_GET = $80000029;
1937
VTAG_PF1_BASE_SET = $8000002a;
1938
VTAG_PF2_BASE_SET = $8000002b;
1939
VTAG_SPEVEN_BASE_SET = $8000002c;
1940
VTAG_SPODD_BASE_SET = $8000002d;
1941
VTAG_BORDERSPRITE_GET = $8000002e;
1942
VTAG_BORDERSPRITE_SET = $8000002f;
1943
VTAG_BORDERSPRITE_CLR = $80000030;
1944
VTAG_SPRITERESN_SET = $80000031;
1945
VTAG_SPRITERESN_GET = $80000032;
1946
VTAG_PF1_TO_SPRITEPRI_SET = $80000033;
1947
VTAG_PF1_TO_SPRITEPRI_GET = $80000034;
1948
VTAG_PF2_TO_SPRITEPRI_SET = $80000035;
1949
VTAG_PF2_TO_SPRITEPRI_GET = $80000036;
1950
VTAG_IMMEDIATE = $80000037;
1951
VTAG_FULLPALETTE_SET = $80000038;
1952
VTAG_FULLPALETTE_GET = $80000039;
1953
VTAG_FULLPALETTE_CLR = $8000003A;
1954
VTAG_DEFSPRITERESN_SET = $8000003B;
1955
VTAG_DEFSPRITERESN_GET = $8000003C;
1957
{ all the following tags follow the new, rational standard for videocontrol tags:
1958
* VC_xxx,state set the state of attribute 'xxx' to value 'state'
1959
* VC_xxx_QUERY,&var get the state of attribute 'xxx' and store it into the longword
1960
* pointed to by &var.
1962
* The following are new for V40:
1965
VC_IntermediateCLUpdate = $80000080;
1966
{ default=true. When set graphics will update the intermediate copper
1967
* lists on color changes, etc. When false, it won't, and will be faster.
1969
VC_IntermediateCLUpdate_Query = $80000081;
1971
VC_NoColorPaletteLoad = $80000082;
1972
{ default = false. When set, graphics will only load color 0
1973
* for this ViewPort, and so the ViewPort's colors will come
1974
* from the previous ViewPort's.
1976
* NB - Using this tag and VTAG_FULLPALETTE_SET together is undefined.
1978
VC_NoColorPaletteLoad_Query = $80000083;
1980
VC_DUALPF_Disable = $80000084;
1981
{ default = false. When this flag is set, the dual-pf bit
1982
in Dual-Playfield screens will be turned off. Even bitplanes
1983
will still come from the first BitMap and odd bitplanes
1984
from the second BitMap, and both R[xy]Offsets will be
1985
considered. This can be used (with appropriate palette
1986
selection) for cross-fades between differently scrolling
1988
When this flag is turned on, colors will be loaded for
1989
the viewport as if it were a single viewport of depth
1991
VC_DUALPF_Disable_Query = $80000085;
1996
SPRITE_ATTACHED = $80;
2000
pSimpleSprite = ^tSimpleSprite;
2001
tSimpleSprite = record
2002
posctldata : Pointer;
2004
x,y : Word; { current position }
2008
pExtSprite = ^tExtSprite;
2010
es_SimpleSprite : tSimpleSprite; { conventional simple sprite structure }
2011
es_wordwidth : WORD; { graphics use only, subject to change }
2012
es_flags : WORD; { graphics use only, subject to change }
2016
{ tags for AllocSpriteData() }
2017
SPRITEA_Width = $81000000;
2018
SPRITEA_XReplication = $81000002;
2019
SPRITEA_YReplication = $81000004;
2020
SPRITEA_OutputHeight = $81000006;
2021
SPRITEA_Attached = $81000008;
2022
SPRITEA_OldDataFormat = $8100000a; { MUST pass in outputheight if using this tag }
2024
{ tags for GetExtSprite() }
2025
GSTAG_SPRITE_NUM = $82000020;
2026
GSTAG_ATTACHED = $82000022;
2027
GSTAG_SOFTSPRITE = $82000024;
2029
{ tags valid for either GetExtSprite or ChangeExtSprite }
2030
GSTAG_SCANDOUBLED = $83000000; { request "NTSC-Like" height if possible. }
2034
pBitScaleArgs = ^tBitScaleArgs;
2035
tBitScaleArgs = record
2036
bsa_SrcX, bsa_SrcY, { source origin }
2037
bsa_SrcWidth, bsa_SrcHeight, { source size }
2038
bsa_XSrcFactor, bsa_YSrcFactor, { scale factor denominators }
2039
bsa_DestX, bsa_DestY, { destination origin }
2040
bsa_DestWidth, bsa_DestHeight, { destination size result }
2041
bsa_XDestFactor, bsa_YDestFactor : Word; { scale factor numerators }
2042
bsa_SrcBitMap, { source BitMap }
2043
bsa_DestBitMap : pBitMap; { destination BitMap }
2044
bsa_Flags : ULONG; { reserved. Must be zero! }
2045
bsa_XDDA, bsa_YDDA : Word; { reserved }
2047
bsa_Reserved2 : Longint;
2050
{ tag definitions for GetRPAttr, SetRPAttr }
2053
RPTAG_Font = $80000000; { get/set font }
2054
RPTAG_APen = $80000002; { get/set apen }
2055
RPTAG_BPen = $80000003; { get/set bpen }
2056
RPTAG_DrMd = $80000004; { get/set draw mode }
2057
RPTAG_OutlinePen = $80000005; { get/set outline pen. corrected case. }
2058
RPTAG_WriteMask = $80000006; { get/set WriteMask }
2059
RPTAG_MaxPen = $80000007; { get/set maxpen }
2061
RPTAG_DrawBounds = $80000008; { get only rastport draw bounds. pass &rect }
2068
pRegionRectangle = ^tRegionRectangle;
2069
tRegionRectangle = record
2070
Next, Prev : pRegionRectangle;
2071
bounds : tRectangle;
2076
bounds : tRectangle;
2077
RegionRectangle : pRegionRectangle;
2082
pGfxBase = ^tGfxBase;
2085
ActiView : pView; { ViewPtr }
2086
copinit : pcopinit; { (copinitptr) ptr to copper start up list }
2087
cia : Pointer; { for 8520 resource use }
2088
blitter : Pointer; { for future blitter resource use }
2094
bsblttl : pbltnode; { Previous four are (bltnodeptr) }
2097
bltsrv : tInterrupt;
2099
DefaultFont : pTextFont; { TextFontPtr }
2100
Modes : Word; { copy of current first bplcon0 }
2103
BeamSync : smallint;
2104
system_bplcon0 : smallint; { it is ored into each bplcon0 for display }
2105
SpriteReserved : Byte;
2106
bytereserved : Byte;
2108
BlitLock : smallint;
2109
BlitNest : smallint;
2112
BlitOwner : pTask; { TaskPtr }
2114
DisplayFlags : Word; { NTSC PAL GENLOC etc}
2116
{ Display flags are determined at power on }
2118
SimpleSprites : Pointer; { SimpleSpritePtr ptr }
2119
MaxDisplayRow : Word; { hardware stuff, do not use }
2120
MaxDisplayColumn : Word; { hardware stuff, do not use }
2121
NormalDisplayRows : Word;
2122
NormalDisplayColumns : Word;
2124
{ the following are for standard non interlace, 1/2 wb width }
2126
NormalDPMX : Word; { Dots per meter on display }
2127
NormalDPMY : Word; { Dots per meter on display }
2128
LastChanceMemory : pSignalSemaphore; { SignalSemaphorePtr }
2130
MicrosPerLine : Word; { 256 time usec/line }
2131
MinDisplayColumn : Word;
2132
ChipRevBits0 : Byte;
2134
crb_reserved : Array[0..3] of Byte;
2135
monitor_id : Word; { normally null }
2136
hedley : Array[0..7] of ULONG;
2137
hedley_sprites : Array[0..7] of ULONG; { sprite ptrs for intuition mouse }
2138
hedley_sprites1 : Array[0..7] of ULONG; { sprite ptrs for intuition mouse }
2139
hedley_count : smallint;
2140
hedley_flags : Word;
2141
hedley_tmp : smallint;
2142
hash_table : Pointer;
2143
current_tot_rows : Word;
2144
current_tot_cclks : Word;
2146
hedley_hint2 : Byte;
2147
nreserved : Array[0..3] of ULONG;
2148
a2024_sync_raster : Pointer;
2149
control_delta_pal : Word;
2150
control_delta_ntsc : Word;
2151
current_monitor : pMonitorSpec;
2152
MonitorList : tList;
2153
default_monitor : pMonitorSpec;
2154
MonitorListSemaphore : pSignalSemaphore;
2155
DisplayInfoDataBase : Pointer;
2157
ActiViewCprSemaphore : pSignalSemaphore;
2158
UtilityBase : Pointer; { for hook AND tag utilities }
2159
ExecBase : Pointer; { to link with rom.lib }
2164
RealStops : Pointer;
2165
SpriteWidth, { current width (in words) of sprites }
2166
SpriteFMode : WORD; { current sprite fmode bits }
2167
SoftSprites, { bit mask of size change knowledgeable sprites }
2168
arraywidth : Shortint;
2169
DefaultSpriteWidth : WORD; { what width intuition wants }
2170
SprMoveDisable : Shortint;
2174
gb_LayersBase : Pointer;
2178
SpecialCounter : ULONG; { special for double buffering }
2180
MonitorFlags : WORD;
2183
MonitorVBlank : tAnalogSignalInterval;
2184
natural_monitor : pMonitorSpec;
2190
HashTableSemaphore : pSignalSemaphore;
2191
HWEmul : Array[0..8] of Pointer;
2203
{ bits defs for ChipRevBits }
2204
GFXB_BIG_BLITS = 0 ;
2206
GFXB_HR_DENISE = 1 ;
2209
GFXB_AA_MLISA = 4 ; { internal use only. }
2211
GFXF_BIG_BLITS = 1 ;
2213
GFXF_HR_DENISE = 2 ;
2216
GFXF_AA_MLISA = 16; { internal use only }
2218
{ Pass ONE of these to SetChipRev() }
2219
SETCHIPREV_A = GFXF_HR_AGNUS;
2220
SETCHIPREV_ECS = (GFXF_HR_AGNUS OR GFXF_HR_DENISE);
2221
SETCHIPREV_AA = (GFXF_AA_ALICE OR GFXF_AA_LISA OR SETCHIPREV_ECS);
2222
SETCHIPREV_BEST= $ffffffff;
2229
BANDWIDTH_1X = (BUS_16 OR NML_CAS);
2230
BANDWIDTH_2XNML= BUS_32;
2231
BANDWIDTH_2XDBL= DBL_CAS;
2232
BANDWIDTH_4X = (BUS_32 OR DBL_CAS);
2234
{ GfxFlags (private) }
2237
GRAPHICSNAME : PChar = 'graphics.library';
2243
PROCEDURE AddAnimOb(anOb : pAnimOb; anKey : ppAnimOb; rp : pRastPort);
2244
PROCEDURE AddBob(bob : pBob; rp : pRastPort);
2245
PROCEDURE AddFont(textFont : pTextFont);
2246
PROCEDURE AddVSprite(vSprite : pVSprite; rp : pRastPort);
2247
FUNCTION AllocBitMap(sizex : ULONG; sizey : ULONG; depth : ULONG; flags : ULONG;const friend_bitmap : pBitMap) : pBitMap;
2248
FUNCTION AllocDBufInfo(vp : pViewPort) : pDBufInfo;
2249
FUNCTION AllocRaster(width : ULONG; height : ULONG) : pCHAR;
2250
FUNCTION AllocSpriteDataA(const bm : pBitMap;const tags : pTagItem) : pExtSprite;
2251
PROCEDURE AndRectRegion(region : pRegion;const rectangle : pRectangle);
2252
FUNCTION AndRegionRegion(const srcRegion : pRegion; destRegion : pRegion) : BOOLEAN;
2253
PROCEDURE Animate(anKey : ppAnimOb; rp : pRastPort);
2254
FUNCTION AreaDraw(rp : pRastPort; x : LONGINT; y : LONGINT) : LONGINT;
2255
FUNCTION AreaEllipse(rp : pRastPort; xCenter : LONGINT; yCenter : LONGINT; a : LONGINT; b : LONGINT) : LONGINT;
2256
FUNCTION AreaEnd(rp : pRastPort) : LONGINT;
2257
FUNCTION AreaMove(rp : pRastPort; x : LONGINT; y : LONGINT) : LONGINT;
2258
PROCEDURE AskFont(rp : pRastPort; textAttr : pTextAttr);
2259
FUNCTION AskSoftStyle(rp : pRastPort) : ULONG;
2260
FUNCTION AttachPalExtra(cm : pColorMap; vp : pViewPort) : LONGINT;
2261
FUNCTION AttemptLockLayerRom(layer : pLayer) : BOOLEAN;
2262
FUNCTION BestModeIDA(const tags : pTagItem) : ULONG;
2263
PROCEDURE BitMapScale(bitScaleArgs : pBitScaleArgs);
2264
FUNCTION BltBitMap(const srcBitMap : pBitMap; xSrc : LONGINT; ySrc : LONGINT; destBitMap : pBitMap; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG; mask : ULONG; tempA : pCHAR) : LONGINT;
2265
PROCEDURE BltBitMapRastPort(const srcBitMap : pBitMap; xSrc : LONGINT; ySrc : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG);
2266
PROCEDURE BltClear(memBlock : pCHAR; byteCount : ULONG; flags : ULONG);
2267
PROCEDURE BltMaskBitMapRastPort(const srcBitMap : pBitMap; xSrc : LONGINT; ySrc : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG;const bltMask : pCHAR);
2268
PROCEDURE BltPattern(rp : pRastPort;const mask : pCHAR; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT; maskBPR : ULONG);
2269
PROCEDURE BltTemplate(const source : pCHAR; xSrc : LONGINT; srcMod : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT);
2270
FUNCTION CalcIVG(v : pView; vp : pViewPort) : WORD;
2271
PROCEDURE CBump(copList : pUCopList);
2272
FUNCTION ChangeExtSpriteA(vp : pViewPort; oldsprite : pExtSprite; newsprite : pExtSprite;const tags : pTagItem) : LONGINT;
2273
PROCEDURE ChangeSprite(vp : pViewPort; sprite : pSimpleSprite; newData : pWORD);
2274
PROCEDURE ChangeVPBitMap(vp : pViewPort; bm : pBitMap; db : pDBufInfo);
2275
PROCEDURE ClearEOL(rp : pRastPort);
2276
FUNCTION ClearRectRegion(region : pRegion;const rectangle : pRectangle) : BOOLEAN;
2277
PROCEDURE ClearRegion(region : pRegion);
2278
PROCEDURE ClearScreen(rp : pRastPort);
2279
PROCEDURE ClipBlit(srcRP : pRastPort; xSrc : LONGINT; ySrc : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG);
2280
PROCEDURE CloseFont(textFont : pTextFont);
2281
FUNCTION CloseMonitor(monitorSpec : pMonitorSpec) : BOOLEAN;
2282
PROCEDURE CMove(copList : pUCopList; destination : POINTER; data : LONGINT);
2283
FUNCTION CoerceMode(vp : pViewPort; monitorid : ULONG; flags : ULONG) : ULONG;
2284
PROCEDURE CopySBitMap(layer : pLayer);
2285
PROCEDURE CWait(copList : pUCopList; v : LONGINT; h : LONGINT);
2286
PROCEDURE DisownBlitter;
2287
PROCEDURE DisposeRegion(region : pRegion);
2288
PROCEDURE DoCollision(rp : pRastPort);
2289
PROCEDURE Draw(rp : pRastPort; x : LONGINT; y : LONGINT);
2290
PROCEDURE DrawEllipse(rp : pRastPort; xCenter : LONGINT; yCenter : LONGINT; a : LONGINT; b : LONGINT);
2291
PROCEDURE DrawGList(rp : pRastPort; vp : pViewPort);
2292
PROCEDURE EraseRect(rp : pRastPort; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
2293
FUNCTION ExtendFont(font : pTextFont;const fontTags : pTagItem) : ULONG;
2294
FUNCTION FindColor(cm : pColorMap; r : ULONG; g : ULONG; b : ULONG; maxcolor : LONGINT) : LONGINT;
2295
FUNCTION FindDisplayInfo(displayID : ULONG) : POINTER;
2296
FUNCTION Flood(rp : pRastPort; mode : ULONG; x : LONGINT; y : LONGINT) : BOOLEAN;
2297
PROCEDURE FontExtent(const font : pTextFont; fontExtent : pTextExtent);
2298
PROCEDURE FreeBitMap(bm : pBitMap);
2299
PROCEDURE FreeColorMap(colorMap : pColorMap);
2300
PROCEDURE FreeCopList(copList : pCopList);
2301
PROCEDURE FreeCprList(cprList : pcprlist);
2302
PROCEDURE FreeDBufInfo(dbi : pDBufInfo);
2303
PROCEDURE FreeGBuffers(anOb : pAnimOb; rp : pRastPort; flag : LONGINT);
2304
PROCEDURE FreeRaster(p : pCHAR; width : ULONG; height : ULONG);
2305
PROCEDURE FreeSprite(num : LONGINT);
2306
PROCEDURE FreeSpriteData(sp : pExtSprite);
2307
PROCEDURE FreeVPortCopLists(vp : pViewPort);
2308
FUNCTION GetAPen(rp : pRastPort) : ULONG;
2309
FUNCTION GetBitMapAttr(const bm : pBitMap; attrnum : ULONG) : ULONG;
2310
FUNCTION GetBPen(rp : pRastPort) : ULONG;
2311
FUNCTION GetColorMap(entries : LONGINT) : pColorMap;
2312
FUNCTION GetDisplayInfoData(const handle : POINTER; buf : pCHAR; size : ULONG; tagID : ULONG; displayID : ULONG) : ULONG;
2313
FUNCTION GetDrMd(rp : pRastPort) : ULONG;
2314
FUNCTION GetExtSpriteA(ss : pExtSprite;const tags : pTagItem) : LONGINT;
2315
FUNCTION GetGBuffers(anOb : pAnimOb; rp : pRastPort; flag : LONGINT) : BOOLEAN;
2316
FUNCTION GetOutlinePen(rp : pRastPort) : ULONG;
2317
PROCEDURE GetRGB32(const cm : pColorMap; firstcolor : ULONG; ncolors : ULONG; table : pulong);
2318
FUNCTION GetRGB4(colorMap : pColorMap; entry : LONGINT) : ULONG;
2319
PROCEDURE GetRPAttrsA(const rp : pRastPort;const tags : pTagItem);
2320
FUNCTION GetSprite(sprite : pSimpleSprite; num : LONGINT) : smallint;
2321
FUNCTION GetVPModeID(const vp : pViewPort) : LONGINT;
2322
PROCEDURE GfxAssociate(const associateNode : POINTER; gfxNodePtr : POINTER);
2323
PROCEDURE GfxFree(gfxNodePtr : POINTER);
2324
FUNCTION GfxLookUp(const associateNode : POINTER) : POINTER;
2325
FUNCTION GfxNew(gfxNodeType : ULONG) : POINTER;
2326
PROCEDURE InitArea(areaInfo : pAreaInfo; vectorBuffer : POINTER; maxVectors : LONGINT);
2327
PROCEDURE InitBitMap(bitMap : pBitMap; depth : LONGINT; width : LONGINT; height : LONGINT);
2328
PROCEDURE InitGels(head : pVSprite; tail : pVSprite; gelsInfo : pGelsInfo);
2329
PROCEDURE InitGMasks(anOb : pAnimOb);
2330
PROCEDURE InitMasks(vSprite : pVSprite);
2331
PROCEDURE InitRastPort(rp : pRastPort);
2332
FUNCTION InitTmpRas(tmpRas : pTmpRas; buffer : PLANEPTR; size : LONGINT) : pTmpRas;
2333
PROCEDURE InitView(view : pView);
2334
PROCEDURE InitVPort(vp : pViewPort);
2335
PROCEDURE LoadRGB32(vp : pViewPort;const table : pULONG);
2336
PROCEDURE LoadRGB4(vp : pViewPort;const colors : pWord; count : LONGINT);
2337
PROCEDURE LoadView(view : pView);
2338
PROCEDURE LockLayerRom(layer : pLayer);
2339
FUNCTION MakeVPort(view : pView; vp : pViewPort) : ULONG;
2340
FUNCTION ModeNotAvailable(modeID : ULONG) : LONGINT;
2341
PROCEDURE Move(rp : pRastPort; x : LONGINT; y : LONGINT);
2342
PROCEDURE MoveSprite(vp : pViewPort; sprite : pSimpleSprite; x : LONGINT; y : LONGINT);
2343
FUNCTION MrgCop(view : pView) : ULONG;
2344
FUNCTION NewRegion : pRegion;
2345
FUNCTION NextDisplayInfo(displayID : ULONG) : ULONG;
2346
FUNCTION ObtainBestPenA(cm : pColorMap; r : ULONG; g : ULONG; b : ULONG;const tags : pTagItem) : LONGINT;
2347
FUNCTION ObtainPen(cm : pColorMap; n : ULONG; r : ULONG; g : ULONG; b : ULONG; f : LONGINT) : ULONG;
2348
FUNCTION OpenFont(textAttr : pTextAttr) : pTextFont;
2349
FUNCTION OpenMonitor(const monitorName : pCHAR; displayID : ULONG) : pMonitorSpec;
2350
FUNCTION OrRectRegion(region : pRegion;const rectangle : pRectangle) : BOOLEAN;
2351
FUNCTION OrRegionRegion(const srcRegion : pRegion; destRegion : pRegion) : BOOLEAN;
2352
PROCEDURE OwnBlitter;
2353
PROCEDURE PolyDraw(rp : pRastPort; count : LONGINT;const polyTable : pLongint);
2354
PROCEDURE QBlit(blit : pbltnode);
2355
PROCEDURE QBSBlit(blit : pbltnode);
2356
FUNCTION ReadPixel(rp : pRastPort; x : LONGINT; y : LONGINT) : ULONG;
2357
FUNCTION ReadPixelArray8(rp : pRastPort; xstart : ULONG; ystart : ULONG; xstop : ULONG; ystop : ULONG; array_ : pointer; temprp : pRastPort) : LONGINT;
2358
FUNCTION ReadPixelLine8(rp : pRastPort; xstart : ULONG; ystart : ULONG; width : ULONG; array_ : pointer; tempRP : pRastPort) : LONGINT;
2359
PROCEDURE RectFill(rp : pRastPort; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
2360
PROCEDURE ReleasePen(cm : pColorMap; n : ULONG);
2361
PROCEDURE RemFont(textFont : pTextFont);
2362
PROCEDURE RemIBob(bob : pBob; rp : pRastPort; vp : pViewPort);
2363
PROCEDURE RemVSprite(vSprite : pVSprite);
2364
FUNCTION ScalerDiv(factor : ULONG; numerator : ULONG; denominator : ULONG) : WORD;
2365
PROCEDURE ScrollRaster(rp : pRastPort; dx : LONGINT; dy : LONGINT; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
2366
PROCEDURE ScrollRasterBF(rp : pRastPort; dx : LONGINT; dy : LONGINT; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
2367
PROCEDURE ScrollVPort(vp : pViewPort);
2368
PROCEDURE SetABPenDrMd(rp : pRastPort; apen : ULONG; bpen : ULONG; drawmode : ULONG);
2369
PROCEDURE SetAPen(rp : pRastPort; pen : ULONG);
2370
PROCEDURE SetBPen(rp : pRastPort; pen : ULONG);
2371
FUNCTION SetChipRev(want : ULONG) : ULONG;
2372
PROCEDURE SetCollision(num : ULONG; routine : tPROCEDURE; gelsInfo : pGelsInfo);
2373
PROCEDURE SetDrMd(rp : pRastPort; drawMode : ULONG);
2374
FUNCTION SetFont(rp : pRastPort;const textFont : pTextFont) : LONGINT;
2375
PROCEDURE SetMaxPen(rp : pRastPort; maxpen : ULONG);
2376
FUNCTION SetOutlinePen(rp : pRastPort; pen : ULONG) : ULONG;
2377
PROCEDURE SetRast(rp : pRastPort; pen : ULONG);
2378
PROCEDURE SetRGB32(vp : pViewPort; n : ULONG; r : ULONG; g : ULONG; b : ULONG);
2379
PROCEDURE SetRGB32CM(cm : pColorMap; n : ULONG; r : ULONG; g : ULONG; b : ULONG);
2380
PROCEDURE SetRGB4(vp : pViewPort; index : LONGINT; red : ULONG; green : ULONG; blue : ULONG);
2381
PROCEDURE SetRGB4CM(colorMap : pColorMap; index : LONGINT; red : ULONG; green : ULONG; blue : ULONG);
2382
PROCEDURE SetRPAttrsA(rp : pRastPort;const tags : pTagItem);
2383
FUNCTION SetSoftStyle(rp : pRastPort; style : ULONG; enable : ULONG) : ULONG;
2384
FUNCTION SetWriteMask(rp : pRastPort; msk : ULONG) : ULONG;
2385
PROCEDURE SortGList(rp : pRastPort);
2386
PROCEDURE StripFont(font : pTextFont);
2387
PROCEDURE SyncSBitMap(layer : pLayer);
2388
FUNCTION GText(rp : pRastPort;const string_ : pCHAR; count : ULONG) : LONGINT;
2389
FUNCTION TextExtent(rp : pRastPort;const string_ : pCHAR; count : LONGINT; _textExtent : pTextExtent) : smallint;
2390
FUNCTION TextFit(rp : pRastPort;const string_ : pCHAR; strLen : ULONG; textExtent : pTextExtent; constrainingExtent : pTextExtent; strDirection : LONGINT; constrainingBitWidth : ULONG; constrainingBitHeight : ULONG) : ULONG;
2391
FUNCTION TextLength(rp : pRastPort;const string_ : pCHAR; count : ULONG) : smallint;
2392
FUNCTION UCopperListInit(uCopList : pUCopList; n : LONGINT) : pCopList;
2393
PROCEDURE UnlockLayerRom(layer : pLayer);
2394
FUNCTION VBeamPos : LONGINT;
2395
FUNCTION VideoControl(colorMap : pColorMap; tagarray : pTagItem) : BOOLEAN;
2397
PROCEDURE WaitBOVP(vp : pViewPort);
2399
FUNCTION WeighTAMatch(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; targetTags : pTagItem) : smallint;
2400
PROCEDURE WriteChunkyPixels(rp : pRastPort; xstart : ULONG; ystart : ULONG; xstop : ULONG; ystop : ULONG; array_ : pointer; bytesperrow : LONGINT);
2401
FUNCTION WritePixel(rp : pRastPort; x : LONGINT; y : LONGINT) : LONGINT;
2402
FUNCTION WritePixelArray8(rp : pRastPort; xstart : ULONG; ystart : ULONG; xstop : ULONG; ystop : ULONG; array_ : pointer; temprp : pRastPort) : LONGINT;
2403
FUNCTION WritePixelLine8(rp : pRastPort; xstart : ULONG; ystart : ULONG; width : ULONG; array_ : pointer; tempRP : pRastPort) : LONGINT;
2404
FUNCTION XorRectRegion(region : pRegion;const rectangle : pRectangle) : BOOLEAN;
2405
FUNCTION XorRegionRegion(const srcRegion : pRegion; destRegion : pRegion) : BOOLEAN;
2409
PROCEDURE BNDRYOFF (w: pRastPort);
2410
PROCEDURE InitAnimate (animkey: ppAnimOb);
2411
PROCEDURE SetAfPt(w: pRastPort;p: Pointer; n: Byte);
2412
PROCEDURE SetDrPt(w: pRastPort;p: Word);
2413
PROCEDURE SetOPen(w: pRastPort;c: Byte);
2414
PROCEDURE SetWrMsk(w: pRastPort; m: Byte);
2416
PROCEDURE SafeSetOutlinePen(w : pRastPort; c : byte);
2417
PROCEDURE SafeSetWriteMask( w : pRastPort ; m : smallint ) ;
2419
PROCEDURE OFF_DISPLAY (cust: pCustom);
2420
PROCEDURE ON_DISPLAY (cust: pCustom);
2421
PROCEDURE OFF_SPRITE (cust: pCustom);
2422
PROCEDURE ON_SPRITE (cust: pCustom);
2423
PROCEDURE OFF_VBLANK (cust: pCustom);
2424
PROCEDURE ON_VBLANK (cust: pCustom);
2426
{Here we read how to compile this unit}
2427
{You can remove this include and use a define instead}
2428
{$I useautoopenlib.inc}
2429
{$ifdef use_init_openlib}
2430
procedure InitGRAPHICSLibrary;
2431
{$endif use_init_openlib}
2433
{This is a variable that knows how the unit is compiled}
2435
GRAPHICSIsCompiledHow : longint;
2440
{$ifndef dont_use_openlib}
2442
{$endif dont_use_openlib}
2444
PROCEDURE BNDRYOFF (w: pRastPort);
2447
Flags := Flags AND (NOT AREAOUTLINE);
2451
PROCEDURE InitAnimate (animkey: ppAnimOb);
2456
PROCEDURE SetAfPt(w: pRastPort;p: Pointer; n: Byte);
2465
PROCEDURE SetDrPt(w: pRastPort;p: Word);
2470
Flags := Flags OR FRST_DOT;
2475
PROCEDURE SetOPen(w: pRastPort;c: Byte);
2480
Flags := Flags OR AREAOUTLINE;
2484
{ This FUNCTION is fine, but FOR OS39 the SetWriteMask() gfx FUNCTION
2485
should be prefered because it SHOULD operate WITH gfx boards as well.
2486
At least I hope it does.... }
2487
PROCEDURE SetWrMsk(w: pRastPort; m: Byte);
2492
PROCEDURE SafeSetOutlinePen(w : pRastPort; c : byte);
2494
IF pGfxBase(GfxBase)^.LibNode.Lib_Version < 39 THEN begin
2496
w^.Flags := w^.Flags OR AREAOUTLINE;
2498
c := SetOutlinePen(w,c);
2502
PROCEDURE SafeSetWriteMask( w : pRastPort ; m : smallint ) ;
2505
IF pGfxBase(GfxBase)^.LibNode.Lib_Version < 39 THEN w^.Mask := BYTE(m)
2506
ELSE x := SetWriteMask( w, m );
2509
PROCEDURE OFF_DISPLAY (cust: pCustom);
2511
cust^.dmacon := BITCLR OR DMAF_RASTER;
2514
PROCEDURE ON_DISPLAY (cust: pCustom);
2516
cust^.dmacon := BITSET OR DMAF_RASTER;
2519
PROCEDURE OFF_SPRITE (cust: pCustom);
2521
cust^.dmacon := BITCLR OR DMAF_SPRITE;
2524
PROCEDURE ON_SPRITE (cust: pCustom);
2526
cust^.dmacon := BITSET OR DMAF_SPRITE;
2529
PROCEDURE OFF_VBLANK (cust: pCustom);
2531
cust^.intena := BITCLR OR INTF_VERTB;
2534
PROCEDURE ON_VBLANK (cust: pCustom);
2536
cust^.intena := BITSET OR INTF_VERTB;
2539
PROCEDURE AddAnimOb(anOb : pAnimOb; anKey : ppAnimOb; rp : pRastPort);
2552
PROCEDURE AddBob(bob : pBob; rp : pRastPort);
2564
PROCEDURE AddFont(textFont : pTextFont);
2575
PROCEDURE AddVSprite(vSprite : pVSprite; rp : pRastPort);
2587
FUNCTION AllocBitMap(sizex : ULONG; sizey : ULONG; depth : ULONG; flags : ULONG;const friend_bitmap : pBitMap) : pBitMap;
2595
MOVEA.L friend_bitmap,A0
2603
FUNCTION AllocDBufInfo(vp : pViewPort) : pDBufInfo;
2615
FUNCTION AllocRaster(width : ULONG; height : ULONG) : pCHAR;
2628
FUNCTION AllocSpriteDataA(const bm : pBitMap;const tags : pTagItem) : pExtSprite;
2641
PROCEDURE AndRectRegion(region : pRegion;const rectangle : pRectangle);
2646
MOVEA.L rectangle,A1
2653
FUNCTION AndRegionRegion(const srcRegion : pRegion; destRegion : pRegion) : BOOLEAN;
2657
MOVEA.L srcRegion,A0
2658
MOVEA.L destRegion,A1
2665
@end: MOVE.B D0,@RESULT
2669
PROCEDURE Animate(anKey : ppAnimOb; rp : pRastPort);
2681
FUNCTION AreaDraw(rp : pRastPort; x : LONGINT; y : LONGINT) : LONGINT;
2695
FUNCTION AreaEllipse(rp : pRastPort; xCenter : LONGINT; yCenter : LONGINT; a : LONGINT; b : LONGINT) : LONGINT;
2711
FUNCTION AreaEnd(rp : pRastPort) : LONGINT;
2723
FUNCTION AreaMove(rp : pRastPort; x : LONGINT; y : LONGINT) : LONGINT;
2737
PROCEDURE AskFont(rp : pRastPort; textAttr : pTextAttr);
2749
FUNCTION AskSoftStyle(rp : pRastPort) : ULONG;
2761
FUNCTION AttachPalExtra(cm : pColorMap; vp : pViewPort) : LONGINT;
2774
FUNCTION AttemptLockLayerRom(layer : pLayer) : BOOLEAN;
2785
@end: MOVE.B D0,@RESULT
2789
FUNCTION BestModeIDA(const tags : pTagItem) : ULONG;
2801
PROCEDURE BitMapScale(bitScaleArgs : pBitScaleArgs);
2805
MOVEA.L bitScaleArgs,A0
2812
FUNCTION BltBitMap(const srcBitMap : pBitMap; xSrc : LONGINT; ySrc : LONGINT; destBitMap : pBitMap; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG; mask : ULONG; tempA : pCHAR) : LONGINT;
2816
MOVEA.L srcBitMap,A0
2819
MOVEA.L destBitMap,A1
2834
PROCEDURE BltBitMapRastPort(const srcBitMap : pBitMap; xSrc : LONGINT; ySrc : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG);
2838
MOVEA.L srcBitMap,A0
2853
PROCEDURE BltClear(memBlock : pCHAR; byteCount : ULONG; flags : ULONG);
2866
PROCEDURE BltMaskBitMapRastPort(const srcBitMap : pBitMap; xSrc : LONGINT; ySrc : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG;const bltMask : pCHAR);
2870
MOVEA.L srcBitMap,A0
2886
PROCEDURE BltPattern(rp : pRastPort;const mask : pCHAR; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT; maskBPR : ULONG);
2903
PROCEDURE BltTemplate(const source : pCHAR; xSrc : LONGINT; srcMod : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT);
2921
FUNCTION CalcIVG(v : pView; vp : pViewPort) : WORD;
2934
PROCEDURE CBump(copList : pUCopList);
2945
FUNCTION ChangeExtSpriteA(vp : pViewPort; oldsprite : pExtSprite; newsprite : pExtSprite;const tags : pTagItem) : LONGINT;
2950
MOVEA.L oldsprite,A1
2951
MOVEA.L newsprite,A2
2960
PROCEDURE ChangeSprite(vp : pViewPort; sprite : pSimpleSprite; newData : pWORD);
2973
PROCEDURE ChangeVPBitMap(vp : pViewPort; bm : pBitMap; db : pDBufInfo);
2986
PROCEDURE ClearEOL(rp : pRastPort);
2997
FUNCTION ClearRectRegion(region : pRegion;const rectangle : pRectangle) : BOOLEAN;
3002
MOVEA.L rectangle,A1
3009
@end: MOVE.B D0,@RESULT
3013
PROCEDURE ClearRegion(region : pRegion);
3024
PROCEDURE ClearScreen(rp : pRastPort);
3035
PROCEDURE ClipBlit(srcRP : pRastPort; xSrc : LONGINT; ySrc : LONGINT; destRP : pRastPort; xDest : LONGINT; yDest : LONGINT; xSize : LONGINT; ySize : LONGINT; minterm : ULONG);
3054
PROCEDURE CloseFont(textFont : pTextFont);
3065
FUNCTION CloseMonitor(monitorSpec : pMonitorSpec) : BOOLEAN;
3069
MOVEA.L monitorSpec,A0
3076
@end: MOVE.B D0,@RESULT
3080
PROCEDURE CMove(copList : pUCopList; destination : POINTER; data : LONGINT);
3085
MOVE.L destination,D0
3093
FUNCTION CoerceMode(vp : pViewPort; monitorid : ULONG; flags : ULONG) : ULONG;
3107
PROCEDURE CopySBitMap(layer : pLayer);
3118
PROCEDURE CWait(copList : pUCopList; v : LONGINT; h : LONGINT);
3131
PROCEDURE DisownBlitter;
3141
PROCEDURE DisposeRegion(region : pRegion);
3152
PROCEDURE DoCollision(rp : pRastPort);
3163
PROCEDURE Draw(rp : pRastPort; x : LONGINT; y : LONGINT);
3176
PROCEDURE DrawEllipse(rp : pRastPort; xCenter : LONGINT; yCenter : LONGINT; a : LONGINT; b : LONGINT);
3191
PROCEDURE DrawGList(rp : pRastPort; vp : pViewPort);
3203
PROCEDURE EraseRect(rp : pRastPort; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
3218
FUNCTION ExtendFont(font : pTextFont;const fontTags : pTagItem) : ULONG;
3231
FUNCTION FindColor(cm : pColorMap; r : ULONG; g : ULONG; b : ULONG; maxcolor : LONGINT) : LONGINT;
3247
FUNCTION FindDisplayInfo(displayID : ULONG) : POINTER;
3259
FUNCTION Flood(rp : pRastPort; mode : ULONG; x : LONGINT; y : LONGINT) : BOOLEAN;
3273
@end: MOVE.B D0,@RESULT
3277
PROCEDURE FontExtent(const font : pTextFont; fontExtent : pTextExtent);
3282
MOVEA.L fontExtent,A1
3289
PROCEDURE FreeBitMap(bm : pBitMap);
3300
PROCEDURE FreeColorMap(colorMap : pColorMap);
3311
PROCEDURE FreeCopList(copList : pCopList);
3322
PROCEDURE FreeCprList(cprList : pcprlist);
3333
PROCEDURE FreeDBufInfo(dbi : pDBufInfo);
3344
PROCEDURE FreeGBuffers(anOb : pAnimOb; rp : pRastPort; flag : LONGINT);
3357
PROCEDURE FreeRaster(p : pCHAR; width : ULONG; height : ULONG);
3370
PROCEDURE FreeSprite(num : LONGINT);
3381
PROCEDURE FreeSpriteData(sp : pExtSprite);
3392
PROCEDURE FreeVPortCopLists(vp : pViewPort);
3403
FUNCTION GetAPen(rp : pRastPort) : ULONG;
3415
FUNCTION GetBitMapAttr(const bm : pBitMap; attrnum : ULONG) : ULONG;
3428
FUNCTION GetBPen(rp : pRastPort) : ULONG;
3440
FUNCTION GetColorMap(entries : LONGINT) : pColorMap;
3452
FUNCTION GetDisplayInfoData(const handle : POINTER; buf : pCHAR; size : ULONG; tagID : ULONG; displayID : ULONG) : ULONG;
3468
FUNCTION GetDrMd(rp : pRastPort) : ULONG;
3480
FUNCTION GetExtSpriteA(ss : pExtSprite;const tags : pTagItem) : LONGINT;
3493
FUNCTION GetGBuffers(anOb : pAnimOb; rp : pRastPort; flag : LONGINT) : BOOLEAN;
3506
@end: MOVE.B D0,@RESULT
3510
FUNCTION GetOutlinePen(rp : pRastPort) : ULONG;
3522
PROCEDURE GetRGB32(const cm : pColorMap; firstcolor : ULONG; ncolors : ULONG; table : pUlong);
3527
MOVE.L firstcolor,D0
3536
FUNCTION GetRGB4(colorMap : pColorMap; entry : LONGINT) : ULONG;
3549
PROCEDURE GetRPAttrsA(const rp : pRastPort;const tags : pTagItem);
3561
FUNCTION GetSprite(sprite : pSimpleSprite; num : LONGINT) : smallint;
3574
FUNCTION GetVPModeID(const vp : pViewPort) : LONGINT;
3586
PROCEDURE GfxAssociate(const associateNode : POINTER; gfxNodePtr : POINTER);
3590
MOVEA.L associateNode,A0
3591
MOVEA.L gfxNodePtr,A1
3598
PROCEDURE GfxFree(gfxNodePtr : POINTER);
3602
MOVEA.L gfxNodePtr,A0
3609
FUNCTION GfxLookUp(const associateNode : POINTER) : POINTER;
3613
MOVEA.L associateNode,A0
3621
FUNCTION GfxNew(gfxNodeType : ULONG) : POINTER;
3625
MOVE.L gfxNodeType,D0
3633
PROCEDURE InitArea(areaInfo : pAreaInfo; vectorBuffer : POINTER; maxVectors : LONGINT);
3638
MOVEA.L vectorBuffer,A1
3639
MOVE.L maxVectors,D0
3646
PROCEDURE InitBitMap(bitMap : pBitMap; depth : LONGINT; width : LONGINT; height : LONGINT);
3660
PROCEDURE InitGels(head : pVSprite; tail : pVSprite; gelsInfo : pGelsInfo);
3673
PROCEDURE InitGMasks(anOb : pAnimOb);
3684
PROCEDURE InitMasks(vSprite : pVSprite);
3695
PROCEDURE InitRastPort(rp : pRastPort);
3706
FUNCTION InitTmpRas(tmpRas : pTmpRas; buffer : PLANEPTR; size : LONGINT) : pTmpRas;
3720
PROCEDURE InitView(view : pView);
3731
PROCEDURE InitVPort(vp : pViewPort);
3742
PROCEDURE LoadRGB32(vp : pViewPort;const table : pULONG);
3754
PROCEDURE LoadRGB4(vp : pViewPort;const colors : pWord; count : LONGINT);
3767
PROCEDURE LoadView(view : pView);
3778
PROCEDURE LockLayerRom(layer : pLayer);
3789
FUNCTION MakeVPort(view : pView; vp : pViewPort) : ULONG;
3802
FUNCTION ModeNotAvailable(modeID : ULONG) : LONGINT;
3814
PROCEDURE Move(rp : pRastPort; x : LONGINT; y : LONGINT);
3827
PROCEDURE MoveSprite(vp : pViewPort; sprite : pSimpleSprite; x : LONGINT; y : LONGINT);
3841
FUNCTION MrgCop(view : pView) : ULONG;
3853
FUNCTION NewRegion : pRegion;
3864
FUNCTION NextDisplayInfo(displayID : ULONG) : ULONG;
3876
FUNCTION ObtainBestPenA(cm : pColorMap; r : ULONG; g : ULONG; b : ULONG;const tags : pTagItem) : LONGINT;
3892
FUNCTION ObtainPen(cm : pColorMap; n : ULONG; r : ULONG; g : ULONG; b : ULONG; f : LONGINT) : ULONG;
3909
FUNCTION OpenFont(textAttr : pTextAttr) : pTextFont;
3921
FUNCTION OpenMonitor(const monitorName : pCHAR; displayID : ULONG) : pMonitorSpec;
3925
MOVEA.L monitorName,A1
3934
FUNCTION OrRectRegion(region : pRegion;const rectangle : pRectangle) : BOOLEAN;
3939
MOVEA.L rectangle,A1
3946
@end: MOVE.B D0,@RESULT
3950
FUNCTION OrRegionRegion(const srcRegion : pRegion; destRegion : pRegion) : BOOLEAN;
3954
MOVEA.L srcRegion,A0
3955
MOVEA.L destRegion,A1
3962
@end: MOVE.B D0,@RESULT
3966
PROCEDURE OwnBlitter;
3976
PROCEDURE PolyDraw(rp : pRastPort; count : LONGINT;const polyTable : pLongint);
3982
MOVEA.L polyTable,A0
3989
PROCEDURE QBlit(blit : pbltnode);
4000
PROCEDURE QBSBlit(blit : pbltnode);
4011
FUNCTION ReadPixel(rp : pRastPort; x : LONGINT; y : LONGINT) : ULONG;
4025
FUNCTION ReadPixelArray8(rp : pRastPort; xstart : ULONG; ystart : ULONG; xstop : ULONG; ystop : ULONG; array_ : pointer; temprp : pRastPort) : LONGINT;
4043
FUNCTION ReadPixelLine8(rp : pRastPort; xstart : ULONG; ystart : ULONG; width : ULONG; array_ : pointer; tempRP : pRastPort) : LONGINT;
4060
PROCEDURE RectFill(rp : pRastPort; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
4075
PROCEDURE ReleasePen(cm : pColorMap; n : ULONG);
4087
PROCEDURE RemFont(textFont : pTextFont);
4098
PROCEDURE RemIBob(bob : pBob; rp : pRastPort; vp : pViewPort);
4111
PROCEDURE RemVSprite(vSprite : pVSprite);
4122
FUNCTION ScalerDiv(factor : ULONG; numerator : ULONG; denominator : ULONG) : WORD;
4128
MOVE.L denominator,D2
4136
PROCEDURE ScrollRaster(rp : pRastPort; dx : LONGINT; dy : LONGINT; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
4153
PROCEDURE ScrollRasterBF(rp : pRastPort; dx : LONGINT; dy : LONGINT; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
4170
PROCEDURE ScrollVPort(vp : pViewPort);
4181
PROCEDURE SetABPenDrMd(rp : pRastPort; apen : ULONG; bpen : ULONG; drawmode : ULONG);
4195
PROCEDURE SetAPen(rp : pRastPort; pen : ULONG);
4207
PROCEDURE SetBPen(rp : pRastPort; pen : ULONG);
4219
FUNCTION SetChipRev(want : ULONG) : ULONG;
4231
PROCEDURE SetCollision(num : ULONG; routine : tPROCEDURE; gelsInfo : pGelsInfo);
4244
PROCEDURE SetDrMd(rp : pRastPort; drawMode : ULONG);
4256
FUNCTION SetFont(rp : pRastPort;const textFont : pTextFont) : LONGINT;
4269
PROCEDURE SetMaxPen(rp : pRastPort; maxpen : ULONG);
4281
FUNCTION SetOutlinePen(rp : pRastPort; pen : ULONG) : ULONG;
4294
PROCEDURE SetRast(rp : pRastPort; pen : ULONG);
4306
PROCEDURE SetRGB32(vp : pViewPort; n : ULONG; r : ULONG; g : ULONG; b : ULONG);
4321
PROCEDURE SetRGB32CM(cm : pColorMap; n : ULONG; r : ULONG; g : ULONG; b : ULONG);
4336
PROCEDURE SetRGB4(vp : pViewPort; index : LONGINT; red : ULONG; green : ULONG; blue : ULONG);
4351
PROCEDURE SetRGB4CM(colorMap : pColorMap; index : LONGINT; red : ULONG; green : ULONG; blue : ULONG);
4366
PROCEDURE SetRPAttrsA(rp : pRastPort;const tags : pTagItem);
4378
FUNCTION SetSoftStyle(rp : pRastPort; style : ULONG; enable : ULONG) : ULONG;
4392
FUNCTION SetWriteMask(rp : pRastPort; msk : ULONG) : ULONG;
4405
PROCEDURE SortGList(rp : pRastPort);
4416
PROCEDURE StripFont(font : pTextFont);
4427
PROCEDURE SyncSBitMap(layer : pLayer);
4438
FUNCTION GText(rp : pRastPort;const string_ : pCHAR; count : ULONG) : LONGINT;
4452
FUNCTION TextExtent(rp : pRastPort;const string_ : pCHAR; count : LONGINT; _textExtent : pTextExtent) : smallint;
4459
MOVEA.L _textExtent,A2
4467
FUNCTION TextFit(rp : pRastPort;const string_ : pCHAR; strLen : ULONG; textExtent : pTextExtent; constrainingExtent : pTextExtent; strDirection : LONGINT; constrainingBitWidth : ULONG; constrainingBitHeight : ULONG) : ULONG;
4474
MOVEA.L textExtent,A2
4475
MOVEA.L constrainingExtent,A3
4476
MOVE.L strDirection,D1
4477
MOVE.L constrainingBitWidth,D2
4478
MOVE.L constrainingBitHeight,D3
4486
FUNCTION TextLength(rp : pRastPort;const string_ : pCHAR; count : ULONG) : smallint;
4500
FUNCTION UCopperListInit(uCopList : pUCopList; n : LONGINT) : pCopList;
4513
PROCEDURE UnlockLayerRom(layer : pLayer);
4524
FUNCTION VBeamPos : LONGINT;
4535
FUNCTION VideoControl(colorMap : pColorMap; tagarray : pTagItem) : BOOLEAN;
4547
@end: MOVE.B D0,@RESULT
4561
PROCEDURE WaitBOVP(vp : pViewPort);
4582
FUNCTION WeighTAMatch(reqTextAttr : pTextAttr; targetTextAttr : pTextAttr; targetTags : pTagItem) : smallint;
4586
MOVEA.L reqTextAttr,A0
4587
MOVEA.L targetTextAttr,A1
4588
MOVEA.L targetTags,A2
4596
PROCEDURE WriteChunkyPixels(rp : pRastPort; xstart : ULONG; ystart : ULONG; xstop : ULONG; ystop : ULONG; array_ : pointer; bytesperrow : LONGINT);
4606
MOVE.L bytesperrow,D4
4613
FUNCTION WritePixel(rp : pRastPort; x : LONGINT; y : LONGINT) : LONGINT;
4627
FUNCTION WritePixelArray8(rp : pRastPort; xstart : ULONG; ystart : ULONG; xstop : ULONG; ystop : ULONG; array_ : pointer; temprp : pRastPort) : LONGINT;
4645
FUNCTION WritePixelLine8(rp : pRastPort; xstart : ULONG; ystart : ULONG; width : ULONG; array_ : pointer; tempRP : pRastPort) : LONGINT;
4662
FUNCTION XorRectRegion(region : pRegion;const rectangle : pRectangle) : BOOLEAN;
4667
MOVEA.L rectangle,A1
4674
@end: MOVE.B D0,@RESULT
4678
FUNCTION XorRegionRegion(const srcRegion : pRegion; destRegion : pRegion) : BOOLEAN;
4682
MOVEA.L srcRegion,A0
4683
MOVEA.L destRegion,A1
4690
@end: MOVE.B D0,@RESULT
4695
{ Change VERSION and LIBVERSION to proper values }
4697
VERSION : string[2] = '0';
4698
LIBVERSION : longword = 0;
4700
{$ifdef use_init_openlib}
4701
{$Info Compiling initopening of graphics.library}
4702
{$Info don't forget to use InitGRAPHICSLibrary in the beginning of your program}
4705
graphics_exit : Pointer;
4707
procedure ClosegraphicsLibrary;
4709
ExitProc := graphics_exit;
4710
if GfxBase <> nil then begin
4711
CloseLibrary(GfxBase);
4716
procedure InitGRAPHICSLibrary;
4719
GfxBase := OpenLibrary(GRAPHICSNAME,LIBVERSION);
4720
if GfxBase <> nil then begin
4721
graphics_exit := ExitProc;
4722
ExitProc := @ClosegraphicsLibrary;
4724
MessageBox('FPC Pascal Error',
4725
'Can''t open graphics.library version ' + VERSION + #10 +
4726
'Deallocating resources and closing down',
4733
GRAPHICSIsCompiledHow := 2;
4734
{$endif use_init_openlib}
4736
{$ifdef use_auto_openlib}
4737
{$Info Compiling autoopening of graphics.library}
4740
graphics_exit : Pointer;
4742
procedure ClosegraphicsLibrary;
4744
ExitProc := graphics_exit;
4745
if GfxBase <> nil then begin
4746
CloseLibrary(GfxBase);
4753
GfxBase := OpenLibrary(GRAPHICSNAME,LIBVERSION);
4754
if GfxBase <> nil then begin
4755
graphics_exit := ExitProc;
4756
ExitProc := @ClosegraphicsLibrary;
4757
GRAPHICSIsCompiledHow := 1;
4759
MessageBox('FPC Pascal Error',
4760
'Can''t open graphics.library version ' + VERSION + #10 +
4761
'Deallocating resources and closing down',
4766
{$endif use_auto_openlib}
4768
{$ifdef dont_use_openlib}
4770
GRAPHICSIsCompiledHow := 3;
4771
{$Warning No autoopening of graphics.library compiled}
4772
{$Warning Make sure you open graphics.library yourself}
4773
{$endif dont_use_openlib}
4776
END. (* UNIT GRAPHICS *)
4779
$Log: graphics.pas,v $
4780
Revision 1.5 2003/02/10 17:59:46 nils
4781
* fixes for delphi mode
4783
Revision 1.4 2003/02/07 20:48:36 nils
4784
* update for amigaos 3.9
4786
* changed startcode for library
4788
Revision 1.3 2003/01/13 20:36:00 nils
4789
* added the defines use_amiga_smartlink
4790
* and use_auto_openlib
4792
Revision 1.2 2002/11/18 20:54:01 nils
4793
* update check internal log