Bring in sources, and document

This commit is contained in:
Elliot Nunn 2019-06-29 23:17:50 +08:00
parent f4d0dadebe
commit 2e16381318
5726 changed files with 1918895 additions and 60 deletions

View File

@ -0,0 +1,138 @@
#
# File DeclData.make
#
# Contains: Makefile for Declaration ROM.
#
# Written by: Kurt Clark, Chas Spillar, and Tim Nichols
#
# Copyright: © 1992-1993 by Apple Computer, Inc., all rights reserved.
#
# Change History (most recent first):
#
# <SM5> 12/13/93 PN Roll in Kaos and Horrors code to support AJ and Malcom machines.
# <SM4> 9/9/93 pdw Added slots.a to dependencies.
# <SM3> 08-03-93 jmp Added various necessary dependencies that werent previously
# spelled out.
# <SM2> 3/4/93 dwc Added DeclDataPDMMace definition for PDM ENET.
# <1> 2/21/93 kc first checked in
# <SM2> 12-04-92 jmp Added the rules for building VSC (Keystone) DeclData.
EthernetDir = {DeclDir}DeclNet:
SonicDir = {EthernetDir}Sonic:
MaceDir = {EthernetDir}Mace:
VideoDir = {DeclDir}DeclVideo:
GammaDir = {VideoDir}Gamma:
PDMMaceDir = {MaceDir}PDMMaceEnet:
#include {MaceDir}Mace.Make
#include {SonicDir}Sonic.Make
#include {VideoDir}VideoDrivers.Make
#include {PDMMaceDir}PDMEnet.Make
DeclResources = "{RsrcDir}DeclData.rsrc" ∂
"{RsrcDir}PrimaryInit.rsrc" ∂
"{RsrcDir}SecondaryInit.rsrc" ∂
"{RsrcDir}SuperInit.rsrc" ∂
"{RsrcDir}DeclDataMace.rsrc" ∂
"{RsrcDir}DeclDataPDMMace.rsrc" ∂
"{RsrcDir}DeclDataSonic.rsrc" ∂
"{RsrcDir}DeclDataVideo.rsrc" ∂
"{RsrcDir}Gamma.rsrc"
DeclHeaders = "{ObjDir}StandardEqu.d" ∂
"{AIncludes}GestaltEqu.a" ∂
"{AIncludes}ShutDown.a" ∂
"{AIncludes}ROMEqu.a" ∂
"{AIncludes}Video.a" ∂
"{IntAIncludes}DockingEqu.a" ∂
"{IntAIncludes}EgretEqu.a" ∂
"{IntAIncludes}GestaltPrivateEqu.a" ∂
"{IntAIncludes}HardwarePrivateEqu.a" ∂
"{IntAIncludes}IOPrimitiveEqu.a" ∂
"{IntAIncludes}PowerPrivEqu.a" ∂
"{AIncludes}Slots.a" ∂
"{IntAIncludes}SlotMgrEqu.a" ∂
"{IntAIncludes}UniversalEqu.a" ∂
"{IntAIncludes}DepVideoEqu.a" ∂
"{SonicDir}SonicEqu.a"
#
# DeclData
#
"{RsrcDir}DeclData" ƒ {DeclResources} "{RsrcDir}RomLink"
"{RsrcDir}RomLink" {DeclResources} -o "{Targ}"
"{RsrcDir}DeclData.rsrc" ƒ "{RIncludes}Types.r" ∂
"{IntRIncludes}DepVideoEqu.r" ∂
"{IntRIncludes}HardwarePrivateEqu.r" ∂
"{IntRIncludes}InternalOnlyEqu.r" ∂
"{IntRIncludes}QuickDraw.r" ∂
"{IntRIncludes}ROMLink.r" ∂
"{DeclDir}DeclData.r"
Rez {StdROpts} "{DeclDir}DeclData.r" -o "{Targ}"
# The ROMLinkHeaderBuilder tool is not used.
#"{IntRIncludes}ROMLink.r" ƒ "{RsrcDir}ROMLinkHeaderBuilder"
# "{RsrcDir}ROMLinkHeaderBuilder" > {Targ} #This is kinky
#
# PrimaryInit
#
"{RsrcDir}PrimaryInit.rsrc" ƒ "{ObjDir}PrimaryInit.a.o"
Link {StdLOpts} {StdAlign} -rt decl=200 "{ObjDir}PrimaryInit.a.o" -o "{Targ}"
"{ObjDir}PrimaryInit.a.o" ƒ "{DeclDir}PrimaryInit.a" ∂
{DeclHeaders}
Asm {StdAOpts} -d ForEclipseROM=0,sonic32=1,ctlpad=0,mmu=1 -i "{SonicDir}" "{DeclDir}PrimaryInit.a" -o "{Targ}"
#
# SecondaryInit
#
"{RsrcDir}SecondaryInit.rsrc" ƒ "{ObjDir}SecondaryInit.a.o"
Link {StdLOpts} {StdAlign} -rt decl=210 "{ObjDir}SecondaryInit.a.o" -o "{Targ}"
"{ObjDir}SecondaryInit.a.o" ƒ "{DeclDir}SecondaryInit.a" ∂
{DeclHeaders}
Asm {StdAOpts} -d ForEclipseROM=0,sonic32=1,ctlpad=0,mmu=1 -i "{SonicDir}" "{DeclDir}SecondaryInit.a" -o "{Targ}"
#
# SuperInit
#
"{RsrcDir}SuperInit.rsrc" ƒ "{ObjDir}SuperInit.a.o"
Link {StdLOpts} {StdAlign} -rt decl=220 "{ObjDir}SuperInit.a.o" -o "{Targ}"
"{ObjDir}SuperInit.a.o" ƒ "{DeclDir}SuperInit.a" ∂
{DeclHeaders}
Asm {StdAOpts} -d ForEclipseROM=0,sonic32=1,ctlpad=0,mmu=1 -i "{SonicDir}" "{DeclDir}SuperInit.a" -o "{Targ}"
#
# Ethernet
#
"{ObjDir}Loopback.c.o" ƒ "{EthernetDir}Loopback.c" ∂
"{CIncludes}TextUtils.h" ∂
"{CIncludes}Memory.h" ∂
"{CIncludes}Devices.h" ∂
"{CIncludes}Files.h" ∂
"{CIncludes}AppleTalk.h" ∂
"{CIncludes}OSUtils.h"
C {StdCOpts} -b -o "{Targ}" "{EthernetDir}Loopback.c"
#
# Gamma Resource
#
"{RsrcDir}Gamma.rsrc" ƒ "{RIncludes}Types.r" ∂
"{IntRIncludes}ROMLink.r" ∂
"{GammaDir}Gamma.r"
Rez {StdROpts} "{GammaDir}Gamma.r" -o "{Targ}"

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,27 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 0009 4765 6F72 6765" /* ..Monaco..George */
$"2044 2E20 5769 6C73 6F6E 204A 722E 0D23" /* D. Wilson Jr..# */
$"0D23 0006 0004 0029 0007 035A 023E 0029" /* .#.....)...Z.>.) */
$"0007 035A 023E A931 9AE4 0000 00F1 0000" /* ...Z.>.1........ */
$"014A 0000 0000 0100" /* .J...... */
};
data 'MPSR' (1008) {
$"0029 0007 035A 023E 0029 0007 035A 023E" /* .)...Z.>.)...Z.> */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"5AB1 8B8D 3FE5 3230 0004 0000 0000 0000" /* Z...?.20........ */
$"0000 A933 7389 A933 7389 A6F7 9FDC 0074" /* ...3s..3s......t */
$"C2F0 0000 0006 0007 1853 7570 6572 4D61" /* .........SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA00 0E43 6872 6973 2050 6574 6572 7365" /* ...Chris Peterse */
$"6E00 0135 000D 4465 636C 4461 7461 2E6D" /* n..5..DeclData.m */
$"616B 6500 0000 0040 526F 6C6C 2069 6E20" /* ake....@Roll in */
$"4B61 6F73 2061 6E64 2048 6F72 726F 7273" /* Kaos and Horrors */
$"2063 6F64 6520 746F 2073 7570 706F 7274" /* code to support */
$"2041 4A20 616E 6420 4D61 6C63 6F6D 206D" /* AJ and Malcom m */
$"6163 6869 6E65 732E 00" /* achines.. */
};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,33 @@
data 'MPSR' (1005) {
$"0009 436F 7572 6965 7200 2020 2020 2020" /* ..Courier. */
$"2020 2020 2020 2020 2020 2020 2020 2020" /* */
$"2020 0005 0004 0029 0007 035A 023E 0029" /* .....)...Z.>.) */
$"0007 035A 023E A964 1348 0000 00C6 0000" /* ...Z.>.d.H...... */
$"0136 0000 0000 0100" /* .6...... */
};
data 'MPSR' (1007) {
$"0001 0003 D821 0003 D82A 0956 6964 5061" /* .....!...*.VidPa */
$"7261 6D73" /* rams */
};
data 'MPSR' (1008) {
$"0029 0007 035A 023E 0029 0007 035A 023E" /* .)...Z.>.)...Z.> */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"79E4 A53B 3FE5 3230 0004 0000 0000 0000" /* y..;?.20........ */
$"0000 A972 83C9 A972 83C9 A6F7 9FDC 0074" /* ...r...r.......t */
$"C2F0 0000 0005 0029 1853 7570 6572 4D61" /* .......).SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA00 0E43 6872 6973 2050 6574 6572 7365" /* ...Chris Peterse */
$"6E00 0232 3800 0A44 6563 6C44 6174 612E" /* n..28..DeclData. */
$"7200 0000 004F 5265 6D6F 7665 2074 6865" /* r....ORemove the */
$"2072 656D 6169 6E69 6E67 2073 6C6F 7420" /* remaining slot */
$"7265 736F 7572 6365 2074 7970 6573 2022" /* resource types " */
$"5F43 5055 4D61 6332 3022 2074 6F20 6669" /* _CPUMac20" to fi */
$"7820 4441 4642 2076 6964 656F 2064 6973" /* x DAFB video dis */
$"706C 6179 2E00" /* play.. */
};

View File

@ -0,0 +1,97 @@
;
; File: 802Equ.a
;
; Contains: Equates for IEEE network standards
;
; Written by: Kerry E. Lynn, Sean Findley
;
; Copyright: © 1990, 1992 by Apple Computer, Inc., all rights reserved.
;
; Change History (most recent first):
;
; <1> 10/6/92 GDW New location for ROMLink tool.
; <1> 3/26/92 FM first checked in
; <1> 12/14/90 JK Added to build
;
; To Do:
;
;-----------=-----------=-------------------------------=---------------------------------------
; 802Equ.a - Equates for IEEE network standards
;
; Kerry E. Lynn
; Feb 1989
;
; Copyright (C) 1989 by:
;
; Apple Computer, Inc.
; 20525 Mariani Ave.
; Cupertino, CA 95014
;
; All Rights Reserved.
;-----------=-----------=-------------------------------=---------------------------------------
; 24-bit quantities, left justified
AppleCode EQU $08000700 ; Apple's vendor code for 802.2 Individual addr
MultiCode EQU $09000700 ; Apple's vendor code for 802.2 Group addr
; Size of a MAC addr
MACAddrSz EQU 6 ; max size (in bytes) for data link addr
MaxMCastSz EQU MACAddrSz ; max size (in bytes) for multicast addr
;---------------------------------------
; 802.3 MAC packet header
;---------------------------------------
MDstAddr EQU 0 ; Offset to destination address
MSrcAddr EQU MDstAddr+MACAddrSz ; Offset to source address
MLength EQU MSrcAddr+MACAddrSz ; Offset to LLC length
MHdrSize EQU MLength+2 ; 802.3 MAC header size
;---------------------------------------
; 802.2 LLC (Type 1) packet header
;---------------------------------------
LDSAP EQU 0 ; Offset to destination Service Access Point (SAP)
IGBIT EQU 0 ; I/G = 0 if Individual DSAP, = 1 if Group DSAP
LSSAP EQU LDSAP+1 ; Offset to source SAP
CRBIT EQU 0 ; C/R = 0 if Command, = 1 if Response
LCtrl EQU LSSAP+1 ; Offset to LLC CONTROL field (see below)
LHdrSize EQU LCtrl+1
LInfo EQU LHdrSize ; Offset to LLC Information
GlobalSAP EQU $FF
NullSAP EQU 0
;---------------------------------------
; CONTROL field bits for 802.2 Type 1 LLC Protocol Data Units (PDUs)
;---------------------------------------
UI EQU %00000011 ; value for "Unnumbered Information" (P/F bit must be 0)
XID EQU %10101111 ; mask for "Exchange Identification" (P/F bit may be 0 or 1)
TEST EQU %11100011 ; mask for "Test" (P/F bit may be 0 or 1)
PFBIT EQU 4 ; P/F = 0 if Poll (command), = 1 if Final (response)
;---------------------------------------
; XID information field
;---------------------------------------
XIDformat EQU %10000001 ; indicates IEEE basic format
XIDinfo1 EQU %00000001 ; indicates Type 1 AND Class I LLC
XIDinfo2 EQU %00000000 ; receive window size = N/A
XIDinfoSz EQU 3 ; number of bytes in an XID response
;---------------------------------------
; Sub-Network Access Protocol (SNAP) packet header
;---------------------------------------
SType EQU 0 ; 5-byte protocol discriminator
SHdrSize EQU SType+5

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,25 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 008F 0090 7FFF 005F" /* ..Monaco......._ */
$"0090 0091 7FFF 0250 0090 0091 7FFF 0262" /* .......P.......b */
$"0000 0006 0004 00B5 0137 03E6 036E 0029" /* .........7...n.) */
$"0007 035A 023E A6A7 F930 0000 03C7 0000" /* ...Z.>...0...... */
$"03C7 0000 0000 0100" /* ........ */
};
data 'MPSR' (1008) {
$"00B5 0137 03E6 036E 0029 0007 035A 023E" /* ...7...n.)...Z.> */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"6658 1030 3FE5 3230 0004 0000 0000 0000" /* fX.0?.20........ */
$"0000 A933 7396 A933 7396 A6F7 AE5C 0078" /* ...3s..3s....\.x */
$"2B21 0000 0001 0001 2053 7570 6572 4D61" /* +!...... SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C4E 6574 BA00 0E43 6872 6973" /* .DeclNet...Chris */
$"2050 6574 6572 7365 6E00 0131 0008 3830" /* Petersen..1..80 */
$"3245 7175 2E61 0000 0000 1F4E 6577 206C" /* 2Equ.a.....New l */
$"6F63 6174 696F 6E20 666F 7220 524F 4D4C" /* ocation for ROML */
$"696E 6B20 746F 6F6C 2E0D 00" /* ink tool... */
};

View File

@ -0,0 +1,397 @@
;
; File: ATMacros.a
;
; Contains: Assembly macros used by AppleTalk
;
; Written by: Mike Shoemaker
;
; Copyright: © 1990-1993 by Apple Computer, Inc., all rights reserved.
;
; Change History (most recent first):
;
; <SM2> 12/13/93 PN Roll in KAOS and Horror to add support for Malcom and AJ
; <1> 10/6/92 GDW New location for ROMLink tool.
; <SM2> 6/22/92 mal Added some labels to VERSION macro and added VMImmumebit equate.
; <SM3> 5/4/92 CSS moved to ethernet folder to get build to work
; <2> 3/19/92 kc Roll in Terror/Horror Changes.
; <SM1> 2/??/92 kc first checked in
; ———————————————————————————————————————————————————————————————————————————————————————
; Pre-SuperMario ROM comments begin here.
; ———————————————————————————————————————————————————————————————————————————————————————
; <H2> 01/22/92 jmp (BG,Z2) Added some additional macros for new ethernet changes.
; ———————————————————————————————————————————————————————————————————————————————————————
; Pre-Horror ROM comments begin here.
; ———————————————————————————————————————————————————————————————————————————————————————
; <T1> 3/27/91 jmp first checked in
; ———————————————————————————————————————————————————————————————————————————————————————
; Pre-TERROR ROM comments begin here.
; ———————————————————————————————————————————————————————————————————————————————————————
; <8> 1/30/91 mbs cj,#82011: Move years after company name in copyright message.
; <7> 12/17/90 mbs The ALIGN directive does not work for the IIGS assembler. Use
; IF ENDIF to generate an extra dc.b 0 if necessary. Yes except
; for the ALIGN, the entire macro worked under the IIGS
; assembler!.
; <6> 11/28/90 mbs In the VERSION macro, when the release stage is 'released', pad
; the version with two trailing spaces so that the length remains
; the same when changing from an f1 to a Golden Master build.
; <5> 11/26/90 mbs Did not handle 3-digit major version number
; <4> 11/12/90 mbs Steven pointed out that verUs is zero, not 1.
; <3> 11/10/90 mbs Add optional parameter to set the label at the front of the
; version structure.
; <2> 11/09/90 mbs Add 'v' in front of version number in long string
; 11/9/90 mbs First written
;
; To Do:
;
; WARNING -- CAN'T USE IF (__IncludingATalkMacros__ == 'UNDEFINED') because
; 6502 assember barfs and doesn't include the file.
PRINT PUSH, OFF
;==========================================================================================
; VERSION
;
; USAGE:
; VERSION <Name>, <Major Version>, <Minor Version>,
; <release stage>, <Revision level>,
; <Copyright Years> [, <Engineering Suffix> [, <Version Label> ] ]
;
; The name field should be quoted if more than one word.
; The copyright years field may or may not be quoted. The macro works either way
; It is OK to leave the engineering suffix field empty.
;
; The start of the version information is given the Label 'VersionInfo', unless
; you specify the last parameter; then it will be used. It must not be quoted.
;
; Example for EtherTalk 1.2a3q1 copyrighted 1987-1990
;
; VERSION 'EtherTalk', 1, 2, 0, alpha, 3, '1987-1990', 'q1'
;==========================================================================================
ATM_development EQU $20 ; These are used in the 3rd byte of the 4-byte version #
ATM_alpha EQU $40 ; .. to indicate release stage
ATM_beta EQU $60
ATM_final EQU $80
ATM_release EQU $80
ATM_verUS EQU 0
MACRO
VERSION &sName, &nMajor, &nMinor, &nBug, \
&sStage, &nRevision, &sCopyright, &sEngr='', &sLabel0=VersionInfo,&sLabel1=End
&sLabel0 ;Make label for this version information
LCLA &nStage ;Numeric representation of stage
LCLC &cStage ;Character representation of stage
LCLA &nPadBytes ;Add padding at end of record to <K2>
;allow room for expansion if we <K2>
;have to add bug release digits <K2>
;to the version # <K2>
LCLC &StrSetting ;To save current string setting
&StrSetting SETC &SETTING('STRING') ;Save current string setting
STRING PASCAL ;Set string state to Pascal
;
; Do some error checking
;
IF &UPCASE(&sStage)='ALPHA' THEN
&nStage SETA ATM_alpha
&cStage SETC 'a'
ELSEIF &UPCASE(&sStage)='BETA' THEN
&nStage SETA ATM_beta
&cStage SETC 'b'
ELSEIF &UPCASE(&sStage)='DEVELOPMENT' THEN
&nStage SETA ATM_development
&cStage SETC 'd'
ELSEIF &UPCASE(&sStage)='FINAL' THEN
&nStage SETA ATM_final
&cStage SETC 'f'
ELSEIF &UPCASE(&sStage)='RELEASE' THEN
&nStage SETA ATM_release
&cStage SETC 'x'
ELSE
AERROR 'The stage parameter to VERSION must be: development, alpha, beta, final or release'
ENDIF
IF (&nMinor > 15) THEN
AERROR 'The Minor version must be less than 16'
ENDIF
IF (&nBug > 15) THEN
AERROR 'The Bug fix version must be less than 16'
ENDIF
;
; Generate the 4-byte version numbers
;
dc.b &nMajor ;Major version number
dc.b (&nMinor * 16) + &nBug ;Build 2nd byte of version
dc.b &nStage, &nRevision ;stage and revision level
;
; Generate the integer country code
;
dc.w ATM_verUS ;Country Code
;
; Build Version string from major/minor version string
;
LCLC &lShortVer
;
; Make 1st digit of version string
;
IF (&nMajor >= 100) THEN
&lShortVer SETC &CONCAT(&CHR(&nMajor / 100 + $30), \
&CHR((&nMajor MOD 100) / 10 + $30), \
&CHR(&nMajor MOD 10 + $30))
ELSE
IF (&nMajor >= 10) THEN
&lShortVer SETC &CONCAT(&CHR(&nMajor / 10 + $30), &CHR(&nMajor MOD 10 + $30))
ELSE
&lShortVer SETC &CHR(&nMajor + $30)
ENDIF
ENDIF
;
; Append 2nd digit of version number (ie: 1.0)
;
IF (&nMinor >= 10) THEN
&lShortVer SETC &CONCAT(&lShortVer,'.',&CONCAT(&CHR(&nMinor / 10 + $30), &CHR(&nMinor MOD 10 + $30)))
ELSE
&lShortVer SETC &CONCAT(&lShortVer,'.',&CHR(&nMinor + $30))
ENDIF
;
; Append third digit of version number if non-zero (ie: 1.0.2). If zero, leave <K2>
; room for the extra characters at the end of the record <K2>
;
IF (&nBug <> 0) THEN
&nPadBytes SETA 0 ; Will not need padding <K2>
IF (&nBug >= 10) THEN
&lShortVer SETC &CONCAT(&lShortVer,'.',&CONCAT(&CHR(&nBug / 10 + $30), &CHR(&nBug MOD 10 + $30)))
ELSE
&lShortVer SETC &CONCAT(&lShortVer,'.',&CHR(&nBug + $30))
ENDIF
ELSE
&nPadBytes SETA 1 ; Leave room for padding <K2>
ENDIF
; Append stage letter and revision if not a release version.
; For release version, append two spaces. This way the string does not change length
; between an 'f1' build and a GM build.
IF (&cStage <> 'x') THEN
&lShortVer SETC &CONCAT(&lShortVer,&cStage)
IF (&nRevision >= 10) THEN
&lShortVer SETC &CONCAT(&lShortVer,&CONCAT(&CHR(&nRevision / 10 + $30), &CHR(&nRevision MOD 10 + $30)))
ELSE
&lShortVer SETC &CONCAT(&lShortVer,&CHR(&nRevision + $30))
ENDIF
ELSE
&lShortVer SETC &CONCAT(&lShortVer, ' ') ; Append two spaces if release
ENDIF
;
; Emit the short string
;
dc.b '&lShortVer'
; ALIGN directive doesn't exist on IIGS assembler so do it the hard way...
IF ((&LEN(&lShortVer) +1) MOD 2) = 1 THEN
dc.b 0
ENDIF
;
; Trim the beginning and ending quotes from the name, copyright years, and
; engineering suffix if present
;
LCLC &lName
LCLC &lCopyright
LCLC &lEngr
IF &SUBSTR(&sName, 1, 1) = &CHR($27) THEN
&lName SETC &SUBSTR(&sName, 2, &LEN(&sName) - 2)
ELSE
&lName SETC &sName
ENDIF
IF &SUBSTR(&sCopyright, 1, 1) = &CHR($27) THEN
&lCopyright SETC &SUBSTR(&sCopyright, 2, &LEN(&sCopyright) - 2)
ELSE
&lCopyright SETC &sCopyright
ENDIF
IF &SUBSTR(&sEngr, 1, 1) = &CHR($27) THEN
&lEngr SETC &SUBSTR(&sEngr, 2, &LEN(&sEngr) - 2)
ELSE
&lEngr SETC &sEngr
ENDIF
;
; Build the long string
;
LCLC &lLongVer ; Define a local variable to hold it
&lLongVer SETC &CONCAT(&lName,' v',&lShortVer,&lEngr,'; © Apple Computer, Inc. ',&lCopyright)
;
; Emit the long string
;
LCLC &sLongVerLabel ;<K2 start>
LCLC &sLongVerLabelEnd ;
&sLongVerLabel SETC &CONCAT(&sLabel0, 'LongStr') ;
&sLongVerLabel ;
dc.b '&lLongVer' ;
IF ((&LEN(&lLongVer) +1) MOD 2) = 1 THEN ; Align things
dc.b 0
ENDIF
;
; If this is an "xx.x" release rather than an "xx.x.x" release, leave room so that
; if we have to rev the version # to x.x.x, the size of the record will not change.
;
IF (&nPadBytes) THEN
dc.b 0,0,0,0
ENDIF
&sLongVerLabelEnd SETC &CONCAT(&sLongVerLabel, 'End')
&sLongVerLabelEnd
;
; Clean up and we're done
;
LCLC &sEndLabel ;Make label for end of version information
&sEndLabel SETC &CONCAT(&sLabel0, &sLabel1)
&sEndLabel
STRING &StrSetting ;Restore string setting
ENDM
EJECT
;==========================================================================================
; SCCLOCKOUT
;
; Macro for disabling interrupts.
;==========================================================================================
SRIntMaskBits EQU $0700 ; The 3 interrupt level bit in the SR
SRIntMaskBitsCMP EQU $F8FF ; The 3 interrupt level bit in the SR
SRIntLevel6 EQU $0600 ; Level 6 interrupt mask
SRIntLevel6MASK EQU $FEFF ; Level 6 interrupt AND value
SRIntLevel5MASK EQU $FDFF ; Level 5 interrupt AND value <K2>
MACRO
_SCCLOCKOUT
ORI.W #SRIntMaskBits,SR ; Set all of the INT bits
ANDI.W #SRIntLevel6MASK,SR ; Set to priority 6
ENDM
;==========================================================================================
; _SETINTMASK
;
; Macro for setting the interrupt level to an arbitrary level. Pass the level in
; a Data register.
;==========================================================================================
MACRO
_SETINTMASK &sReg
move.w SR,-(SP)
andi.w #SRIntMaskBitsCMP,(SP)
or.w &sReg,(SP)
move.w (SP)+,SR
ENDM
;==========================================================================================
; VSCCEnable
;
; Macro for disabling interrupts.
; Pass address register holding MPP vars, and a temporary Data register
;==========================================================================================
MACRO
_VSCCENABLE &sMPPVarsReg, &tmpReg
MOVE.W SR, &tmpReg
ANDI.W #SRIntMaskBitsCMP,&tmpReg ; Clear all of the INT bits
EORI.W #$2000, &tmpReg ; Toggle the 2000 bit
move.w vSCCEnable(&sMPPVarsReg),-(SP) ; Push vscc enable
EOR.W &tmpReg, (SP) ; Or in the int bits (and toggles 2000)
; Stupid machine won't let memory be the source on an XOR instruction
MOVE.W (SP)+,SR ; Set SR
ENDM
;==========================================================================================
; These Macros & Equates are used to call the multipurpose function dispatcher in the
; Lap Manager. None of these functionn have jack to do with the Lap Manager, but they
; provide a way for code to get the functions without having to link with the library
; containing them. Of course, they require that a Lap Manager be present.
;==========================================================================================
;
; Macro used in following macros
;
MACRO
_L21Common &nVal
LCLC &cLabel ; Used to make a semi-unique label
&cLabel SETC &CONCAT('@L21Ret',&nVal)
pea &cLabel ; Want to return to here
move.l LAPMgrPtr,D0 ; Ptr to Lap Manager
add.l #LAPMgrCall,D0 ; Ptr to dispatch entry point
move.l D0,-(SP) ; Put on stack
move.l #((&nVal << 16) + LInt21Dispatch),D0
rts ; Call Lap Manager
&cLabel
ENDM
;
; Macros to call Lap Manager Dispatch routines
;
; Returns non-zero in D0.L if Extensions are disabled at boot time. Always returns zero on
; System 6. Sets condition codes
MACRO
_LExtensionsDisabled
_L21Common L21ExtensionsDisabled
ENDM
; pascal Handle GetBestResource(OSType theType, short theID)
MACRO
_LGetBestResource
_L21Common L21GetBestResource
ENDM
; pascal Boolean TrapAvailable(short theTrap)
MACRO
_LTrapAvailable
_L21Common L21TrapAvailable
ENDM
;==========================================================================================
; New Macros go here
;==========================================================================================
;
; MACROS for SNMP counters <K2>
;
MACRO
_IncrCount &SNMPCounter
ADDQ.L #1, SNMPVars.&SNMPCounter(A2) ; increment whatever SNMP counter
ENDM
VMImmuneBit EQU 0 ; bit in driver DCE flags to tell VM to leave paramblocks alone
PRINT POP
; END ATMacros.a

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,27 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 0062 7920 4170 706C" /* ..Monaco.by Appl */
$"6554 616C 6B0D 3B0D 3B09 5772 6974 7465" /* eTalk.;.;.Writte */
$"6E20 0006 0004 0067 0076 0373 02AB 0067" /* n .....g.v.s...g */
$"0076 0373 02AB A92E 382C 0000 00D8 0000" /* .v.s....8,...... */
$"0129 0000 0000 0100" /* .)...... */
};
data 'MPSR' (1008) {
$"0067 0076 0373 02AB 0067 0076 0373 02AB" /* .g.v.s...g.v.s.. */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"3AD9 AFA2 3FE5 3230 0004 0000 0000 0000" /* :...?.20........ */
$"0000 A933 7396 A933 7396 A6F7 AE5C 0078" /* ...3s..3s....\.x */
$"2B21 0000 0002 0003 2053 7570 6572 4D61" /* +!...... SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C4E 6574 BA00 0E43 6872 6973" /* .DeclNet...Chris */
$"2050 6574 6572 7365 6E00 0132 000D 4174" /* Petersen..2..At */
$"616C 6B4D 6163 726F 732E 6100 0000 0038" /* alkMacros.a....8 */
$"526F 6C6C 2069 6E20 4B41 4F53 2061 6E64" /* Roll in KAOS and */
$"2048 6F72 726F 7220 746F 2061 6464 2073" /* Horror to add s */
$"7570 706F 7274 2066 6F72 204D 616C 636F" /* upport for Malco */
$"6D20 616E 6420 414A 00" /* m and AJ. */
};

View File

@ -0,0 +1,94 @@
;
; File: ENETEqu.a
;
; Contains: Equates for the Ethernet driver
;
; Written by: Sean Findley (Version 1.1a1)
;
; Copyright: © 1990, 1992 by Apple Computer, Inc., all rights reserved.
;
; This file is used in these builds: Mac32
;
; Change History (most recent first):
;
; <SM2> 10/26/92 mal Updated SNMP control codes.
; <1> 10/6/92 GDW New location for ROMLink tool.
; <2> 3/26/92 FM Rolled into reality
; <2> 1/9/91 JK Cleaned up to simplify N&C support.
; <1> 12/14/90 JK Added to build
;
; To Do:
;
IF (&TYPE('MHdrSize') = 'UNDEFINED') THEN
INCLUDE '802Equ.a' ; IEEE equates
ENDIF
; Control codes.
ESetGeneral EQU 253 ; Set "general" mode
EGetInfo EQU 252 ; Get info
ERdCancel EQU 251 ; Cancel read
ERead EQU 250 ; Read
EWrite EQU 249 ; Write
EDetachPH EQU 248 ; Detach protocol handler
EAttachPH EQU 247 ; Attach protocol handler
EAddMulti EQU 246 ; Add a multicast address
EDelMulti EQU 245 ; Delete a multicast address
EOpenSAP EQU 244 ; Open an 802.2 SAP
ECloseSAP EQU 243 ; Close an 802.2 SAP
ELapGetLinkStatus EQU 242 ; Get interface statistics, RFC 1213
EGetDot3CollStats EQU 241 ; Get 802.3 collision statistics, RFC 1284
EGetDot3Statistics EQU 240 ; Get 802.3 statistics, RFC 1284
ESetDot3Entry EQU 239 ; Set 802.3 status & control information
EGetDot3Entry EQU 238 ; Get 802.3 status & control information
FirstENET EQU EGetDot3Entry ; First ENET command
LastENET EQU ESetGeneral ; Last ENET command
; ENET queue element standard structure: arguments passed in the CSParam area
EProtType EQU CSParam ; Offset to protocol type code
EMultiAddr EQU CSParam ; Multicast address (EAddMulti,EDelMulti)
EHandler EQU EProtType+2 ; Offset to protocol handler
EWDSPointer EQU EHandler ; WDS pointer (EWrite)
EBuffPtr EQU EHandler ; Buffer pointer (ERead,EGetInfo)
EKillQEl EQU EHandler ; QEl pointer (ERdCancel)
EBuffSize EQU EBuffPtr+4 ; Buffer size (ERead,EGetInfo)
EDataSize EQU EBuffSize+2 ; Actual data size (Eread)
;---------------------------------------
; Ethernet packet header
;---------------------------------------
EDestAddr EQU 0 ; Offset to destination address
ESrcAddr EQU 6 ; Offset to source address
EType EQU 12 ; Offset to data link type
EHdrSize EQU 14 ; Ethernet header size
EMinDataSz EQU 46 ; Minimum data size
EMaxDataSz EQU 1500 ; Maximum data size
EAddrSz EQU 6 ; Size of an ethernet node address
MAddrSz EQU 8 ; Size of an ethernet multicast address (?)
; These are defined in 802Equ.a
;
ETHdrSize EQU MHdrSize+LHdrSize+SHdrSize
;
; Errors and misc.
;
eLenErr EQU ddpLenErr ; Length error
eMultiErr EQU ddpSktErr ; Multicast address error
EAddrRType EQU 'eadr' ; Alternate address resource type
;
; Link specific 'atlk' AGetInfo call
;
ESpeed EQU 10000000 ; Link speed in bits/sec

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,25 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 002E 00FD 002E 00FE" /* ..Monaco........ */
$"020E 0000 020E 00FE 0000 0000 0000 0000" /* ................ */
$"0000 0006 0004 0045 0029 01D2 0246 0083" /* .......E.)...F.. */
$"001C 0210 0239 A711 6848 0000 0113 0000" /* .....9..hH...... */
$"0148 0000 0000 0100" /* .H...... */
};
data 'MPSR' (1008) {
$"0045 0029 01D2 0246 0083 001C 0210 0239" /* .E.)...F.......9 */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"2321 3B31 3FE5 3230 0004 0000 0000 0000" /* #!;1?.20........ */
$"0000 A933 7396 A933 7396 A6F7 AE5C 0078" /* ...3s..3s....\.x */
$"2B21 0000 0003 0003 2053 7570 6572 4D61" /* +!...... SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C4E 6574 BA00 0E43 6872 6973" /* .DeclNet...Chris */
$"2050 6574 6572 7365 6E00 0132 0009 454E" /* Petersen..2..EN */
$"4554 4571 752E 6100 0000 001B 5570 6461" /* ETEqu.a.....Upda */
$"7465 6420 534E 4D50 2063 6F6E 7472 6F6C" /* ted SNMP control */
$"2063 6F64 6573 2E00" /* codes.. */
};

View File

@ -0,0 +1,157 @@
/*
File: Loopback.c
Contains: Ethernet loopback test code
Written by: Sean Findley
Copyright: © 1990, 1992 by Apple Computer, Inc., all rights reserved.
Change History (most recent first):
<1> 10/6/92 GDW New location for ROMLink tool.
<SM5> 6/22/92 mal Modified so ptr and size to loopback test data is passed from
the driver since shared by Sonic and Mace drivers.
<SM1> 6/11/92 CS Roll-in changes from Reality:
<2> 6/1/92 DTY Include TextUtils.h for the new home of EqualString.
TextUtils now contains the EqualString prototype, so include it.
<3> 3/26/92 FM Rolled into reality
<2> 2/11/92 RB Use the real EqualString to avoid having to link old C libraries
with this code.
<2> 4/21/91 CCH Rolled in Sean Findley's changes.
<1> 12/14/90 JK Added to build
To Do:
*/
#include <TextUtils.h>
#include "memory.h"
#include "devices.h"
#include "files.h"
#include "appletalk.h"
#include "OSUtils.h"
typedef struct
{
char Addr[6];
} Enet;
typedef struct
{
Enet Destination; /* Ethernet destination */
Enet Source; /* Ethernet source */
unsigned short EProtocoltype; /* Ethernet protocol type */
char testdata[255];
} LBpacket;
typedef union /* parameter block for calling .ENET */
{
CntrlParam ctl; /* for ctl calls */
struct
{
char filler[28];
unsigned short EprotType;
Ptr EBuffPtr;
unsigned short EBuffSize;
unsigned short EDataSize;
} info;
MPPParamBlock ecall;
} Edrvrparms;
#define Ehandler DDP.DDPptrs.listener
#define EWdsPointer DDP.DDPptrs.wdsPointer
#define EKillQEl EBuffPtr
#define ERdCancel 251
#define ERead 250
#define EWrite 249
#define EDetachPH 248
#define EAttachPH 247
#define Ethhdrsz 14
Boolean cmpdata(char *p1, char *p2, short len) /* true = data equal, false = data not equal */
{
short i;
for(i=0;i<len;i++)
{
if(p1[i] != p2[i])
return(false);
}
return(true);
}
killtest(Edrvrparms *pbw, Edrvrparms *pb)
{
pbw->ctl.csCode = ERdCancel;
pbw->info.EKillQEl = (Ptr) pb;
PBControl((ParmBlkPtr) pbw,false);
pbw->ctl.csCode = EDetachPH;
PBControl((ParmBlkPtr) pbw,false);
}
Boolean LOOPBACKTEST(short refnum,Enet *enetaddr, int AppleData, short AppleDataSz)
{
LBpacket LBPR,LBPW;
Edrvrparms pb,pbw;
WDSElement wds[2];
unsigned long secs1,secs2;
pb.ctl.ioCRefNum = refnum;
pb.ctl.ioCompletion = nil;
pb.ctl.csCode = EAttachPH;
pb.info.EprotType = 0x809B;
pb.ecall.Ehandler = nil;
if (PBControl((ParmBlkPtr) &pb,false)) /* attach special protocol using default handler */
return(false);
pb.ctl.csCode = ERead;
pb.info.EBuffPtr = (Ptr) &LBPR;
pb.info.EBuffSize = sizeof(LBpacket);
if (PBControl((ParmBlkPtr) &pb,true)) /* setup a read using default handler */
{
pb.ctl.csCode = EDetachPH;
PBControl((ParmBlkPtr) &pb,false);
return(false);
}
pbw = pb;
wds[0].entryLength = Ethhdrsz + AppleDataSz;
wds[0].entryPtr = (Ptr) &LBPW;
wds[1].entryLength = 0;
LBPW.Destination = *enetaddr;
LBPW.Source = *enetaddr;
LBPW.EProtocoltype = 0x809B;
BlockMove((Ptr)AppleData,LBPW.testdata,AppleDataSz);
pbw.ecall.EWdsPointer = (Ptr) wds;
pbw.ctl.csCode = EWrite;
if (PBControl((ParmBlkPtr) &pbw,false)) /* write a packet to ourself */
{
killtest(&pbw,&pb);
return(false);
}
GetDateTime(&secs1);
while (pb.ctl.ioResult == 1) /* wait for default read to complete or timeout */
{
GetDateTime(&secs2);
if (secs2 - secs1 > 3)
{
killtest(&pbw,&pb);
return(false);
}
}
pbw.ctl.csCode = EDetachPH;
PBControl((ParmBlkPtr) &pbw,false);
if (!cmpdata(LBPR.testdata,LBPW.testdata,AppleDataSz)) /* check data looped back */
return(false);
return(true);
}

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,25 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 0081 0902 0000 0000" /* ..Monaco........ */
$"0000 0043 7F10 FFFE 09EC 0003 0000 0000" /* ...C............ */
$"0000 0006 0004 0082 0072 02A1 02AB 0082" /* .........r...... */
$"0072 02A1 02AB A678 8BA0 0000 00C7 0000" /* .r.....x........ */
$"00C7 0000 0000 0100" /* ........ */
};
data 'MPSR' (1008) {
$"0082 0072 02A1 02AB 0082 0072 02A1 02AB" /* ...r.......r.... */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"ACF4 9D69 3FE5 3230 0004 0000 0000 0000" /* ...i?.20........ */
$"0000 A933 7396 A933 7396 A6F7 AE5C 0078" /* ...3s..3s....\.x */
$"2B21 0000 0004 0001 2053 7570 6572 4D61" /* +!...... SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C4E 6574 BA00 0E43 6872 6973" /* .DeclNet...Chris */
$"2050 6574 6572 7365 6E00 0131 000A 4C6F" /* Petersen..1..Lo */
$"6F70 6261 636B 2E63 0000 0000 1F4E 6577" /* opback.c.....New */
$"206C 6F63 6174 696F 6E20 666F 7220 524F" /* location for RO */
$"4D4C 696E 6B20 746F 6F6C 2E0D 00" /* MLink tool... */
};

View File

@ -0,0 +1,89 @@
/*
File: MACEecfg.r
Contains: 'ecfg' resource templates for MACE built-in ethernet systems
Written by: Mark A. Law
Copyright: © 1992-1993 by Apple Computer, Inc., all rights reserved.
Change History (most recent first):
<1> 6/7/93 kc first checked in
<LW2> 3/21/93 mal Versioned MACE 'ecfg' rsrc record and removed 24-bit MACEBase
field.
To Do:
*/
Type 'ecfg'
{
unsigned integer; /* Record version */
unsigned hex longint; /* 32-bit MACE address */
unsigned hex longint; /* Ethernet PROM address */
unsigned hex byte; /* MACE transmit frame control */
unsigned hex byte; /* MACE receive frame control */
unsigned hex byte; /* MACE xmit/recv fifo config control */
unsigned hex byte; /* MACE MAC config control */
hex string [6]; /* Alternate ethernet address */
unsigned integer; /* Alternate # transmit buffers */
unsigned integer; /* Alternate # receive buffers */
unsigned integer; /* Alternate # receive chains */
};
Resource 'ecfg' (43, "Cyclone33") {
1,
0x50F1C000,
0x50F08000,
0x1,
0,
0x2C,
0x3,
$"",
0,
0,
0
};
Resource 'ecfg' (78, "Cyclone40") {
1,
0x50F1C000,
0x50F08000,
0x1,
0,
0x2C,
0x3,
$"",
0,
0,
0
};
Resource 'ecfg' (60, "Tempest25") {
1,
0x50F1C000,
0x50F08000,
0x1,
0,
0x2C,
0x3,
$"",
0,
0,
0
};
Resource 'ecfg' (79, "Tempest33") {
1,
0x50F1C000,
0x50F08000,
0x1,
0,
0x2C,
0x3,
$"",
0,
0,
0
};

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,25 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 0000 2120 0000 0000" /* ..Monaco..! .... */
$"0000 0046 0000 0014 0006 1D98 0001 0045" /* ...F...........E */
$"0013 0006 0004 002E 023D 0376 0472 0027" /* .........=.v.r.' */
$"0005 036F 023A A7EF 2570 0000 00E7 0000" /* ...o.:..%p...... */
$"0172 0000 0000 0100" /* .r...... */
};
data 'MPSR' (1008) {
$"002E 023D 0376 0472 0027 0005 036F 023A" /* ...=.v.r.'...o.: */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"EC7C 5D24 3FE5 3230 0004 0000 0000 0000" /* .|]$?.20........ */
$"0000 A933 739B A933 739B A6F7 B0C6 0078" /* ...3s..3s......x */
$"BC36 0000 0008 0001 2553 7570 6572 4D61" /* .6......%SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C4E 6574 BA4D 6163 65BA 000E" /* .DeclNet.Mace... */
$"4368 7269 7320 5065 7465 7273 656E 0001" /* Chris Petersen.. */
$"3100 0A4D 4143 4565 6366 672E 7200 0000" /* 1..MACEecfg.r... */
$"0010 6669 7273 7420 6368 6563 6B65 6420" /* ..first checked */
$"696E 00" /* in. */
};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,32 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 0000 6E64 6572 2061" /* ..Monaco..nder a */
$"2050 5343 2D73 7479 6C65 2044 4D41 206D" /* PSC-style DMA m */
$"6F64 0006 0004 0034 0014 0265 02ED 0034" /* od.....4...e...4 */
$"0014 0265 02ED A879 5FD8 0000 0000 0000" /* ...e...y_....... */
$"0000 0000 0000 0100" /* ........ */
};
data 'MPSR' (1008) {
$"0034 0014 0265 02ED 0034 0014 0265 02ED" /* .4...e...4...e.. */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"EFCC 7A99 3FE5 3230 0004 0000 0000 0000" /* ..z.?.20........ */
$"0000 A933 739B A933 739B A6F7 B0C6 0078" /* ...3s..3s......x */
$"BC36 0000 0001 0011 2553 7570 6572 4D61" /* .6......%SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C4E 6574 BA4D 6163 65BA 000E" /* .DeclNet.Mace... */
$"4368 7269 7320 5065 7465 7273 656E 0002" /* Chris Petersen.. */
$"3130 0006 4D61 6365 2E61 0000 0000 8546" /* 10..Mace.a.....F */
$"6978 6564 2062 7567 2077 6865 7265 2064" /* ixed bug where d */
$"7276 7220 6361 6E20 6661 696C 2074 6F20" /* rvr can fail to */
$"6F70 656E 2069 6620 564D 206F 6E20 616E" /* open if VM on an */
$"6420 6C6F 6769 6361 6C20 746F 2070 6879" /* d logical to phy */
$"7369 6361 6C20 6164 6472 6573 7320 6D61" /* sical address ma */
$"7070 696E 6720 6F66 2072 6563 7620 6275" /* pping of recv bu */
$"6666 6572 7320 6172 6520 6E6F 7420 3120" /* ffers are not 1 */
$"746F 2031 2E20 2053 6565 2047 6574 506B" /* to 1. See GetPk */
$"7428 292E 00" /* t().. */
};

View File

@ -0,0 +1,77 @@
#
# File Mace.Make
#
# Contains: Makefile for Mace.
#
# Written by: Kurt Clark, Chas Spillar, and Tim Nichols
#
# Copyright: © 1992-1993 by Apple Computer, Inc. All rights reserved.
#
# Change History (most recent first):
#
# <SM2> 6/14/93 kc Roll in Ludwig.
# <LW3> 3/16/93 chp Added a dependency on SysPrivateEqu.a for Mace.a.o.
# <LW2> 1/27/93 mal Add MACE ecfg rsrc.
# <SM2> 11/30/92 SWC Changed TimeEqu.a->Timer.a.
#
"{RsrcDir}DeclDataMace.rsrc" ƒ "{ObjDir}MaceEnet.a.o" ∂
"{ObjDir}Mace.a.o" ∂
"{ObjDir}Loopback.c.o" ∂
"{IfObjDir}interface.o"
Link {StdLOpts} {StdAlign} -rt decl=1 -o "{Targ}" ∂
"{ObjDir}MaceEnet.a.o" ∂
"{ObjDir}Mace.a.o" ∂
"{ObjDir}Loopback.c.o" ∂
"{IfObjDir}interface.o"
"{RsrcDir}MACEecfg.rsrc" ƒ {MaceDir}MACEecfg.r
Rez {StdROpts} -t rsrc -c RSED "{MaceDir}MACEecfg.r" -o "{Targ}"
"{ObjDir}Enet61.rsrc" ƒ "{ObjDir}MaceEnet.a.o" ∂
"{ObjDir}Mace.a.o" ∂
"{ObjDir}Loopback.c.o"
Link {StdLOpts} {StdAlign} -rt enet=61 -o "{Targ}" ∂
-sn Main="Cyclone MACE Ethernet Driver" ∂
-ra "Cyclone MACE Ethernet Driver"=resSysHeap,resPurgeable,resLocked ∂
"{ObjDir}MaceEnet.a.o" ∂
"{ObjDir}Mace.a.o" ∂
"{ObjDir}Loopback.c.o" ∂
"{IfObjDir}interface.o"
"{ObjDir}MaceEnet.a.o" ƒ "{MaceDir}MaceEnet.a" ∂
"{MaceDir}MaceEqu.a" ∂
"{MaceDir}VersionMaceEnet.a" ∂
"{EthernetDir}AtalkMacros.a" ∂
"{EthernetDir}ENETEqu.a" ∂
"{EthernetDir}SNMPLAP.a" ∂
"{AIncludes}GestaltEqu.a" ∂
"{AIncludes}Slots.a" ∂
"{AIncludes}SysEqu.a" ∂
"{AIncludes}SysErr.a" ∂
"{AIncludes}Timer.a" ∂
"{AIncludes}Traps.a" ∂
"{IntAIncludes}HardwarePrivateEqu.a"∂
"{IntAIncludes}InternalOnlyEqu.a" ∂
"{IntAIncludes}PSCEqu.a" ∂
"{IntAIncludes}UniversalEqu.a"
Asm {StdAOpts} -i "{MaceDir}" -i "{EthernetDir}" -o "{Targ}" "{MaceDir}MaceEnet.a"
"{ObjDir}Mace.a.o" ƒ "{MaceDir}Mace.a" ∂
"{MaceDir}MaceEqu.a" ∂
"{EthernetDir}AtalkMacros.a" ∂
"{EthernetDir}ENETEqu.a" ∂
"{EthernetDir}SNMPLAP.a" ∂
"{AIncludes}GestaltEqu.a" ∂
"{AIncludes}SysEqu.a" ∂
"{AIncludes}SysErr.a" ∂
"{AIncludes}Traps.a" ∂
"{IntAIncludes}SysPrivateEqu.a" ∂
"{IntAIncludes}HardwarePrivateEqu.a"∂
"{IntAIncludes}InternalOnlyEqu.a" ∂
"{IntAIncludes}PSCEqu.a" ∂
"{IntAIncludes}UniversalEqu.a"
Asm {StdAOpts} -i "{MaceDir}" -i "{EthernetDir}" -o "{Targ}" "{MaceDir}Mace.a"

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,25 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 0065 6F72 6765 2044" /* ..Monaco.eorge D */
$"2E20 5769 6C73 6F6E 204A 722E 0D23 0D23" /* . Wilson Jr..#.# */
$"0943 0006 0004 0027 0005 01E0 023A 0027" /* .C.....'.....:.' */
$"0005 01E0 023A A833 AE0C 0000 00E2 0000" /* .....:.3........ */
$"010A 0000 0000 0100" /* ........ */
};
data 'MPSR' (1008) {
$"0027 0005 01E0 023A 0027 0005 01E0 023A" /* .'.....:.'.....: */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"776C 9186 3FE5 3230 0004 0000 0000 0000" /* wl..?.20........ */
$"0000 A933 739B A933 739B A6F7 B0C6 0078" /* ...3s..3s......x */
$"BC36 0000 0006 0003 2553 7570 6572 4D61" /* .6......%SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C4E 6574 BA4D 6163 65BA 000E" /* .DeclNet.Mace... */
$"4368 7269 7320 5065 7465 7273 656E 0001" /* Chris Petersen.. */
$"3200 094D 6163 652E 6D61 6B65 0000 0000" /* 2..Mace.make.... */
$"0F52 6F6C 6C20 696E 204C 7564 7769 672E" /* .Roll in Ludwig. */
$"00" /* . */
};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,25 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 0000 F0D2 0001 CD42" /* ..Monaco.......B */
$"0000 0200 0000 F200 0200 0000 0000 0000" /* ................ */
$"0000 0006 0004 0029 0242 035A 0479 0029" /* .......).B.Z.y.) */
$"0242 035A 0479 A839 2AE4 0000 0137 0000" /* .B.Z.y.9*....7.. */
$"015F 0000 0000 0100" /* ._...... */
};
data 'MPSR' (1008) {
$"0029 0242 035A 0479 0029 0242 035A 0479" /* .).B.Z.y.).B.Z.y */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"0C58 0EBB 3FE5 3230 0004 0000 0000 0000" /* .X..?.20........ */
$"0000 A933 739B A933 739B A6F7 B0C6 0078" /* ...3s..3s......x */
$"BC36 0000 0003 0010 2553 7570 6572 4D61" /* .6......%SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C4E 6574 BA4D 6163 65BA 000E" /* .DeclNet.Mace... */
$"4368 7269 7320 5065 7465 7273 656E 0001" /* Chris Petersen.. */
$"3900 0A4D 6163 6545 6E65 742E 6100 0000" /* 9..MaceEnet.a... */
$"000F 526F 6C6C 2069 6E20 4C75 6477 6967" /* ..Roll in Ludwig */
$"2E00" /* .. */
};

View File

@ -0,0 +1,336 @@
;
; File: MaceEqu.a
;
; Contains: Equates for accessing the Ethernet Media Access
; Controller (MACE)
;
; Written by: Mark A. Law
;
; Copyright: © 1991-1993 by Apple Computer, Inc. All rights reserved.
;
; This file is used in these builds: Mac32
;
; Change History (most recent first):
;
; <SM6> 6/14/93 kc Roll in Ludwig.
; <LW4> 5/1/93 mal #1082434 Added records for new GetMem & FreeMem rtns.
; <LW3> 3/21/93 mal Versioned record for MACE 'ecfg' rsrc.
; <LW2> 1/27/93 mal Added MACEecfg rsrc support.
; <SM5> 12/4/92 mal Removed OFLO bit from recv pkt status.
; <SM4> 11/19/92 mal Added equ for yet another bit AMD didn't tell us about.
; <SM3> 10/30/92 mal MaceInitParms record change.
; <SM2> 10/13/92 mal -changed status thats passed to RecvRtn to lw
; <1> 10/6/92 GDW New location for ROMLink tool.
; <SM2> 6/22/92 mal Changes to support PSC2's (EVT2) Ethernet DMA receive model.
; <P4> 4/30/92 mal Expanded MaceInitParms record.
; <P3> 4/27/92 mal Added MaceInit parameters record.
; <P2> 3/23/92 mal Added MACE MAC config reg bit defines
;
; ---------------------------------------------------------
; MACE Registers
; ---------------------------------------------------------
MACERegBase EQU $50F1C000 ; Mace Reg Base on Cyclone
MACERegs RECORD 0
MACE_RX_FIFO DS.W 1 ;RD RXData -Read Status first
ORG *+$e
MACE_XMIT_FIFO DS.W 1 ;TX TXData
ORG *+$e
MACE_TX_FRM_CNTRL DS.B 1 ;RD/WR 01=Retry,XMTFCS,AUTOPAD
ORG *+$f
MACE_TX_FRM_STAT DS.B 1 ;RD
ORG *+$f
MACE_TX_RETRY_CNT DS.B 1 ;RD
ORG *+$f
MACE_RX_FRM_CNTRL DS.B 1 ;RD/WR 00 = Not_AutoStripPad
ORG *+$f
MACE_RX_FRM_STAT DS.B 1 ;RD Read 4x to get RX Status of packet
ORG *+$f
MACE_FIFO_FRM_CNT DS.B 1 ;RD Number of frames in FIFO
ORG *+$f
MACE_INT DS.B 1 ;RD_1 Interupt Source bits
ORG *+$f
MACE_INT_MSK DS.B 1 ;RD/WR Interupt Enables
ORG *+$f
MACE_POLL DS.B 1 ;RD Yet another status location
ORG *+$f
MACE_BIU_CNFG DS.B 1 ;RD/WR 20 = normal mode 01 = Soft Reset
ORG *+$f
MACE_FIFO_CNFG DS.B 1
ORG *+$f
MACE_MAC_CNFG DS.B 1 ;Enables
ORG *+$f
MACE_PLS_CNFG DS.B 1 ;RD/WR 0=Normal Mode
ORG *+$f
MACE_PHY_CNFG DS.B 1 ;RD/WR Reserved,Dude.
ORG *+$f
MACE_CHIP_ID_LOW DS.B 1 ;RD Just Reads ID
ORG *+$f
MACE_CHIP_ID_HIGH DS.B 1 ;RD Just Reads ID
ORG *+$f
MACE_ADDR_CNFG DS.B 1 ;RD/WR 04=Phy_Addr, 02=Log_Addr
ORG *+$1f
MACE_LOG_ADDR DS.B 1 ;Load with 6 Zeros
ORG *+$f
MACE_PHY_ADDR DS.B 1 ;Load with Address
ORG *+$2f
MACE_MISSED_PKT_CNT DS.B 1 ;RD
ORG *+$4f
MACE_USER_TEST_REG DS.B 1 ;
ENDR
;
; MACE Interrupt Reg. & Int. Reg. Mask Bit defines
; MACE Int. Reg - Read/Clear; MACE Int. Mask Reg. - Read/Write
;
BABL EQU 6 ; Babble, Xmit timeout error
CERR EQU 5 ; Signal Quality Error (SQE), xmit
RCVCO EQU 4 ; Receive Collision Cnt Overflow
MPCO EQU 2 ; Missed Pkt Cnt Overflow
RCVINT EQU 1 ; Rcv int
XMTINT EQU 0 ; Xmit int
; mask to disable all MACE ints
MaceIntMask EQU (1<<BABL)+(1<<CERR)+(1<<RCVCO)+(1<<MPCO)+(1<<RCVINT)+(1<<XMTINT)
OurIntsMask EQU (1<<RCVINT) ; ignore recv ints
;
; MACE Transmit Frame Status Reg. Bit defines
; Note: ONE and MORE are swapped prior to CURIO B0 MACE
;
XMTSV EQU 7 ; transmit status field valid when 1
UFLO EQU 6 ; underflow - xmit fifo
LCOL EQU 5 ; late collision
MORE EQU 4 ; more than 1 retry needed to xmit
ONE EQU 3 ; exactly 1 retry needed to xmit
DEFER EQU 2 ; transmission defered at least once
LCAR EQU 1 ; loss of carrier
RTRY EQU 0 ; retry
;
; MACE Transmit Frame Control Reg. Bit defines (byte)
;
DRTRY EQU 7 ; disable retry
DXMTFCS EQU 3 ; disable xmit fcs
APADXMT EQU 0 ; enable xmt autopad
; -forces generation of fcs
;
; MACE Receive Frame Control Reg. Bit defines (byte)
;
ASTRIPRCV EQU 0 ; enable rcv autopad stripping
; -forces stripping of fcs
;
; MACE Receive Status Reg. Bit defines (long)
;
; Receive Message Byte Count (byte0)
; Bits 7-0 : Recv Message Byte Count bits 7-0
; Receive Status (byte1)
; Bits 3-0 : Recv Message Byte Count bits 11-8
; Bits 7-4 : Recv Message Status bits
RcvOFLO EQU 7 ; receive fifo overflow
RcvCLSN EQU 6 ; late collision during recv
RcvFRAM EQU 5 ; frame error, non-integer # of bytes
RcvFCS EQU 4 ; frame check sequence error
; Receive Runt Packet Count (byte2)
; -number of runts recv'd since last successfully recv'd pkt
; -maxs at 255
; Receive Collision Count (byte3)
; -number of collisions since last successfully recv'd pkt
; -maxs at 255
;
; MACE Bus Interface Unit Reg. Bit defines (byte)
;
BSWAP EQU 7 ; byte swap mode, 0-Intel, 1-Motorola
; Transmit start point Bits 5-4
XMSTP EQU 4 ; bit shift offset
MACERESET EQU 0 ; software reset
; Transmit start point equates
; -controls when preamble xmit starts
XMTS4 EQU $00 ; start when 4 bytes in FIFO
XMTS16 EQU $10 ; start when 16 bytes in FIFO
XMTS64 EQU $20 ; start when 64 bytes in FIFO
XMTS112 EQU $30 ; start when 112 bytes in FIFO
;
; MACE FIFO Configuration Reg. Bit defines (byte)
; -fifo water mark changes ignored until fw reset bit set
; Transmit FIFO water mark Bits 7-6
XMTFW EQU 6 ; bit shift offset
; Receive FIFO water mark Bits 5-4
RCVFW EQU 4 ; bit shift offset
XMTFWR EQU 3 ; xmit fifo water mark reset
RCVFWR EQU 2 ; recv fifo water mark reset
XMTBRST EQU 1 ; xmit burst
RCVBRST EQU 0 ; recv burst
; FIFO watermark equates
RFW16 EQU $00 ; 16 byte recv FIFO watermark
RFW32 EQU $10 ; 32 byte recv FIFO watermark
RFW64 EQU $20 ; 64 byte recv FIFO watermark
TFW16 EQU $00 ; 16 byte xmit FIFO watermark
TFW32 EQU $40 ; 32 byte xmit FIFO watermark
TFW64 EQU $80 ; 64 byte xmit FIFO watermark
;
; MACE MAC Configuration Reg. Bit defines (byte)
;
PROMISC EQU 7 ; promiscuous mode, recv all valid frames
DXMT2PD EQU 6 ; disable xmit 2-part deferral algorithm
EMBA EQU 5 ; enable modified back-off algorithm
ENXMT EQU 1 ; enable xmit
ENRCV EQU 0 ; enable recv
;
; MACE Physical Layer Signaling Reg. Bit defines (byte)
;
XMTSEL EQU 3 ; xmit mode select
; Port Select Bits 2-1
PORTSEL EQU 1 ; bit shift offset
ENSTS EQU 0 ; enable optional I/O function status
;
; MACE Internal Address Configuration Reg. Bit defines (byte)
;
ADDRCHG EQU 7 ; address change enable
PHYADDR EQU 2 ; physical address select
LOGADDR EQU 1 ; logical address select
;
; MACE User Test Reg. Bit defines (byte)
;
;••••• WARNING: DO NOT EVER SET BIT 7 or you'll fry the MACE!!!! •••••
; Bit 6 (disable) is set during MACE init to disallow an erroneous and/or
; malicious setting of RTRE.
RTRE EQU 7 ; reserved test register enable
RTRD EQU 6 ; reserved test register disable
;•••••
RPA EQU 5 ; runt packet accept
FCOLL EQU 4 ; force a collision, use with loopback
RCVFCSE EQU 3 ; receive fcs enable, use with loopback
; Loopback control Bits 2-1, %XX0 ••• NOT FOR BIT SHIFTS!
NOLPB EQU %000 ; disable loopback mode
EXTLPB EQU %010 ; external loopback mode
INTLPB EQU %100 ; internal loopback, no MENDEC
MENDECLPB EQU %110 ; internal loopback, with MENDEC
;
; Misc. equates
;
MondoPkt EQU 2000 ; Value > max pkt, used for Recv DMA cnt
CntRegMask EQU $0001ffff ; Ignore upper 15 bits
nobuff EQU -2 ; no xmit buffer available
;•••••••••••••••• Network Statistics
NetStats RECORD 0 ; network management stats.
TxOK DS.L 1 ; frames transmitted OK
sCollFrame DS.L 1 ; single collision frames
mCollFrame DS.L 1 ; multiple collision frames
CollFrame DS.L 1 ; collision frames
DefTx DS.L 1 ; deferred transmissions
LateColl DS.L 1 ; late collisions
ExcessColl DS.L 1 ; excessive collisions
ExcessDef DS.L 1 ; excessive defferals
InMACTxErr DS.L 1 ; internal MAC transmit errors
RxOK DS.L 1 ; frames received OK
MultiRxOK DS.L 1 ; multicast frames recd OK
BroadRxOK DS.L 1 ; broadcast frames recd OK
FCSerr DS.L 1 ; frame check sequence errors
FAerr DS.L 1 ; frame alignment errors
MPerr DS.L 1 ; missed packet errors
Size EQU *
ENDR
;•••••••••••••••• General Equates
TalliesPerSec EQU 5000000 ; number of timer ticks/second
TxMaxRetries EQU 4 ; max attempts to retry aborted xmits
Max_Tx_Packets EQU 16 ; maximum # of chained Tx packets
Min_Pkt_Size EQU 60 ; minimum packet size
Min_Rx_Buffs EQU 2 ; minimum # of recv descriptors/buffers
Max_Pkt_Size EQU 1518 ; maximum packet size (inc. CRC)
EOL_Bit EQU 0 ; end-of-link bit
;•••••••••••••••• For GetMemory call
GetMem RECORD 0
memsize DS.l 1 ; requested size
memoptions DS.l 1 ; requested options
memhndl DS.l 1 ; handle to memory mgr block
memhndla DS.l 1 ; handle to 4 or 8k aligned memory
memhndlasz DS.l 1 ; ptr to 4 or 8k aligned memory size
GetMemSz EQU *
ENDR
Locked EQU 0 ; want locked memory
Contig EQU 1 ; want contiguous memory
CacheOff EQU 2 ; want non-cacheable memory
;•••••••••••••••• For FreeMemory call
FreeMem RECORD 0
memoptions DS.l 1 ; requested options
memptr DS.l 1 ; ptr to memory mgr block
memptra DS.l 1 ; ptr to 4 or 8k aligned memory
memptrasz DS.l 1 ; 4 or 8k aligned memory size
FreeMemSz EQU *
ENDR
;•••••••••••••••• Initialization Parameters
MACEInitParms RECORD 0
RecvRtn DS.l 1 ; address of Ethernet receive routine
RecvPrms DS.l 1 ; parms to pass @ receive
XmitRtn DS.l 1 ; address of Ethernet xmit complete routine
XmitPrms DS.l 1 ; parms to pass @ xmit complete
MACECfgPtr DS.l 1 ; ptr to MACE config record
Dot3NetStats DS.l 1 ; ptr to 802.3 statistics array
LAPMIBNetStats DS.l 1 ; ptr to LAP MIB statistics array
EnetAddr DS.l 1 ; ptr to ethernet address
FastMoveRtn DS.l 1 ; ->proc to move memory FAST
IPSize EQU *
ENDR
;•••• Parms passed to .ENET "RecvRtn"
RcvParms RECORD {A6Link}
Size EQU * ; no local vars
A6Link DS.l 2 ; saved A6 and return addr
Parm DS.l 1 ; parm passed to MaceInit
Buff DS.l 1 ; ptr to Mace's buffer containing pkt
Pkt DS.l 1 ; ptr to packet data
Len DS.w 1 ; pkt length
Stat DS.l 1 ; pkt status
; Stat definition:
; Byte 0: Receive Runt Packet Count (Bits 31-24)
; -number of runts recv'd since last successfully recv'd pkt
; -maxs at 255
; Byte 1: Receive Collision Count (Bits 23-16)
; -number of collisions since last successfully recv'd pkt
; -maxs at 255
; Byte 2-3: Receive Status (Bits 15-0)
; Bits 15-7,3-0 : reserved, read as 0's
; Bits 6-4 : Recv Message Status bits
; RcvCLSN EQU 6 ; late collision during recv
; RcvFRAM EQU 5 ; frame error, non-integer # of bytes
; RcvFCS EQU 4 ; frame check sequence error
ParmsSz EQU * - Parm ; len of passed parms
ENDR
Configrsrc EQU 'ecfg' ; rsrc type for MACE config data rsrc
; Mace Configuration Record
MACECfg RECORD 0 ; Config values from config rsrc
MACECfgVers DS.w 1 ; record version
MACEBase DS.l 1 ; Base address of MACE
EnetPROM DS.l 1 ; base address of Address Prom
XmitFrmCtl DS.b 1 ; MACE transmit frame control register value
RecvFrmCtl DS.b 1 ; MACE receive frame control register value
FIFOCfgCtl DS.b 1 ; MACE xmit/recv fifo config control register value
MACCfgCtl DS.b 1 ; MACE MAC config control register value
; The following are optional values; ignored if zero
EnetAddr DS.b 6 ; Alternate Ethernet Address, overrides Address PROM
XmitBuffs DS.w 1 ; Alternate number of transmit buffers
RecvBuffs DS.w 1 ; Alternate number of receive buffers
RecvChains DS.w 1 ; Alternate number of receive "chains"
CfgSize EQU *
ENDR

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,25 @@
data 'MPSR' (1005) {
$"000C 436F 7572 6965 7200 2A2A 2A2A 2A2A" /* ..Courier.****** */
$"2A2A 2A2A 2A2A 2A2A 2A2A 2A0D 3B09 4571" /* ***********.;.Eq */
$"7561 0007 0004 0029 0242 035A 0479 0029" /* ua.....).B.Z.y.) */
$"0242 035A 0479 A839 2AA8 0000 0129 0000" /* .B.Z.y.9*....).. */
$"0151 0000 0000 0100" /* .Q...... */
};
data 'MPSR' (1008) {
$"0029 0242 035A 0479 0029 0242 035A 0479" /* .).B.Z.y.).B.Z.y */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"7F7E 54A0 3FE5 3230 0004 0000 0000 0000" /* .~T.?.20........ */
$"0000 A933 739B A933 739B A6F7 B0C6 0078" /* ...3s..3s......x */
$"BC36 0000 0004 000A 2553 7570 6572 4D61" /* .6......%SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C4E 6574 BA4D 6163 65BA 000E" /* .DeclNet.Mace... */
$"4368 7269 7320 5065 7465 7273 656E 0001" /* Chris Petersen.. */
$"3600 094D 6163 6545 7175 2E61 0000 0000" /* 6..MaceEqu.a.... */
$"0F52 6F6C 6C20 696E 204C 7564 7769 672E" /* .Roll in Ludwig. */
$"00" /* . */
};

View File

@ -0,0 +1,83 @@
# Contains: Makefile for PDM MACE Ethernet driver.
#
# Written by: Dave Calvert
#
# Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
#
# Change History (most recent first):
#
# <SM6> 3/5/93 dwc Changed DeclDataPDMMace.rsrc ID to be unique from
# DeclDataMace.rsrc.
# <SM3> 3/4/93 dwc Added DeclDataPDMMace definition for PDM ENET.
# <SM2> 2/25/93 dwc Re-enable loopbacktests and include Interface.o for them.
# <SM2> 2/4/93 RC Took out Loopback.c.o link and fixed {make} to {makedir}
#
#===============================================================================
# Create DeclData Resource for PDM Declaration ROM
#===============================================================================
"{RsrcDir}DeclDataPDMMace.rsrc" ƒ "{ObjDir}PDMMaceEnet.a.o" ∂
"{ObjDir}PDMMace.a.o" ∂
"{ObjDir}Loopback.c.o" ∂
"{IfObjDir}interface.o"
Link {StdLOpts} {StdAlign} -rt decl=1 -o "{Targ}" ∂
"{ObjDir}PDMMaceEnet.a.o" ∂
"{ObjDir}PDMMace.a.o" ∂
"{ObjDir}Loopback.c.o" ∂
"{IfObjDir}Interface.o"
"{RsrcDir}PDMENET.rsrc" ƒ "{ObjDir}PDMMaceEnet.a.o" ∂
"{ObjDir}PDMMace.a.o" ∂
"{PDMMaceDir}PDMEnet.make" ∂
"{ObjDir}Loopback.c.o" ∂
"{IfObjDir}Interface.o"
Link -t rsrc -c RSED -sn Main="PDM MACE Ethernet Driver" ∂
-ra "PDM MACE Ethernet Driver"=resSysHeap,resPurgeable,resLocked ∂
-rt enet=57 -o {Targ} ∂
"{ObjDir}PDMMaceEnet.a.o" ∂
"{ObjDir}PDMMace.a.o" ∂
"{ObjDir}Loopback.c.o" ∂
"{IfObjDir}Interface.o"
"{RsrcDir}PDMENET57.rsrc" ƒ "{ObjDir}PDMMaceEnet.a.o" ∂
"{ObjDir}PDMMace.a.o" ∂
# "{ObjDir}Loopback.c.o" ∂
"{PDMMaceDir}PDMEnet.make"
Link -t rsrc -c RSED -sn Main="PDM MACE Ethernet Driver" ∂
-ra "PDMENET"=resSysHeap,resPurgeable,resLocked ∂
-rt enet=57 -o {Targ} ∂
"{ObjDir}PDMMaceEnet.a.o" ∂
# "{ObjDir}Loopback.c.o" ∂
"{ObjDir}PDMMace.a.o"
#===============================================================================
# Assemble Stuff
#===============================================================================
"{ObjDir}PDMMace.a.o" ƒ "{PDMMaceDir}PDMMace.a" ∂
"{PDMMaceDir}PDMMaceEqu.a" ∂
"{IntAIncludes}AMICEqu.a" ∂
"{IntAIncludes}UniversalEqu.a" ∂
"{EthernetDir}ATalkMacros.a" ∂
"{PDMMaceDir}PDMEnet.make"
Asm {StdAOpts} {Defs} -i "{PDMMaceDir}" -i "{EthernetDir}" -o "{Targ}" "{PDMMaceDir}PDMMace.a"
"{ObjDir}PDMMaceEnet.a.o" ƒ "{PDMMaceDir}PDMMaceEnet.a" ∂
"{PDMMaceDir}PDMMaceEqu.a" ∂
"{PDMMaceDir}VersionPDMMaceEnet.a" ∂
"{EthernetDir}802Equ.a" ∂
"{EthernetDir}ATalkMacros.a" ∂
"{EthernetDir}ENETEqu.a" ∂
"{EthernetDir}SNMPLAP.a" ∂
"{IntAIncludes}UniversalEqu.a" ∂
"{IntAIncludes}AMICEqu.a" ∂
"{AIncludes}GestaltEqu.a" ∂
"{AIncludes}SysEqu.a" ∂
"{AIncludes}SysErr.a" ∂
"{AIncludes}Traps.a" ∂
"{AIncludes}Slots.a" ∂
"{PDMMaceDir}PDMEnet.make"
Asm {StdAOpts} {Defs} -i "{PDMMaceDir}" -i "{EthernetDir}" -o "{Targ}" "{PDMMaceDir}PDMMaceEnet.a"

View File

@ -0,0 +1,29 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 0065 6F72 6765 2044" /* ..Monaco.eorge D */
$"2E20 5769 6C73 6F6E 204A 722E 0D23 0D23" /* . Wilson Jr..#.# */
$"0943 0006 0004 00B4 000C 0363 043D 00B4" /* .C.........c.=.. */
$"000C 0363 043D A7BD 0EC8 0000 0000 0000" /* ...c.=.......... */
$"0000 0000 0000 0100" /* ........ */
};
data 'MPSR' (1008) {
$"00B4 000C 0363 043D 00B4 000C 0363 043D" /* .....c.=.....c.= */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"ABA3 F3A9 3FE5 3230 0004 0000 0000 0000" /* ....?.20........ */
$"0000 A933 73A3 A933 73A3 A796 71C8 0006" /* ...3s..3s...q... */
$"D7AA 0000 0005 0006 3153 7570 6572 4D61" /* ........1SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C4E 6574 BA4D 6163 65BA 5044" /* .DeclNet.Mace.PD */
$"4D4D 6163 6545 6E65 74BA 000E 4368 7269" /* MMaceEnet...Chri */
$"7320 5065 7465 7273 656E 0001 3600 0C50" /* s Petersen..6..P */
$"444D 456E 6574 2E6D 616B 6500 0000 0044" /* DMEnet.make....D */
$"4368 616E 6765 6420 4465 636C 4461 7461" /* Changed DeclData */
$"5044 4D4D 6163 652E 7273 7263 2049 4420" /* PDMMace.rsrc ID */
$"746F 2062 6520 756E 6971 7565 2066 726F" /* to be unique fro */
$"6D20 4465 636C 4461 7461 4D61 6365 2E72" /* m DeclDataMace.r */
$"7372 632E 00" /* src.. */
};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,26 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 0000 6E64 6572 2061" /* ..Monaco..nder a */
$"2050 5343 2D73 7479 6C65 2044 4D41 206D" /* PSC-style DMA m */
$"6F64 0006 0004 0027 0005 026B 01DF 0027" /* od.....'...k...' */
$"0005 026B 01DF A8D8 162C 0000 0113 0000" /* ...k.....,...... */
$"0145 0000 0000 0100" /* .E...... */
};
data 'MPSR' (1008) {
$"0027 0005 026B 01DF 0027 0005 026B 01DF" /* .'...k...'...k.. */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"1AAC A01F 3FE5 3230 0004 0000 0000 0000" /* ....?.20........ */
$"0000 A933 73A3 A933 73A3 A796 71C8 0006" /* ...3s..3s...q... */
$"D7AA 0000 0002 0027 3153 7570 6572 4D61" /* .......'1SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C4E 6574 BA4D 6163 65BA 5044" /* .DeclNet.Mace.PD */
$"4D4D 6163 6545 6E65 74BA 000E 4368 7269" /* MMaceEnet...Chri */
$"7320 5065 7465 7273 656E 0002 3235 0009" /* s Petersen..25.. */
$"5044 4D4D 6163 652E 6100 0000 0019 546F" /* PDMMace.a.....To */
$"6F6B 206F 7574 2050 444D 2045 5654 3120" /* ok out PDM EVT1 */
$"7375 7070 6F72 7400" /* support. */
};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,29 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 0000 F0D2 0001 CD42" /* ..Monaco.......B */
$"0000 0200 0000 F200 0200 0000 0000 0000" /* ................ */
$"0000 0006 0004 005F 0249 027D 0465 003B" /* ......._.I.}.e.; */
$"0012 0259 022E A858 AB80 0000 0193 0000" /* ...Y...X........ */
$"0204 0000 0000 0100" /* ........ */
};
data 'MPSR' (1008) {
$"005F 0249 027D 0465 003B 0012 0259 022E" /* ._.I.}.e.;...Y.. */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"0E95 2FA6 3FE5 3230 0004 0000 0000 0000" /* ../.?.20........ */
$"0000 A933 73A3 A933 73A3 A796 71C8 0006" /* ...3s..3s...q... */
$"D7AA 0000 0001 000F 3153 7570 6572 4D61" /* ........1SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C4E 6574 BA4D 6163 65BA 5044" /* .DeclNet.Mace.PD */
$"4D4D 6163 6545 6E65 74BA 000E 4368 7269" /* MMaceEnet...Chri */
$"7320 5065 7465 7273 656E 0002 3132 000D" /* s Petersen..12.. */
$"5044 4D4D 6163 6545 6E65 742E 6100 0000" /* PDMMaceEnet.a... */
$"004D 4D61 6B65 2074 6865 2072 6563 6569" /* .MMake the recei */
$"7665 2068 616E 646C 6572 2069 676E 6F72" /* ve handler ignor */
$"6520 7468 6520 7061 636B 6574 2069 6620" /* e the packet if */
$"7468 6572 6520 7761 7320 6120 4D61 6365" /* there was a Mace */
$"206F 7665 7272 756E 2065 7272 6F72 2E00" /* overrun error.. */
};

View File

@ -0,0 +1,335 @@
;
; File: PDMMaceEqu.a
;
; Contains: Equates for accessing the Ethernet Media Access
; Controller (MACE) for the PDM ENET driver
;
; Written by: Dave Calvert
;
; Copyright: © 1992-1993 by Apple Computer, Inc. All rights reserved.
;
; This file is used in these builds: ROM RISC (PDM ENET)
;
; Change History (most recent first):
;
; <SM10> 6/2/93 GMR Changed some of the init parameters (back to Mark's equates),
; modified the receive record/status definitions.
; <SM9> 5/27/93 dwc Added support for AMIC work-around code.
; <SM8> 5/25/93 dwc Clean up for Alpha.
; <SM7> 5/4/93 dwc Added debug code to work around AMIC's returning FF's on the
; first read.
; <SM6> 4/6/93 dwc Added status/packet logging equate.
; <SM5> 3/24/93 dwc Remove obsolete code and added code to try to recover from
; lowered interrupt level during packet handling.
; <SM4> 3/5/93 dwc Removed some more debugging code.
; <SM3> 2/25/93 dwc Enable receive, remove some debug equates.
; <SM2> 2/24/93 dwc Cleaned up some debug equates, added some more debug equates,
; disabled receive for the PDM D5 ROM build.
; <SM1> 2/4/93 dwc first checked in
;
;
; ---------------------------------------------------------
; MACE Registers
; ---------------------------------------------------------
MACERegBase EQU $50F1C000 ; Mace Reg Base on Cyclone
MACERegs RECORD 0
MACE_RX_FIFO DS.W 1 ;RD RXData -Read Status first
ORG *+$e
MACE_XMIT_FIFO DS.W 1 ;TX TXData
ORG *+$e
MACE_TX_FRM_CNTRL DS.B 1 ;RD/WR 01=Retry,XMTFCS,AUTOPAD
ORG *+$f
MACE_TX_FRM_STAT DS.B 1 ;RD
ORG *+$f
MACE_TX_RETRY_CNT DS.B 1 ;RD
ORG *+$f
MACE_RX_FRM_CNTRL DS.B 1 ;RD/WR 00 = Not_AutoStripPad
ORG *+$f
MACE_RX_FRM_STAT DS.B 1 ;RD Read 4x to get RX Status of packet
ORG *+$f
MACE_FIFO_FRM_CNT DS.B 1 ;RD Number of frames in FIFO
ORG *+$f
MACE_INT DS.B 1 ;RD_1 Interupt Source bits
ORG *+$f
MACE_INT_MSK DS.B 1 ;RD/WR Interupt Enables
ORG *+$f
MACE_POLL DS.B 1 ;RD Yet another status location
ORG *+$f
MACE_BIU_CNFG DS.B 1 ;RD/WR 20 = normal mode 01 = Soft Reset
ORG *+$f
MACE_FIFO_CNFG DS.B 1
ORG *+$f
MACE_MAC_CNFG DS.B 1 ;Enables
ORG *+$f
MACE_PLS_CNFG DS.B 1 ;RD/WR 0=Normal Mode
ORG *+$f
MACE_PHY_CNFG DS.B 1 ;RD/WR Reserved,Dude.
ORG *+$f
MACE_CHIP_ID_LOW DS.B 1 ;RD Just Reads ID
ORG *+$f
MACE_CHIP_ID_HIGH DS.B 1 ;RD Just Reads ID
ORG *+$f
MACE_ADDR_CNFG DS.B 1 ;RD/WR 04=Phy_Addr, 02=Log_Addr
ORG *+$1f
MACE_LOG_ADDR DS.B 1 ;Load with 6 Zeros
ORG *+$f
MACE_PHY_ADDR DS.B 1 ;Load with Address
ORG *+$2f
MACE_MISSED_PKT_CNT DS.B 1 ;RD
ORG *+$4f
MACE_USER_TEST_REG DS.B 1 ;
ENDR
;
; MACE Interrupt Reg. & Int. Reg. Mask Bit defines
; MACE Int. Reg - Read/Clear; MACE Int. Mask Reg. - Read/Write
;
BABL EQU 6 ; Babble, Xmit timeout error
CERR EQU 5 ; Signal Quality Error (SQE), xmit
RCVCO EQU 4 ; Receive Collision Cnt Overflow
MPCO EQU 2 ; Missed Pkt Cnt Overflow
RCVINT EQU 1 ; Rcv int
XMTINT EQU 0 ; Xmit int
; mask to disable all MACE ints
;
; MACE Poll register bits
;
TDTREQ EQU 6 ; Transmit data request
RTDREQ EQU 5 ; Receive data request
;==========================================================================================
; _SETTHEINTMASK
;
; Macro for setting the interrupt level to an arbitrary level. Pass the level in
; a Data register.
;==========================================================================================
MACRO
_SETTHEINTMASK &sReg
move.w SR,-(SP)
or.w &sReg,(SP)
move.w (SP)+,SR
ENDM
MaceIntMask EQU (1<<BABL)+(1<<CERR)+(1<<RCVCO)+(1<<MPCO)+(1<<RCVINT)+(1<<XMTINT)
OurIntsMask EQU (1<<RCVINT) ; Ignore only these interrupts from MACE
;
; MACE Transmit Frame Status Reg. Bit defines
; Note: ONE and MORE are swapped prior to CURIO B0 MACE
;
XMTSV EQU 7 ; transmit status field valid when 1
UFLO EQU 6 ; underflow - xmit fifo
LCOL EQU 5 ; late collision
MORE EQU 4 ; more than 1 retry needed to xmit
ONE EQU 3 ; exactly 1 retry needed to xmit
DEFER EQU 2 ; transmission defered at least once
LCAR EQU 1 ; loss of carrier
RTRY EQU 0 ; retry
;
; MACE Transmit Frame Control Reg. Bit defines (byte)
;
DRTRY EQU 7 ; disable retry
DXMTFCS EQU 3 ; disable xmit fcs
APADXMT EQU 0 ; enable xmt autopad
; -forces generation of fcs
;
; MACE Receive Frame Control Reg. Bit defines (byte)
;
ASTRIPRCV EQU 0 ; enable rcv autopad stripping
; -forces stripping of fcs
;
; MACE Receive Status Reg. Bit defines (long)
;
; Receive Message Byte Count (byte0)
; Bits 7-0 : Recv Message Byte Count bits 7-0
; Receive Status (byte1)
; Bits 3-0 : Recv Message Byte Count bits 11-8
; Bits 7-4 : Recv Message Status bits
RcvOFLO EQU 7 ; receive fifo overflow
RcvCLSN EQU 6 ; late collision during recv
RcvFRAM EQU 5 ; frame error, non-integer # of bytes
RcvFCS EQU 4 ; frame check sequence error
; Receive Runt Packet Count (byte2)
; -number of runts recv'd since last successfully recv'd pkt
; -maxs at 255
; Receive Collision Count (byte3)
; -number of collisions since last successfully recv'd pkt
; -maxs at 255
;
; MACE Bus Interface Unit Reg. Bit defines (byte)
;
BSWAP EQU 7 ; byte swap mode, 0-Intel, 1-Motorola
; Transmit start point Bits 5-4
XMSTP EQU 4 ; bit shift offset
MACERESET EQU 0 ; software reset
; Transmit start point equates
; -controls when preamble xmit starts
XMTS4 EQU $00 ; start when 4 bytes in FIFO
XMTS16 EQU $10 ; start when 16 bytes in FIFO
XMTS64 EQU $20 ; start when 64 bytes in FIFO
XMTS112 EQU $30 ; start when 112 bytes in FIFO
;
; MACE FIFO Configuration Reg. Bit defines (byte)
; -fifo water mark changes ignored until fw reset bit set
; Transmit FIFO water mark Bits 7-6
XMTFW EQU 6 ; bit shift offset
; Receive FIFO water mark Bits 5-4
RCVFW EQU 4 ; bit shift offset
XMTFWR EQU 3 ; xmit fifo water mark reset
RCVFWR EQU 2 ; recv fifo water mark reset
XMTBRST EQU 1 ; xmit burst
RCVBRST EQU 0 ; recv burst
; FIFO watermark equates
RFW16 EQU $00 ; 16 byte recv FIFO watermark
RFW32 EQU $10 ; 32 byte recv FIFO watermark
RFW64 EQU $20 ; 64 byte recv FIFO watermark
TFW16 EQU $00 ; 16 byte xmit FIFO watermark
TFW32 EQU $40 ; 32 byte xmit FIFO watermark
TFW64 EQU $80 ; 64 byte xmit FIFO watermark
;
; MACE MAC Configuration Reg. Bit defines (byte)
;
PROMISC EQU 7 ; promiscuous mode, recv all valid frames
DXMT2PD EQU 6 ; disable xmit 2-part deferral algorithm
EMBA EQU 5 ; enable modified back-off algorithm
ENXMT EQU 1 ; enable xmit
ENRCV EQU 0 ; enable recv
;
; MACE Physical Layer Signaling Reg. Bit defines (byte)
;
XMTSEL EQU 3 ; xmit mode select
; Port Select Bits 2-1
PORTSEL EQU 1 ; bit shift offset
ENSTS EQU 0 ; enable optional I/O function status
;
; MACE Internal Address Configuration Reg. Bit defines (byte)
;
ADDRCHG EQU 7 ; address change enable
PHYADDR EQU 2 ; physical address select
LOGADDR EQU 1 ; logical address select
;
; MACE User Test Reg. Bit defines (byte)
;
;••••• WARNING: DO NOT EVER SET BIT 7 or you'll fry the MACE!!!! •••••
; Bit 6 (disable) is set during MACE init to disallow an erroneous and/or
; malicious setting of RTRE.
RTRE EQU 7 ; reserved test register enable
RTRD EQU 6 ; reserved test register disable
;•••••
RPA EQU 5 ; runt packet accept
FCOLL EQU 4 ; force a collision, use with loopback
RCVFCSE EQU 3 ; receive fcs enable, use with loopback
; Loopback control Bits 2-1, %XX0 ••• NOT FOR BIT SHIFTS!
NOLPB EQU %000 ; disable loopback mode
EXTLPB EQU %010 ; external loopback mode
INTLPB EQU %100 ; internal loopback, no MENDEC
MENDECLPB EQU %110 ; internal loopback, with MENDEC
;
; Misc. equates
;
MondoPkt EQU 2000 ; Value > max pkt, used for Recv DMA cnt
AddrPROM EQU $50F08000 ; 32 bit address of address PROM
CntRegMask EQU $0001ffff ; Ignore upper 15 bits
nobuff EQU -2 ; no xmit buffer available
;•••••••••••••••• Network Statistics
NetStats RECORD 0 ; network management stats.
TxOK DS.L 1 ; frames transmitted OK
sCollFrame DS.L 1 ; single collision frames
mCollFrame DS.L 1 ; multiple collision frames
CollFrame DS.L 1 ; collision frames
DefTx DS.L 1 ; deferred transmissions
LateColl DS.L 1 ; late collisions
ExcessColl DS.L 1 ; excessive collisions
ExcessDef DS.L 1 ; excessive defferals
InMACTxErr DS.L 1 ; internal MAC transmit errors
RxOK DS.L 1 ; frames received OK
MultiRxOK DS.L 1 ; multicast frames recd OK
BroadRxOK DS.L 1 ; broadcast frames recd OK
FCSerr DS.L 1 ; frame check sequence errors
FAerr DS.L 1 ; frame alignment errors
MPerr DS.L 1 ; missed packet errors
Size EQU *
ENDR
;•••••••••••••••• General Equates
TalliesPerSec EQU 5000000 ; number of timer ticks/second
TxMaxRetries EQU 4 ; max attempts to retry aborted xmits
Max_Tx_Packets EQU 16 ; maximum # of chained Tx packets
Min_Pkt_Size EQU 60 ; minimum packet size
Min_Rx_Buffs EQU 2 ; minimum # of recv descriptors/buffers
Max_Pkt_Size EQU 1518 ; maximum packet size (inc. CRC)
EOL_Bit EQU 0 ; end-of-link bit
;•••••••••••••••• For GetMemory call
Locked EQU 0 ; want locked memory
Contig EQU 1 ; want contiguous memory
CacheOff EQU 2 ; want non-cacheable memory
;•••••••••••••••• Initialization Parameters
MACEInitParms RECORD 0
RecvRtn DS.l 1 ; address of Ethernet receive routine
RecvPrms DS.l 1 ; parms to pass @ receive
XmitRtn DS.l 1 ; address of Ethernet xmit complete routine
XmitPrms DS.l 1 ; parms to pass @ xmit complete
MACECfgPtr DS.l 1 ; ptr to MACE config record
Dot3NetStats DS.l 1 ; ptr to 802.3 statistics array
LAPMIBNetStats DS.l 1 ; ptr to LAP MIB statistics array
EnetAddr DS.l 1 ; ptr to ethernet address
FastMoveRtn DS.l 1 ; ->proc to move memory FAST
IPSize EQU *
ENDR
;•••• Parms passed to .ENET "RecvRtn"
RcvParms RECORD {A6Link}
Size EQU * ; no local vars
A6Link DS.L 2 ; saved A6 and return addr
Parm DS.L 1 ; parm passed to MaceInit
PktLen DS.L 1 ; pkt length
PktStat DS.L 1 ; pkt status
PktData DS.L 1 ; ptr to packet data
; Byte 0-1: Receive Status (Bits 15-0)
; Bits 15-7,3-0 : reserved, read as 0's
; Bits 6-4 : Recv Message Status bits
; RcvCLSN EQU 6 ; late collision during recv
; RcvFRAM EQU 5 ; frame error, non-integer # of bytes
; RcvFCS EQU 4 ; frame check sequence error
ParmsSz EQU * - Parm ; len of passed parms
ENDR
Configrsrc EQU 'ecfg' ; rsrc type for MACE config data rsrc
; Mace Configuration Record
MACECfg RECORD 0 ; Config values from config rsrc
MACECfgVers DS.w 1 ; record version
MACEBase DS.l 1 ; Base address of MACE
EnetPROM DS.l 1 ; base address of Address Prom
XmitFrmCtl DS.b 1 ; MACE transmit frame control register value
RecvFrmCtl DS.b 1 ; MACE receive frame control register value
FIFOCfgCtl DS.b 1 ; MACE xmit/recv fifo config control register value
MACCfgCtl DS.b 1 ; MACE MAC config control register value
; The following are optional values; ignored if zero
EnetAddr DS.b 6 ; Alternate Ethernet Address, overrides Address PROM
XmitBuffs DS.w 1 ; Alternate number of transmit buffers
RecvBuffs DS.w 1 ; Alternate number of receive buffers
RecvChains DS.w 1 ; Alternate number of receive "chains"
CfgSize EQU *
ENDR

View File

@ -0,0 +1,31 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 0000 2A2A 2A2A 2A2A" /* ..Monaco..****** */
$"2A2A 2A2A 2A2A 2A2A 2A2A 2A0D 3B09 4571" /* ***********.;.Eq */
$"7561 0006 0004 0054 003E 018F 0239 0054" /* ua.....T.>...9.T */
$"003E 018F 0239 A832 523C 0000 0153 0000" /* .>...9.2R<...S.. */
$"01E4 0000 0000 0100" /* ........ */
};
data 'MPSR' (1008) {
$"0054 003E 018F 0239 0054 003E 018F 0239" /* .T.>...9.T.>...9 */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"A4F1 0AD6 3FE5 3230 0004 0000 0000 0000" /* ....?.20........ */
$"0000 A933 73A3 A933 73A3 A796 71C8 0006" /* ...3s..3s...q... */
$"D7AA 0000 0003 000B 3153 7570 6572 4D61" /* ........1SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C4E 6574 BA4D 6163 65BA 5044" /* .DeclNet.Mace.PD */
$"4D4D 6163 6545 6E65 74BA 000E 4368 7269" /* MMaceEnet...Chri */
$"7320 5065 7465 7273 656E 0002 3130 000C" /* s Petersen..10.. */
$"5044 4D4D 6163 6545 7175 2E61 0000 0000" /* PDMMaceEqu.a.... */
$"6D43 6861 6E67 6564 2073 6F6D 6520 6F66" /* mChanged some of */
$"2074 6865 2069 6E69 7420 7061 7261 6D65" /* the init parame */
$"7465 7273 2028 6261 636B 2074 6F20 4D61" /* ters (back to Ma */
$"726B 2773 2065 7175 6174 6573 292C 206D" /* rk's equates), m */
$"6F64 6966 6965 6420 7468 6520 7265 6365" /* odified the rece */
$"6976 6520 7265 636F 7264 2F73 7461 7475" /* ive record/statu */
$"7320 6465 6669 6E69 7469 6F6E 732E 00" /* s definitions.. */
};

View File

@ -0,0 +1,25 @@
;
; File: VersionMaceEnet.a
;
; Contains: Version information for Mace Ethernet driver for PDM
;
; Written by: Dave Calvert
;
; Copyright: © 1992-1993 by Apple Computer, Inc., all rights reserved.
;
; Change History (most recent first):
;
; <SM3> 5/27/93 dwc Make Rev D8.
; <SM2> 2/24/93 dwc Made version zero for the ROM based version.
; <SM1> 2/4/93 dwc first checked in
;
; To Do:
;
PRINT PUSH, GEN, NOMDIR
;
; ••• DO NOT CHANGE parm 9, "MaceEnet", driver code depends on that string!
;
VERSION 'PDM MACE DMA Ethernet Driver', 0, 0, 0, development, 8, '1993', 'q4', MaceEnet
PRINT POP

View File

@ -0,0 +1,26 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 0069 6768 7473 2072" /* ..Monaco.ights r */
$"6573 6572 7665 642E 0D3B 0D3B 0943 6861" /* eserved..;.;.Cha */
$"6E67 0006 0004 019A 0485 022C 06FA 019A" /* ng.........,.... */
$"0485 022C 06FA A82A 4B00 0000 0000 0000" /* ...,...*K....... */
$"0000 0000 0000 0100" /* ........ */
};
data 'MPSR' (1008) {
$"019A 0485 022C 06FA 019A 0485 022C 06FA" /* .....,.......,.. */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"2FEA 3453 3FE5 3230 0004 0000 0000 0000" /* /.4S?.20........ */
$"0000 A933 73A3 A933 73A3 A796 71C8 0006" /* ...3s..3s...q... */
$"D7AA 0000 0004 0003 3153 7570 6572 4D61" /* ........1SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C4E 6574 BA4D 6163 65BA 5044" /* .DeclNet.Mace.PD */
$"4D4D 6163 6545 6E65 74BA 000E 4368 7269" /* MMaceEnet...Chri */
$"7320 5065 7465 7273 656E 0001 3300 1456" /* s Petersen..3..V */
$"6572 7369 6F6E 5044 4D4D 6163 6545 6E65" /* ersionPDMMaceEne */
$"742E 6100 0000 000C 4D61 6B65 2052 6576" /* t.a.....Make Rev */
$"2044 382E 00" /* D8.. */
};

View File

@ -0,0 +1,45 @@
;
; File: VersionMaceEnet.a
;
; Contains: Version information for Mace Ethernet driver for Cyclone
;
; Written by: Mark A. Law
;
; Copyright: © 1991-1993 by Apple Computer, Inc., all rights reserved.
;
; Change History (most recent first):
;
; <SM10> 7/26/93 mal Changed vers to 1.0.1d1 for first bug fix after 1.0 release.
; <SM9> 6/17/93 kc Roll in Ludwig.
; <LW8> 6/14/93 mal Changed version to 1.0.
; <SM8> 6/14/93 kc Roll in Ludwig.
; <LW7> 5/22/93 mal Change vers to 1.0b7q1 since drvr did change since b6.
; <LW6> 5/3/93 mal Updated to 1.0b6q4
; <LW5> 5/1/93 mal Changed name to 'Built-In Ethernet Driver' and vers to 1.0b6q1.
; <LW4> 3/21/93 mal Updated to b3q2
; <LW3> 2/17/93 mal Updated to 1.0a10q4
; <2> 1/27/93 mal Updated to 1.0a9q3
; <SM7> 12/4/92 mal Updated to 1.0a8q3.
; <SM6> 11/19/92 mal Updated to 1.0a7.
; <SM5> 11/10/92 mal Updated to 1.0a6q1.
; <SM4> 10/30/92 mal Updated to 1.0a5
; <SM3> 10/26/92 mal Updated to 1.0a4q4
; <SM2> 10/13/92 mal changed to 1.0d10q4
; <1> 10/6/92 GDW New location for ROMLink tool.
; <SM4> 9/14/92 mal changed to 1.0d9q6
; <SM3> 7/25/92 mal Changed to 1.0d9q4
; <SM2> 6/22/92 mal Updated to 1.0d8q1.
; <P4> 4/30/92 mal
; <P3> 4/28/92 mal Chg to 1.0D5q1
; <P2> 3/23/92 mal Chg to 1.0d3q4 for 1.0D3 ROM bld.
;
; To Do:
;
PRINT PUSH, GEN, NOMDIR
;
; ••• DO NOT CHANGE parm 9, "MaceEnet", driver code depends on that string!
;
VERSION 'Built-In Ethernet Driver', 1, 0, 1, development, 1, '1992-1993', '', MaceEnet
PRINT POP

View File

@ -0,0 +1,28 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 0069 6768 7473 2072" /* ..Monaco.ights r */
$"6573 6572 7665 642E 0D3B 0D3B 0943 6861" /* eserved..;.;.Cha */
$"6E67 0006 0004 00CE 0036 01BF 02EF 0055" /* ng.......6.....U */
$"002F 0146 02E8 A879 725C 0000 0000 0000" /* ./.F...yr\...... */
$"0000 0000 0000 0100" /* ........ */
};
data 'MPSR' (1008) {
$"00CE 0036 01BF 02EF 0055 002F 0146 02E8" /* ...6.....U./.F.. */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"AB77 FA68 3FE5 3230 0004 0000 0000 0000" /* .w.h?.20........ */
$"0000 A933 739B A933 739B A6F7 B0C6 0078" /* ...3s..3s......x */
$"BC36 0000 0005 0011 2553 7570 6572 4D61" /* .6......%SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C4E 6574 BA4D 6163 65BA 000E" /* .DeclNet.Mace... */
$"4368 7269 7320 5065 7465 7273 656E 0002" /* Chris Petersen.. */
$"3130 0011 5665 7273 696F 6E4D 6163 6545" /* 10..VersionMaceE */
$"6E65 742E 6100 0000 003C 4368 616E 6765" /* net.a....<Change */
$"6420 7665 7273 2074 6F20 312E 302E 3164" /* d vers to 1.0.1d */
$"3120 666F 7220 6669 7273 7420 6275 6720" /* 1 for first bug */
$"6669 7820 6166 7465 7220 312E 3020 7265" /* fix after 1.0 re */
$"6C65 6173 652E 00" /* lease.. */
};

View File

@ -0,0 +1,227 @@
;
; File: SNMPLAP.a
;
; Contains: Simple Network Management Protocol equates for
; Link Access Protocols
;
; Written by: Mark A. Law and Brad Suinn
;
; Copyright: © 1992 by Apple Computer, Inc. All rights reserved.
;
; Change History (most recent first):
;
; <SM3> 10/26/92 mal Updated to ESD's latest version.
; <SM2> 10/26/92 mal Updated SNMP statistic arrays to latest versions.
; <1> 10/6/92 GDW New location for ROMLink tool.
;
LAPMIBStats RECORD 0,increment
ifVersion DS.L 1 ; Version of LinkStats we support
ifDescr DS.B 256 ; String with info about interface
ifType DS.L 1 ; <8> Change to a Long. Code with type of interface
ifMaxMTU DS.L 1 ; <8> Change to a Long. Largest size of IP datagram that can be tx/recv
ifSpeed DS.L 1 ; Bandwidth in bits/second
ifPhysAddress DS.B 32 ; Interface address
ifAdminStatus DS.L 1 ; <8> Change to a Long. Desired state (1 = up, 2 = down, 3 = testing)
ifOperStatus DS.L 1 ; <8> Change to a Long. Current state (1 = up, 2 = down, 3 = testing)
ifLastChange DS.L 1 ; SysTicks when interface entered current operation state
ifInOctets DS.L 1 ; Total nbr bytes received including framing chars
ifInUcastPkts DS.L 1 ; Nbr of unicast packets received
ifInNUcastPkts DS.L 1 ; Nbr of broad/multi cast packets received
ifInDiscards DS.L 1 ; Nbr of overwrites that occured (NOT USED)
ifInErrors DS.L 1 ; Nbr of pkts recv which contain error
ifInUnknownProtos DS.L 1 ; Nbr of pkts recv discarded cuz of unknown protocol
ifOutOctets DS.L 1 ; Total nbr bytes tx including framing chars
ifOutUcastPkts DS.L 1 ; Nbr of unicast packets tx
ifOutNUcastPkts DS.L 1 ; Nbr of broad/multi cast packets tx
ifOutDiscards DS.L 1 ; Nbr tx pkts discarded (NOT USED)
ifOutErrors DS.L 1 ; Nbr tx pkts not sent due to error
ifOutQLen DS.L 1 ; Current nbr of packets in output queue
LAPMIBStatsSz EQU *
ENDR
; ifAdminStatus and ifOperStatus
ifStatusUp EQU 1
ifStatusDown EQU 2
ifStatusTesting EQU 3
; IfTypes
other EQU 1 ; none of the following
regular1822 EQU 2
hdh1822 EQU 3
ddn_x25 EQU 4
rfc877_x25 EQU 5
ethernet_csmacd EQU 6
iso88023_csmacd EQU 7
iso88024_tokenBus EQU 8
iso88025_tokenRing EQU 9
iso88026_man EQU 10
starLan EQU 11
proteon_10Mbit EQU 12
proteon_80Mbit EQU 13
hyperchannel EQU 14
fddi EQU 15
lapb EQU 16
sdlc EQU 17
ds1 EQU 18 ; T-1
e1 EQU 19 ; european equivalent of T-1
basicISDN EQU 20
primaryISDN EQU 21
propPointToPointSerial EQU 22 ; proprietary serial
ppp EQU 23
softwareLoopback EQU 24
eon EQU 25 ; CLNP over IP
ethernet_3Mbit EQU 26
nsip EQU 27 ; XMS over IP
slip EQU 28 ; generic SLIP
ultra EQU 29 ; ULTRA technologies
ds3 EQU 30 ; T-3
sip EQU 31 ; SMDS
frame_relay EQU 32
;
; EtherNet (802.3) SNMP equates
;
Dot3Entry Record 0,increment
dot3Version DS.l 1 ; Version of LapDot3 entry that we support
dot3Index DS.l 1 ; ifIndex for this driver
dot3InitializeMac DS.l 1 ; Init status (1 = inited, 2 = uninited)
dot3SubLayerStatus DS.l 1 ; Op status of the MAC sublayer (1 = enabled, 2 = disabled)
dot3MulticastReceiveStatus DS.l 1 ; Multicast receive status (1 = enabled, 2 = disabled)
dot3TxEnabled DS.l 1 ; MAC frame tx state (1 = enabled, 2 = disabled)
dot3TestTdrValue DS.l 1 ; Time between TDR start/end
Dot3EntrySz EQU * ; End of Dot3Entry
ENDR
Dot3StatsEntry RECORD 0,increment
dot3StatsVersion DS.l 1 ; Version number
dot3StatsIndex DS.l 1 ; Same as ifIndex (to be left at zero)
dot3StatsAlignmentErrors DS.l 1
dot3StatsFCSErrors DS.l 1
dot3StatsSingleCollisionFrames DS.l 1
dot3StatsMultipleCollisionFrames DS.l 1
dot3StatsSQETestErrors DS.l 1
dot3StatsDeferredTransmissions DS.l 1
dot3StatsLateCollisions DS.l 1
dot3StatsExcessiveCollisions DS.l 1
dot3StatsInternalMacTransmitErrors DS.l 1
dot3StatsCarrierSenseErrors DS.l 1
dot3StatsExcessiveDeferrals DS.l 1
dot3StatsFrameTooLongs DS.l 1
dot3StatsInRangeLengthErrors DS.l 1
dot3StatsOutOfRangeLengthFields DS.l 1
dot3StatsInternalMacReceiveErrors DS.l 1
Dot3StatsEntrySz EQU *
ENDR
Dot3CollEntry RECORD 0,increment
dot3CollVersion DS.l 1 ; Version number
dot3CollIndex DS.l 1 ; Same as ifIndex (to be left at zero)
dot3CollCount DS.l 1
dot3CollFrequencies DS.l 1
Dot3CollEntrySz EQU *
ENDR
;
; TokenRing (802.5) SNMP equates
;
Dot5Entry Record 0,increment
dot5Version DS.l 1 ; Version of LapDot5 entry that we support
dot5Index DS.l 1 ; ifIndex for this driver
dot5Commands DS.l 1 ; always reads as no_op (1)
dot5RingStatus DS.l 1
dot5RingState DS.l 1
dot5RingOpenStatus DS.l 1
dot5RingSpeed DS.l 1
dot5UpStream DS.l 1
dot5ActMonParticipate DS.l 1
dot5Functional DS.l 1
Dot5EntrySz EQU * ; End of Dot5Entry
ENDR
Dot5StatsEntry RECORD 0,increment ; ••
dot5StatsVersion DS.l 1 ; Version number
dot5StatsIndex DS.l 1 ; Same as ifIndex (to be left at zero)
dot5StatsLineErrors DS.l 1
dot5StatsBurstErrors DS.l 1
dot5StatsACErrors DS.l 1
dot5StatsAbortTransErrors DS.l 1
dot5StatsInternalErrors DS.l 1
dot5StatsLostFrameErrors DS.l 1
dot5StatsReceiveCongestions DS.l 1
dot5StatsFrameCopiedErrors DS.l 1
dot5StatsTokenErrors DS.l 1
dot5StatsSoftErrors DS.l 1
dot5StatsHardErrors DS.l 1
dot5StatsSignalLoss DS.l 1
dot5StatsTransmitBeacons DS.l 1
dot5StatsRecoverys DS.l 1
dot5StatsLobeWires DS.l 1
dot5StatsRemoves DS.l 1
dot5StatsSingles DS.l 1
dot5StatsFreqErrors DS.l 1
Dot5StatsEntrySz EQU *
ENDR
Dot5TimerEntry RECORD 0,increment ; ••
dot5TimerVersion DS.l 1 ; Version number
dot5TimerIndex DS.l 1 ; Same as ifIndex (to be left at zero)
dot5TimerReturnRepeat DS.l 1
dot5TimerHolding DS.l 1
dot5TimerQueuePDU DS.l 1
dot5TimerValidTransmit DS.l 1
dot5TimerNoToken DS.l 1
dot5TimerActiveMon DS.l 1
dot5TimerStandbyMon DS.l 1
dot5TimerErrorReport DS.l 1
dot5TimerBeaconTransmit DS.l 1
dot5TimerBeaconReceive DS.l 1
Dot5TimerEntrySz EQU *
ENDR
; dot3InitializeMac
dot3initialized EQU 1
dot3uninitialized EQU 2
; dot3SubLayerStatus, dot3MulticastReceiveStatus
dot3enabled EQU 1
dot3disabled EQU 2
; dot3TxEnabled, dot5ActMonParticipate
dot_true EQU 1
dot_false EQU 2
; dot5Commands
dot5no_op EQU 1
dot5open EQU 2
dot5reset EQU 3
dot5close EQU 4
; dot5RingState
opened EQU 1
closed EQU 2
opening EQU 3
closing EQU 4
openFailure EQU 5
ringFailure EQU 6
; dot5RingOpenStatus
noOpen EQU 1
badParam EQU 2
lobeFailed EQU 3
signalLoss EQU 4
insertionTimeout EQU 5
ringFailed EQU 6
beaconing EQU 7
duplicateMAC EQU 8
requestFailed EQU 9
removeReceived EQU 10
ringopen EQU 11
; dot5RingSpeed
unknown EQU 1
oneMegabit EQU 2
fourMegabit EQU 3
sixteenMegabit EQU 4
SNMPVersion EQU $100 ; used for LAPMIBStats, Dot3Stats, Dot3Entry

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,25 @@
data 'MPSR' (1005) {
$"000C 4D6F 6E61 636F 006D 656E 7420 5072" /* ..Monaco.ment Pr */
$"6F74 6F63 6F6C 2065 7175 6174 6573 2066" /* otocol equates f */
$"6F72 0007 0004 0018 FBD1 025B FDD1 0018" /* or.........[.... */
$"FBD1 025B FDD1 A711 CA40 0000 0107 0000" /* ...[.....@...... */
$"0141 0000 0000 0100" /* .A...... */
};
data 'MPSR' (1008) {
$"0018 FBD1 025B FDD1 0018 FBD1 025B FDD1" /* .....[.......[.. */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"C58C 8468 3FE5 3230 0004 0000 0000 0000" /* ...h?.20........ */
$"0000 A933 7396 A933 7396 A6F7 AE5C 0078" /* ...3s..3s....\.x */
$"2B21 0000 0005 0005 2053 7570 6572 4D61" /* +!...... SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C4E 6574 BA00 0E43 6872 6973" /* .DeclNet...Chris */
$"2050 6574 6572 7365 6E00 0133 0009 534E" /* Petersen..3..SN */
$"4D50 4C41 502E 6100 0000 0020 5570 6461" /* MPLAP.a.... Upda */
$"7465 6420 746F 2045 5344 2773 206C 6174" /* ted to ESD's lat */
$"6573 7420 7665 7273 696F 6E2E 00" /* est version.. */
};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,25 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 000C 0186 000D 0118" /* ..Monaco........ */
$"000E 0168 000F 0000 001E 000F 0000 496E" /* ...h..........In */
$"7661 0006 0004 003C 0024 02E8 02BD 003C" /* va.....<.$.....< */
$"0024 02E8 02BD A678 8BDC 0000 0000 0000" /* .$.....x........ */
$"0000 0000 0000 0100" /* ........ */
};
data 'MPSR' (1008) {
$"003C 0024 02E8 02BD 003C 0024 02E8 02BD" /* .<.$.....<.$.... */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"33F7 B43E 3FE5 3230 0004 0000 0000 0000" /* 3..>?.20........ */
$"0000 A933 73AB A933 73AB A6F7 B0F2 0078" /* ...3s..3s......x */
$"C6B2 0000 0001 0001 2653 7570 6572 4D61" /* ........&SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C4E 6574 BA53 6F6E 6963 BA00" /* .DeclNet.Sonic.. */
$"0E43 6872 6973 2050 6574 6572 7365 6E00" /* .Chris Petersen. */
$"0131 0007 536F 6E69 632E 6100 0000 001F" /* .1..Sonic.a..... */
$"4E65 7720 6C6F 6361 7469 6F6E 2066 6F72" /* New location for */
$"2052 4F4D 4C69 6E6B 2074 6F6F 6C2E 0D00" /* ROMLink tool... */
};

View File

@ -0,0 +1,39 @@
#
# File: Sonic.make
#
# Contains: Makefile for Sonic.
#
# Written by: Kurt Clark, Chas Spillar, and Tim Nichols
#
# Copyright: © 1992 by Apple Computer, Inc., all rights reserved.
#
# Change History (most recent first):
#
"{RsrcDir}DeclDataSonic.rsrc" ƒ "{ObjDir}SonicEnet.a.o" ∂
"{ObjDir}Sonic.a.o" ∂
"{ObjDir}Loopback.c.o" ∂
"{IfObjDir}interface.o"
Link {StdLOpts} {StdAlign} -rt decl=1 -o "{Targ}" "{ObjDir}SonicEnet.a.o" ∂
"{ObjDir}Sonic.a.o" ∂
"{ObjDir}Loopback.c.o" ∂
"{IfObjDir}interface.o"
"{ObjDir}SonicEnet.a.o" ƒ "{SonicDir}SonicEnet.a" ∂
"{SonicDir}SonicEqu.a" ∂
"{SonicDir}VersionEclipse.a" ∂
"{EthernetDir}AtalkMacros.a" ∂
"{EthernetDir}ENETEqu.a" ∂
"{AIncludes}GestaltEqu.a" ∂
"{AIncludes}Slots.a" ∂
"{AIncludes}SysEqu.a" ∂
"{AIncludes}SysErr.a" ∂
"{AIncludes}ToolUtils.a" ∂
"{AIncludes}Traps.a"
Asm {StdAOpts} -d ForEclipseROM=0,sonic32=1,ctlpad=0,mmu=1 -i "{SonicDir}" -i "{EthernetDir}" -o "{Targ}" "{SonicDir}SonicEnet.a"
"{ObjDir}Sonic.a.o" ƒ "{SonicDir}Sonic.a" ∂
"{SonicDir}SonicEqu.a"
Asm {StdAOpts} -d sonic32=1,mmu=1 -i "{SonicDir}" -i "{EthernetDir}" -o "{Targ}" "{SonicDir}Sonic.a"

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,25 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 0047 656F 7267 6520" /* ..Monaco.George */
$"442E 2057 696C 736F 6E20 4A72 2E0D 230D" /* D. Wilson Jr..#. */
$"2309 0006 0004 0029 0007 035A 0238 0029" /* #......)...Z.8.) */
$"0007 035A 0238 A71A 6851 0000 00E0 0000" /* ...Z.8..hQ...... */
$"00E0 0000 0000 0100" /* ........ */
};
data 'MPSR' (1008) {
$"0029 0007 035A 0238 0029 0007 035A 0238" /* .)...Z.8.)...Z.8 */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"2B26 BAE5 3FE5 3230 0004 0000 0000 0000" /* +&..?.20........ */
$"0000 A933 73AB A933 73AB A6F7 B0F2 0078" /* ...3s..3s......x */
$"C6B2 0000 0006 0001 2653 7570 6572 4D61" /* ........&SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C4E 6574 BA53 6F6E 6963 BA00" /* .DeclNet.Sonic.. */
$"0E43 6872 6973 2050 6574 6572 7365 6E00" /* .Chris Petersen. */
$"0131 000A 536F 6E69 632E 6D61 6B65 0000" /* .1..Sonic.make.. */
$"0000 144D 6F76 6564 2066 726F 6D20 6D61" /* ...Moved from ma */
$"6B65 6669 6C65 2E00" /* kefile.. */
};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,31 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 0072 742B 2430 3034" /* ..Monaco.rt+$004 */
$"3420 2D20 7468 6520 7374 6F72 7920 636F" /* 4 - the story co */
$"6E74 0006 0004 0031 000B 023A 02EC 0031" /* nt.....1...:...1 */
$"000B 023A 02EC A783 0EA8 0000 00DD 0000" /* ...:............ */
$"017A 0000 0000 0100" /* .z...... */
};
data 'MPSR' (1008) {
$"0031 000B 023A 02EC 0031 000B 023A 02EC" /* .1...:...1...:.. */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"58E5 6215 3FE5 3230 0004 0000 0000 0000" /* X.b.?.20........ */
$"0000 A933 73AB A933 73AB A6F7 B0F2 0078" /* ...3s..3s......x */
$"C6B2 0000 0003 0007 2653 7570 6572 4D61" /* ........&SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C4E 6574 BA53 6F6E 6963 BA00" /* .DeclNet.Sonic.. */
$"0E43 6872 6973 2050 6574 6572 7365 6E00" /* .Chris Petersen. */
$"0134 000B 536F 6E69 6345 6E65 742E 6100" /* .4..SonicEnet.a. */
$"0000 007A 446F 206E 6F74 206D 6F76 6520" /* ...zDo not move */
$"2324 3236 3030 2074 6F20 7468 6520 7374" /* #$2600 to the st */
$"6174 7573 2072 6567 6973 7465 722C 2061" /* atus register, a */
$"6C77 6179 7320 646F 2061 6E20 4F52 492E" /* lways do an ORI. */
$"5720 7769 7468 2069 7420 736F 2074 6861" /* W with it so tha */
$"7420 4E75 4B65 726E 656C 2077 6F72 6B73" /* t NuKernel works */
$"2061 6E64 2074 6865 2073 7461 636B 2069" /* and the stack i */
$"7320 6E6F 7420 6368 616E 6765 642E 00" /* s not changed.. */
};

View File

@ -0,0 +1,501 @@
;
; File: SonicEqu.a
;
; Contains: Sonic-specific equates
;
; Written by: Sean Findley
;
; Copyright: © 1990, 1992 by Apple Computer, Inc., all rights reserved.
;
; This file is used in these builds: Mac32
;
; Change History (most recent first):
;
; <1> 10/6/92 GDW New location for ROMLink tool.
; <1> 6/12/92 RLM first checked in
; <P2> 02/07/92 jmp (jmp,H2/BG/SJF,Z4) Rolled in SMOVE macro def and SonicAddress
; def.
; <1> 2/4/92 mal first checked in
; ———————————————————————————————————————————————————————————————————————————————————————
; Pre-Pandora ROM comments begin here.
; ———————————————————————————————————————————————————————————————————————————————————————
; <3> 2/26/91 JK Added extended Motorola mode equates.
; <2> 1/30/91 JK Added code review changes.
; <1> 12/14/90 JK Added to build
;
; To Do:
;
; SonicEqu.a - Equates for SONIC
; written by Sean J. Findley Jan. 1990
; Copyright (c) 1990 Apple Computer, Inc.
MACRO
CtlRegPad
IF CTLPAD THEN
ORG *+2
ENDIF
ENDM
MACRO ; <Z4> thru next <Z4>
SMOVE &src,&dest
IF SONIC32 THEN
MOVE.L &src,&dest
ELSE
MOVE.W &src,&dest
ENDIF
ENDM ; <Z4>
;•••••••••••••••• SONIC Registers
SONICRegs RECORD 0
IF SONIC32 THEN
Command DS.L 1 ; (CR) SONIC control
Data_Config DS.L 1 ; (DCR) packet configuration
Recv_Control DS.L 1 ; (RCR) pkt reception control
Trans_Control DS.L 1 ; (TCR) Transmission control
Int_Mask DS.L 1 ; (IMR) interrupt mask
Int_Status DS.L 1 ; (ISR) interrupts status bits
Upper_TDA DS.L 1 ; (UTDA) upper 16 bits of TDA address
Current_TDA DS.L 1 ; (CTDA) 16 bit ptr to current TDA
Trans_PktSize DS.L 1 ; (TPS) total size of outbound pkt
Trans_FragCount DS.L 1 ; (TFC) transmit fragment count
Trans_PktStart0 DS.L 1 ; (TSA0) lower 16 bit of pkt addr
Trans_PktStart1 DS.L 1 ; (TSA1) upper "
Trans_FragSize DS.L 1 ; (TFS) current fragment size
Upper_RDA DS.L 1 ; (URDA) upper 16 bits of RDA address
Current_RDA DS.L 1 ; (CRDA) 16 bit ptr to current RDA
Recv_RBA0 DS.L 1 ; (CRBA0) lower 16 bit receive addr in RBA
Recv_RBA1 DS.L 1 ; (CRBA1) upper 16 bit recive addr in RBA
Buff_Cnt0 DS.L 1 ; (RBWC0) lower 16 bit of word count in RBA
Buff_Cnt1 DS.L 1 ; (RBWC1) upper "
End_Buff DS.L 1 ; (EOBC) end of buffer word count
Upper_RRA DS.L 1 ; (URRA) upper 16 bits of RRA address
RRA_Start DS.L 1 ; (RSA) 16 bit ptr to RRA
RRA_End DS.L 1 ; (REA) 16 bit ptr to end of RRA
RRA_Read DS.L 1 ; (RRP) where SONIC gets next read resource
RRA_Write DS.L 1 ; (RWP) where host puts new read resources
TRBA0 DS.L 1 ; (TRBA0) used by SONIC
TRBA1 DS.L 1 ; (TRBA1) "
TBWC0 DS.L 1 ; (TBWC0) "
TBWC1 DS.L 1 ; (TBWC1) "
ADDR0 DS.L 1 ; (ADDR0) "
ADDR1 DS.L 1 ; (ADDR1) "
LLFA DS.L 1 ; (LLFA) "
TTDA DS.L 1 ; (TTDA) "
CAM_EntryPtr DS.L 1 ; (CEP) points to CAM cell
CAM_Port2 DS.L 1 ; (CAP2) selects upper 16 bits of CAM cell
CAM_Port1 DS.L 1 ; (CAP1) selects middle 16 bits of CAM cell
CAM_Port0 DS.L 1 ; (CAP0) selects lower 16 bits of CAM cell
CAM_Enable DS.L 1 ; (CE) CAM enable register turns cells on/off
CAM_DescPtr DS.L 1 ; (CDP) 16 bit ptr to current CAM descriptor
CAM_Count DS.L 1 ; (CDC) count of CAM descriptors
Silicon_Rev DS.L 1 ; (SR) rev info on SONIC chip
Timer0 DS.L 1 ; (WT0) lower 16 bits of SONCIC timer
Timer1 DS.L 1 ; (WT1) upper 16 "
Recv_SeqCnt DS.L 1 ; (RSC) receive sequence counter
CRC_Err DS.L 1 ; (CRCT) CRC error count
FAE_Err DS.L 1 ; (FAET) frame alignment error count
MissedPkt_Err DS.L 1 ; (MPT) missed packet error count
MDT DS.L 1 ; (MDT) max. deferral timer
RTC DS.L 1 ; (RTC) receive test control
TTC DS.L 1 ; (TTC) transmit test control
DTC DS.L 1 ; (DTC) DMA test control
CC0 DS.L 1 ; (CC0) CAM comparison 0
CC1 DS.L 1 ; (CC1) CAM comparison 1
CC2 DS.L 1 ; (CC2) CAM comparison 2
CM DS.L 1 ; (CM) CAM match
res1 DS.L 2 ; reserved by National Semiconductor
RBC DS.L 1 ; (RBC) receiver byte count
res2 DS.L 1 ; reserved by National Semiconductor
TBO DS.L 1 ; (TBO) transmit backoff counter
TRC DS.L 1 ; (TRC) transmit random counter
TBM DS.L 1 ; (TBM) transmit backoff mask
res3 DS.L 1 ; reserved by National Semiconductor
Data_Config2 DS.L 1 ; extended data configiguration
ELSE
Command DS.W 1 ; (CR) SONIC control
CtlRegPad
Data_Config DS.W 1 ; (DCR) packet configuration
CtlRegPad
Recv_Control DS.W 1 ; (RCR) pkt reception control
CtlRegPad
Trans_Control DS.W 1 ; (TCR) Transmission control
CtlRegPad
Int_Mask DS.W 1 ; (IMR) interrupt mask
CtlRegPad
Int_Status DS.W 1 ; (ISR) interrupts status bits
CtlRegPad
Upper_TDA DS.W 1 ; (UTDA) upper 16 bits of TDA address
CtlRegPad
Current_TDA DS.W 1 ; (CTDA) 16 bit ptr to current TDA
CtlRegPad
Trans_PktSize DS.W 1 ; (TPS) total size of outbound pkt
CtlRegPad
Trans_FragCount DS.W 1 ; (TFC) transmit fragment count
CtlRegPad
Trans_PktStart0 DS.W 1 ; (TSA0) lower 16 bit of pkt addr
CtlRegPad
Trans_PktStart1 DS.W 1 ; (TSA1) upper "
CtlRegPad
Trans_FragSize DS.W 1 ; (TFS) current fragment size
CtlRegPad
Upper_RDA DS.W 1 ; (URDA) upper 16 bits of RDA address
CtlRegPad
Current_RDA DS.W 1 ; (CRDA) 16 bit ptr to current RDA
CtlRegPad
Recv_RBA0 DS.W 1 ; (CRBA0) lower 16 bit receive addr in RBA
CtlRegPad
Recv_RBA1 DS.W 1 ; (CRBA1) upper 16 bit recive addr in RBA
CtlRegPad
Buff_Cnt0 DS.W 1 ; (RBWC0) lower 16 bit of word count in RBA
CtlRegPad
Buff_Cnt1 DS.W 1 ; (RBWC1) upper "
CtlRegPad
End_Buff DS.W 1 ; (EOBC) end of buffer word count
CtlRegPad
Upper_RRA DS.W 1 ; (URRA) upper 16 bits of RRA address
CtlRegPad
RRA_Start DS.W 1 ; (RSA) 16 bit ptr to RRA
CtlRegPad
RRA_End DS.W 1 ; (REA) 16 bit ptr to end of RRA
CtlRegPad
RRA_Read DS.W 1 ; (RRP) where SONIC gets next read resource
CtlRegPad
RRA_Write DS.W 1 ; (RWP) where host puts new read resources
CtlRegPad
TRBA0 DS.W 1 ; (TRBA0) used by SONIC
CtlRegPad
TRBA1 DS.W 1 ; (TRBA1) "
CtlRegPad
TBWC0 DS.W 1 ; (TBWC0) "
CtlRegPad
TBWC1 DS.W 1 ; (TBWC1) "
CtlRegPad
ADDR0 DS.W 1 ; (ADDR0) "
CtlRegPad
ADDR1 DS.W 1 ; (ADDR1) "
CtlRegPad
LLFA DS.W 1 ; (LLFA) "
CtlRegPad
TTDA DS.W 1 ; (TTDA) "
CtlRegPad
CAM_EntryPtr DS.W 1 ; (CEP) points to CAM cell
CtlRegPad
CAM_Port2 DS.W 1 ; (CAP2) selects upper 16 bits of CAM cell
CtlRegPad
CAM_Port1 DS.W 1 ; (CAP1) selects middle 16 bits of CAM cell
CtlRegPad
CAM_Port0 DS.W 1 ; (CAP0) selects lower 16 bits of CAM cell
CtlRegPad
CAM_Enable DS.W 1 ; (CE) CAM enable register turns cells on/off
CtlRegPad
CAM_DescPtr DS.W 1 ; (CDP) 16 bit ptr to current CAM descriptor
CtlRegPad
CAM_Count DS.W 1 ; (CDC) count of CAM descriptors
CtlRegPad
Silicon_Rev DS.W 1 ; (SR) rev info on SONIC chip
CtlRegPad
Timer0 DS.W 1 ; (WT0) lower 16 bits of SONCIC timer
CtlRegPad
Timer1 DS.W 1 ; (WT1) upper 16 "
CtlRegPad
Recv_SeqCnt DS.W 1 ; (RSC) receive sequence counter
CtlRegPad
CRC_Err DS.W 1 ; (CRCT) CRC error count
CtlRegPad
FAE_Err DS.W 1 ; (FAET) frame alignment error count
CtlRegPad
MissedPkt_Err DS.W 1 ; (MPT) missed packet error count
CtlRegPad
MDT DS.W 1 ; (MDT) max. deferral timer
CtlRegPad
RTC DS.W 1 ; (RTC) receive test control
CtlRegPad
TTC DS.W 1 ; (TTC) transmit test control
CtlRegPad
DTC DS.W 1 ; (DTC) DMA test control
CtlRegPad
CC0 DS.W 1 ; (CC0) CAM comparison 0
CtlRegPad
CC1 DS.W 1 ; (CC1) CAM comparison 1
CtlRegPad
CC2 DS.W 1 ; (CC2) CAM comparison 2
CtlRegPad
CM DS.W 1 ; (CM) CAM match
CtlRegPad
res1 DS.W 2 ; reserved by National Semiconductor
CtlRegPad
RBC DS.W 1 ; (RBC) receiver byte count
CtlRegPad
res2 DS.W 1 ; reserved by National Semiconductor
CtlRegPad
TBO DS.W 1 ; (TBO) transmit backoff counter
CtlRegPad
TRC DS.W 1 ; (TRC) transmit random counter
CtlRegPad
TBM DS.W 1 ; (TBM) transmit backoff mask
CtlRegPad
res3 DS.W 1 ; reserved by National Semiconductor
CtlRegPad
Data_Config2 DS.W 1 ; extended data configiguration
ENDIF
ENDR
;•••••••••••••••• Content Addressable Memory (CAM) Descriptor Area CDA
CAMDesc RECORD 0
IF SONIC32 THEN
Entry_ptr DS.L 1 ; base zero index to CAM cell
Port2 DS.L 1 ; lower 16 bits in cell
Port1 DS.L 1 ; middle 16 bits in cell
Port0 DS.L 1 ; upper 16 bits in cell
enable DS.L 1 ; CAM cell enable mask
ELSE
Entry_ptr DS.W 1 ; base zero index to CAM cell
Port2 DS.W 1 ; lower 16 bits in cell
Port1 DS.W 1 ; middle 16 bits in cell
Port0 DS.W 1 ; upper 16 bits in cell
enable DS.W 1 ; CAM cell enable mask
ENDIF
CAMDescSz EQU *
ENDR
;•••••••••••••••• Receive Resource Descriptor Area RRA
RRArec RECORD 0
IF SONIC32 THEN
buff_ptr0 DS.L 1 ; lower 16 bits of RBA address
buff_ptr1 DS.L 1 ; upper 16 bits of RBA address
buff_wc0 DS.L 1 ; lower 16 bits of RBA word count
buff_wc1 DS.L 1 ; upper 16 bits of RBA word count
ELSE
buff_ptr0 DS.W 1 ; lower 16 bits of RBA address
buff_ptr1 DS.W 1 ; upper 16 bits of RBA address
buff_wc0 DS.W 1 ; lower 16 bits of RBA word count
buff_wc1 DS.W 1 ; upper 16 bits of RBA word count
ENDIF
RRArecSz EQU *
ENDR
;•••••••••••••••• Receive Descriptor Area RDA
Rxpkt RECORD 0
; this link is used to keep rx descriptors on our own list(s) when SONIC is not using them
nextRD DS.L 1 ; internal ptr to next descriptor
isFree DS.B 1 ; = true if desc has been freed
ORG nextRD
IF SONIC32 THEN
status DS.L 1 ; receive status
byte_count DS.L 1 ; size of packet read
pkt_ptr0 DS.L 1 ; lower 16 bits of packet addr. in RBA
pkt_ptr1 DS.L 1 ; upper 16 bits of packet addr. in RBA
seq_no DS.L 1 ; sequence number
link DS.L 1 ; link to other RD
in_use DS.L 1 ; use flag
ELSE
status DS.W 1 ; receive status
byte_count DS.W 1 ; size of packet read
pkt_ptr0 DS.W 1 ; lower 16 bits of packet addr. in RBA
pkt_ptr1 DS.W 1 ; upper 16 bits of packet addr. in RBA
seq_no DS.W 1 ; sequence number
link DS.W 1 ; link to other RD
in_use DS.W 1 ; use flag
ENDIF
RxRDAsize EQU *
ENDR
;•••••••••••••••• Transmit Descriptor Area TDA
Max_Tx_Frags EQU 16 ; maximum fragments supported for a transmit
Txpkt RECORD 0 ; Transmit Descriptor
; this link is used to keep tx descriptors on our own list when SONIC is not using them
nextTD DS.L 1 ; internal ptr to next descriptor
ORG nextTD
IF SONIC32 THEN
status DS.L 1 ; status info written by SONIC
config DS.L 1 ; pre-transmit config data
pkt_size DS.L 1 ; size of packet
frag_count DS.L 1 ; fragment count
frag_start EQU * ; start of individual fragments
; the following 3 fields are repeated 1..frag_count
frag_ptr0 DS.L 1 ; lower 16 bits of address
frag_ptr1 DS.L 1 ; upper "
frag_size DS.L 1 ; fragment size
frag_esize EQU * - frag_start ; size of individual fragments
ORG * + (Max_Tx_Frags-1) * frag_esize
; allocate rest of fragments
link DS.L 1 ; lower 16 bits of next TD (if any)
ELSE
status DS.W 1 ; status info written by SONIC
config DS.W 1 ; pre-transmit config data
pkt_size DS.W 1 ; size of packet
frag_count DS.W 1 ; fragment count
frag_start EQU * ; start of individual fragments
; the following 3 fields are repeated 1..frag_count
frag_ptr0 DS.W 1 ; lower 16 bits of address
frag_ptr1 DS.W 1 ; upper "
frag_size DS.W 1 ; fragment size
frag_esize EQU * - frag_start ; size of individual fragments
ORG * + (Max_Tx_Frags-1) * frag_esize
; allocate rest of fragments
link DS.W 1 ; lower 16 bits of next TD (if any)
ENDIF
TxTDAsize EQU * ; size of a single frame TD
ENDR
;•••••••••••••••• Initialization Parameters
SONICinitParms RECORD 0
SONICbase DS.L 1 ; base address of SONIC registers
IntInstall DS.L 1 ; addr of proc that installs interrupt handler
RECVRtn DS.L 1 ; address of receive routine
RECVPrms DS.L 1 ; parms to pass @ receive
TRANRtn DS.L 1 ; address of xmit complete routine
TRANPrms DS.L 1 ; parms to pass @ xmit complete
MemStart DS.L 1 ; address of memory usage area
MemSize DS.L 1 ; size of memory usage area
NumRxBuffs DS.L 1 ; proposed # of receive buffers
IntDisable DS.L 1 ; proc to disable interrupts
IntEnable DS.L 1 ; proc to reenable interrupts
NetStatArray DS.L 1 ; ptr to network statistics array
DataConfig DS.L 1 ; data configuration value
TransAddr DS.L 1 ; ->proc to translate logical->physical address
ParmSize EQU *
ENDR
;•••••••••••••••• CAM Parameters
CAMparms RECORD 0
SONICPtr DS.L 1 ; SONIC base address <Z4>
EAddr DS.B 6 ; Ethernet address
LoadorClear DS.L 1 ; ≠ 0 if adding CAM entry
ParmSize EQU *
ENDR
;•••••••••••••••• (CR) Command Register Bits
LoadCAM EQU 9 ; load content addressable memory
ReadRRA EQU 8 ; read next read resource descriptor
SoftReset EQU 7 ; do a software reset
StartTimer EQU 5 ; start watchdog timer
StopTimer EQU 4 ; stop "
RxEnable EQU 3 ; receive packets
RxDisable EQU 2 ; stop receiving packets
TxEnable EQU 1 ; transmit packets
TxDisable EQU 0 ; stop transmitting packets
;•••••••••••••••• (RCR) Receive Control/Status Register Bits
RecvErrors EQU 15 ; accept/reject packets with errors
RecvRunts EQU 14 ; accept/reject runt packets
RecvBroadCast EQU 13 ; accept/reject broadcasts
RecvAll EQU 12 ; turn on/off promiscuious mode
RecvMultiCast EQU 11 ; accept/reject multicasts
NoLoopBack EQU $0000 ; mask for no loopback
MACLoopBack EQU $0200 ; mask for MAC loopback
ENDECLoopBack EQU $0400 ; mask for ENDEC loopback
TxRxLoopBack EQU $0600 ; mask for Transceiver loopback
MultiRecd EQU 8 ; set when multicast is received
BroadRecd EQU 7 ; set when broadcast is received
RBAEmpty EQU 6 ; set when out of buffers in RBA
CarrierSense EQU 5 ; set when net busy and CRS is active
CollisionSense EQU 4 ; set when collision occurs if COL active
CRCErr EQU 3 ; set if packet has CRC error
FramAlignErr EQU 2 ; set if frame not aligned
LoopBackRecd EQU 1 ; set when loopback is received
ReceivedOK EQU 0 ; set upon successful packet reception
;•••••••••••••••• (TCR) Transmit Control/Status Register Bits
TxProgInt EQU 15 ; generate a software interrupt
OWCTimer EQU 14 ; "out of window collision" timer control
CRCInhibit EQU 13 ; turn on/off FCS field
ExDeferTimer EQU 12 ; turn on/off excessive defer timer
ExcessDefer EQU 10 ; excessive deferrals detected
DeferredTx EQU 9 ; set when packet is being deferred
NoCRS EQU 8 ; CRS not present during transmission
CRSLost EQU 7 ; bad CRS during transmission
ExcessColl EQU 6 ; > 16 collisions detected
OutWindow EQU 5 ; "out of window" collision detected
PktMonitorBad EQU 3 ; packet monitored as bad
FIFOUnderRun EQU 2 ; Tx FIFO underrun
BCMismatch EQU 1 ; TxPkt_size ≠ sum(TxFrag_size)
TransmitOK EQU 0 ; packet transmitted successfuly
;•••••••••••••••• (DCR) Data Configuration Register Bits
EXBUS EQU 15 ; extended bus mode
LatchBusRetry EQU 13 ; LBR
DConfig_Usr1 EQU 12 ; sets/resets pin USR1
DConfig_Usr0 EQU 11 ; sets/resets pin USR0
SynchTerm EQU 10 ; select sync/async input to DMA
WaitCtl0 EQU $0000 ; 0 bus cycles added to DMA
WaitCtl1 EQU $0040 ; 1 bus cycle added to DMA
WaitCtl2 EQU $0080 ; 2 bus cycles added to DMA
WaitCtl3 EQU $00C0 ; 3 bus cycles added to DMA
DataWidth EQU 5 ; 16/32 bit path width for DMA
BlockMode EQU 4 ; DMA block mode selection
RFT2 EQU $0000 ; 2 word recv FIFO threshold
RFT4 EQU $0004 ; 4 word recv FIFO threshold
RFT8 EQU $0008 ; 8 word recv FIFO threshold
RFT12 EQU $000C ; 12 word recv FIFO threshold
TFT4 EQU $0000 ; 4 word trans FIFO threshold
TFT8 EQU $0001 ; 8 word trans FIFO threshold
TFT12 EQU $0002 ; 12 word trans FIFO threshold
TFT14 EQU $0003 ; 14 word trans FIFO threshold
;•••••••••••••••• (DCR2) Extended Data Configuration Register Bits
EXUSR3 EQU 15 ; extended user bits
EXUSR2 EQU 14
EXUSR1 EQU 13
EXUSR0 EQU 12
;•••••••••••••••• (ISR) Interrupt Status Register Bits
BusRetry EQU 14 ; set when bus needed retry
LostHeartBeat EQU 13 ; set when heartbeat is lost
DoneLoadCAM EQU 12 ; set when load CAM operation is done
GetProgInt EQU 11 ; set when programmable int. occurs
RecdPkt EQU 10 ; set when a packet has been recd.
TransDone EQU 9 ; set when trans is finished
TransError EQU 8 ; set when trans finished with an error
TimerElapsed EQU 7 ; set when timer reaches zero
EmptyRDA EQU 6 ; set when receive descriptors exhausted
EmptyRRA EQU 5 ; set when receive resources exhausted
RBAOverFLow EQU 4 ; set when buffer area is full
CRCRollover EQU 3 ; set when CRC tally has reached $FFFF
FAERollover EQU 2 ; set when FAE tally has reached $FFFF
MPRollover EQU 1 ; set when MP tally has reached $FFFF
RxFIFORollover EQU 0 ; set when Rx FIFO overflows
OurIntsMask EQU (1 << BusRetry) + \
(1 << RecdPkt) + \
(1 << TransDone) + \
(1 << TimerElapsed) + \
(1 << RxFIFORollover) + \
(1 << RBAOverFlow) + \
(1 << EmptyRRA)
;•••••••••••••••• Network Statistics
NetStats RECORD 0 ; network management stats.
TxOK DS.L 1 ; frames transmitted OK
sCollFrame DS.L 1 ; single collision frames
mCollFrame DS.L 1 ; multiple collision frames
CollFrame DS.L 1 ; collision frames
DefTx DS.L 1 ; deferred transmissions
LateColl DS.L 1 ; late collisions
ExcessColl DS.L 1 ; excessive collisions
ExcessDef DS.L 1 ; excessive defferals
InMACTxErr DS.L 1 ; internal MAC transmit errors
RxOK DS.L 1 ; frames received OK
MultiRxOK DS.L 1 ; multicast frames recd OK
BroadRxOK DS.L 1 ; broadcast frames recd OK
FCSerr DS.L 1 ; frame check sequence errors
FAerr DS.L 1 ; frame alignment errors
MPerr DS.L 1 ; missed packet errors
Size EQU *
ENDR
;•••••••••••••••• General Equates
TalliesPerSec EQU 5000000 ; number of timer ticks/second
TxMaxRetries EQU 4 ; max attempts to retry aborted xmits
Max_Tx_Packets EQU 16 ; maximum # of chained Tx packets
Min_Pkt_Size EQU 60 ; minimum packet size
Min_Rx_Buffs EQU 2 ; minimum # of recv descriptors/buffers
Max_Pkt_Size EQU 1518 ; maximum packet size (inc. CRC)
EOL_Bit EQU 0 ; end-of-link bit
Ctl_Mem_Size EQU Txpkt.TxTDAsize*Max_Tx_Packets+ \; up to Max_Tx_Packets chained transmits
RRArec.RRArecSz+ \; 1 RRA descriptor
CAMDesc.CAMDescSz ; 1 CAM descriptor
Min_Mem_Size EQU Ctl_Mem_Size+ \
Max_Pkt_Size*Min_Rx_Buffs+ \; max. size packets
Rxpkt.RxRDAsize*Min_Rx_Buffs; recv. descriptors

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,26 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 0072 6F67 496E 7409" /* ..Monaco.rogInt. */
$"0945 5155 0909 0931 3509 0909 0909 0909" /* .EQU...15....... */
$"3B20 0006 0004 003C 0024 0363 023D 003C" /* ; .....<.$.c.=.< */
$"0024 0363 023D A678 8BDC 0000 0000 0000" /* .$.c.=.x........ */
$"0000 0000 0000 0100" /* ........ */
};
data 'MPSR' (1008) {
$"003C 0024 0363 023D 003C 0024 0363 023D" /* .<.$.c.=.<.$.c.= */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"EE56 7A55 3FE5 3230 0004 0000 0000 0000" /* .VzU?.20........ */
$"0000 A933 73AB A933 73AB A6F7 B0F2 0078" /* ...3s..3s......x */
$"C6B2 0000 0004 0001 2653 7570 6572 4D61" /* ........&SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C4E 6574 BA53 6F6E 6963 BA00" /* .DeclNet.Sonic.. */
$"0E43 6872 6973 2050 6574 6572 7365 6E00" /* .Chris Petersen. */
$"0131 000A 536F 6E69 6345 7175 2E61 0000" /* .1..SonicEqu.a.. */
$"0000 1F4E 6577 206C 6F63 6174 696F 6E20" /* ...New location */
$"666F 7220 524F 4D4C 696E 6B20 746F 6F6C" /* for ROMLink tool */
$"2E0D 00" /* ... */
};

View File

@ -0,0 +1,38 @@
;
; File: VersionEclipse.a
;
; Contains: Version information for Eclipse
;
; Written by: Mike Quinn
;
; Copyright: © 1991-1992 by Apple Computer, Inc., all rights reserved.
;
; This file is used in these builds: Mac32
;
; Change History (most recent first):
;
; <SM2> 2/2/92 CSS Rollin Horror stuff:
; <H6> 10/17/92 BG Changed version to final release version.
; <1> 10/6/92 GDW New location for ROMLink tool.
; <SM2> 6/22/92 mal Updated to 1.0.4d3.
; <1> 6/12/92 RLM first checked in
; <P3> 5/13/92 KW (JC,H4) Change driver to support configuration information
; obtained from ecfg resource rather than from using boxflag
; driven tables.
; <P2> 02/07/92 jmp (jmp,H3/BG,6) Updated version numbers for Zydeco.
; <1> 2/4/92 mal first checked in
; ———————————————————————————————————————————————————————————————————————————————————————
; Pre-Pandora ROM comments begin here.
; ———————————————————————————————————————————————————————————————————————————————————————
; <5> 10/22/91 BG/SAM Changed release version number.
; <4> 5/22/91 BG Updated version to reflect ROM beta.
; <3> 4/21/91 CCH Rolled in Sean Findley's changes.
; <2> 3/14/91 BG (actually sf) Updated driver version information.
; <1> 2/11/91 mjq first checked in
;
PRINT PUSH, GEN, NOMDIR
VERSION 'Quadra Ethernet Driver', 1, 0, 4, final, 1, '1990-1992', '', SonicEnet
PRINT POP

View File

@ -0,0 +1,25 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 0054 4571 752E 6100" /* ..Monaco.TEqu.a. */
$"0000 0000 003E 0001 0000 4574 6865 724E" /* .....>....EtherN */
$"6574 0006 0004 0029 0007 0230 02D4 0029" /* et.....)...0...) */
$"0007 0230 02D4 A796 9FFB 0000 0109 0000" /* ...0............ */
$"017D 0000 0000 0100" /* .}...... */
};
data 'MPSR' (1008) {
$"0029 0007 0230 02D4 0029 0007 0230 02D4" /* .)...0...)...0.. */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"38F6 9052 3FE5 3230 0004 0000 0000 0000" /* 8..R?.20........ */
$"0000 A933 73AB A933 73AB A6F7 B0F2 0078" /* ...3s..3s......x */
$"C6B2 0000 0005 0002 2653 7570 6572 4D61" /* ........&SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C4E 6574 BA53 6F6E 6963 BA00" /* .DeclNet.Sonic.. */
$"0E43 6872 6973 2050 6574 6572 7365 6E00" /* .Chris Petersen. */
$"0132 0010 5665 7273 696F 6E45 636C 6970" /* .2..VersionEclip */
$"7365 2E61 0000 0000 1355 7064 6174 6520" /* se.a.....Update */
$"6672 6F6D 2048 6F72 726F 722E 00" /* from Horror.. */
};

View File

@ -0,0 +1,247 @@
/*
File: ATIDeclGamma.r
Contains: xxx put contents here xxx
Written by: xxx put writers here xxx
Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
Change History (most recent first):
<1> 11/5/93 fau first checked in
<1> 10/27/93 fau first checked in
<1> 10/19/93 fau first checked in
*/
//--------------------------------------------------------------------------
//start
//
//Name: ATIDeclGamma.r
//Creator: George D. Wilson Jr.
//Date: 5/19/92
//
//Purpose: Gamma table declarations
//
//Category: Gamma Tables
//File: ATIDeclGamma.r
//
//Detailed: This file contains gamma table definitions for standard
// Apple monitors.
//
//Note:
//
//History:
//
// Date Programmer Modification
// -------- ---------- -----------------------------------------
//
//stop
//------------------------------------------------------------------------*/
#include "ROMLink.r"
#include "Types.r"
//=====================================================================
// Gamma resource tables
//=====================================================================
#define ColorGammaID 2000
#define HiResGammaID 2001
#define GrayGammaID 2002
#define RubikGammaID 2003
resource 'gdir' (700, "_GammaDirHiRes") {{
128, l{"HiResGamma"};
}};
resource 'gdir' (710, "_GammaDir_16") {{
128, l{"HiResGamma"};
129, l{"ColorGamma"};
}};
resource 'node' (720, "ColorGamma") {{
blocksize{};
word {ColorGammaID}; // gamma res ID
cstring{"Page-White Gamma"};
align {2};
word {$0000}; // gVersion
word {$0000}; // gType
word {$0000}; // gFormulaSize
word {$0003}; // gChanCnt
word {$0100}; // gDataCnt
word {$0008}; // gChanWidth
longs{{
$00030609;$0C101012;$13151616;$181B1C1E; // red channel
$1F222326;$282B2C2F;$3234373A;$3C3F4041;
$42434445;$46474749;$4A4B4C4D;$4E4F5051;
$52535454;$56565758;$595A5B5C;$5D5E5F60;
$61626364;$65666768;$696A6B6C;$6D6E6F70;
$71727273;$74757677;$78797A7A;$7B7C7D7E;
$7F818283;$83848586;$8788898A;$8A8B8C8D;
$8E8F9091;$92939394;$95969798;$98999A9B;
$9C9D9E9F;$A0A1A1A2;$A3A4A4A5;$A6A7A8A8;
$A9AAABAC;$ADADAEAF;$B0B1B2B2;$B3B4B5B5;
$B6B7B8B8;$B9BABBBC;$BCBDBEBF;$C0C0C1C2;
$C3C3C4C5;$C6C6C7C8;$C9C9CACB;$CCCDCDCE;
$CFD0D1D1;$D2D3D4D4;$D5D6D7D7;$D8D9DADA;
$DBDCDDDE;$DEDFE0E1;$E1E2E3E4;$E4E5E6E7;
$E7E8E9EA;$EAEBECED;$EEEEEFF0;$F1F1F2F3;
$F4F4F5F6;$F7F8F8F9;$FAFBFBFC;$FDFEFFFF;
}};
longs{{
$00030609;$0C101018;$20202223;$24252728; // green channel
$292C2D2E;$30323437;$383A3D3F;$40414242;
$43444445;$46474849;$4A4A4B4C;$4D4E4F50;
$51525354;$55565758;$595B5C5D;$5E5F6061;
$62636465;$65666768;$696A6B6C;$6D6E6F70;
$71717273;$74747576;$77787979;$7A7B7C7D;
$7E7F8081;$82838484;$85868788;$88898A8B;
$8C8D8E8E;$8F909192;$93939495;$96969798;
$999A9A9B;$9C9D9E9E;$9FA0A1A2;$A2A3A4A5;
$A5A6A7A8;$A8A9AAAB;$ABACADAE;$AFAFB0B1;
$B2B2B3B4;$B5B5B6B7;$B7B8B9BA;$BABBBCBD;
$BDBEBFC0;$C1C1C2C3;$C3C4C5C6;$C6C7C8C9;
$C9CACBCC;$CCCDCECF;$CFD0D1D2;$D2D3D4D4;
$D5D6D6D7;$D8D9D9DA;$DBDCDCDD;$DEDEDFE0;
$E1E1E2E3;$E4E4E5E6;$E6E7E8E9;$E9EAEBEC;
$ECEDEEEF;$EFF0F1F2;$F2F3F4F4;$F5F6F7F7;
}};
longs{{
$00020508;$0A0D1010;$10202022;$23232425; // blue channel
$25272829;$2A2C2D2E;$2F303233;$34363738;
$3A3C3D3F;$40414142;$42434444;$45454647;
$4748494A;$4A4B4C4D;$4D4E4F4F;$51515253;
$54555656;$5758595A;$5B5C5D5E;$5F606061;
$62626364;$64656666;$67686969;$6A6B6C6C;
$6D6E6F6F;$70717272;$73747475;$76777778;
$79797A7B;$7C7C7D7E;$7F808182;$82838484;
$85868687;$8888898A;$8A8B8C8D;$8D8E8F90;
$90919192;$93939495;$95969797;$9899999A;
$9B9B9C9D;$9D9E9FA0;$A0A1A1A2;$A3A3A4A4;
$A5A6A6A7;$A7A8A9A9;$AAABABAC;$ADADAEAF;
$AFB0B0B1;$B2B2B3B3;$B4B5B5B6;$B6B7B8B8;
$B9BABABB;$BBBCBDBD;$BEBFBFC0;$C0C1C2C2;
$C3C3C4C5;$C5C6C6C7;$C8C8C9C9;$CACBCBCC;
$CCCDCECE;$CFD0D0D1;$D1D2D3D3;$D4D4D5D6;
}};
}};
resource 'node' (730, "HiResGamma") {{
blocksize{};
word {HiResGammaID}; // gamma res ID
cstring{"Mac Std Gamma"};
align {2};
word{$0000}; // gVersion
word{$0000}; // gType
word{$0000}; // gFormulaSize
word{$0001}; // gChanCnt
word{$0100}; // gDataCnt
word{$0008}; // gChanWidth
longs{{
$0005090B;$0E101315;$17191B1D;$1E202224;
$2527282A;$2C2D2F30;$31333436;$37383A3B;
$3C3E3F40;$42434445;$4748494A;$4B4D4E4F;
$50515254;$55565758;$595A5B5C;$5E5F6061;
$62636465;$66676869;$6A6B6C6D;$6E6F7071;
$72737475;$76777879;$7A7B7C7D;$7E7F8081;
$81828384;$85868788;$898A8B8C;$8C8D8E8F;
$90919293;$94959596;$9798999A;$9B9B9C9D;
$9E9FA0A1;$A1A2A3A4;$A5A6A6A7;$A8A9AAAB;
$ABACADAE;$AFB0B0B1;$B2B3B4B4;$B5B6B7B8;
$B8B9BABB;$BCBCBDBE;$BFC0C0C1;$C2C3C3C4;
$C5C6C7C7;$C8C9CACA;$CBCCCDCD;$CECFD0D0;
$D1D2D3D3;$D4D5D6D6;$D7D8D9D9;$DADBDCDC;
$DDDEDFDF;$E0E1E1E2;$E3E4E4E5;$E6E7E7E8;
$E9E9EAEB;$ECECEDEE;$EEEFF0F1;$F1F2F3F3;
$F4F5F5F6;$F7F8F8F9;$FAFAFBFC;$FCFDFEFF;
}};
}};
resource 'node' (740, "GrayGamma") {{
blocksize{};
word {GrayGammaID}; // gamma res ID
cstring{"Mac Gray Gamma"};
align {2};
word{$0000}; // gVersion
word{$0000}; // gType
word{$0000}; // gFormulaSize
word{$0001}; // gChanCnt
word{$0100}; // gDataCnt
word{$0008}; // gChanWidth
longs{{
$000A141D;$23262B2E;$30323437;$393B3C3E;
$40414244;$4547484A;$4B4D4E4F;$50515254;
$55565758;$5A5B5C5D;$5E5F6061;$63646566;
$6768696A;$6B6C6D6E;$6F707171;$72737475;
$76777879;$7A7B7C7D;$7E7F8080;$81828384;
$84858687;$88898A8A;$8B8C8D8E;$8F909091;
$92929394;$95969797;$98999A9A;$9B9C9D9E;
$9E9FA0A1;$A1A2A3A3;$A4A5A6A7;$A7A8A9AA;
$AAABACAD;$ADAEAFAF;$B0B1B2B2;$B3B4B4B5;
$B6B6B7B7;$B8B9B9BA;$BBBCBCBD;$BEBEBFC0;
$C0C1C2C2;$C3C4C5C5;$C6C6C7C8;$C8C9CACB;
$CCCDCDCE;$CFCFD0D0;$D1D2D2D3;$D3D4D5D6;
$D6D7D7D8;$D9D9DADA;$DBDCDDDD;$DEDFDFE0;
$E0E1E2E3;$E3E4E5E5;$E6E6E7E7;$E8E8E9EA;
$EAEBEBEC;$EDEDEEEF;$F0F0F1F2;$F2F3F4F4;
$F5F5F6F7;$F7F8F9FA;$FAFBFCFC;$FDFEFEFF;
}};
}};
resource 'node' (750, "RubikGamma") {{
blocksize{};
word {RubikGammaID}; // gamma res ID
cstring{"Mac RGB Gamma"};
align {2};
word{$0000}; // gVersion
word{$0000}; // gType
word{$0000}; // gFormulaSize
word{$0001}; // gChanCnt
word{$0100}; // gDataCnt
word{$0008}; // gChanWidth
longs{{
$05070809;$0B0C0D0F;$10111214;$15161819;
$1A1C1D1E;$20212223;$24262829;$2A2C2D2F;
$30313334;$36373839;$3A3C3D3E;$40414243;
$44454648;$494B4C4D;$4E4F5051;$52535455;
$5758595A;$5B5C5D5E;$5F606163;$63656567;
$67696A6B;$6C6D6E6F;$70717273;$74757677;
$78797A7A;$7B7C7D7E;$7F818283;$83848586;
$8788898A;$8B8C8D8E;$8E909091;$92939394;
$95969798;$999A9B9C;$9D9E9FA0;$A0A1A2A3;
$A4A4A5A6;$A7A8A9AA;$AAACADAD;$AEAEB0B1;
$B2B3B3B4;$B5B6B7B8;$B9B9BABB;$BCBDBEBF;
$BFC0C1C2;$C2C3C4C5;$C6C7C8C9;$CACBCCCD;
$CDCECECF;$D0D1D2D3;$D3D4D5D6;$D6D7D8D8;
$D9DADBDC;$DDDEDEDF;$E0E1E1E2;$E3E4E4E5;
$E6E7E7E8;$E9EAEBEC;$EDEEEEEF;$EFF0F1F2;
$F3F3F4F5;$F6F7F8F8;$F9F9FAFB;$FCFDFEFF;
}};
}};

View File

@ -0,0 +1,25 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 002D 2D2D 2D2D 2D2D" /* ..Monaco.------- */
$"2D2D 2D2D 2D2D 2D2D 2D2D 2D2D 0D2F 2F73" /* ------------.//s */
$"7461 0006 0004 00B6 004B 025F 0379 00B6" /* ta.......K._.y.. */
$"004B 025F 0379 A8B6 4AB0 0000 019B 0000" /* .K._.y..J....... */
$"019B 0000 0000 0100" /* ........ */
};
data 'MPSR' (1008) {
$"00B6 004B 025F 0379 00B6 004B 025F 0379" /* ...K._.y...K._.y */
$"0000 0000 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"AFBD 2474 3FE5 3230 0004 0000 0000 0000" /* ..$t?.20........ */
$"0000 A933 73B5 A933 73B5 A900 0533 005C" /* ...3s..3s....3.\ */
$"1376 0000 0002 0001 2653 7570 6572 4D61" /* .v......&SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C56 6964 656F BA41 5449 BA00" /* .DeclVideo.ATI.. */
$"0E43 6872 6973 2050 6574 6572 7365 6E00" /* .Chris Petersen. */
$"0131 000E 4154 4944 6563 6C47 616D 6D61" /* .1..ATIDeclGamma */
$"2E72 0000 0000 1066 6972 7374 2063 6865" /* .r.....first che */
$"636B 6564 2069 6E00" /* cked in. */
};

View File

@ -0,0 +1,168 @@
/*
File: ATIDeclMonitors.r
Contains: xxx put contents here xxx
Written by: xxx put writers here xxx
Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
Change History (most recent first):
<1> 11/5/93 fau first checked in
<1> 10/27/93 fau first checked in
<1> 10/19/93 fau first checked in
*/
//--------------------------------------------------------------------------
//start
//
//Name: ATIDeclMonitors.r
//Creator: George D. Wilson Jr.
//Date: 9/19/92
//
//Purpose: Defintions for ATI monitors declaration ROM
//
//Category: Gamma Tables
//File: ATIDeclMonitors.r
//
//Detailed: This file contains definitions for video modes for the ATI
// VRAM PCI card.
//
//Note:
//
//History:
//
// Date Programmer Modification
// -------- ---------- -----------------------------------------
//
//stop
//------------------------------------------------------------------------*/
#include "ROMLink.r"
#include "Types.r"
#include "InternalOnlyEqu.r" //skanky stuff
#include "ATIDefROM.r"
//=====================================================================
// _VideoType
//=====================================================================
resource 'styp' (520, "_VideoType") {
catDisplay, //Video sResource : <Category>
typVideo, // <Type>
drSwApple, // <DrvrSw>
drHwATI // <DrvrHw>
};
//=====================================================================
// _VideoName
//=====================================================================
resource 'cstr' (530, "_VideoName") {
"Display_Video_Apple_ATI"
};
//=====================================================================
// Driver directory
//=====================================================================
resource 'ddir' (530, "_VidDrvrDir") {{
sMacOS68020, l{"_sATIDrvrDir"}; //References the Macintosh-OS 68020 driver.
}};
resource 'node' (535, "_sATIDrvrDir") {{
blocksize{};
include{match{{file{$$Shell("RsrcDir")"DeclDataVideo.rsrc"};
type{'decl'};
id{112};}}};
}};
//=====================================================================
// _sRsrc_VideoHR_ATI for Hi-Res monitor
//=====================================================================
resource 'srsc' (500, "_sRsrc_VideoHR_ATI") {{
sRsrcType, l{"_VideoType"}; //References the sResource Type.
sRsrcName, l{"_VideoName"}; //References the sResource Name.
sRsrcDrvrDir, l{"_VidDrvrDir"}; //References the driver directory.
sRsrcFlags, d{6};
sRsrcHWDevId, d{1}; //The hardware device Id.
minorBaseOS, long{defMinorBase}; //References the Minor Base Offset.
minorLength, long{defMinorLength}; //References the Minor Base Length.
sGammaDir, a{"_GammaDir_HR"}; //References the Gamma resource for 13"
oneBitMode, l{"_EightBitModeHR1024"}; //References the first mode parameters.
}};
//=====================================================================
// _sRsrc_VideoHR_Diamond for Hi-Res monitor for Diamond
//=====================================================================
resource 'srsc' (505, "_sRsrc_VideoHR_Diamond") {{
sRsrcType, l{"_VideoType"}; //References the sResource Type.
sRsrcName, l{"_VideoName"}; //References the sResource Name.
sRsrcDrvrDir, l{"_VidDrvrDir"}; //References the driver directory.
sRsrcFlags, d{6};
sRsrcHWDevId, d{1}; //The hardware device Id.
minorBaseOS, long{defMinorBase}; //References the Minor Base Offset.
minorLength, long{defMinorLength}; //References the Minor Base Length.
sGammaDir, a{"_GammaDir_HR"}; //References the Gamma resource for 13"
oneBitMode, l{"_EightBitModeHR640"}; //References the first mode parameters.
}};
//=====================================================================
//=====================================================================
// Hi-Res vidParms records
//=====================================================================
//=====================================================================
//=====================================================================
// Eight-Bit per pixel parameter list for Hi-Res
//=====================================================================
resource 'vmod' (550, "_EightBitModeHR1024") {{
mVidParams, l{"_EightVidParamsHR1024"}; //References the eight-bit mode parameter record.
mPageCnt, d{1}; //The page count.
mDevType, d{clutType}; //The device type.
}};
resource 'vdev' (550, "_EightVidParamsHR1024") {
eightmBaseOffset,
1024, //RowBytes
{eightmBounds_THR,eightmBounds_LHR,eightmBounds_BHR,eightmBounds_RHR},
eightVersion, //bmVersion
0, //packType not used
0, //packSize not used
eightmHRes, //bmHRes
eightmVRes, //bmVRes
eightPixelType, //bmPixelType
eightPixelSize, //bmPixelSize
eightCmpCount, //bmCmpCount
eightCmpSize, //bmCmpSize
eightmPlaneBytes //bmPlaneBytes
};
resource 'vmod' (555, "_EightBitModeHR640") {{
mVidParams, l{"_EightVidParamsHR640"}; //References the eight-bit mode parameter record.
mPageCnt, d{1}; //The page count.
mDevType, d{clutType}; //The device type.
}};
resource 'vdev' (555, "_EightVidParamsHR640") {
eightmBaseOffset,
640, //RowBytes
{eightmBounds_THR,eightmBounds_LHR,eightmBounds_BHR,eightmBounds_RHR},
eightVersion, //bmVersion
0, //packType not used
0, //packSize not used
eightmHRes, //bmHRes
eightmVRes, //bmVRes
eightPixelType, //bmPixelType
eightPixelSize, //bmPixelSize
eightCmpCount, //bmCmpCount
eightCmpSize, //bmCmpSize
eightmPlaneBytes //bmPlaneBytes
};

View File

@ -0,0 +1,26 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 002D 2D2D 2D2D 2D2D" /* ..Monaco.------- */
$"2D2D 2D2D 2D2D 2D2D 2D2D 2D2D 0D2F 2F73" /* ------------.//s */
$"7461 0006 0004 0034 0085 02DE 0334 0034" /* ta.....4.....4.4 */
$"0085 02DE 0334 A961 74AB 0000 1647 0000" /* .....4.at....G.. */
$"1647 0000 0E84 0100" /* .G...... */
};
data 'MPSR' (1008) {
$"0034 0085 02DE 0334 0034 0085 02DE 0334" /* .4.....4.4.....4 */
$"0000 0E84 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"8EA8 853C 3FE5 3230 0004 0000 0000 0000" /* ...<?.20........ */
$"0000 A961 C104 A961 74AB A900 0533 005C" /* ...a...at....3.\ */
$"1376 0006 0003 0002 2653 7570 6572 4D61" /* .v......&SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C56 6964 656F BA41 5449 BA00" /* .DeclVideo.ATI.. */
$"0E43 6872 6973 2050 6574 6572 7365 6E00" /* .Chris Petersen. */
$"0132 0011 4154 4944 6563 6C4D 6F6E 6974" /* .2..ATIDeclMonit */
$"6F72 732E 7200 0000 0024 7075 7420 696E" /* ors.r....$put in */
$"2064 6961 6D6F 6E64 2063 6172 6420 7375" /* diamond card su */
$"7070 6F72 7420 666F 7220 544E 540D 00" /* pport for TNT.. */
};

View File

@ -0,0 +1,133 @@
/*
File: ATIVideoROM.r
Contains: xxx put contents here xxx
Written by: xxx put writers here xxx
Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
Change History (most recent first):
<1> 11/5/93 fau first checked in
<1> 10/27/93 fau first checked in
<1> 10/19/93 fau first checked in
*/
//--------------------------------------------------------------------------
//start
//
//Name: ATIVideoROM.r
//Creator: George D. Wilson Jr.
//Date: 9/19/92
//
//Purpose: Declaration ROM for ATI system
//
//Category: DeclROM
//File: ATIVideoROM.r
//
//Detailed: This file defines the declaration information for the ATI
// mother board. Currently this system defines only the video display
// portion of the system.
//
//Note:
//
//History:
//
// Date Programmer Modification
// -------- ---------- -----------------------------------------
// 10/13/93 George W. Cleaned up some not used resources.
//
//stop
//------------------------------------------------------------------------*/
#include "ROMLink.r"
#include "Types.r"
#include "InternalOnlyEqu.r" //skanky stuff
#include "DepVideoEqu.r"
#include "ATIDefROM.r" //Video driver equates
//
//=====================================================================
// BEGIN Declaration ROM
//=====================================================================
//*************************************************************
//Constants
//*************************************************************
#define TheBoardId $0575 //the Board Id (Special ATI Mother board)
//----------- sResource Directory //<Id OF>
#define sRsrc_Board 1 //Board sResource {May be any number in [0..127]}
#define sRsrc_Video 128 //Video sResource {May be any number in [128..254]}
//=====================================================================
// Directory
//=====================================================================
resource 'sdir' (270, "_sRsrcATIDir") {{
sRsrc_Board, l{"_sRsrc_BdATI"}; //References the board sResource.
sRsrc_VideoHR_ATI, a{"_sRsrc_VideoHR_ATI"}; //References the video sResource Hi-Res
sRsrc_VideoHR_Diamond, a{"_sRsrc_VideoHR_Diamond"}; //References the video sResource Hi-Res
}};
//=============================================================
// sRsrc_Board List - the Board sResource
//=============================================================
resource 'boar' (280, "_sRsrc_BdATI") {{
sRsrcType, l{"_BoardType"}; //References the sResource type
sRsrcName, c{"PCI Video"}; //Official product name
sRsrcIcon, a{"_VidICONCyclone"}; //A new icon
boardId, d{TheBoardId}; //The board Id.
primaryInit, l{"_sPInitRec"}; //References the Primary init record.
vendorInfo, l{"_VendorInfo"}; //References the OPTIONAL Vendor information list.
}};
//=============================================================
// _BoardType - Board type and category
//=============================================================
resource 'styp' (290, "_BoardType") {
catBoard, //<Category> CatBoard ALWAYS = $0001 for bd srsrc
typBoard, //<Type> TypBoard ALWAYS = $0000 for bd srsrc
0, //<DrvrSw> CatBoard ALWAYS = $0000 for bd srsrc
0 //<DrvrHw> CatBoard ALWAYS = $0000 for bd srsrc
};
//=====================================================================
// Primary Init Record
//=====================================================================
resource 'node' (418, "_sPInitRec") {{
blocksize{};
include{match{{file{$$Shell("RsrcDir")"DeclDataVideo.rsrc"};
type{'decl'};
id{110};}}};
}};
//=====================================================================
// Vendor Info record
//=====================================================================
resource 'vend' (420, "_VendorInfo") {{
vendorId, c{"Apple Computer, Inc."};
revLevel, c{"1.0D1x02"};
partNum, c{"0010"};
}};
//=====================================================================
// Format/Header Block
//=====================================================================
resource 'form' (128, "Root") {
l{"_sRsrcDir"},
1, // Should put "romRevision = 1" in ROMLink.r
appleFormat,
0,
$0F
};

View File

@ -0,0 +1,26 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 003D 3D3D 3D3D 3D3D" /* ..Monaco.======= */
$"3D3D 3D3D 3D3D 3D3D 3D3D 3D3D 3D3D 3D3D" /* ================ */
$"3D3D 0006 0004 0041 0125 033E 036C 0041" /* ==.....A.%.>.l.A */
$"0125 033E 036C A961 74BB 0000 0F5A 0000" /* .%.>.l.at....Z.. */
$"0F5A 0000 0761 0100" /* .Z...a.. */
};
data 'MPSR' (1008) {
$"0041 0125 033E 036C 0041 0125 033E 036C" /* .A.%.>.l.A.%.>.l */
$"0000 0761 0000 0000 0000 0000 0000" /* ...a.......... */
};
data 'ckid' (128, "Projector") {
$"B992 B7FE 3FE5 3230 0004 0000 0000 0000" /* ....?.20........ */
$"0000 A961 C104 A961 74BB A900 0533 005C" /* ...a...at....3.\ */
$"1376 0006 0004 0002 2653 7570 6572 4D61" /* .v......&SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C56 6964 656F BA41 5449 BA00" /* .DeclVideo.ATI.. */
$"0E43 6872 6973 2050 6574 6572 7365 6E00" /* .Chris Petersen. */
$"0132 000E 4154 4944 6563 6C56 6964 656F" /* .2..ATIDeclVideo */
$"2E72 0000 0000 2470 7574 2069 6E20 6469" /* .r....$put in di */
$"616D 6F6E 6420 6361 7264 2073 7570 706F" /* amond card suppo */
$"7274 2066 6F72 2054 4E54 0D00" /* rt for TNT.. */
};

View File

@ -0,0 +1,238 @@
/*
File: ATIDefROM.r
Contains: xxx put contents here xxx
Written by: xxx put writers here xxx
Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
Change History (most recent first):
<1> 11/5/93 fau first checked in
<1> 10/27/93 fau first checked in
<1> 10/19/93 fau first checked in
*/
//--------------------------------------------------------------------------
//start
//
//Name: ATIDefROM.r
//Creator: George D. Wilson Jr.
//Date: 9/19/92
//
//Purpose: Defintions for ATI monitors declaration ROM.
//
//Category: Header File
//File: ATIDefROM.r
//
//Detailed: This file contains definitions for video modes for the Apple
// 13" and 16" monitors.
//
//Note:
//
//History:
//
// Date Programmer Modification
// -------- ---------- -----------------------------------------
//
//stop
//------------------------------------------------------------------------*/
#define clutType 0 // 0 if lookup table
#define fixedType 1 // 1 if fixed table
#define directType 2 // 2 if direct values
#define defPixelType 0 // pixeltype=chunky
#define ChunkyDirect 16 // pixelType=ChunkyDirect
#define defmDevType clutType // clutType = 0
#define sRsrc_VideoHR_ATI $80 // Video parameter sResource id
#define sRsrc_Video16 $81 // Video parameter sResource id
#define sRsrc_VideoHR_Diamond $90
//*************************************************************
//Constants
//*************************************************************
//
// Parameter definitions {For Primary init}
//
#define defScrnRow $0080 //Bytes per pixel line
#define defMinorBase 0 //Video RAM Offset is 0
#define defMinorLength $4B000 //Video RAM length is $40000
#define defBaseOffset $00000000 //Offset for ROM
//=============================================================================
// Parameter definitions One bit-per-pixel Hi-Res 13"
//=============================================================================
#define onemBaseOffset defBaseOffset //Offset to base of video RAM
#define onemRowBytesHR $0050 //Rowbytes
#define onemBounds_THR 0 //Bounds.Top
#define onemBounds_LHR 0 //Bounds.Left
#define onemBounds_BHR 480 //Bounds.Bottom
#define onemBounds_RHR 640 //Bounds.Right
#define oneVersion 0 //Version = 0
#define onemHRes $480000 //Horizontal Pixels/inch
#define onemVRes $480000 //Vertical pixels/inch
#define onePixelType clutType //0 = Chunky
#define onePixelSize 1 //Number of bits per pixel
#define oneCmpCount 1 //Number of components in pixel
#define oneCmpSize 1 //Number of bits per component
#define onemPlaneBytes 0 //Offset from one plane to the next.
#define onemPageCnt 1 //Total number of pages
#define onemVertRefRate 67 //Vert refresh rate
#define onemDevType 0 //0 = CLUTType
//=============================================================================
// Parameter definitions Two bit-per-pixel
//=============================================================================
#define twomBaseOffset defBaseOffset //Offset to base of video RAM
#define twomRowBytesHR $00A0 //Rowbytes
#define twomBounds_THR 0 //Bounds.Top
#define twomBounds_LHR 0 //Bounds.Left
#define twomBounds_BHR 480 //Bounds.Bottom
#define twomBounds_RHR 640 //Bounds.Right
#define twoVersion 0 //Version = 0
#define twomHRes $480000 //Horizontal Pixels/inch
#define twomVRes $480000 //Vertical pixels/inch
#define twoPixelType clutType //0 = Chunky
#define twoPixelSize 2 //Number of bits per pixel
#define twoCmpCount 1 //Number of components in pixel
#define twoCmpSize 2 //Number of bits per component
#define twomPlaneBytes 0 //Offset from one plane to the next.
#define twomPageCnt 1 //Total number of pages
#define twomVertRefRate 67 //Vert refresh rate
#define twomDevType 0 //0 = CLUTType
//=============================================================================
// Parameter definitions Four bit-per-pixel
//=============================================================================
#define fourmBaseOffset defBaseOffset //Offset to base of video RAM
#define fourmRowBytesHR $0140 //Rowbytes
#define fourmBounds_THR 0 //Bounds.Top
#define fourmBounds_LHR 0 //Bounds.Left
#define fourmBounds_BHR 480 //Bounds.Bottom
#define fourmBounds_RHR 640 //Bounds.Right
#define fourVersion 0 //Version = 0
#define fourmHRes $480000 //Horizontal Pixels/inch
#define fourmVRes $480000 //Vertical pixels/inch
#define fourPixelType clutType //0 = Chunky
#define fourPixelSize 4 //Number of bits per pixel
#define fourCmpCount 1 //Number of components in pixel
#define fourCmpSize 4 //Number of bits per component
#define fourmPlaneBytes 0 //Offset from one plane to the next.
#define fourmPageCnt 1 //Total number of pages
#define fourmVertRefRate 67 //Vert refresh rate
#define onemDevType 0 //0 = CLUTType
//=============================================================================
// Parameter definitions Eight bit-per-pixel
//=============================================================================
#define eightmBaseOffset defBaseOffset //Offset to base of video RAM
#define eightmRowBytesHR $0400 //Rowbytes
#define eightmBounds_THR 0 //Bounds.Top
#define eightmBounds_LHR 0 //Bounds.Left
#define eightmBounds_BHR 480 //Bounds.Bottom
#define eightmBounds_RHR 640 //Bounds.Right
#define eightVersion 0 //Version = 0
#define eightmHRes $480000 //Horizontal Pixels/inch
#define eightmVRes $480000 //Vertical pixels/inch
#define eightPixelType clutType //0 = Chunky
#define eightPixelSize 8 //Number of bits per pixel
#define eightCmpCount 1 //Number of components in pixel
#define eightCmpSize 8 //Number of bits per component
#define eightmPlaneBytes 0 //Offset from one plane to the next.
#define eightmPageCnt 1 //Total number of pages
#define eightmVertRefRate 67 //Vert refresh rate
#define onemDevType 0 //0 = CLUTType
//=============================================================================
// Parameter definitions Sixteen bit-per-pixel
//=============================================================================
#define sixteenmBaseOffset defBaseOffset //Offset to base of video RAM
#define sixteenmRowBytesHR $0500 //Rowbytes
#define sixteenmBounds_THR 0 //Bounds.Top
#define sixteenmBounds_LHR 0 //Bounds.Left
#define sixteenmBounds_BHR 480 //Bounds.Bottom
#define sixteenmBounds_RHR 640 //Bounds.Right
#define sixteenVersion 0 //Version = 0
#define sixteenmHRes $480000 //Horizontal Pixels/inch
#define sixteenmVRes $480000 //Vertical pixels/inch
#define sixteenPixelType $10 //0 = Chunky $10 = Direct
#define sixteenPixelSize 16 //Number of bits per in pixel
#define sixteenCmpCount 3 //Number of components in pixel
#define sixteenCmpSize 5 //Number of bits per component
#define sixteenmPlaneBytes 0 //Offset from one plane to the next.
#define sixteenmPageCnt 1 //Total number of pages
#define sixteenmVertRefRate 67 //Vert refresh rate
#define sixteenmDevType ChunkyDirect //0 = CLUTType
//=============================================================================
// Parameter definitions One bit-per-pixel
//=============================================================================
#define onemRowBytes16 104 //Rowbytes
#define onemBounds_T16 0 //Bounds.Top
#define onemBounds_L16 0 //Bounds.Left
#define onemBounds_B16 624 //Bounds.Bottom
#define onemBounds_R16 832 //Bounds.Right
//=============================================================================
// Parameter definitions Two bit-per-pixel
//=============================================================================
#define twomRowBytes16 208 //Rowbytes
#define twomBounds_T16 0 //Bounds.Top
#define twomBounds_L16 0 //Bounds.Left
#define twomBounds_B16 624 //Bounds.Bottom
#define twomBounds_R16 832 //Bounds.Right
//=============================================================================
// Parameter definitions Four bit-per-pixel
//=============================================================================
#define fourmRowBytes16 416 //Rowbytes
#define fourmBounds_T16 0 //Bounds.Top
#define fourmBounds_L16 0 //Bounds.Left
#define fourmBounds_B16 624 //Bounds.Bottom
#define fourmBounds_R16 832 //Bounds.Right
//=============================================================================
// Parameter definitions Eight bit-per-pixel
//=============================================================================
#define eightmRowBytes16 832 //Rowbytes
#define eightmBounds_T16 0 //Bounds.Top
#define eightmBounds_L16 0 //Bounds.Left
#define eightmBounds_B16 624 //Bounds.Bottom
#define eightmBounds_R16 832 //Bounds.Right
//=====================================================================
// Video parameter sRsrc resource IDs
//=====================================================================
#define sRsrcVidATIHR $80 // Hi-Res 1,2,4,8,16bpp
#define sRsrcVidATI16 $81 // 16" 1,2,4,8bpp
#define sRsrcVidATIFP $82 // 15" full page
#define sRsrcVidATI12 $83 // 12" monochrome?????
//=====================================================================
// Special defines for SuperMario Build
//=====================================================================
//#define sRsrcUnknownDir 1 // sRsrc Directory for unknown CPUs.
//#define sRsrcUnknownBd 1 // Unknown board sRsrc.
//#define sRsrcBFBasedDir $7F // CPUs supported (or thought about) in the Zydeco ROM.
//#define sRsrc_Vid_DAFB_HRa $C8 // HiRes 8,16,32
//#define sRsrc_Vid_DAFB_LPa $C6 // GoldFish 8,16,32
//#define BoardspIDShift 1 // board spID shift value
//#define sRsrc_BdSpike boxQuadra700+BoardspIDShift // (16+BoardspIDShift)

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,26 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 0078 7878 0D0D 0957" /* ..Monaco.xxx...W */
$"7269 7474 656E 2062 793A 0978 7878 2070" /* ritten by:.xxx p */
$"7574 0006 0004 002A 0275 0357 0471 01A4" /* ut.....*.u.W.q.. */
$"0000 0363 043D A961 74CB 0000 27A8 0000" /* ...c.=.at...'... */
$"27A8 0000 1B5A 0100" /* '....Z.. */
};
data 'MPSR' (1008) {
$"002A 0275 0357 0471 01A4 0000 0363 043D" /* .*.u.W.q.....c.= */
$"0000 1B5A 0000 0000 0000 0000 0000" /* ...Z.......... */
};
data 'ckid' (128, "Projector") {
$"5E8E 812F 3FE5 3230 0004 0000 0000 0000" /* ^../?.20........ */
$"0000 A961 C104 A961 74CB A900 0533 005C" /* ...a...at....3.\ */
$"1376 0006 0005 0002 2653 7570 6572 4D61" /* .v......&SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C56 6964 656F BA41 5449 BA00" /* .DeclVideo.ATI.. */
$"0E43 6872 6973 2050 6574 6572 7365 6E00" /* .Chris Petersen. */
$"0132 000B 4154 4944 6566 524F 4D2E 7200" /* .2..ATIDefROM.r. */
$"0000 0024 7075 7420 696E 2064 6961 6D6F" /* ...$put in diamo */
$"6E64 2063 6172 6420 7375 7070 6F72 7420" /* nd card support */
$"666F 7220 544E 540D 00" /* for TNT.. */
};

View File

@ -0,0 +1,464 @@
;
; File: ATIDrvr.a
;
; Contains: xxx put contents here xxx
;
; Written by: xxx put writers here xxx
;
; Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
;
; Change History (most recent first):
;
; <1> 11/5/93 fau first checked in
; <1> 10/27/93 fau first checked in
; <1> 10/19/93 fau first checked in
;
;
;--------------------------------------------------------------------------
;start
;
;Name: ATIDrvr.a
;Creator: George D. Wilson Jr.
;Date: 4/24/92
;
;Purpose: Driver header for the ATI graphics driver.
;
;Category: Driver Header
;File: ATIDrvr.a
;
;Exports: Open - Driver open routine.
; Control - Driver control routine.
; Status - Driver status routine.
; Close - Driver close routine.
; intHandler - ATI VBL interrupt handler.
;
;Locals: done - Common driver exit routine.
;
;Detailed: This file is the assembly front end to the high level
; ATI driver routines. Most routines within this module
; simply setup a call to a high level routine of the same type.
; The only exception to this "Open". Open performs almost
; all the driver and variable initalization.
;
;Note:
;
;History:
;
; Date Programmer Modification
; -------- ---------- -----------------------------------------
;
;stop
;------------------------------------------------------------------------*/
;--------------------------------------------------------------------------
;
; Includes
;
;------------------------------------------------------------------------*/
include 'QuickDraw.a'
include 'Traps.a'
include 'SysEqu.a'
include 'ToolUtils.a'
include 'SysErr.a'
include 'ATIHdr.a'
;--------------------------------------------------------------------------
;
; Imported Variables
;
;------------------------------------------------------------------------*/
globals RECORD 0,INCREMENT
ALIGN 2
globalsSize EQU *-globals
ENDR
Enable EQU 1 ; Turn ATI interrupts on
true EQU 1 ; Boolean true
false EQU 0 ; Boolean false
;--------------------------------------------------------------------------
;
; Imported Procedures
;
;------------------------------------------------------------------------*/
IMPORT OpenDRVR ; High level 'C' open routine
IMPORT ControlDRVR ; High level 'C' control routine
IMPORT StatusDRVR ; High level 'C' status routine
IMPORT CloseDRVR ; High level 'C' close routine
IMPORT DrvrSlotIntHandlerNuBus ; High level 'C' interrupt handler
;--------------------------------------------------------------------------
;
; Local Equates
;
;------------------------------------------------------------------------*/
rSave reg d1-d7/a0-a6 ; Saved registers
;--------------------------------------------------------------------------
;
; Exported Procedures
;
;------------------------------------------------------------------------*/
;--------------------------------------------------------------------------
;
; Driver Headers
;
; *** WARNING: No code must be placed before these headers. ***
;
;------------------------------------------------------------------------*/
ATI MAIN EXPORT
IMPORT Open
IMPORT Close
IMPORT Control
IMPORT Status
ATIDrvr
dc.w $4C00 ; Flags: locked,bye,stat,ctl
dc.w 0 ; Periodic call interval
dc.w 0 ; Not an ornament
dc.w 0 ; No menu
dc.w Open-ATIDrvr ; Open routine offset
dc.w 0 ; Prime routine offset
dc.w Control-ATIDrvr ; Control routine offset
dc.w Status-ATIDrvr ; Status routine offset
dc.w Close-ATIDrvr ; Close routine offset
STRING PASCAL
_DCB_DriverNameATI ; Name of driver
ALIGN 2
_DCW_Version ; Version number of driver
ENDP
;--------------------------------------------------------------------------
;
; Beginning of Procedure Definitions
;
;------------------------------------------------------------------------*/
;--------------------------------------------------------------------------
;start
;
;Name: done
;Creator: George D. Wilson Jr.
;Date: 4/24/92
;
;Purpose: Common exit routine.
;
;Category: Driver Done Handler
;File: ATIDrvr.a
;
;Calls: none
;
;Called By: Open, Close, Status, Control
;
;Entry: A0 - Parameter block pointer.
; A1 - Driver DCE pointer.
;
;Alters: ioResult - In parameter block will be altered.
;
;Exit: D0 - Result code (also copied into parameter block)
;
;Algorithm: If the "noQueueBit" bit is set in the ioTrap field of the
; parameter block, the I/O call is immediate, and exit via
; an RTS instruction. Immediate calls don't go through IODone,
; since the parameter block isn't queued.
;
; If ioResult is less than or equal to zero, return via a
; jump to the Device Manager's IODone routine.
;
; If ioResult is greater than zero, indicating that the I/O
; call is not yet done, return is via an RTS instruction.
;
;History:
;
; Date Programmer Modification
; -------- ---------- ---------------------------------------
;
;stop
;------------------------------------------------------------------------*/
done PROC
bclr #drvrActive,dCtlFlags+1(a1) ; always clear busy bit
move.w ioResult(a0),d0 ; get ioResult
tst.w d0 ; is the call done?
bgt.s @byRts ; no - exit via RTS instr.
btst #noQueueBit-8,ioTrap(a0) ; is the call immediate?
bne.s @byRts ; br if so - exit via RTS instr.
move.l JIODone,-(sp) ; call is done; return to IODone
@byRts
; _Debugger ; MacsBug
rts ;
ENDP
;--------------------------------------------------------------------------
;start
;
;Name: IntHandlerNuBus
;Creator: George D. Wilson Jr.
;Date: 4/24/92
;
;Purpose: ATI interrupt handler.
;
;Category: Slot Interrupt Handler
;File: ATIDrvr.a
;
;Called By: Mac exception handler
;
;Alters:
;
;Detailed: This is the low level entry point for the interrupt generated
; by the cursor VBL.
;
; Currently this routine is called by the 'intMeister' interrupt
; system. It determines which ATI interrupt generated the
; exception and calls the appropriate routine registered.
;
;Note: Keep a eye on this routine if the hardware or the 'intMeister'
; change.
;
;History:
;
; Date Programmer Modification
; -------- ---------- ----------------------------------------
;
;stop
;------------------------------------------------------------------------*/
IntHandlerNuBus PROC EXPORT
; _Debugger
moveq #kOurSlotNum,d0
move.l JVBLTask,a0 ; Make the cursor move
jsr (a0)
moveq #1,d0
@noVBL rts
ENDP
;--------------------------------------------------------------------------
;start
;
;Name: Open
;Creator: George D. Wilson Jr.
;Date: 4/24/92
;
;Purpose: Performs low level driver open functions.
;
;Category: Driver Entry Point.
;File: ATIDrvr.c
;
;Calls: OpenDRVR, done
;
;Entry: a1 - Our driver DCE.
;
;Alters: dCtlStorage - Will be set to the global data storage
; for our driver if everything is OK.
;
; ioResult(a0) - The ioResult field of the parameter
; block will contain a driver error code
; or 'noErr' if everything went OK.
;
;Exit: d0 - Contains a driver error code or 'noErr'
; if everything went OK.
;
;Detailed: This routine leaves all the hard work to the high level routine.
; It expects the high level to indicate the success or failure by
; leaving a result code in D0.
;
;History:
;
; Date Programmer Modification
; -------- ---------- -----------------------------------------
;
;stop
;------------------------------------------------------------------------*/
Open PROC
WITH globals
movem.l rSave,-(sp) ; Save regs
move.l a1,-(sp) ; push DCE pointer
move.l a0,-(sp) ; push parm block pointrt
jsr OpenDRVR ; call C code
add #8,sp ; drop arguments
movem.l (sp)+,rSave ; Restore registers
move.w d0,ioResult(a0) ; Store the result code
bra done
ENDP
;--------------------------------------------------------------------------
;start
;
;Name: Close
;Creator: George D. Wilson Jr.
;Date: 4/24/92
;
;Purpose: Performs driver close function.
;
;Category: Driver Entry Point.
;File: ATIDrvr.c
;
;Calls: close, done
;
;Entry: a0 - Pointer to callers parameter block.
;
; a1 - Pointer to our driver DCE.
;
;Alters: ioResult(a0) - The result field of the parameter block
; is set to the value returned from the
; high level call. The high level routine
; leaves its result in D0.
;
;Exit: d0 - Has a driver error code left by the high level routine.
;
;Detailed: When a driver close call is made this routine passes the
; callers parameter block in A0 and the driver DCE in A1 and
; calls the high level routine. The high routine handles everything.
;
; The high level routine should return a driver error code in D0.
;
;History:
;
; Date Programmer Modification
; -------- ---------- -----------------------------------------
;
;stop
;------------------------------------------------------------------------*/
Close PROC
; _Debugger ; MacsBug
movem.l rSave,-(sp) ; Save regs
move.l a1,-(sp) ; push DCE pointer
move.l a0,-(sp) ; push parm block pointer
jsr CloseDRVR ; call C code
add #8,sp ; drop arguments
movem.l (sp)+,rSave ; Restore registers
move.w d0,ioResult(a0) ; Store the result code
bra done
ENDP
;--------------------------------------------------------------------------
;start
;
;Name: Status
;Creator: George D. Wilson Jr.
;Date: 4/24/92
;
;Purpose: Performs driver status functions.
;
;Category: Driver Entry Point.
;File: ATIDrvr.c
;
;Calls: status, done
;
;Entry: a0 - Pointer to callers parameter block.
;
; a1 - Pointer to our driver DCE.
;
;Alters: ioResult(a0) - The result field of the parameter block
; is set to the value returned from the
; high level call. The high level routine
; leaves its result in D0.
;
;Exit: d0 - Has a driver error code or 'noErr'.
;
;Detailed: This routine is simply an assembly language interface
; to the higher level status routine. It pushs a
; pointer to the callers parameter and then pushs
; a pointer to the driver DCE onto the stack.
;
; The high level routine should return a driver error
; code in D0.
;
;History:
;
; Date Programmer Modification
; -------- ---------- -----------------------------------------
;
;stop
;------------------------------------------------------------------------*/
Status PROC
movem.l rSave,-(sp) ; Save regs
move.l a1,-(sp) ; push DCE pointer
move.l a0,-(sp) ; push parm block pointer
jsr StatusDRVR ; call C code
add #8,sp ; drop arguments
movem.l (sp)+,rSave ; Restore registers
move.w d0,ioResult(a0) ; Store the result code
bra done
ENDP
;--------------------------------------------------------------------------
;start
;
;Name: Control
;Creator: George D. Wilson Jr.
;Date: 4/24/92
;
;Purpose: Performs driver control functions.
;
;Category: Driver Entry Point.
;File: ATIDrvr.c
;
;Calls: control, done
;
;Entry: a0 - Pointer to callers parameter block.
;
; a1 - Pointer to our driver DCE.
;
;Alters: ioResult(a0) - The result field of the parameter block
; is set to the value returned from the
; high level call. The high level routine
; leaves its result in D0.
;
;Exit: d0 - Has a driver error code or 'noErr'.
;
;Detailed: This routine is simply an assembly language interface
; to the higher level control routine. It pushs a
; pointer to the callers parameter and then pushs
; a pointer to the driver DCE onto the stack.
;
; The high level routine should return a driver error
; code in D0.
;
;History:
;
; Date Programmer Modification
; -------- ---------- -----------------------------------------
;
;stop
;------------------------------------------------------------------------*/
Control PROC
movem.l rSave,-(sp) ; Save regs
move.l a1,-(sp) ; push DCE pointer
move.l a0,-(sp) ; push parm block pointrt
jsr ControlDRVR ; call C code
add #8,sp ; drop arguments
movem.l (sp)+,rSave ; Restore registers
move.w d0,ioResult(a0) ; Store the result code
bra done
ENDP
END
;--------------------------------------------------------------------------
;
; End of Module
;
;------------------------------------------------------------------------*/

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,34 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 00BE 0009 0000 0014" /* ..Monaco........ */
$"0001 2260 000A 0050 014A 00AC 02B6 0000" /* .."`...P.J...... */
$"0000 0006 0004 005C 0099 0237 0347 005C" /* .......\...7.G.\ */
$"0099 0237 0347 A933 73B5 0000 072C 0000" /* ...7.G.3s....,.. */
$"0733 0000 2D92 0100" /* .3..-... */
};
data 'MPSR' (1007) {
$"0006 0000 2384 0000 2389 0543 6C6F 7365" /* ....#...#..Close */
$"0000 2ED8 0000 2EDF 0743 6F6E 7472 6F6C" /* .........Control */
$"0000 1407 0000 140B 0564 6F6E 6500 0000" /* .........done... */
$"1926 0000 1935 0B69 6E74 4861 6E64 6C65" /* .&...5.intHandle */
$"7200 0000 1DDE 0000 1DE2 054F 7065 6E00" /* r..........Open. */
$"0000 2939 0000 293F 0753 7461 7475 7300" /* ..)9..)?.Status. */
};
data 'MPSR' (1008) {
$"005C 0099 0237 0347 005C 0099 0237 0347" /* .\...7.G.\...7.G */
$"0000 2D92 0000 0000 0000 0000 0000" /* ..-........... */
};
data 'ckid' (128, "Projector") {
$"C19B A15E 3FE5 3230 0004 0000 0000 0000" /* ...^?.20........ */
$"0000 A933 73B5 A933 73B5 A900 0533 005C" /* ...3s..3s....3.\ */
$"1376 0000 0006 0001 2653 7570 6572 4D61" /* .v......&SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C56 6964 656F BA41 5449 BA00" /* .DeclVideo.ATI.. */
$"0E43 6872 6973 2050 6574 6572 7365 6E00" /* .Chris Petersen. */
$"0131 0009 4154 4944 7276 722E 6100 0000" /* .1..ATIDrvr.a... */
$"0010 6669 7273 7420 6368 6563 6B65 6420" /* ..first checked */
$"696E 00" /* in. */
};

View File

@ -0,0 +1,610 @@
/*
File: ATIDrvr.c
Contains: xxx put contents here xxx
Written by: xxx put writers here xxx
Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
Change History (most recent first):
<1> 11/5/93 fau first checked in
<1> 10/27/93 fau first checked in
<1> 10/19/93 fau first checked in
*/
/*-------------------------------------------------------------------------
*start
*
*Name: ATIDriver.c
*Creator: George D. Wilson Jr.
*Date: 8/15/93
*
*Purpose: Main interface file for ATI video driver.
*
*Category: Macintosh driver
*File: ATIDrvr.c
*
*Exports: OpenDRVR - Handles initialization of driver.
* CloseDRVR - Handles shutdown of driver.
* ControlDRVR - Handles driver control calls.
* StatusDRVR - Handles driver status calls.
* WaitForVBL - Returns when vertical blanking is active.
*
*Locals:
*
*Detailed:
*
*Note:
*
*History:
*
* Date Programmer Modification
* -------- ---------- -----------------------------------------
*
*stop
*-----------------------------------------------------------------------*/
/*-------------------------------------------------------------------------
*
* Includes
*
*-----------------------------------------------------------------------*/
#include <Types.h>
#include <Video.h>
#include <Devices.h>
#include <Errors.h>
#include <OSUtils.h>
#include <Slots.h>
#include <Memory.h>
#include <Retrace.h>
#include "ATIStdTypes.h"
#include "ATI.h"
#include "ATIDrvr.h"
#include "ATIVideo.h"
#include "NubEqu.h"
/*-------------------------------------------------------------------------
*
* Imported Procedures
*
*-----------------------------------------------------------------------*/
extern UInt16 GetRowBytes(UInt8 monitorID, UInt8 videoMode, UInt8 theSlot);
extern void IntHandlerNuBus();
/*-------------------------------------------------------------------------
*
* Exported Procedures
*
*-----------------------------------------------------------------------*/
UInt16 OpenDRVR (CntrlParam *pb, AuxDCEPtr dce);
UInt16 CloseDRVR (CntrlParam *pb, DCtlPtr dce);
UInt16 ControlDRVR (CntrlParam *pb, DCtlPtr dce);
UInt16 StatusDRVR (CntrlParam *pb, DCtlPtr dce);
/*-------------------------------------------------------------------------
*
* Beginning of Procedure Definitions
*
*-----------------------------------------------------------------------*/
/*-------------------------------------------------------------------------
*start
*
*Name: WaitForVBL
*Creator: George D. Wilson Jr.
*Date: 3/20/92
*
*Purpose:
*
*Category:
*File:
*
*Calls:
*
*Called By:
*
*Entry:
*
*Alters:
*
*Exit:
*
*Detailed:
*
*Algorithm:
*
*Note:
*
*History:
*
* Date Programmer Modification
* -------- ---------- -----------------------------------------
*
*stop
*-----------------------------------------------------------------------*/
void WaitForVBL()
{
short i=0;
i = i+1;
// DebugStr("\pWaitForVBL");
} /* End of WaitForVBL */
/*-------------------------------------------------------------------------
*start
*
*Name: InstallInterruptRoutine
*Creator: George D. Wilson Jr.
*Date: 3/20/92
*
*Purpose:
*
*Category:
*File:
*
*Calls:
*
*Called By:
*
*Entry:
*
*Alters:
*
*Exit:
*
*Detailed:
*
*Algorithm:
*
*Note:
*
*History:
*
* Date Programmer Modification
* -------- ---------- -----------------------------------------
*
*stop
*-----------------------------------------------------------------------*/
void InstallInterruptRoutine(DCtlPtr dce)
{
// OSErr err;
globalsPtr g;
// UInt32 intHi;
// DebugStr("\pInstallInterruptRoutine");
g = (globalsPtr) *(dce->dCtlStorage);
// RegisterNubInt(kVideoLineInt,(InterruptHdlr) IntHandlerNuBus,(long) dce);
g->gInterruptsEnabled = kVBLInterruptEnabled;
} /* End of InstallInterruptRoutine */
/*-------------------------------------------------------------------------
*start
*
*Name: RemoveInterruptRoutine
*Creator: George D. Wilson Jr.
*Date: 3/20/92
*
*Purpose:
*
*Category:
*File:
*
*Calls:
*
*Called By:
*
*Entry:
*
*Alters:
*
*Exit:
*
*Detailed:
*
*Algorithm:
*
*Note:
*
*History:
*
* Date Programmer Modification
* -------- ---------- -----------------------------------------
*
*stop
*-----------------------------------------------------------------------*/
void RemoveInterruptRoutine(DCtlPtr dce)
{
// OSErr err;
globalsPtr g;
// DebugStr("\pRemoveInterruptRoutine");
g = (globalsPtr) *(dce->dCtlStorage);
if ( g->gInterruptsEnabled ) {
WaitForVBL();
if ( *(long*)(kMySlot | kNMRQDisable) );
// RemoveNubInt(kVideoLineInt);
g->gInterruptsEnabled = kVBLInterruptDisabled;
}
}
/*-------------------------------------------------------------------------
*start
*
*Name: OpenDRVR
*Creator: George D. Wilson Jr.
*Date: 3/20/92
*
*Purpose:
*
*Category:
*File:
*
*Calls:
*
*Called By:
*
*Entry:
*
*Alters:
*
*Exit:
*
*Detailed:
*
*Algorithm:
*
*Note:
*
*History:
*
* Date Programmer Modification
* -------- ---------- -----------------------------------------
*
*stop
*-----------------------------------------------------------------------*/
UInt16 OpenDRVR (CntrlParam *pb, AuxDCEPtr dce)
{
#pragma unused(pb)
globalsPtr g;
Handle globs;
UInt16 i;
SpBlock spPb;
// OSErr err;
SPRAMRecord sPRAM;
UInt8 videoMode;
// DebugStr("\pOpenDRVR");
globs = nil;
ResrvMem(GLOBALSSIZE);
globs = NewHandleSysClear(GLOBALSSIZE);
if ( globs == nil ) return(openErr);
dce->dCtlStorage = globs;
HLock(globs);
g = (globalsPtr) *(globs);
//==========================================================================
// Zero all global data stuff
//==========================================================================
g->gGammaPtr = nil;
g->gCurrentPage = kOurVidPage;
g->gCurrentMode = kFirstVideoMode; // 8 bpp Fix this later •••
g->gBaseAddr = (Ptr) (kATIVRAMAddr);
g->gFBBaseAddr = (Ptr) (kATIVRAMAddr);
g->gInterruptsEnabled = kVBLInterruptEnabled;
g->gMonoOnly = false; // Device supports color •••
g->gLuminanceMode = false; // Current mode is color •••
g->gDirectMode = false;
g->gNumLines = kNumLines480; // 13" is 480 •••
g->gBigSlotNum = dce->dCtlSlot;
g->gSlotNum = dce->dCtlSlot;
videoMode = kFirstVideoMode;
spPb.spSlot = g->gSlotNum;
spPb.spResult = &sPRAM;
#if 0
err = SReadPRAMRec(&spPb);
if ( err == noErr ) { // Did we get our PRAM?
g->gMonitorID = sPRAM.vendorUse4; // No save the monitor ID
g->gCurrentMode = sPRAM.vendorUse1; // Use the first video mode
if ( g->gCurrentMode > kFirstVideoMode ) {
g->gDirectMode = true;
}
}
#else
g->gDirectMode = false;
g->gMonitorID = kRGB1312; // No save the monitor ID
g->gCurrentMode = kFirstVideoMode;
#endif
g->gRowBytes = GetRowBytes(g->gMonitorID,g->gCurrentMode,g->gSlotNum);
//==========================================================================
// Get or build gamma table
//==========================================================================
g->gGammaPtr = (GammaTablePtr) NewPtrSysClear(sizeof(GammaTable));
if ( g->gGammaPtr ) {
g->gGammaPtr->gFormulaSize = 0;
g->gGammaPtr->gChanCnt = 1;
g->gGammaPtr->gDataCnt = 3;
g->gGammaPtr->gDataCnt = 256;
g->gGammaPtr->gDataWidth = 0x0008;
for ( i = 0; i < kNumCLUTEntries; i++ ) {
g->gGammaPtr->gFormulaData[i] = i;
}
}
#ifndef ROM
// InitNubInts();
// InitNubIntMgr();
#endif
// InstallInterruptRoutine(dce);
#ifdef ROM
// err = AttachVBL(0x0E);
#endif
return(noErr); // Say open was successful
}
/*-------------------------------------------------------------------------
*start
*
*Name: CloseDRVR
*Creator: George D. Wilson Jr.
*Date: 3/20/92
*
*Purpose:
*
*Category:
*File:
*
*Calls:
*
*Called By:
*
*Entry:
*
*Alters:
*
*Exit:
*
*Detailed:
*
*Algorithm:
*
*Note:
*
*History:
*
* Date Programmer Modification
* -------- ---------- -----------------------------------------
*
*stop
*-----------------------------------------------------------------------*/
UInt16 CloseDRVR (CntrlParam *pb, DCtlPtr dce)
{
#pragma unused(pb)
globalsPtr g;
UInt8 mmuMode;
// DebugStr("\pCloseDRVR");
g = (globalsPtr) *(dce->dCtlStorage);
mmuMode = true32b;
SwapMMUMode(&mmuMode);
DoDisableVideo(g->gBigSlotNum); // Turn the video system off
if ( g->gGammaPtr ) { // If we have a gamma table
DisposPtr((Ptr) (g->gGammaPtr)); // Release the memory
}
if ( g->gInterruptsEnabled ) { // If cursor interrupts are enabled
// RemoveInterruptRoutine(dce); // Disable them
}
SwapMMUMode(&mmuMode);
DisposHandle(dce->dCtlStorage); // Release driver globals storage
return(noErr); // Say open was successful
}
/*-------------------------------------------------------------------------
*start
*
*Name: ControlDRVR
*Creator: George D. Wilson Jr.
*Date: 3/20/92
*
*Purpose:
*
*Category:
*File:
*
*Calls:
*
*Called By:
*
*Entry:
*
*Alters:
*
*Exit:
*
*Detailed:
*
*Algorithm:
*
*Note:
*
*History:
*
* Date Programmer Modification
* -------- ---------- -----------------------------------------
*
*stop
*-----------------------------------------------------------------------*/
UInt16 ControlDRVR (CntrlParam *pb, DCtlPtr dce)
{
Int16 message; // The control call being made
OSErr err;
globalsPtr g;
UInt8 mmuMode;
// DebugStr("\pControlDRVR");
g = (globalsPtr) *(dce->dCtlStorage);
mmuMode = true32b;
SwapMMUMode(&mmuMode);
message = pb->csCode;
switch ( message ) {
case cscReset:
err = DoVideoReset((VDPgInfoPtr) *((UInt32 *) &(pb->csParam[0])), dce);
break;
// case cscKillIO:
// err = DoKillIO((VDPgInfoPtr) *((UInt32 *) &(pb->csParam[0])), dce);
// break;
case cscSetMode:
err = DoSetVideoMode((VDPgInfoPtr) *((UInt32 *) &(pb->csParam[0])), dce);
break;
case cscSetEntries:
err = DoSetEntries((VDSetEntryPtr) *((UInt32 *) &(pb->csParam[0])), dce);
break;
case cscSetGamma:
err = DoSetGamma((VDGamRecPtr) *((UInt32 *) &(pb->csParam[0])), dce);
break;
case cscGrayScreen:
err = DoGrayPage((VDPgInfoPtr) *((UInt32 *) &(pb->csParam[0])), dce);
break;
case cscSetGray:
err = DoSetGray((VDGrayPtr) *((UInt32 *) &(pb->csParam[0])), dce);
break;
case cscSetInterrupt:
err = DoSetInterrupt((VDPgInfoPtr) *((UInt32 *) &(pb->csParam[0])), dce);
break;
case cscDirectSetEntries:
err = DoDirectSetEntries((VDSetEntryPtr) *((UInt32 *) &(pb->csParam[0])), dce);
break;
case cscSetDefaultMode:
err = DoSetDefaultMode((VDDefModePtr) *((UInt32 *) &(pb->csParam[0])), dce);
break;
case 200:
err = noErr;
break;
default: err = controlErr;
} // End switch
pb->ioResult = err;
SwapMMUMode(&mmuMode);
return(err);
}
/*-------------------------------------------------------------------------
*start
*
*Name: StatusDRVR
*Creator: George D. Wilson Jr.
*Date: 3/20/92
*
*Purpose:
*
*Category:
*File:
*
*Calls:
*
*Called By:
*
*Entry:
*
*Alters:
*
*Exit:
*
*Detailed:
*
*Algorithm:
*
*Note:
*
*History:
*
* Date Programmer Modification
* -------- ---------- -----------------------------------------
*
*stop
*-----------------------------------------------------------------------*/
UInt16 StatusDRVR (CntrlParam *pb, DCtlPtr dce)
{
Int16 message; // The control call being made
OSErr err; // Error code returned from routine
globalsPtr g;
UInt8 mmuMode;
// DebugStr("\pStatusDRVR");
g = (globalsPtr) *(dce->dCtlStorage);
mmuMode = true32b;
SwapMMUMode(&mmuMode);
message = pb->csCode;
err = statusErr; // Standard error code
switch ( message ) {
case cscGetMode:
err = DoGetMode((VDPgInfoPtr) *((UInt32 *) &(pb->csParam[0])), dce);
break;
case cscGetEntries:
err = DoGetEntries((VDSetEntryPtr) *((UInt32 *) &(pb->csParam[0])), dce);
break;
case cscGetPageCnt:
err = DoGetPages((VDPgInfoPtr) *((UInt32 *) &(pb->csParam[0])), dce);
break;
case cscGetBaseAddr:
err = DoGetBaseAddr((VDPgInfoPtr) *((UInt32 *) &(pb->csParam[0])), dce);
break;
case cscGetGray:
err = DoGetGray((VDGrayPtr) *((UInt32 *) &(pb->csParam[0])), dce);
break;
case cscGetInterrupt:
err = DoGetInterrupt((VDPgInfoPtr) *((UInt32 *) &(pb->csParam[0])), dce);
break;
case cscGetGamma:
err = DoGetGamma((VDGamRecPtr) *((UInt32 *) &(pb->csParam[0])), dce);
break;
case cscGetDefaultMode:
err = DoGetDefaultMode((VDDefModePtr) *((UInt32 *) &(pb->csParam[0])), dce);
break;
} // End switch
pb->ioResult = err; // Pass result code on
SwapMMUMode(&mmuMode);
return(err);
}
/*-------------------------------------------------------------------------
*
* End of Module
*
*-----------------------------------------------------------------------*/

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,26 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 002D 2D2D 2D2D 2D2D" /* ..Monaco.------- */
$"2D2D 2D2D 2D2D 2D2D 2D2D 2D0D 2A73 7461" /* -----------.*sta */
$"7274 0006 0004 0070 00A3 0339 034F 0070" /* rt.....p...9.O.p */
$"00A3 0339 034F A961 74E0 0000 31BA 0000" /* ...9.O.at...1... */
$"31BA 0000 2AD5 0100" /* 1...*... */
};
data 'MPSR' (1008) {
$"0070 00A3 0339 034F 0070 00A3 0339 034F" /* .p...9.O.p...9.O */
$"0000 2AD5 0000 0000 0000 0000 0000" /* ..*........... */
};
data 'ckid' (128, "Projector") {
$"AE13 AE73 3FE5 3230 0004 0000 0000 0000" /* ...s?.20........ */
$"0000 A961 C104 A961 74E0 A900 0533 005C" /* ...a...at....3.\ */
$"1376 0006 0007 0002 2653 7570 6572 4D61" /* .v......&SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C56 6964 656F BA41 5449 BA00" /* .DeclVideo.ATI.. */
$"0E43 6872 6973 2050 6574 6572 7365 6E00" /* .Chris Petersen. */
$"0132 0009 4154 4944 7276 722E 6300 0000" /* .2..ATIDrvr.c... */
$"0024 7075 7420 696E 2064 6961 6D6F 6E64" /* .$put in diamond */
$"2063 6172 6420 7375 7070 6F72 7420 666F" /* card support fo */
$"7220 544E 540D 00" /* r TNT.. */
};

View File

@ -0,0 +1,304 @@
/*
File: ATIDrvr.h
Contains: xxx put contents here xxx
Written by: xxx put writers here xxx
Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
Change History (most recent first):
<1> 11/5/93 fau first checked in
<1> 10/27/93 fau first checked in
<1> 10/19/93 fau first checked in
*/
/*-------------------------------------------------------------------------
*start
*
*Name: ATIDrvr.h
*Creator: George D. Wilson Jr.
*Date: 3/17/92
*
*Purpose: Contains structures and defines for the RISC video driver.
*
*Category: Header File
*File: ATIDrvr.h
*
*Detailed:
*
*Note:
*
*History:
*
* Date Programmer Modification
* -------- ---------- -----------------------------------------
*
*stop
*-----------------------------------------------------------------------*/
#define ATI 1 // Indicate we are for ATI hardware
#define kNumPages 1 // Number of video pages
#define kOurVidPage 0 // The video page we use Always 0 on Quadra
#define kVBLInterruptEnabled 0 // VBL interrupts enabled return value
#define kVBLInterruptDisabled 1 // VBL interrupts disenabled return value
#define kDAFBHWID 0x001C // DAFB hardware device ID
#define kRowBytes138bpp 0x400 // Apple 13" rowbytes 8bpp
// #define kRowBytes1316bpp 0x500 // Apple 13" rowbytes 16bpp
// #define kRowBytes1324bpp 0xA00 // Apple 13" rowbytes 24bpp
#define kNumLines480 480 //
#define kNumCLUTEntries 256 // Number of entries in the CLUT
#define kSuper9 0x90000000
#define kSuperA 0xA0000000
#define kSuperB 0xB0000000
#define kSuperC 0xC0000000
#define kSuperD 0xD0000000
#define kSuperE 0xE0200000
#define kSlot9 0x09000000
#define kSlotA 0x0A000000
#define kSlotB 0x0B000000
#define kSlotC 0x0C000000
#define kSlotD 0x0D000000
#define kSlotE 0x0E000000
#define kMySlot kSlotE // Used to access ATI with Nub601
#ifdef ROM
#define kMySlot8 0x00 // Used to access ATI sResource structs
#else
#define kMySlot8 0x0E // Used to access ATI with Nub601
#endif
#define kMySuperSlot kSuperE // Used to access ATI with Nub601
#define kFirstVideoMode 0x80
#define kSecondVideoMode 0x81
#define kThirdVideoMode 0x82
#define kFourthVideoMode 0x83
#define kFifthVideoMode 0x84
#define kSixthVideoMode 0x85
//===============================================================================
// Below are the bit patterns to write into memory for each of the supported
// bit depths.
//===============================================================================
#define kOneBitPattern 0xAAAAAAAA
#define kTwoBitPattern 0xCCCCCCCC
#define kFourBitPattern 0xF0F0F0F0
#define kEightBitPattern 0xFF00FF00
#define kSixTeenBitPattern 0xFFFF0000
#define kThirtyTwoBitPattern 0xFFFFFFFF
#define kGrayCLUTValue 0x00808080 // Value to gray the CLUT
#define kRedLumValue 0x4CCC
#define kGreenLumValue 0x970A
#define kBlueLumValue 0x1C29
//===============================================================================
// The following definitions define the number of long word writes to
// to do to fill one line of video on the 13" monitor.
// This should be changed later to be monitor indepentent.
//===============================================================================
#define kOneBitBytes 0x14 // Number of long writes for one bpp
#define kTwoBitBytes 0x28 // Number of long writes for two bpp
#define kFourBitBytes 0x50 // Number of long writes for four bpp
#define kEightBitBytes 0xA0 // Number of long writes for eight bpp
#define kSixTeenBitBytes 0x140 // Number of long writes for sixteen bpp
#define kThirtyTwoBitBytes 0x280 // Number of long writes for thirty two bpp
#define kMonoDevice 0x01 // Monochrome device
#define kNonMonoDevice 0x00 // Non luminance mapping device
// #define kNumLines 480 // Number of lines on a 13"
//==========================================================================
// Sense line decode values
//==========================================================================
#define kSenseLineReset 0x00000007 // Drives all lines low
#define kSenseLineAMask 0x00000006 // Drives the A bit
#define kSenseLineBMask 0x00000005 // Drives the B bit
#define kSenseLineCMask 0x00000003 // Drives the C bit
#define kSenseLineMask 0x00000070 // Only the first three bits are used
#define kMonitorNotConnected 0x07 // No monitor or extended value
#define kRGB21 0x00 // 21" RGB display 1152x870 100.0 MHz
#define kFullPage 0x01 // Full page display 640x870 57.28 MHz
#define kRGB12 0x02 // 12" RGB display 512x384 15.67 MHz
#define kTwoPage 0x03 // Two page display 1152x870 100.0 MHz
#define kNTSC 0x04 // NTSC display varxvar 12.27 MHz
#define kRGB15 0x05 // 15" RGB display 640x870 57.28 MHz
#define kRGB1312 0x06 // Hi-Res 13" & 12" displays 30.24 MHz
#define k16SenseACode 0x02 // Value received from A mask
#define k16SenseBCode 0x05 // Value received from B mask
#define k16SenseCCode 0x02 // Value received from C mask
//==========================================================================
// Slot manager defines for the timing sResources
//==========================================================================
#define kATIVidParmSpId 0x7E // Resource id for the all ATI video systems
#define kNoMonitorConnected 0xFF // No Monitor connected to system
#define kRGB1312Connected 0x80 // Hi-Res sRsrc ID
#define kRGB16Connected 0x81 // 16" sRsrc ID
#define kRGB21Connected 0x82 // sRsrc ID
#define kFullPageConnected 0x83 // sRsrc ID
#define kRGB12Connected 0x84 // sRsrc ID
#define kTwoPageConnected 0x85 // sRsrc ID
#define kNTSCConnected 0x86 // sRsrc ID
#define kRGB15Connected 0x87 // sRsrc ID
#define kEndeavorParmSpId 0x80 // Resource id of Endeavor SBlock
#define kACDCParmSpId 0x81 // Resource id of ACDC SBlock
#define kSwatchParmSpId 0x82 // Resource id of Swatch SBlock
//==========================================================================
// Definition of default mode data structure
//==========================================================================
struct VDDefMode {
UInt8 csID;
};
typedef struct VDDefMode VDDefMode;
typedef VDDefMode *VDDefModePtr, **VDDefModeHandle;
#define kVDDefModeSize (sizeof(VDDefMode))
//==========================================================================
// Exported status routines
//==========================================================================
OSErr DoGetBaseAddr(VDPgInfoPtr pgPtr, DCtlPtr dce);
OSErr DoGetDefaultMode(VDDefModePtr dfPtr, DCtlPtr dce);
OSErr DoGetEntries(VDSetEntryPtr pgPtr, DCtlPtr dce);
OSErr DoGetGamma(VDGamRecPtr gPtr, DCtlPtr dce);
OSErr DoGetGray(VDGrayPtr pgPtr, DCtlPtr dce);
OSErr DoGetInterrupt(VDPgInfoPtr flgPtr, DCtlPtr dce);
OSErr DoGetMode(VDPgInfoPtr pgPtr, DCtlPtr dce);
OSErr DoGetPages(VDPgInfoPtr pgPtr, DCtlPtr dce);
//==========================================================================
// Exported control routines
//==========================================================================
OSErr DoVideoReset(VDPgInfoPtr pgPtr, DCtlPtr dce);
OSErr DoSetVideoMode(VDPgInfoPtr pgPtr, DCtlPtr dce);
OSErr DoSetEntries(VDSetEntryPtr pgPtr, DCtlPtr dce);
OSErr DoSetGamma(VDGamRecPtr pgPtr, DCtlPtr dce);
OSErr DoGrayPage(VDPgInfoPtr pgPtr, DCtlPtr dce);
OSErr DoSetGray(VDGrayPtr pgPtr, DCtlPtr dce);
OSErr DoSetInterrupt(VDPgInfoPtr pgPtr, DCtlPtr dce);
OSErr DoDirectSetEntries(VDSetEntryPtr pgPtr, DCtlPtr dce);
OSErr DoSetDefaultMode(VDDefModePtr dfPtr, DCtlPtr dce);
//==========================================================================
// Definition of slot manager vendor PRAM data structure
//==========================================================================
struct SPRAMRecord {
UInt16 boardID;
UInt8 vendorUse1;
UInt8 vendorUse2;
UInt8 vendorUse3;
UInt8 vendorUse4;
UInt8 vendorUse5;
UInt8 vendorUse6;
};
typedef struct SPRAMRecord SPRAMRecord;
typedef SPRAMRecord *SPRAMRecordPtr, **SPRAMRecordHandle;
#define kSPRAMRecordSize (sizeof(SPRAMRecord))
//==========================================================================
// Definition of gamma table data structure
//==========================================================================
struct GammaTable {
short gVersion; // gamma version number
short gType; // gamma data type
short gFormulaSize; // Formula data size
short gChanCnt; // number of channels of data
short gDataCnt; // number of values/channel
short gDataWidth; // bits/corrected value (data packed to next larger byte size)
char gFormulaData[255*3]; // data for formulas followed by gamma values
};
typedef struct GammaTable GammaTable;
typedef GammaTable *GammaTablePtr, **GammaTableHandle;
#define kGammaTableSize (sizeof(GammaTable))
struct ACDCVidParms {
UInt8 pbcr0ValueFirstMode;
UInt8 pbcr1ValueFirstMode;
UInt8 pbcr0ValueSecondMode;
UInt8 pbcr1ValueSecondMode;
UInt8 pbcr0ValueThirdMode;
UInt8 pbcr1ValueThirdMode;
};
typedef struct ACDCVidParms ACDCVidParms;
typedef struct ACDCVidParms *ACDCVidParmsPtr;
typedef struct ACDCVidParms **ACDCVidParmsHdl;
#define ACDCVIDPARMSSIZE ((UInt32) sizeof(ACDCVidParms))
struct endeavorVidParms {
UInt8 MRegValue;
UInt8 NRegValue;
};
typedef struct endeavorVidParms endeavorVidParms;
typedef struct endeavorVidParms *endeavorVidParmsPtr;
typedef struct endeavorVidParms **endeavorVidParmsHdl;
#define ENDEAVORVIDPARMSSIZE ((UInt32) sizeof(endeavorVidParms))
struct globals {
GammaTablePtr gGammaPtr;
Ptr gBaseAddr;
Ptr gFBBaseAddr;
Boolean gInterruptsEnabled;
Boolean gMonoOnly;
Boolean gLuminanceMode;
Boolean gDirectMode;
UInt16 gNumLines;
UInt16 gRowBytes;
UInt16 gCurrentPage;
UInt32 gBigSlotNum;
UInt8 gMonitorID;
UInt8 gSlotNum;
UInt8 gCurrentMode;
SlotIntQElement qElem;
};
typedef struct globals globals;
typedef struct globals *globalsPtr;
typedef struct globals **globalsH;
#define GLOBALSSIZE ((UInt32) sizeof(globals))
//==========================================================================
// Utility routines
//==========================================================================
void RemoveInterruptRoutine(DCtlPtr dce);
void InstallInterruptRoutine(DCtlPtr dce);
void DoDisableVideo(UInt32 theSlot);
/*-------------------------------------------------------------------------
*
* End of Module
*
*-----------------------------------------------------------------------*/

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,26 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 002D 2D2D 2D2D 2D2D" /* ..Monaco.------- */
$"2D2D 2D2D 2D2D 2D2D 2D2D 2D0D 2A73 7461" /* -----------.*sta */
$"7274 0006 0004 003C 0024 026D 02FD 003C" /* rt.....<.$.m...< */
$"0024 026D 02FD A961 74F1 0000 0A16 0000" /* .$.m...at....... */
$"0AF8 0000 0878 0100" /* .....x.. */
};
data 'MPSR' (1008) {
$"003C 0024 026D 02FD 003C 0024 026D 02FD" /* .<.$.m...<.$.m.. */
$"0000 0878 0000 0000 0000 0000 0000" /* ...x.......... */
};
data 'ckid' (128, "Projector") {
$"B325 AE73 3FE5 3230 0004 0000 0000 0000" /* .%.s?.20........ */
$"0000 A961 C104 A961 74F1 A900 0533 005C" /* ...a...at....3.\ */
$"1376 0006 0008 0002 2653 7570 6572 4D61" /* .v......&SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C56 6964 656F BA41 5449 BA00" /* .DeclVideo.ATI.. */
$"0E43 6872 6973 2050 6574 6572 7365 6E00" /* .Chris Petersen. */
$"0132 0009 4154 4944 7276 722E 6800 0000" /* .2..ATIDrvr.h... */
$"0024 7075 7420 696E 2064 6961 6D6F 6E64" /* .$put in diamond */
$"2063 6172 6420 7375 7070 6F72 7420 666F" /* card support fo */
$"7220 544E 540D 00" /* r TNT.. */
};

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,26 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 002D 2D2D 2D2D 2D2D" /* ..Monaco.------- */
$"2D2D 2D2D 2D2D 2D2D 2D2D 2D0D 2A73 7461" /* -----------.*sta */
$"7274 0006 0004 0098 00B7 0255 0365 0098" /* rt.........U.e.. */
$"00B7 0255 0365 A961 7501 0000 85B8 0000" /* ...U.e.au....... */
$"85B8 0000 50C8 0100" /* ....P... */
};
data 'MPSR' (1008) {
$"0098 00B7 0255 0365 0098 00B7 0255 0365" /* .....U.e.....U.e */
$"0000 50C8 0000 0000 0000 0000 0000" /* ..P........... */
};
data 'ckid' (128, "Projector") {
$"2909 ED65 3FE5 3230 0004 0000 0000 0000" /* )..e?.20........ */
$"0000 A961 C104 A961 7501 A900 0533 005C" /* ...a...au....3.\ */
$"1376 0006 0009 0002 2653 7570 6572 4D61" /* .v......&SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C56 6964 656F BA41 5449 BA00" /* .DeclVideo.ATI.. */
$"0E43 6872 6973 2050 6574 6572 7365 6E00" /* .Chris Petersen. */
$"0132 000C 4154 4944 7276 7249 6D70 2E63" /* .2..ATIDrvrImp.c */
$"0000 0000 2470 7574 2069 6E20 6469 616D" /* ....$put in diam */
$"6F6E 6420 6361 7264 2073 7570 706F 7274" /* ond card support */
$"2066 6F72 2054 4E54 0D00" /* for TNT.. */
};

View File

@ -0,0 +1,84 @@
;
; File: ATIHdr.a
;
; Contains: xxx put contents here xxx
;
; Written by: xxx put writers here xxx
;
; Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
;
; Change History (most recent first):
;
; <1> 11/5/93 fau first checked in
; <1> 10/27/93 fau first checked in
; <1> 10/19/93 fau first checked in
;
;
;--------------------------------------------------------------------------
;start
;
;Name: ATIHdr.a
;Creator: George D. Wilson Jr.
;Date: 4/24/92
;
;Purpose: Common equates and defines for ATI driver.
;
;Category: Driver Header include file
;File: ATIHdr.a
;
;Detailed: This assembly include file contains common equates for
; the version information of the ATI video driver
; and PrimaryInit.
;
;History:
;
; Date Programmer Modification
; -------- ---------- -----------------------------------------
;
;stop
;------------------------------------------------------------------------*/
kOurSlotNum EQU $E ;; The slot of the Nub Card
; -------------------------------------------------------------------
; +++++++++++++++++++++++ Version Control Constants +++++++++++++++++
; -------------------------------------------------------------------
gbla &numericVersion ; Numeric Version Number
&numericVersion seta $1000
gblc &textVersion ; Textual Version Number
&textVersion setc '1.0D1x1'
gblc &driverName
&driverName setc 'Display_Video_Apple_ATI' ; Driver name
; -------------------------------------------------------------------
; Macros for Accessing Version and Name Constants
; -------------------------------------------------------------------
MACRO
_DCB_RevLevel
gblc &textVersion
DC.B '&textVersion'
ENDM
MACRO
_DCB_DriverNameATI
gblc &driverName
DC.B '.&driverName'
ENDM
MACRO
_DCW_Version
gbla &numericVersion
DC.W &numericVersion
ENDM
;--------------------------------------------------------------------------
;
; End of Module
;
;------------------------------------------------------------------------*/

View File

@ -0,0 +1 @@
TEXTMPS

View File

@ -0,0 +1,25 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 0000 001A 00DF 002E" /* ..Monaco........ */
$"015B 8000 0000 0000 0034 0100 0046 0146" /* .[.......4...F.F */
$"0405 0006 0004 00AC 00C1 025F 036F 00AC" /* ..........._.o.. */
$"00C1 025F 036F A8B6 42B8 0000 03A8 0000" /* ..._.o..B....... */
$"03A8 0000 02DF 0100" /* ........ */
};
data 'MPSR' (1008) {
$"00AC 00C1 025F 036F 00AC 00C1 025F 036F" /* ....._.o....._.o */
$"0000 02DF 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"62ED C731 3FE5 3230 0004 0000 0000 0000" /* b..1?.20........ */
$"0000 A933 73B5 A933 73B5 A900 0533 005C" /* ...3s..3s....3.\ */
$"1376 0000 000A 0001 2653 7570 6572 4D61" /* .v......&SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C56 6964 656F BA41 5449 BA00" /* .DeclVideo.ATI.. */
$"0E43 6872 6973 2050 6574 6572 7365 6E00" /* .Chris Petersen. */
$"0131 0008 4154 4948 6472 2E61 0000 0000" /* .1..ATIHdr.a.... */
$"1066 6972 7374 2063 6865 636B 6564 2069" /* .first checked i */
$"6E00" /* n. */
};

View File

@ -0,0 +1,87 @@
;
; File: ATIPrimaryInit.a
;
; Contains: xxx put contents here xxx
;
; Written by: xxx put writers here xxx
;
; Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
;
; Change History (most recent first):
;
; <1> 11/5/93 fau first checked in
; <1> 10/27/93 fau first checked in
; <1> 10/19/93 fau first checked in
;
;
;--------------------------------------------------------------------------
;start
;
;Name: PrimaryInit.a
;Creator: George D. Wilson Jr.
;Date: 8/10/93
;
;Purpose: Does the jump into the high C PrimaryInit code.
;
;Category: INIT Point.
;File: PrimaryInit.a
;
;Calls: REALMAIN
;
;Entry: a0 - Pointer to slot exec parameter block.
;
;Alters: See high level code for alters.
;
;Detailed: This entry point pushes the slot exec parameter block
; onto the stack and jumps to the high level C. It upon
; returning from the C routine simply returns with an rts.
;
;History:
;
; Date Programmer Modification
; -------- ---------- -----------------------------------------
;
;stop
;------------------------------------------------------------------------*/
;--------------------------------------------------------------------------
;
; Includes
;
;------------------------------------------------------------------------*/
INCLUDE 'ROMEqu.a' ;Declaration ROM equates
INCLUDE 'Slots.a' ;Declaration ROM equates
;--------------------------------------------------------------------------
;
; Main Entry Point
;
;------------------------------------------------------------------------*/
Begin MAIN EXPORT
IMPORT REALMAIN
DC.B sExec2
DC.B sCPU68020
DC.W 0
DC.L theCode-* ; Offset to executable
theCode
WITH SEBlock,SpBlock
move.l a0,-(sp) ; Move the SEBlock on stack
jsr REALMAIN ; Call high level C code
addq.l #4,sp ; Drop arguments
rts
ENDP
END
;--------------------------------------------------------------------------
;
; End of Module
;
;------------------------------------------------------------------------*/

View File

@ -0,0 +1,25 @@
data 'MPSR' (1005) {
$"0009 4D6F 6E61 636F 0004 0490 0006 210C" /* ..Monaco......!. */
$"000A 004D 006A 0058 0227 0000 002C 0227" /* ...M.j.X.'...,.' */
$"0000 0006 0004 00C0 00CB 0269 0379 00C0" /* ...........i.y.. */
$"00CB 0269 0379 A8BC 250C 0000 0508 0000" /* ...i.y..%....... */
$"0508 0000 040C 0100" /* ........ */
};
data 'MPSR' (1008) {
$"00C0 00CB 0269 0379 00C0 00CB 0269 0379" /* .....i.y.....i.y */
$"0000 040C 0000 0000 0000 0000 0000" /* .............. */
};
data 'ckid' (128, "Projector") {
$"4CD3 7E10 3FE5 3230 0004 0000 0000 0000" /* L.~.?.20........ */
$"0000 A933 73B5 A933 73B5 A900 0533 005C" /* ...3s..3s....3.\ */
$"1376 0000 000B 0001 2653 7570 6572 4D61" /* .v......&SuperMa */
$"7269 6F50 726F 6ABA 4465 636C 4461 7461" /* rioProj.DeclData */
$"BA44 6563 6C56 6964 656F BA41 5449 BA00" /* .DeclVideo.ATI.. */
$"0E43 6872 6973 2050 6574 6572 7365 6E00" /* .Chris Petersen. */
$"0131 0010 4154 4950 7269 6D61 7279 496E" /* .1..ATIPrimaryIn */
$"6974 2E61 0000 0000 1066 6972 7374 2063" /* it.a.....first c */
$"6865 636B 6564 2069 6E00" /* hecked in. */
};

View File

@ -0,0 +1,546 @@
/*
File: ATIPrimaryInit.c
Contains: xxx put contents here xxx
Written by: xxx put writers here xxx
Copyright: © 1993 by Apple Computer, Inc., all rights reserved.
Change History (most recent first):
<1> 11/5/93 fau first checked in
<1> 10/27/93 fau first checked in
<1> 10/19/93 fau first checked in
*/
/*-------------------------------------------------------------------------
*start
*
*Name: PrimaryInit.c
*Creator: George D. Wilson Jr.
*Date: 4/23/92
*
*Purpose: Main interface file for ATI video driver primary init.
*
*Category: Macintosh driver
*File: PrimaryInit.c
*
*Exports: main - Main entry point for primary init.
*
*Detailed:
*
*Note:
*
*History:
*
* Date Programmer Modification
* -------- ---------- -----------------------------------------
*
*stop
*-----------------------------------------------------------------------*/
/*-------------------------------------------------------------------------
*
* Includes
*
*-----------------------------------------------------------------------*/
#include <Types.h>
#include <Video.h>
#include <Devices.h>
#include <Errors.h>
#include <OSUtils.h>
#include <Slots.h>
#include <Memory.h>
#include "ATIStdTypes.h"
#include "ATI.h"
#include "ATIDrvr.h"
#include "ATIVideo.h"
/*-------------------------------------------------------------------------
*
* Imported Procedures
*
*-----------------------------------------------------------------------*/
extern void PruneMonitors(UInt16 cardType, UInt8 theSlot);
extern UInt16 GetRowBytes(UInt8 monitorID, UInt8 videoMode, UInt8 theSlot);
extern UInt16 GetNumLines(UInt8 monitorID, UInt8 videoMode, UInt8 theSlot);
extern void DoProgramTiming(UInt32 slotNum, Ptr baseAddr, UInt8 monitorID,
UInt8 videoMode, UInt8 ourSlot, UInt16 rowBytes,
Boolean enableInterrupts);
extern void DoEnableVideo(UInt32 theSlot);
/*-------------------------------------------------------------------------
*start
*
*Name: SenseLineCheck
*Creator: George D. Wilson Jr.
*Date: 5/21/92
*
*Purpose: Returns the currently connected monitor code.
*
*Category:
*File: PrimaryInit.c
*
*Calls:
*
*Called By:
*
*Entry:
*
*Alters:
*
*Exit: UInt8 - Returns the sRsrc id of the monitor family connected.
*
*Detailed:
*
*Algorithm:
*
*Note:
*
*History:
*
* Date Programmer Modification
* -------- ---------- -----------------------------------------
* 9/28/93 George W. Added default return of 13" display.
*
*stop
*-----------------------------------------------------------------------*/
UInt8
SenseLineCheck(UInt32 theSlot)
{
UInt32 *SenseRegPtr;
UInt32 senseLineVal1,senseLineVal2,senseLineVal3;
// DebugStr("\pSenseLineCheck");
return(kRGB1312Connected); // ••• ATI hack
SenseRegPtr = (UInt32 *) (theSlot | kATISenseLineBase);
senseLineVal1 = *SenseRegPtr; // Read the sense lines
senseLineVal1 &= kSenseLineMask; // Mask off the sense line bits
senseLineVal1 >= kSenseLineShift;
switch ( senseLineVal1 ) {
case kMonitorNotConnected:
*SenseRegPtr = (kSenseLineAMask); // Set all lines to ones
// *SenseRegPtr = (kSenseLinesReg); // Causes sense lines to be read
senseLineVal1 = *SenseRegPtr; // Read the sense lines
senseLineVal1 &= kSenseLineMask; // Mask off the sense line bits
senseLineVal1 >= kSenseLineShift; // Move bits to bottom
*SenseRegPtr = (kSenseLineBMask); // Set all lines to ones
// *SenseRegPtr = (kSenseLinesReg); // Causes sense lines to be read
senseLineVal2 = *SenseRegPtr; // Read the sense lines
senseLineVal2 &= kSenseLineMask; // Mask off the sense line bits
senseLineVal2 >= kSenseLineShift; // Move bits to bottom
*SenseRegPtr = (kSenseLineCMask); // Set all lines to ones
// *SenseRegPtr = (kSenseLinesReg); // Causes sense lines to be read
senseLineVal3 = *SenseRegPtr; // Read the sense lines
senseLineVal3 &= kSenseLineMask; // Mask off the sense line bits
senseLineVal3 >= kSenseLineShift; // Move bits to bottom
if ( (senseLineVal1 == kSenseLineAMask) &&
(senseLineVal2 == kSenseLineBMask) &&
(senseLineVal3 == kSenseLineCMask) ) {
return(kMonitorNotConnected);
}
if ( (senseLineVal1 == k16SenseACode) &&
(senseLineVal2 == k16SenseBCode) &&
(senseLineVal3 == k16SenseCCode) ) {
return(kRGB16Connected);
}
return(kMonitorNotConnected);
break;
case kRGB1312:
return(kRGB1312Connected);
break;
default: return(kMonitorNotConnected);
}
} /* End of SenseLineCheck */
void RampCLUT (UInt8 devID, UInt16 cardType)
{
UInt32 i;
UInt8 *clutAddrReg;
UInt8 *clutData;
// UInt32 dummy;
// DebugStr("\pRampClut");
IOLongWrite(0xF2800000, (devID << 12) | 4);
*(unsigned char *)(0xF2C00000) = 0x3;
PerformPCIHack();
if (cardType == kATIVendorID) {
clutAddrReg = (UInt8 *) kDAC_W_INDEX;
clutData = (UInt8 *) kDAC_DATA; // Point to data register
*clutAddrReg = 0; // Point to the first entry
PerformPCIHack();
for ( i = 0; i < 256; i++ ) {
*clutData = kGrayCLUTValue;
PerformPCIHack();
*clutData = kGrayCLUTValue;
PerformPCIHack();
*clutData = kGrayCLUTValue;
PerformPCIHack();
}
}
if (cardType == kDiamondVendorID) {
unsigned char *writeReg;
unsigned char *dataReg;
writeReg = (unsigned char *)(0xF20003C8); // kRamWrite
dataReg = (unsigned char *)(0xF20003C9); // kPaletteData
*writeReg = 0;
PerformPCIHack();
for (i = 0; i < 256; i++) {
*dataReg = (unsigned char)i; // red
PerformPCIHack();
*dataReg = (unsigned char)i; // green
PerformPCIHack();
*dataReg = (unsigned char)i; // blue
PerformPCIHack();
}
}
IOLongWrite(0xF2800000, (devID << 12) | 4);
*(unsigned char *)(0xF2C00000) = 0x2;
PerformPCIHack();
} /* End of RampClut */
/*-------------------------------------------------------------------------
*start
*
*Name: GrayPage
*Creator: George D. Wilson Jr.
*Date: 3/30/92
*
*Purpose:
*
*Category:
*File: PrimaryInit.c
*
*Calls:
*
*Called By:
*
*Entry:
*
*Alters:
*
*Exit:
*
*Detailed:
*
*Algorithm:
*
*Note:
*
*History:
*
* Date Programmer Modification
* -------- ---------- -----------------------------------------
*
*stop
*-----------------------------------------------------------------------*/
OSErr GrayPage(Ptr baseAddr, UInt16 rowBytes, UInt8 depth, UInt16 numLines)
{
UInt32 grayPattern;
UInt32 numWrites;
Ptr linePtr;
UInt32 *dumbPtr;
UInt16 i,j;
#if 0
Ptr myPtr;
UInt16 k, huh, huh1;
#endif
// DebugStr("\pGrayPage");
switch ( depth ) {
case 1: grayPattern = kOneBitPattern; break;
case 2: grayPattern = kTwoBitPattern; break;
case 4: grayPattern = kFourBitPattern; break;
case 8: grayPattern = kEightBitPattern; break;
case 16: grayPattern = kSixTeenBitPattern; break;
case 32: grayPattern = kThirtyTwoBitPattern; break;
}
numWrites = rowBytes / 4;
linePtr = (Ptr) baseAddr;
if ( depth == 32 ) {
for ( i = 0; i < numLines; i++ ) {
dumbPtr = (UInt32 *) linePtr;
for ( j = 0; j < numWrites; j++ ) {
*dumbPtr++ = grayPattern;
grayPattern = ~grayPattern;
}
linePtr += rowBytes;
grayPattern = ~grayPattern;
}
} else {
for ( i = 0; i < numLines; i++ ) {
dumbPtr = (UInt32 *) linePtr;
for ( j = 0; j < numWrites; j++ ) {
*dumbPtr++ = grayPattern;
}
linePtr += rowBytes;
grayPattern = ~grayPattern;
}
}
// code to dump the DACs into the frame buffer.
// 16x16 rectangles each with a different pixel value.
#if 0
huh = 0;
for (i = 0; i < numLines; i++) {
linePtr = (Ptr) baseAddr + (i * rowBytes);
myPtr = linePtr;
huh1 = huh;
for (j = 0; j < 16; j++) {
for (k = 0; k < 40; k++) {
*myPtr = huh1;
myPtr++;
}
huh1++;
}
if (i % 30 == 0 && i > 0) {
huh += 16;
}
}
#endif
return(noErr);
} /* End of GrayPage */
void CalcSlotBaseAddr (UInt8 slot, UInt32 *baseAddr32, UInt32 *baseAddrFB32)
{
UInt8 slotNum;
slotNum = slot;
*baseAddr32 = ((UInt32) (0x0F0 | slotNum) << 24);
*baseAddrFB32 = (UInt32) ((0x0F00 | (slotNum << 4) | slotNum) << 20);
}
/*-------------------------------------------------------------------------
*start
*
*Name: REALMAIN
*Creator: George D. Wilson Jr.
*Date: 5/21/92
*
*Purpose: Main entry point for the ATI primary init.
*
*Category: Entry Point
*File: PrimaryInit.c
*
*Calls:
*
*Called By:
*
*Entry:
*
*Alters:
*
*Exit: UInt8
*
*Detailed:
*
*Algorithm:
*
*Note:
*
*History:
*
* Date Programmer Modification
* -------- ---------- -----------------------------------------
* 5/21/92 George W. Added sense line logic.
*
*stop
*-----------------------------------------------------------------------*/
void REALMAIN (SEBlock *aSEBlockPtr)
{
Ptr baseAddr=0;
Ptr baseAddrFB;
UInt16 rowBytes;
UInt32 slotNum;
UInt8 slot;
UInt8 mmuMode;
UInt8 theMonitorID;
SpBlock spPb;
OSErr err;
SPRAMRecord sPRAM;
UInt8 videoMode=0;
UInt16 numLines;
UInt16 depth;
UInt16 cardType;
mmuMode = true32b;
SwapMMUMode(&mmuMode);
slot = aSEBlockPtr->seSlot; // Get out slot number
slotNum = kMySuperSlot;
#if 0
PruneMonitors(theMonitorID,slot);
if ( (theMonitorID < kRGB1312Connected) ||
(theMonitorID > kRGB16Connected) ) { // We only support 13"
aSEBlockPtr->seStatus = -1;
return; // All done get out
}
// CalcSlotBaseAddr(slot,&baseAddr,&baseAddrFB);
baseAddr = (Ptr) (kBaseAddress | kMySuperSlot);
baseAddrFB = (Ptr) (kBaseAddress | kMySlot | 0xF0000000);
videoMode = kFirstVideoMode;
spPb.spSlot = slot;
spPb.spResult = &sPRAM;
err = SReadPRAMRec(&spPb);
if ( err == noErr ) { // Did we get our PRAM?
if ( sPRAM.vendorUse4 != theMonitorID ) { // Is this the same monitor as last time?
sPRAM.vendorUse4 = theMonitorID; // No save the monitor ID
spPb.spsPointer = (Ptr) &sPRAM; // Heres the PRAM record to save
err = SPutPRAMRec(&spPb); // Save it for ever
} else { // Yes
if ( (sPRAM.vendorUse1 >= kFirstVideoMode) || // Range check mode value
(sPRAM.vendorUse1 >= kFifthVideoMode) ) {
videoMode = sPRAM.vendorUse1; // If mode value is funny save default.
}
}
}
rowBytes = GetRowBytes(theMonitorID,videoMode,slot);
numLines = GetNumLines(theMonitorID,videoMode,slot);
DoProgramTiming(kMySuperSlot,(Ptr) kBaseAddress,
theMonitorID,videoMode,slot, rowBytes,false);
depth = GetBitDepth(theMonitorID,videoMode,slot);
GrayPage(baseAddrFB,rowBytes,8,numLines);
RampCLUT();
DoEnableVideo(slotNum);
#else
//====================================================
// New funky code for ATI card
//====================================================
slot = FindPCICard(&cardType); // Search some slots for ATI
if ( slot == 0x00 ) {
aSEBlockPtr->seStatus = -1;
return; // All done get out
}
err = EnableIOAccess(slot, true, cardType);
if ( err != noErr ) {
aSEBlockPtr->seStatus = -1;
return; // All done get out
}
{
OSErr err;
SpBlock spPb;
char *p;
short i;
p = (char *) &spPb;
for ( i = 0; i < sizeof(SpBlock); i++ ) *p++ = 0;
spPb.spSlot = 0x00;
if ( cardType == kATIVendorID) { // look for ATI
spPb.spID = 0x90; // id of board sRsrc to delete
}
if ( cardType == kDiamondVendorID) { // look for Diamond
spPb.spID = 0x80; // The id of the board sRsrc
}
err = SDeleteSRTRec(&spPb);
}
theMonitorID = SenseLineCheck(slotNum);
if ( theMonitorID == kNoMonitorConnected ) { // No monitor
aSEBlockPtr->seStatus = -1;
return; // All done get out
}
videoMode = kFirstVideoMode;
spPb.spSlot = slot;
spPb.spResult = &sPRAM;
#if 0
err = SReadPRAMRec(&spPb);
if ( err == noErr ) { // Did we get our PRAM?
if ( sPRAM.vendorUse4 != theMonitorID ) { // Is this the same monitor as last time?
sPRAM.vendorUse4 = theMonitorID; // No save the monitor ID
spPb.spsPointer = (Ptr) &sPRAM; // Heres the PRAM record to save
err = SPutPRAMRec(&spPb); // Save it for ever
} else { // Yes
if ( (sPRAM.vendorUse1 >= kFirstVideoMode) || // Range check mode value
(sPRAM.vendorUse1 >= kFifthVideoMode) ) {
videoMode = sPRAM.vendorUse1; // If mode value is funny save default.
}
}
}
#endif
if (cardType == kATIVendorID) {
UInt32 data;
UInt16 *ioReg;
ioReg = (UInt16 *) kMEM_CFG; // Memory config IO register
data = WByteSwap(*ioReg); // Get existing data
data |= (kATIVRAMAddr >> 16) | k4MegAperture; // Set the VRAM base address
data &= 0x0000FFFF;
*ioReg = WByteSwap(data); // Write new stuff
PerformPCIHack();
ioReg = (UInt16 *) kLOCAL_CNTL; //
*ioReg = WByteSwap(0x00A2); // Write new stuff
PerformPCIHack();
baseAddr = (Ptr) kATIVRAMAddr; // should equal kDiamondFBBase
baseAddrFB = (Ptr) kATIVRAMAddr;
depth = 8; // Default for now is 8bpp
rowBytes = 1024;
numLines = 480;
GrayPage(baseAddrFB,rowBytes,depth,numLines);
RampCLUT(slot,kATIVendorID);
SlamRegisters(slot);
}
else {
baseAddr = (Ptr) kDiamondFBBase; // should equal kATIVRAMAddr
baseAddrFB = (Ptr) kDiamondFBBase;
depth = 8; // Default for now is 8bpp
rowBytes = 640;
numLines = 480;
GoDiamond640x480x8Apple(slot);
GrayPage(baseAddrFB,rowBytes,depth,numLines);
}
#endif
aSEBlockPtr->seStatus = noErr;
SwapMMUMode(&mmuMode);
}

Some files were not shown because too many files have changed in this diff Show More