// ORBIT definitions
// Indices into microcode function dispatch.

manifest [
fControl=0
fOrbitData=1
fHeight=2
fXY=3
fDBCWID=4
fFontData=5
fDWC=6
fInk=7
fDBCWIDIn=8
fROSCommand=9
fReadBlock=10
fCharacter=11
fSlot=12
fOneBand=13
fROSStatus=14
fStatus=400//Really a nop in microcode
]


// First 3 bits are not reported by hardware, but are inserted by
// the microcode.

structure STATUS[
IACS bit 1
timeout bit 1
stableROSword bit 1
prematurePageAbort bit 1 // Orbit was behind when SendVideo disappeared
invalidBandEntry bit 1 // Microcode encountered unimplemented band "opcode"
blank bit 3
badROS bit 1
incon bit 1
stableROS bit 1
behind bit 1
ROSStatus bit 4 =
[
ROSStatusBit0 bit
ROSStatusBit1 bit
ROSStatusBit2 bit
ROSStatusBit3 bit
]
]

structure CONTROL[
FA bit 8
slotTakeEnable bit 1
slotTake bit
blank bit
clrBehind bit
goAway bit
which bit
clrFresh bit
reset bit
]

// Adapter definitions

structure ROSCMD[
command bit 4
value bit 12 =
[
bitScale bit 3
motorScale bit 3
extendVideo bit
spare bit
testPageSync bit
commandLocal bit
commandBeamOn bit
testMode bit
]
]

structure ROSSTATUS[
sendVideo bit
printMode bit
local bit
beamEnable bit
statusBeamOn bit
spare1 bit 11

lastCommand word

videoPolarity bit
bitScale bit 3
bitBlock bit 12

selectLeadEdge bit
motorScale bit 3
motorSpeed bit 12

switch3 bit
spare2 bit
extendVideo bit
testPageSync bit
lineSyncDelay bit 12

switch4 bit
commandLocal bit
commandBeamOn bit
testMode bit
pageSyncDelay bit 12

lineNoise bit
compareError bit
bufferUnderflow bit
packetsOK bit
externalCommand1 bit 12

lineCount bit 4
videoGate bit 12

specialStatus1 word
specialStatus2 word
id word
sn word
]

manifest [
// Adapter control commands
adBufferReset=0
adSetScales=#10010//Note inverted polarity of test page sync
adCommandBeamOn = 2// Used in conjunction with adSetScales
adBitClock=#20000
adMotorSpeed=#30000
adLineSyncDelay=#40000
adPageSyncDelay=#50000
adVideoGate=#70000
adExternalCommand1=#60000
adExternalCommand2=#70000
]

// DCS, October 16, 1977 3:59 PM, add "prematurePageAbort", "invalidBandEntry" firmware orbit status bits
// April 17, 1978 5:00 PM, add adCommandBeam On
//