;**************************************************************************
; (C)1993 ATARI CORP.       SECRET & CONFIDENTIAL       ALL RIGHTS RESERVED
;
;
;                                CD_inits.inc
;
;       This include file contains all of the equates needed for the CDROM
;	functions.
;
;                                REVISION HISTORY
;
; REV.  DATE       BY            DESCRIPTION OF EDIT
; """"  """"       ""            """""""""""""""""""
; 1.00  14 Jun 93  DMS   Original. Equates taken from DATA.213
; 2.00  25 Jun 93  DMS   Add more variables for full DSA Bus testing
; 3.00  19 Jul 93  DMS   Add Butch's registers. move variable mem up.
; 4.00  26 Jul 93  DMS   Add more CD variables
; 5.00  19 Aug 93  DMS   Fix half-buff pointer
; 6.01  17 Sep 93  DMS   Modify for 2 MB Sylvester (Rapier Rev 2 PCB)
; 6.02  20 Sep 93  DMS   For CD.s demos and Programmer's Interface doc
; 6.03  01 Oct 93  DMS   Add CD_retry
;
; 3.01	18 Nov 93  PKF	 Deleted the non-relocatable variable storage for CD
;			 This variable storage is now relocatable and are
;			 defined in file cd.s
;
;			 Also the non-relocatable Butch's register shadow
;			 is now made relocatable and are defined in file cd.s
;
;****************************************************************************

; Butch's hardware registers

BUTCH		equ	$DFFF00		; base of Butch=interrupt control register, R/W
DSCNTRL		equ	BUTCH+4		; DSA control register, R/W
DS_DATA		equ	BUTCH+$A	; DSA TX/RX data, R/W
I2CNTRL		equ	BUTCH+$10	; i2s bus control register, R/W
SBCNTRL		equ	BUTCH+$14	; CD subcode control register, R/W
SUBDATA		equ	BUTCH+$18	; Subcode data register A
SUBDATB		equ	BUTCH+$1C	; Subcode data register B
SB_TIME		equ	BUTCH+$20	; Subcode time and compare enable (D24)
I2SDAT1		equ	BUTCH+$24	; i2s FIFO data
I2SDAT2		equ	BUTCH+$28	; i2s FIFO data

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

; COMMANDS TO SERVO PROCESSOR

US_PLAYTITLE	equ	$01		; param = Title Number (Hex)
US_STOP		equ	$02		; param = xx
US_READTOC	equ	$03		; param = Session Number (Hex)
US_PAUSE	equ	$04		; param = xx
US_UNPAUSE	equ	$05		; param = xx

US_RESERVED_00	equ	$06		; param = --
US_RESERVED_01	equ	$07		; param = --
US_RESERVED_02	equ	$08		; param = --

US_TITLELEN	equ	$09		; param = Track Number (Hex)
US_OPENTRAY	equ	$0A		; param = xx
US_CLOSETRAY	equ	$0B		; param = xx

US_COMPLETETIME	equ	$0D		; param = xx

US_GOTOTIME_MIN	equ	$10		; param = Abs. Min. (Hex)
US_GOTOTIME_SEC	equ	$11		; param = Abs. Sec. (Hex)
US_GOTOTIME_FRM	equ	$12		; param = Abs. Frm. (Hex)

US_READLONGTOC	equ	$14		; param = Session Number (Hex)
US_SETMODE	equ	$15		; param = Mode Settings

US_GETLASTERR	equ	$16		; param = xx
US_CLEARERR	equ	$17		; param = xx

US_SPINUP	equ	$18		; param = Session Number (Hex)

US_AB_STARTMIN	equ	$20		; param = Abs. Start Time Min. (Hex)
US_AB_STARTSEC	equ	$21		; param = Abs. Start Time Sec. (Hex)
US_AB_STARTFRM	equ	$22		; param = Abs. Start Time Frm. (Hex)
US_AB_STOPMIN	equ	$23		; param = Abs. Stop Time Min. (Hex)
US_AB_STOPSEC	equ	$24		; param = Abs. Stop Time Sec. (Hex)
US_AB_STOPFRM	equ	$25		; param = Abs. Stop Time Frm. (Hex)

US_AB_RELEASE	equ	$26		; param = xx

US_RESERVED_03	equ	$30		; param = --
US_RESERVED_04	equ	$30		; param = --
US_RESERVED_05	equ	$30		; param = --
US_RESERVED_06	equ	$30		; param = --
US_RESERVED_07	equ	$30		; param = --
US_RESERVED_08	equ	$30		; param = --

US_DISCSTATUS	equ	$50		; param = xx
US_SETVOLUME	equ	$51		; param = Volume Level (Hex)

US_RESERVED_09	equ	$52		; param = --

US_SESNINFO	equ	$54		; param = xx
US_SETDACMODE	equ	$70		; param = DAC Mode

US_RES_VEND_00	equ	$A0		; param = --
US_RES_VEND_01	equ	$A1		; param = --
US_RES_VEND_02	equ	$A2		; param = --
US_RES_VEND_03	equ	$A3		; param = --
US_RES_VEND_04	equ	$A4		; param = --
US_RES_VEND_05	equ	$A5		; param = --
US_RES_VEND_06	equ	$A6		; param = --
US_RES_VEND_07	equ	$A7		; param = --
US_RES_VEND_08	equ	$A8		; param = --
US_RES_VEND_09	equ	$A9		; param = --
US_RES_VEND_0A	equ	$AA		; param = --
US_RES_VEND_0B	equ	$AB		; param = --
US_RES_VEND_0C	equ	$AC		; param = --
US_RES_VEND_0D	equ	$AD		; param = --
US_RES_VEND_0E	equ	$AE		; param = --
US_RES_VEND_0F	equ	$AF		; param = --

US_RESERVED_0A	equ	$80		; param = --
US_RESERVED_0B	equ	$81		; param = --
US_RESERVED_0C	equ	$82		; param = --
US_RESERVED_0D	equ	$83		; param = --

US_RESERVED_0E	equ	$C0		; param = --
US_RESERVED_0F	equ	$C1		; param = --
US_RESERVED_10	equ	$2C		; param =

; SERVICE COMMANDS

SV_SERV_OFF	equ	$F0		; param = $00
SV_SERV_INFO	equ	$F0		; param = $01

SV_SLEDGE_OFF	equ	$F1		; param = $00
SV_SLEDGE300MS	equ	$F1		; param = $01

SV_FOCUS_OFF	equ	$F2		; param = $00
SV_FOCUS_ON	equ	$F2		; param = $01

SV_TTMOTOR_OFF	equ	$F3		; param = $00
SV_TTMOTOR_ON	equ	$F3		; param = $01

SV_RADIAL_OFF	equ	$F4		; param = $00
SV_RADIAL_ON	equ	$F4		; param = $01

; COMMANDS FROM SERVO PROCESSOR

SP_FOUND	equ	$01		; param = xx

SP_STOPPED	equ	$02		; param = xx

SP_DISCSTATUS	equ	$03		; param = $00 - No Disc Present
					;       = $01 - Disc Present

SP_ERRORVAL	equ	$04		; param = Error Value

SP_TITLELEN_0	equ	$09		; param = LSB Byte of Sec. (Hex)
SP_TITLELEN_1	equ	$0A		; param = MSB Byte of Sec. (Hex)

SP_TRAYMOVING	equ	$0B		; param = $00 - Moving inside
					;	= $01 - Moving Outside
SP_TRAYOPEN	equ	$0C		; param = xx
SP_TRAYCLOSE	equ	$0D		; param = xx

SP_ACT_TITLE	equ	$10		; param = New Track Number (Hex)
SP_ACT_INDEX	equ	$11		; param = New Index Number (Hex)
SP_ACT_MINUTES	equ	$12		; param = New Minutes (Hex)
SP_ACT_SECONDS	equ	$13		; param = New Seconds (Hex)

SP_ABS_TIMEMIN	equ	$14		; param = New Abs. Minutes (Hex)
SP_ABS_TIMESEC	equ	$15		; param = New Abs. Seconds (Hex)
SP_ABS_TIMEFRM	equ	$16		; param = New Abs. Frames (Hex)

SP_MODESTATUS	equ	$17		; param = Mode Settings

SP_TOC_MINTRK	equ	$20		; param = Min. Track Number (Hex)
SP_TOC_MAXTRK	equ	$21		; param = Max. Track Number (Hex)
SP_TOC_STRTMIN	equ	$22		; param = Start Time lead-out Min. (Hex)
SP_TOC_STRTSEC	equ	$23		; param = Start Time lead-out Sec. (Hex)
SP_TOC_STRTFRM	equ	$24		; param = Start Time lead-out Frm. (Hex)

SP_AB_RELEASED	equ	$26		; param = xx

SP_RESERVED_00	equ	$30		; param = --
SP_RESERVED_01	equ	$31		; param = --
SP_RESERVED_02	equ	$32		; param = --
SP_RESERVED_03	equ	$33		; param = --
SP_RESERVED_04	equ	$34		; param = --

SP_VOLLEVEL	equ	$51		; param = Volume Level (Hex)

SP_RESERVED_05	equ	$52		; param = --

SP_SESNINFO	equ	$54		; param = Number of Sessions (Hex)

SP_RESERVED_06	equ	$5D		; param = --
SP_RESERVED_07	equ	$5E		; param = --
SP_RESERVED_08	equ	$5F		; param = --

SP_LONGTOC_TRK	equ	$60		; param = Track Number (Hex)
SP_LONGTOC_FLD	equ	$61		; param = Control and Address Field
SP_LONGTOC_MIN	equ	$62		; param = Start Time Minutes (Hex)
SP_LONGTOC_SEC	equ	$63		; param = Start Time Seconds (Hex)
SP_LONGTOC_FRM	equ	$64		; param = Start Time Frames (Hex)

SP_RESERVED_09	equ	$65		; param = --
SP_RESERVED_0A	equ	$66		; param = --
SP_RESERVED_0B	equ	$67		; param = --
SP_RESERVED_0C	equ	$68		; param = --

SP_DACMODE	equ	$70		; param = DAC Mode
SP_SERV_VERSION	equ	$F0		; param = Servo Version Number

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

