;
; ** $VER: blit.h 39.1 (18.9.92)
; ** Includes Release 40.15
; **
; ** Defines for direct hardware use of the blitter.
; **
; ** (C) Copyright 1985-1993 Commodore-Amiga, Inc.
; **     All Rights Reserved
;

#HSIZEBITS = 6
#VSIZEBITS = 16-#HSIZEBITS
#HSIZEMASK = $3f       ;  2^6 -- 1
#VSIZEMASK = $3FF       ;  2^10 - 1

;  all agnii support horizontal blit of at least 1024 bits (128 bytes) wide
;  some agnii support horizontal blit of up to 32768 bits (4096 bytes) wide

#NO_BIG_BLITS = 0

;CNIF #NO_BIG_BLITS = 0
  #MINBYTESPERROW = 128
  #MAXBYTESPERROW = 4096
;CELSE
;  #MAXBYTESPERROW = 128
;CEND

;  definitions for blitter control register 0

#ABC    = $80
#ABNC   = $40
#ANBC   = $20
#ANBNC  = $10
#NABC   = $8
#NABNC  = $4
#NANBC  = $2
#NANBNC = $1

;  some commonly used operations
#A_OR_B   = #ABC | #ANBC  | #NABC |  #ABNC | #ANBNC |#NABNC
#A_OR_C   = #ABC | #NABC | #ABNC |  #ANBC | #NANBC |#ANBNC
#A_XOR_C   = #NABC| #ABNC | #NANBC | #ANBNC
#A_TO_D   = #ABC| #ANBC| #ABNC| #ANBNC

#BC0B_DEST = 8
#BC0B_SRCC = 9
#BC0B_SRCB   = 10
#BC0B_SRCA = 11
#BC0F_DEST = $100
#BC0F_SRCC = $200
#BC0F_SRCB = $400
#BC0F_SRCA = $800

#BC1F_DESC   = 2       ;  blitter descend direction

#DEST = $100
#SRCC = $200
#SRCB = $400
#SRCA = $800

#ASHIFTSHIFT  = 12       ;  bits to right align ashift value
#BSHIFTSHIFT  = 12       ;  bits to right align bshift value

;  definations for blitter control register 1
#LINEMODE     = $1
#FILL_OR      = $8
#FILL_XOR     = $10
#FILL_CARRYIN = $4
#ONEDOT      = $2      ;  one dot per horizontal line
#OVFLAG      = $20
#SIGNFLAG     = $40
#BLITREVERSE  = $2

#SUD      = $10
#SUL      = $8
#AUL      = $4

#OCTANT8   = 24
#OCTANT7   = 4
#OCTANT6   = 12
#OCTANT5   = 28
#OCTANT4   = 20
#OCTANT3   = 8
#OCTANT2   = 0
#OCTANT1   = 16

;  stuff for blit qeuer
Structure bltnode
    *n.bltnode
     *Function.l
    stat.b
    blitsize.w
    beamsync.w
    *cleanup.l
EndStructure

;  defined bits for bltstat
#CLEANUP = $40
#CLEANME = #CLEANUP

