;****************************************************************************
;
;	JAGUAR.S  Hardware Equates for JAGUAR System
;
;	Copyright 1992 Atari U.S. Corp.
;
;****************************************************************************

					; 68000-GPU Program RAM location
					;	conflict exists.
					;	68000 thinks its at
					;		$D00000 + $3000
					;	GPU thinks its at
					;		$400000 + $3000

ORGBASE		EQU	$00400000	; GPU Internal base address
GPUORG		EQU	ORGBASE + $3000	; GPU Program base address

SEMAPHORE	EQU	$0000BFF0	; kludge to handle semaphore in
					; 68000-GPU address conflict

;****************************************************************************

;
;	JAGUAR REGISTERS
;


MEMCON1		EQU	BASE + $0	; Memory Configuration Register One
MEMCON2		EQU	BASE + $2	; Memory Configuration Register Two
HC		EQU	BASE + $4	; Horizontal Count
VC		EQU	BASE + $6	; Vertical Count
LPH		EQU	BASE + $8	; Horizontal Lightpen
LPV		EQU	BASE + $0a	; Vertical Lightpen
CLK1		EQU	BASE + $0c	; System Clock Frequency
CLK2		EQU	BASE + $0e	; Video Clock Frequency
OB0		EQU	BASE + $10	; Current Object Phrase
OB1		EQU	BASE + $12
OB2		EQU	BASE + $14
OB3		EQU	BASE + $16
OLP		EQU	BASE + $20	; Object List Pointer
OLPLO		EQU	BASE + $20
OLPHI		EQU	BASE + $22
ODP		EQU	BASE + $24	; Object Data Pointer
OBF		EQU	BASE + $26	; Object Processor Flag
VMODE		EQU	BASE + $28	; Video Mode
BORD1		EQU	BASE + $2a	; Border Color (Red & Green)
BORD2		EQU	BASE + $2c	; Border Color (Blue)
HP		EQU	BASE + $2e	; Horizontal Period
HBB		EQU	BASE + $30	; Horizontal Blanking Begin
HBE		EQU	BASE + $32	; Horizontal Blanking End
HS		EQU	BASE + $34	; Horizontal Sync
HVS		EQU	BASE + $36	; Horizontal Vertical Sync
HDB1		EQU	BASE + $38	; Horizontal Display Begin One
HDB2		EQU	BASE + $3a	; Horizontal Display Begin Two
HDE		EQU	BASE + $3c	; Horizontal Display End
VP		EQU	BASE + $3e	; Vertical Period
VBB		EQU	BASE + $40	; Vertical Blanking Begin
VBE		EQU	BASE + $42	; Vertical Blanking End
VS		EQU	BASE + $44	; Vertical Sync
VDB		EQU	BASE + $46	; Vertical Display Begin
VDE		EQU	BASE + $48	; Vertical Display End
VEB		EQU	BASE + $4a	; Vertical Equalization Begin
VEE		EQU	BASE + $4c	; Vertical Equalization End
VI		EQU	BASE + $4e	; Vertical Interrupt
PIT0		EQU	BASE + $50	; Programmable Interrupt Timer (Lo)
PIT1		EQU	BASE + $52	; Programmable Interrupt Timer (Hi)
HEQ		EQU	BASE + $54	; Horizontal Equalization End
TEST1		EQU	BASE + $56	; Undocumented Register - DO NOT USE
BG		EQU	BASE + $58	; Background Color

INT1		EQU	BASE + $e0	; CPU Interrupt Control Register
INT2		EQU	BASE + $e2	; CPU Interrupt Resume Register

CLUT		EQU	BASE + $400	; Color Lookup Table

LBUFA		EQU	BASE + $800	; Line Buffer A
LBUFB		EQU	BASE + $1000	; Line Buffer B
LBUFC		EQU	BASE + $1800	; Line Buffer Current

;
;	GPU REGISTERS
;
G_FLAGS		EQU	BASE + $2100	; GPU Flags
G_MTXC		EQU	BASE + $2104	; GPU Matrix Control
G_MTXA		EQU	BASE + $2108	; GPU Matrix Address
G_BIGEND	EQU	BASE + $210c	; GPU Data Organization
G_PC		EQU	BASE + $2110	; GPU Program Counter
G_CTRL		EQU	BASE + $2114	; GPU Operation Control/Status
G_HIDATA	EQU	BASE + $2118	; GPU Bus Interface high data
G_REMAIN	EQU	BASE + $211c	; GPU Division Remainder
G_RAM		EQU	BASE + $3000	; GPU Internal RAM
G_ENDRAM	EQU	G_RAM+ $1000	; 4K bytes

;
;	BLTTER REGISTERS
;
A1_BASE		EQU	BASE + $2200	; A1 Base Address
					;	destination (0,0)
A1_FLAGS	EQU	BASE + $2204	; A1 Control Flags
;A1_WIN		EQU	BASE + $2208	; A1 Window Size
A1_CLIP		EQU	BASE + $2208	; A1 Window Size
;A1_PTR		EQU	BASE + $220C	; A1 Pointer
A1_PIXEL	EQU	BASE + $220C	; A1 Pointer
A1_STEP		EQU	BASE + $2210	; A1 Step (Integer Part)
;A1_STEPF	EQU	BASE + $2214	; A1 Step (Fractional Part)
A1_FSTEP	EQU	BASE + $2214	; A1 Step (Fractional Part)
;A1_FRAC	EQU	BASE + $2218	; A1 Pointer (Fractional)
A1_FPIXEL	EQU	BASE + $2218	; A1 Pointer (Fractional)
A1_INC		EQU	BASE + $221C	; A1 Increment (Integer Part)
;A1_INCF	EQU	BASE + $2220	; A1 Increment (Fractional Part)
A1_FINC		EQU	BASE + $2220	; A1 Increment (Fractional Part)

A2_BASE		EQU	BASE + $2224	; A2 Base Address source (0,0)
A2_FLAGS	EQU	BASE + $2228	; A2 Control Flags
A2_MASK		EQU	BASE + $222C	; A2 Window Mask
;A2_PTR		EQU	BASE + $2230	; A2 Pointer
A2_PIXEL	EQU	BASE + $2230	; A2 Pointer
A2_STEP		EQU	BASE + $2234	; A2 Step (Integer)

B_CMD		EQU	BASE + $2238	; Command
B_COUNT		EQU	BASE + $223C	; Counters
B_SRCD		EQU	BASE + $2240	; Source Data
B_DSTD		EQU	BASE + $2248	; Destination Data
B_DSTZ		EQU	BASE + $2250	; Destination Z
B_SRCZ1		EQU	BASE + $2258	; Source Z (Integer)
B_SRCZ2		EQU	BASE + $2260	; Source Z (Fractional)
B_PATD		EQU	BASE + $2268	; Pattern Data
B_IINC		EQU	BASE + $2270	; Intensity Increment
B_ZINC		EQU	BASE + $2274	; Z Increment

;****************************************************************************
;*	Generic defines
;****************************************************************************
;

ENDRAM		EQU	$100000		; 1 MEG of DRAM

;****************************************************************************;
LEDS		EQU	BASE + $1f001	; If you say so, Leonard ..
;
;	CPU Registers
;
LEVEL2		EQU	4*26	; 68000 Level2 Autovector
;
;****************************************************************************
;*		EOF
;****************************************************************************

