mirror of
https://github.com/elliotnunn/sys7.1-doc-wip.git
synced 2024-12-12 04:29:09 +00:00
222 lines
8.5 KiB
Plaintext
222 lines
8.5 KiB
Plaintext
;__________________________________________________________________________________________________
|
|
;
|
|
; File: IOPrimitiveEqu.a
|
|
;
|
|
; Contains: This file contains the IOPrimitive equates.
|
|
;
|
|
; Written by: David J. Wong
|
|
;
|
|
; Copyright: © 1989-1993 by Apple Computer, Inc., all rights reserved.
|
|
;
|
|
; Change History (most recent first):
|
|
;
|
|
; <SM5> 11/12/93 ged Added new sound primitive vectors to synch with Horror/Kaos as
|
|
; much as possible (see in-line comments).
|
|
; <SM4> 12/4/92 SWC Added new sound vector table entry for InitSoundHW.
|
|
; <SM3> 6/4/92 KW (NJV,H9) Added sndPlayThruBit equate for DFAC's Playthru enable
|
|
; bit.
|
|
; (NJV,H8) Added sndSonoraReverseDFAC value for use in
|
|
; SonoraDriver.a
|
|
; <SM2> 5/17/92 kc Roll in Horror Changes. Comments follow:
|
|
; <H7> 4/3/92 SWC Added ADB/DebugUtil equates.
|
|
; <H6> 3/25/92 NJV Changed sndSonoraDFAC again to account for new SonoraDFACInit
|
|
; routine
|
|
; <H5> 3/24/92 NJV Changed sndSonoraDFAC to disable playthru
|
|
; <H4> 3/12/92 NJV Added sndSonoraDFAC for Sonora-based machines.
|
|
; <H3> 10/15/91 SWC Added table entry for initializing clock/PRAM hardware.
|
|
; <H2> 10/15/91 SWC Added clock/PRAM equates.
|
|
; <T5> 5/31/91 djw Update DBLite DFAC initialization value
|
|
; <T4> 5/10/91 djw Fix ByPass equate bug, add user AGC field to SoundIOHeader, roll
|
|
; in DBLite equates.
|
|
; <T3> 3/18/91 djw Add routine specific definitions. Change all DFAC specific
|
|
; equates from Egret to DFAC order.
|
|
; <T2> 2/18/91 djw Add mask value for leaving agc enabled on Eclipse.
|
|
; <6> 1/22/92 RB Updated the value of sndEclipseDFAC, sndSpikeDFAC and
|
|
; sndDBLiteDFAC to the values found in Terror.
|
|
; <5> 10/28/91 SAM/KSM Rolled in Regatta changes.
|
|
;
|
|
; Regatta Change History:
|
|
;
|
|
; <1> 4/30/91 djw Fix ByPass equate bug, add user AGC field to SoundIOHeader,
|
|
; roll in DBLite equates.
|
|
; 7.0 Change History:
|
|
;
|
|
; <4> 8/22/91 JSM Clean up header.
|
|
; <3> 8/7/91 KIP Add macro to test for existance of one of the sound primitive
|
|
; vectors.
|
|
; <2> 6/11/91 gbm Take out conditional for Regatta
|
|
; <1> 4/3/91 KIP first checked in
|
|
; <3> 3/18/91 djw Add routine specific definitions. Change all DFAC specific
|
|
; equates from Egret to DFAC order.
|
|
; <2> 2/18/91 djw Add mask value for leaving agc enabled on Eclipse.
|
|
; <1> 2/15/91 djw first checked in
|
|
|
|
|
|
|
|
;====================================
|
|
; Sound Definitions
|
|
;====================================
|
|
|
|
; Header definition for sound primitive private globals
|
|
|
|
SoundIOHeader record {SndBeginTable},increment
|
|
DFACPad ds.b 1 ; padding <t4>
|
|
UserAGC ds.b 1 ; user AGC setting <t4>
|
|
UserVolume ds.b 1 ; user volume level
|
|
DFAClast ds.b 1 ; last DFAC value written
|
|
SndTblLength ds.w 1 ; length of tables in entries
|
|
SndBeginTable equ *
|
|
SoundIOHeaderSize equ *-SoundIOHeader
|
|
endr
|
|
|
|
|
|
; Index definitions for vector table
|
|
|
|
sndDFACInit equ 0 ; RAM-less initialization routine for DFAC
|
|
sndDFACSend equ 1 ; send a byte to DFAC
|
|
sndPlaybackVol equ 2 ; set the playback volume
|
|
sndEnableInt equ 3 ; enable sound interrupt
|
|
sndDisableInt equ 4 ; disable sound interrupt
|
|
sndClearInt equ 5 ; clear sound interrupt
|
|
sndInputSelect equ 6 ; select sound input source
|
|
sndInputSource equ 7 ; return current sound input source
|
|
sndAuxByPass equ 8 ; auxiliary sound bypass enable/disable
|
|
sndPlayThruVol equ 9 ; set playthrough (recording monitor) volume
|
|
sndAGCcontrol equ $a ; AGC enable/disable
|
|
sndInitSoundHW equ $b ; initialize sound hardware <SM4>
|
|
dontUse1 equ $c ; Horror ROM defined vectors - don't use these 3
|
|
dontUse2 equ $d ; these vectors are out of synch with Horror, and
|
|
dontUse3 equ $e ; any Gibbly code accessing them could be dangerous
|
|
sndInitSoundHW2 equ $f ; initialize sound hardware (alias to vector $b above)
|
|
sndInitGlobals equ $10 ; (re)initialize any custom sound globals
|
|
sndModemSound equ $11 ; modem sound channel control
|
|
sndModemSndVol equ $12 ; modem sound volume control
|
|
sndGetSmplRate equ $13 ; get the current hardware sample rate
|
|
sndSetSmplRate equ $14 ; set the current hardware sample rate
|
|
sndGetInputGain equ $15 ; get the current hardware input gain
|
|
sndSetInputGain equ $16 ; set the current hardware input gain
|
|
sndPlayThruCntl equ $17 ; enable/disable sound playthrough path
|
|
sndSoundHWCntl equ $18 ; grab (or release) the sound HW from (to) the OS
|
|
sndSoundHWState equ $19 ; returns the state of the sound HW
|
|
sndVirtualHWHook equ $1A ; calling hook for SW emulated sound features
|
|
|
|
; Routine specific definitions
|
|
|
|
; sndInputSelect and sndInputSource - sound input source selection
|
|
sndInputOff equ 0 ; no sound input source
|
|
sndMicrophone equ 1 ; microphone input source
|
|
sndAuxiliary equ 2 ; auxillary source
|
|
sndLineIn equ 3 ; line in <7>
|
|
sndInternalMic equ 4 ; internal microphone <7> <H11>
|
|
|
|
; sndAGCControl - AGC control settings
|
|
sndDisableAGC equ 0 ; AGC off
|
|
sndEnableAGC equ 1 ; AGC on
|
|
sndDisableTCA equ 2 ; TCA off
|
|
|
|
|
|
; Sound routine miscellaneous definitions
|
|
|
|
DFACInitLen equ 1 ; number of bytes to send DFAC for initialization
|
|
|
|
; DFAC specific definitions (in DFAC order - s0 is lsb)
|
|
|
|
sndAGCMask equ $f3 ; mask off s2,s3 for AGC control
|
|
sndTCAOff equ $00 ; AGC off with minimum gain
|
|
sndAGCOn equ $08
|
|
sndAGCOff equ $04 ; AGC off with maximum gain
|
|
|
|
sndSelectMask equ $fc ; mask off s0,s1
|
|
sndSelectOff equ $00 ; no input source
|
|
sndSelectMike equ $01 ; microphone source selected
|
|
sndSelectAux equ $02 ; auxillary source selected
|
|
|
|
sndPlayThruMask equ $1f ; mask off s5,s6,s7
|
|
sndPlayThruBit equ $04 ; Playthru enable bit on DFAC
|
|
|
|
sndByPassMask equ $ef ; mask off s4 for aux bypass
|
|
sndByPassOff equ $00 ; disable bypass mode
|
|
sndByPassOn equ $10 ; enable bypass mode <t4>
|
|
|
|
sndSonoraDFAC equ $ea ; DFAC setting (play) in DFAC order <h5>
|
|
sndSonoraReverseDFAC equ $57 ; DFAC setting (play) in REVERSE DFAC order <h8>
|
|
sndElsieDFAC equ $ea ; initial dfac values
|
|
sndEricksonDFAC equ $00
|
|
sndEclipseDFAC equ $00 ; <t6>
|
|
sndSpikeDFAC equ $00 ; <t6>
|
|
sndTimDFAC equ $00
|
|
sndDBLiteDFAC equ $E2 ; <t5>
|
|
|
|
sndModemSndOff equ $00 ; selectors for sndModemSound vector <7>
|
|
sndModemSndOn equ $01 ; |
|
|
; v
|
|
sndPlayThruOff equ $00 ; selectors for sndPlayThruCntl vector
|
|
sndPlayThruOn equ $01
|
|
|
|
sndReleaseHW equ $00 ; selectors for sndGrabHWcntl
|
|
sndGrabHW equ $01
|
|
|
|
sndVHInit equ $00 ; selectors for sndVirtualHWHook
|
|
sndSinDrvrOpen equ $01 ; ^
|
|
sndSinDrvrClose equ $02 ; |
|
|
sndSinBuffReady equ $03 ; <7>
|
|
|
|
; Sound macros to access these routines through ExpandMem
|
|
|
|
macro ; <t4>
|
|
jsrTBL &selector
|
|
with ExpandMemRec
|
|
move.l a0,-(sp)
|
|
movea.l ([ExpandMem],emSndPrimitives),a0
|
|
tst.l &selector*4(a0)
|
|
beq.s @mDone
|
|
movea.l &selector*4(a0),a0
|
|
jsr (a0)
|
|
@mDone
|
|
movea.l (sp)+,a0
|
|
endwith
|
|
endm
|
|
|
|
; macro to test if a one of the vectors exists
|
|
|
|
macro
|
|
tstTBL &selector
|
|
with ExpandMemRec
|
|
move.l a0,-(sp)
|
|
movea.l ([ExpandMem],emSndPrimitives),a0
|
|
tst.l &selector*4(a0)
|
|
movea.l (sp)+,a0
|
|
endwith
|
|
endm
|
|
|
|
|
|
;====================================
|
|
; Clock/PRAM Definitions
|
|
;====================================
|
|
|
|
; index definitions for vector table
|
|
|
|
cpInitHardware EQU 0 ; initialize hardware (RAM-less) <H3>
|
|
cpWrProtOff EQU 1 ; write-enable PRAM (RAM-less) <H2>
|
|
cpWrProtOn EQU 2 ; write-protect PRAM (RAM-less) <H2>
|
|
cpRdXByte EQU 3 ; read PRAM byte (RAM-less) <H2>
|
|
cpWrXByte EQU 4 ; write PRAM byte (RAM-less) <H2>
|
|
cpXPRAMIO EQU 5 ; read/write PRAM byte[s] (no traps) <H2>
|
|
cpXParam EQU 6 ; read/write PRAM byte[s] (trap-based) <H2>
|
|
cpReadTime EQU 7 ; read the clock (trap-based) <H2>
|
|
cpWriteTime EQU 8 ; write to the clock (trap-based) <H2>
|
|
|
|
|
|
;====================================
|
|
; ADB Definitions
|
|
;====================================
|
|
|
|
; index definitions for vector table
|
|
|
|
adbInitProc EQU 0 ; initialize HW dependent procs, etc. <H7>
|
|
adbEnableKbdNMI EQU 1 ; enable NMI for debugger <H7>
|
|
adbDebugEnter EQU 2 ; DebugUtil enter <H7>
|
|
adbDebugExit EQU 3 ; DebugUtil exit <H7>
|
|
adbDebugPoll EQU 4 ; DebugUtil ADB polling <H7>
|
|
adbKeySwSecure EQU 5 ; check for keyswitch in SECURE position<H7>
|