mirror of
https://github.com/elliotnunn/mac-rom.git
synced 2024-12-22 23:29:27 +00:00
4325cdcc78
Resource forks are included only for .rsrc files. These are DeRezzed into their data fork. 'ckid' resources, from the Projector VCS, are not included. The Tools directory, containing mostly junk, is also excluded.
235 lines
8.6 KiB
Plaintext
235 lines
8.6 KiB
Plaintext
;
|
|
; File: backlight.a
|
|
;
|
|
; Contains: backlight driver low level glue
|
|
;
|
|
; Written by: Andy Gong
|
|
;
|
|
; Copyright: © 1990-1993 by Apple Computer, Inc. All rights reserved.
|
|
;
|
|
; This file is used in these builds: ROM
|
|
;
|
|
; Change History (most recent first):
|
|
;
|
|
; <K3> 9/8/93 ag a new set of values for the backlight table. this should
|
|
; increase the range on both the top and bottom ends.
|
|
; <K2> 8/13/93 ag changed hardwareequ.a to hardwareprivateequ.a.
|
|
; <1> 7/27/93 ag first checked in
|
|
; <H12> 3/11/93 RLE another pass at the Escher backlighting table
|
|
; <H11> 2/26/93 RLE split a new backlight table off for Escher since the displays
|
|
; are just a wee bit different
|
|
; <H10> 1/21/93 RLE add support for Escher
|
|
; <H9> 7/13/92 SWC Yet another pass at the DBLite table. Deja vu, eh?
|
|
; <H8> 6/30/92 ag Added cpu info tables for cpu dependent information.
|
|
; <H7> 5/7/92 ag Changed the structure of the backlight tables. Included in the
|
|
; tables are a header which indicates the minimun and maximum
|
|
; values.
|
|
; <H6> 4/10/92 SWC Yet another pass at the DBLite table.
|
|
; <H5> 3/4/92 SWC Next pass at the DBLite table.
|
|
; <H4> 2/12/92 SWC Changed the DB-Lite table limits to have a narrower range of
|
|
; values.
|
|
; <H3> 9/10/91 SWC Changed the DB-Lite table to have a span of 0..127 instead of
|
|
; 0..255 since the backlight values don't go that high.
|
|
; <H2> 8/26/91 SWC Added a PWM lookup table for DB-Lite.
|
|
; ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
|
|
; Pre-HORROR ROM comments begin here.
|
|
; ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
|
|
; <5> 7/8/91 ag added lookup table for ashai added name constant for gestalt
|
|
; lookup
|
|
; <4> 6/24/91 ag added new lookup table for PWM low voltage operation.
|
|
; <3> 6/11/91 ag added new table for low power scaling.
|
|
; <2> 4/2/91 ag added table lookup for PWM
|
|
; <1> 1/23/91 ag first checked in
|
|
;_______________________________________________________________________
|
|
|
|
|
|
BLANKS ON
|
|
|
|
PRINT OFF
|
|
INCLUDE 'SysEqu.a'
|
|
INCLUDE 'SysErr.a'
|
|
INCLUDE 'Traps.a'
|
|
INCLUDE 'HardwarePrivateEqu.a'
|
|
INCLUDE 'powerprivequ.a'
|
|
INCLUDE 'backlightequ.a'
|
|
|
|
PRINT ON
|
|
|
|
|
|
STRING PASCAL
|
|
|
|
|
|
BacklightPrimitiveTables Proc
|
|
|
|
with backlightflags
|
|
|
|
export PrattBkltPrims
|
|
|
|
|
|
DC.L PrimsTypeTable ; flags
|
|
DC.L (PrattBkltPrimsEnd-PrattBkltPrims) ; size of table
|
|
PrattBkltPrims ; Table of Primitives tables
|
|
DC.L PrattBkltProcTable-PrattBkltPrims ; offset to table of backlight routines
|
|
DC.L PrattBkltInfo-PrattBkltPrims ; offset to table of backlight information
|
|
PrattBkltPrimsEnd
|
|
|
|
|
|
DC.L PrimsTypeInfo ; flags
|
|
DC.L (PrattBkltInfoEnd-PrattBkltInfo) ; size of table
|
|
PrattBkltInfo ; machine-specific constants:
|
|
dc.l (0 << disableHWinput)\ ; operating flag (stops user input)
|
|
+(0 << kbdactive)\ ; operating flag (kbd control inprogress)
|
|
+(1 << vbl_ok)\ ; operating flag (allow vbl operations)
|
|
+(1 << flyByWire)\ ; config flag (hardware input)
|
|
+(1 << freeflag)\
|
|
+(0 << dualTable)\ ; config flag (use multi tables)
|
|
+(0 << lowTable)\ ; operating flag (currently using low table)
|
|
+(0 << slewChange) ; operating flag (table transition inprogress)
|
|
dc.w 10 ; vbl count SampleRate
|
|
dc.w 0 ; (n/a) lowThreshold
|
|
dc.w 0 ; (n/a) hiThreshold
|
|
PrattBkltInfoEnd
|
|
|
|
|
|
CASE OBJECT
|
|
import SetPWM,PotControl,InitPWMControls,PGE_button
|
|
import PWMCloseRoutine,PWMControl,BkltGenericStatus
|
|
|
|
DC.L PrimsTypePtr ; flags
|
|
DC.L (PrattBkltProcTableEnd-PrattBkltProcTable) ; size of table
|
|
PrattBkltProcTable ; machine specific IdleMind Routines
|
|
dc.l SetPWM - PrattBkltProcTable ; set routine
|
|
dc.l PotControl - PrattBkltProcTable ; get user input routine
|
|
dc.l InitPWMControls - PrattBkltProcTable ; initialize routine
|
|
dc.l PWMCloseRoutine - PrattBkltProcTable ; close routine
|
|
dc.l PWMControl - PrattBkltProcTable ; control routine
|
|
dc.l BkltGenericStatus - PrattBkltProcTable ; status routine
|
|
dc.l BkltStandardExit - PrattBkltProcTable ; (n/a) charger state change routine
|
|
dc.l PWMMaxTbl - PrattBkltProcTable ; table of maximum value for different power ranges
|
|
dc.l dbTbl - PrattBkltProcTable ; low range table
|
|
dc.l dbTbl - PrattBkltProcTable ; high range table
|
|
dc.l PGE_button - PrattBkltProcTable ; hardware dependent var
|
|
PrattBkltProcTableEnd
|
|
|
|
export PowerBookDuoBkltPrims
|
|
|
|
DC.L PrimsTypeTable ; flags
|
|
DC.L (PowerBookDuoBkltPrimsEnd-PowerBookDuoBkltPrims) ; size of table
|
|
PowerBookDuoBkltPrims ; Table of Primitives tables
|
|
DC.L PowerBookDuoBkltProcTable-PowerBookDuoBkltPrims ; offset to table of backlight routines
|
|
DC.L PowerBookDuoBkltInfo-PowerBookDuoBkltPrims ; offset to table of backlight information
|
|
PowerBookDuoBkltPrimsEnd
|
|
|
|
|
|
DC.L PrimsTypeInfo ; flags
|
|
DC.L (PowerBookDuoBkltInfoEnd-PowerBookDuoBkltInfo) ; size of table
|
|
PowerBookDuoBkltInfo ; machine-specific constants:
|
|
dc.l (0 << disableHWinput)\ ; operating flag (stops user input)
|
|
+(0 << kbdactive)\ ; operating flag (kbd control inprogress)
|
|
+(1 << vbl_ok)\ ; operating flag (allow vbl operations)
|
|
+(1 << flyByWire)\ ; config flag (hardware input)
|
|
+(1 << freeflag)\
|
|
+(0 << dualTable)\ ; config flag (use multi tables)
|
|
+(0 << lowTable)\ ; operating flag (currently using low table)
|
|
+(0 << slewChange) ; operating flag (table transition inprogress)
|
|
dc.w 10 ; vbl count SampleRate
|
|
dc.w 0 ; (n/a) lowThreshold
|
|
dc.w 0 ; (n/a) hiThreshold
|
|
PowerBookDuoBkltInfoEnd
|
|
|
|
|
|
CASE OBJECT
|
|
import SetPWM,PotControl,InitPWMControls,PGE_button
|
|
import PWMCloseRoutine,PWMControl,BkltGenericStatus
|
|
|
|
DC.L PrimsTypePtr ; flags
|
|
DC.L (PowerBookDuoBkltProcTableEnd-PowerBookDuoBkltProcTable) ; size of table
|
|
PowerBookDuoBkltProcTable ; machine specific IdleMind Routines
|
|
dc.l SetPWM - PowerBookDuoBkltProcTable ; set routine
|
|
dc.l PotControl - PowerBookDuoBkltProcTable ; get user input routine
|
|
dc.l InitPWMControls - PowerBookDuoBkltProcTable ; initialize routine
|
|
dc.l PWMCloseRoutine - PowerBookDuoBkltProcTable ; close routine
|
|
dc.l PWMControl - PowerBookDuoBkltProcTable ; control routine
|
|
dc.l BkltGenericStatus - PowerBookDuoBkltProcTable ; status routine
|
|
dc.l BkltStandardExit - PowerBookDuoBkltProcTable ; (n/a) charger state change routine
|
|
dc.l PWMMaxTbl - PowerBookDuoBkltProcTable ; table of maximum value for different power ranges
|
|
dc.l dbTbl - PowerBookDuoBkltProcTable ; low range table
|
|
dc.l dbTbl - PowerBookDuoBkltProcTable ; high range table
|
|
dc.l PGE_button - PowerBookDuoBkltProcTable ; hardware dependent var
|
|
PowerBookDuoBkltProcTableEnd
|
|
CASE OFF
|
|
|
|
;--------------------------------------------------------------------------------------------------------------
|
|
;
|
|
;
|
|
DBLiteinfo
|
|
|
|
;--------------------------------------------------------------------------------------------------------------
|
|
;
|
|
dbTbl ; <H2>
|
|
dc.w 0 ; minimum value <H7>
|
|
dc.w @end - @start ; <H7>
|
|
|
|
@start DC.B 127 ; 0 <H7>
|
|
DC.B 120 ; 1
|
|
DC.B 113 ; 2
|
|
DC.B 109 ; 3
|
|
DC.B 106 ; 4
|
|
DC.B 102 ; 5
|
|
DC.B 99 ; 6
|
|
DC.B 95 ; 7
|
|
DC.B 92 ; 8
|
|
DC.B 88 ; 9
|
|
DC.B 85 ; 10
|
|
DC.B 81 ; 11
|
|
DC.B 77 ; 12
|
|
DC.B 74 ; 13
|
|
DC.B 70 ; 14
|
|
DC.B 67 ; 15
|
|
DC.B 63 ; 16
|
|
DC.B 60 ; 17
|
|
DC.B 56 ; 18
|
|
DC.B 53 ; 19
|
|
DC.B 49 ; 20
|
|
DC.B 45 ; 21
|
|
DC.B 42 ; 22
|
|
DC.B 38 ; 23
|
|
DC.B 35 ; 24
|
|
DC.B 31 ; 25
|
|
DC.B 28 ; 26
|
|
DC.B 24 ; 27
|
|
DC.B 21 ; 28
|
|
DC.B 17 ; 29
|
|
DC.B 14 ; 30
|
|
@end DC.B 10 ; 31 <H7>
|
|
|
|
;--------------------------------------------------------------------------------------------------------------
|
|
;
|
|
PWMMaxTbl
|
|
dc.w 31 ; 0
|
|
dc.w 15 ; 1
|
|
dc.w 15 ; 2
|
|
dc.w 7 ; 3
|
|
dc.w 3 ; 4
|
|
|
|
;--------------------------------------------------------------------------------------------------------------
|
|
;
|
|
CASE OBJECT
|
|
export PotInputRangeShiftTblPWM
|
|
PotInputRangeShiftTblPWM
|
|
dc.w 0 ; 0
|
|
dc.w 1 ; 1
|
|
dc.w 1 ; 2
|
|
dc.w 2 ; 3
|
|
dc.w 3 ; 4
|
|
CASE OFF
|
|
|
|
|
|
|
|
case object
|
|
BkltStandardExit
|
|
rts
|
|
|
|
case off
|
|
END
|