//routemwlbholes.bcpl

// Board-specific Route extra-hole routines for the Multi-Wire version of the
// Dorado Main Logic Board

// last modified by E. McCreight, May 10, 1979 9:33 PM
// to correct VDD/VTT bus bar wiring reversal

get "route.defs"

external [ Pin1of16 ]

static [ boardInterfaceVersion = interfaceVersion ]


let ComputeMWCoords(px, py, isMils) be
[
unless isMils do
[
@px = 25*@px
@py = 25*@py
]

// The board,
// viewed in standard orientation with a01 at top left and l01 at top
// right, is described with y increasing upward and x increasing
// to the right and the 0,0 origin at bottom left off the board.

@px = 1100+@px
// offset the x co-ordinate by 1.1 inches
@py = 14400-@py
// reverse the y co-ordinate and offset 14.4 inches

// Location a01 pin 1 is now at x=2000, y=14000

@px = @px+25-((@px+25) rem 50) // round to nearest on-grid point
@py = @py+25-((@py+25) rem 50)
]

and DescribeHoles(PrintAHole) be
[
manifest [ plated = true; unplated = not plated ]
manifest
[
socketHoleSize = 41 // mils, after plating & solder coat
screwHoleSize = 144 // mils, unplated
]
manifest [ leftBusBarCenterx = -14; rightBusBarCenterx = 488 ]

let x,y = nil,nil

for x=0 to 599 do for y=0 to 599 do if FindIndexFromCoord(x,y) ne 0 then
[
let class,pin = empty,0
FindIndexFromCoord(x, y, lv class, lv pin)
PrintAHole(x, y, socketHoleSize, plated, false, class ne empty)
]

for row=0 to 11 do
PrintAHole(rightBusBarCenterx-10, 28+42*row, socketHoleSize, plated, false, true)
// VDD strip feed-thru holes

for row=0 to 11 do
PrintAHole(leftBusBarCenterx+10, 34+42*row, socketHoleSize, plated, false, true)
// VTT strip feed-thru holes

for x=leftBusBarCenterx to rightBusBarCenterx by (rightBusBarCenterx-leftBusBarCenterx) do
[
for row=0 to 1 do for hole = 0 to 1 do
PrintAHole(x-2+hole*4, row*524, socketHoleSize, plated, false, true)
// power bus feed-thru holes

for row=0 to 2 do
PrintAHole(x, 16+row*246, screwHoleSize, unplated, false, true)
// bus bar mounting screws
]
]