supermario/base/SuperMarioProj.1994-02-09/Interfaces/AIncludes/Video.a
2019-06-29 23:17:50 +08:00

294 lines
13 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;
; File: Video.a
;
; Contains: Equates for video drivers as defined in CARDS & DRIVERS.
;
; Written by: Dave Fung, but hell deny it.
;
; Copyright: © 1990, 1992-1993 by Apple Computer, Inc., all rights reserved.
;
; Change History (most recent first):
;
; <SM8> 12/13/93 PN Roll in KAOs and Horror changes to support Malcom and AJ
; machines
; <SM7> 08-06-93 jmp Added more csDisplayTypes.
; <SM6> 6/25/93 IH Update kHasSerialSense to kHasDirectConnect
; <5> 6/1/93 IH Add VDSwitchInfo
; <SM4> 04-07-93 jmp Added the csc ids of one of the new driver calls for supporting
; the Display Manager.
; <SM3> 4/6/93 fau Synchronized with Ludwig.
; <LW3> 4/5/93 fau Removed the now-private codes for Cyclone's video-in driver, as
; well as the records defined for them.
; <SM2> 4/5/93 chp Synchronize with Ludwig.
; <LW2> 2/16/93 fau Changed VDCompOut and added VDInternalInfo for changes to the
; Civic driver.
; <SM4> 7/7/92 CSS Update from Reality.
; <18> 7/1/92 DCL This file is the replacement for the now obsolete VideoEqu.a.
; Changed the 'including' name to match the new file name.
; <SM3> 6/19/92 KW (fau,P3) Added the interface for VDCompositeOut. Added the
; latest cs Codes for the new Cyclone calls.
; <SM2> 5/20/92 KW Roll in from Pandora, P2
;----------------------------------------------------
; Pre SuperMario Comments below
;----------------------------------------------------
; <17> 6/14/91 JL Checked in official MPW 3.2ƒ version. Temporarily lost comment
; about sGammaDir and sRsrcVidNames - will be restored. Didn't
; publish comment about commented out mTable.
; <16> 1/30/91 gbm sab, #38: Change the already including this file variable to
; all uppercase (for security reasons)
; <15> 7/18/90 jmp Removed the cscVidInit equate and changed cscVidKillIO to
; cscKillIO.
; <14> 7/11/90 jmp Added mode equates for video cards NOT having contiguous (i.e.,
; 1, 2, 4, 8 [, 16, 32]) modes.
; <13> 7/11/90 jmp Added comment about some equates here; cleaned up <12>s
; comment, removed goofy “to do.”
; <12> 6/27/90 jmp Added equate names from 2nd Ed. of CARDS & DRIVERS.
;
; To Do:
;
; Version: 3.3
; Created: Friday, October 20, 1989 at 10:11:40 PM
;
; File: VideoEqu.a
;
; Assembler Interface to the Macintosh Libraries
; Copyright Apple Computer, Inc. 1986-1988
; All Rights Reserved
;
; Modification History:
; <6> 03/02/90 JAL secondaryINIT belongs in ROMEqu.a
; <4> 03/02/90 JAL Added sixteenBitMode, thirtyTwoBitMode,
; secondaryINIT, and spGammaDir.
;<C742/02Feb87 GWN> Changed video parameters to an sBlock.
; 11 Jun 87 KLH Added Control Codes & Status Codes.
; 2 Jul 87 KLH Added VDSetEntryRecord.
; 1.0 CCH 11/ 9/1988 Adding to EASE.
; END EASE MODIFICATION HISTORY
;•1.1 CCH 9/14/1988 Updated EASE with the current rev of this file.
;--------------------------------------------------------------------
IF &TYPE('__INCLUDINGVIDEO__') = 'UNDEFINED' THEN
__INCLUDINGVIDEO__ SET 1
;
; Video sResource parameter Id's
;
mBaseOffset EQU 1 ;Id of mBaseOffset.
mRowBytes EQU 2
mBounds EQU 3
mVersion EQU 4
mHRes EQU 5
mVRes EQU 6
mPixelType EQU 7
mPixelSize EQU 8
mCmpCount EQU 9
mCmpSize EQU 10
mPlaneBytes EQU 11
;* mTable EQU 12
;* mPageCnt EQU 13
mVertRefRate EQU 14
mVidParams EQU 1 ;Video parameter block id.
mTable EQU 2 ;Offset to the table.
mPageCnt EQU 3 ;Number of pages
mDevType EQU 4 ;Device Type
;
; Video sResource List Id's
;
oneBitMode EQU 128 ;Id of OneBitMode Parameter list.
twoBitMode EQU 129 ;Id of TwoBitMode Parameter list.
fourBitMode EQU 130 ;Id of FourBitMode Parameter list.
eightBitMode EQU 131 ;Id of EightBitMode Parameter list.
sixteenBitMode EQU 132 ;Id of SixteenBitMode Parameter list.
thirtyTwoBitMode EQU 133 ;Id of ThirtyTwoBitMode Parameter list.
firstVidMode EQU 128 ; If we ever decide to add/drop a modes
secondVidMode EQU 129 ; in a particular card, it makes more
thirdVidMode EQU 130 ; sense to name the modes in an ordinal
fourthVidMode EQU 131 ; fashion rather than in a cardinal
fifthVidMode EQU 132 ; one. (The RBV equates do this.) <14>
sixthVidMode EQU 133
spGammaDir EQU 64
spVidNamesDir EQU 65 ; <12>
; csTimingFormat values in VDTimingInfo
;
kDeclROMtables EQU 'decl' ; look in the declartion rom for timing info
;
; csConnectFlags values in VDDisplayConnectInfo
;
kAllModesValid EQU 0 ; All modes not trimmed by primary init are know to be good
kAllModesSafe EQU 1 ; All modes not trimmed by primary init are know to be good
kReportsTagging EQU 2 ; To identify smart monitors we must be able to detect tagged displays
kHasDirectConnect EQU 3 ; True implies that serial data link is active through sense lines
kIsMonoDev Equ 4 ; Says whether theres an RGB (0) or Monochrome (1) connection.
; Note: The kIsMonoDev bit is backwards from gdDevType bit because
; weve already shipped some color LCD products that way,
; and wed really like to default to RGB (i.e., three guns),
; and zero is a good default value.
;
; csConnectFlag values in VDTimingInfo
kModeValid Equ 0 ; Says that this mode should NOT be trimmed.
kModeSafe Equ 1 ; Says that this mode is safe.
; csDisplayType values in VDDisplayConnectInfo
kUnknownConnect EQU 1 ; Not sure how well use this, but seems like a good idea.
kPanelConnect EQU 2 ; For use with fixed-in-place LCD panels.
kPanelTFTConnect Equ 2 ; Alias for kPanelConnect (because some ROM have already GMd that way).
kFixedModeCRTConnect EQU 3 ; For use with fixed-mode (i.e., very limited range) displays.
kMultiModeCRT1Connect EQU 4 ; 320x200 maybe, 12" maybe, 13" (default), 16" certain, 19" maybe, 21" maybe
kMultiModeCRT2Connect EQU 5 ; 320x200 maybe, 12" maybe, 13" certain, 16" (default), 19" certain, 21" maybe
kMultiModeCRT3Connect EQU 6 ; 320x200 maybe, 12" maybe, 13" certain, 16" certain, 19" default, 21" certain
kMultiModeCRT4Connect EQU 7 ; Expansion to large multi mode (not yet used)
kModelessConnect EQU 8 ; Expansion to modeless model (not yet used)
kFullPageConnect Equ 9 ; 640x818 (to get 8bpp in 512K case) and 640x870 (these two only)
kVGAConnect Equ 10 ; 640x480 VGA default -- question everything else
kNTSCConnect Equ 11 ; NTSC ST (default), FF, STconv, FFconv
kPALConnect Equ 12 ; PAL ST (default), FF, STconv, FFconv
kHRConnect Equ 13 ; 640x400 (to get 8bpp in 256K case) and 640x480 (these two only)
kPanelFSTNConnect Equ 14 ; For use with fixed-in-place LCD FSTN (aka “Supertwist”) panels.
;
; Control Codes
;
cscReset EQU 0
cscKillIO EQU 1 ; <15>
cscSetMode EQU 2
cscSetEntries EQU 3
cscSetGamma EQU 4 ; <12>
cscGrayPage EQU 5
cscGrayScreen EQU 5 ; This is what C&D 2 calls it. <12>
cscSetGray EQU 6
cscSetInterrupt EQU 7 ; <12>
cscDirectSetEntries EQU 8 ; <12>
cscSetDefaultMode EQU 9 ; <12>
cscSwitchMode Equ 10 ;
cscSetSync Equ 11 ;
;
; Status Codes
;
cscGetMode EQU 2
cscGetEntries EQU 3
cscGetPageCnt EQU 4
cscGetPages EQU 4 ; This is what C&D 2 calls it. <12>
cscGetPageBase EQU 5
cscGetBaseAddr EQU 5 ; This is what C&D 2 calls it. <12>
cscGetGray EQU 6 ; <12>
cscGetInterrupt EQU 7 ; <12>
cscGetGamma EQU 8 ; <12>
cscGetDefaultMode EQU 9 ; <12>
cscGetCurMode EQU 10 ;
cscGetSync EQU 11 ;
cscGetConnection EQU 12 ; Return information about the connection to the display
cscGetModeTiming EQU 13 ; Return timing info for a mode
csGTable EQU 0 ; [long] pointer to gamma table
csTable EQU 0 ; [long] pointer to CLUT
csStart EQU 4 ; [word] entry start number
csCount EQU 6 ; [word] entry count to change
;
; mVidParams block
;
VPBlock RECORD 0 ;Video Parameters block.
vpBaseOffset DS.L 1 ;Offset to page zero of video RAM (From minorBaseOS).
vpRowBytes DS.W 1 ;Width of each row of video memory.
vpBounds DS.W 4 ;BoundsRect for the video display (gives dimensions).
vpVersion DS.W 1 ;PixelMap version number.
vpPackType DS.W 1 ;
vpPackSize DS.L 1 ;
vpHRes DS.L 1 ;Horizontal resolution of the device (pixels per inch).
vpVRes DS.L 1 ;Vertical resolution of the device (pixels per inch).
vpPixelType DS.W 1 ;Defines the pixel type.
vpPixelSize DS.W 1 ;Number of bits in pixel.
vpCmpCount DS.W 1 ;Number of components in pixel.
vpCmpSize DS.W 1 ;Number of bits per component
vpPlaneBytes DS.L 1 ;Offset from one plane to the next.
vpBlockSize EQU *
ENDR
VDSetEntryRecord RECORD 0
csTable DS.L 1 ; ^ColorSpec - (long) Pointer to an array of color specs
csStart DS.W 1 ; INTEGER - (word) Which spec in array to start with, or -1
csCount DS.W 1 ; INTEGER - (word) Number of color spec entries to set
ENDR
VDSwitchInfo RECORD 0
csMode DS.W 1 ; INTEGER - (word) mode - depth
csData DS.L 1 ; LONGINT - (long) functional sResource of mode
csPage DS.W 1 ; INTEGER - (word) page to switch in
csBaseAddr DS.L 1 ; Ptr - (long) base address of page
csReserved DS.L 1 ; LONGINT - (long) reserved - set to 0
ENDR
VDTimingInfo RECORD 0
csTimingMode DS.L 1 ; LONGINT - (long) timing mode (a la InitGDevice)
csTimingReserved DS.L 1 ; LONGINT - (long) reserved
csTimingFormat DS.L 1 ; LONGINT - (long) what format is the timing info
csTimingData DS.L 1 ; LONGINT - (long) data supplied by driver
csTimingFlags DS.L 1 ; LONGINT - (long) mode within device
ENDR
VDDisplayConnectInfo RECORD 0
csDisplayType DS.W 1 ; INTEGER - (word) Type of display connected
csConnectTagged DS.W 1 ; INTEGER - (word) Display is currently "it" (tagged to identify component)
csConnectFlags DS.L 1 ; LONGINT - (long) what format is the timing info
csDisplayComponent DS.L 1 ; LONGINT - (long) if the card has a direct connection to the display, it returns the display component here (FUTURE)
csConnectReserved DS.L 1 ; LONGINT - (long) reserved
ENDR
VDPageInfo RECORD 0
csMode DS.W 1 ; INTEGER - (word) mode within device
csData DS.L 1 ; LONGINT - (long) data supplied by driver
csPage DS.W 1 ; INTEGER - (word) page to switch in
csBaseAddr DS.L 1 ; Ptr - (long) base address of page
ENDR
VDSizeInfo RECORD 0
csHSize DS.W 1 ; INTEGER - (word) desired/returned h size
csHPos DS.W 1 ; INTEGER - (word) desired/returned h position
csVSize DS.W 1 ; INTEGER - (word) desired/returned v size
csVPos DS.W 1 ; INTEGER - (word) desired/returned v position
ENDR
VDSettings RECORD 0
csParamCnt DS.W 1 ; INTEGER - (word) number of params
csBrightMax DS.W 1 ; INTEGER - (word) max brightness
csBrightDef DS.W 1 ; INTEGER - (word) default brightness
csBrightVal DS.W 1 ; INTEGER - (word) current brightness
csCntrstMax DS.W 1 ; INTEGER - (word) max contrast
csCntrstDef DS.W 1 ; INTEGER - (word) default contrast
csCntrstVal DS.W 1 ; INTEGER - (word) current contrast
csTintMax DS.W 1 ; INTEGER - (word) max tint
csTintDef DS.W 1 ; INTEGER - (word) default tint
csTintVal DS.W 1 ; INTEGER - (word) current tint
csHueMax DS.W 1 ; INTEGER - (word) max hue
csHueDef DS.W 1 ; INTEGER - (word) default hue
csHueVal DS.W 1 ; INTEGER - (word) current hue
csHorizDef DS.W 1 ; INTEGER - (word) default horizontal
csHorizVal DS.W 1 ; INTEGER - (word) current horizontal
csHorizMax DS.W 1 ; INTEGER - (word) max horizontal
csVertDef DS.W 1 ; INTEGER - (word) default vertical
csVertVal DS.W 1 ; INTEGER - (word) current vertical
csVertMax DS.W 1 ; INTEGER - (word) max vertical
ENDR
ENDIF ; ...already included