shoebill/core/ethernet_rom/shoebill_ether_rom.a
name fd31d642b0 Lots of new ethernet-related code (doesn't work yet)
The board is basically implemented. It's just a dummy slot ROM
with no driver or primary/secondary init, that looks enough
like the Apple EtherTalk card. The DP8390 controller chip
has its address space implemented, and some of its registers
work. Lots more work to do on that

With slog() tracing enabled, you can see A/UX try to send a
multicast ethernet frame, then give up waiting for some kind
of response from the chip, then decide that the ethernet
controller is dead and print an error to console
2014-08-27 19:37:26 -04:00

1 line
2.4 KiB
Plaintext
Executable File

MACHINE MC68020
STRING C
PRINT OFF ; What does this do?
INCLUDE 'SysErr.a'
INCLUDE 'SysEqu.a'
INCLUDE 'ROMEqu.a'
INCLUDE 'SlotEqu.a'
INCLUDE 'TimeEqu.a'
INCLUDE 'Traps.a'
INCLUDE 'VideoEqu.a'
INCLUDE 'QuickEqu.a'
PRINT ON
VideoDeclROM MAIN
WITH VDPageInfo,SlotIntQElement
; EtherAddr is placed here, before sResourceDir and out of the range of the CRC
; check, because I guess it was too difficult to recompute the CRC when they were
; burning EPROMs back in 1986.
; So there's some ugly offset-accounting to make the rom seem (4096-8) bytes long,
; but still access this MAC address.
myEtherAddr
dc.l 'woof'
dc.l 'woof'
FormatBlockSize EQU 20
ROMSize EQU 4096
MyBoardID EQU $0008 ; Apple EtherTalk board ID
; ---- sResource directory ----
CategoryBoard EQU 1
CategoryEther EQU 128
sResourceDir OSLstEntry CategoryBoard, sResourceBoard
OSLstEntry CategoryEther, sResourceEther
DatLstEntry endOfList,0
; ---- Board sResource ----
sResourceBoard
OSLstEntry sRsrcType, boardType
OSLstEntry sRsrcName, boardName
DatLstEntry boardID, MyBoardID
OSLstEntry vendorInfo, myVendorInfo
; No primary or secondary init needed (phew)
DatLstEntry endOfList, 0
boardType
DC.W CatBoard ; category
DC.W TypBoard ; type
DC.W 0 ; driver sw ?
DC.W 0 ; driver hw ?
STRING C
boardName DC.L 'Shoebill Phony Ethernet'
myVendorInfo OSLstEntry VendorId, myVendorID
OSLstEntry RevLevel, myRevLevel
OSLstEntry PartNum, myPartNum
myVendorID DC.L 'Shoebill'
myRevLevel DC.L 'Rev-1'
myPartNum DC.L 'Bort'
; ---- Ethernet sResource ----
sResourceEther
OSLstEntry sRsrcType, myEtherType
OSLstEntry sRsrcName, myEtherName
OSLstEntry MinorBaseOS, myMinorBaseOS
dc.w $80ff ; 80 -> MAC address, $FFFFxx relative address of the MAC address
dc.w -*+2
DatLstEntry endOfList, 0
myEtherType
dc.w CatNetwork
dc.w TypEtherNet
dc.w 0 ; drvrSw, doesn't matter
dc.w 1 ; drvrHw, this is DrHw3Com on Apple EtherTalk
myEtherName
dc.l 'Network_Ethernet_Shoebill'
myMinorBaseOS DC.L $D0000
STRING C
; ---- Format block ----
; Pad to align this structure with the end of the rom
ORG ROMSize-FormatBlockSize
; Offset to sResource directory
;OSLstEntry 0,sResourceDir
DC.L (sResourceDir-*)**$00FFFFFF
DC.L ROMSize-8
DC.L 0 ; CRC goes here
DC.B 1 ; Rom revision level
DC.B AppleFormat
DC.L TestPattern
DC.B 0 ; Reserved
DC.B $A5 ; Byte lanes 1010 0101 (LSB from CPU's perspective)
ENDP
END