Initialize_Hard_Soft IDNT ; Title of Initialize Hardware ; and Software SECTION Sect_Initialize_Hard_Soft,4,C ; Declare a noncommon code ; section. Align to Longwords. *************************************************************************** * * * Initialize Hardware and Software Rev. 2-FEB-1994 * *************************************************************************** *************************************************************************** * * * Initialize all of the MVME-214 Memory to all zeros (32k bytes). * * This is for both VME buffers of MVME-214's i.e. C1,C2,V1,V2. * * The "C" type buffers and the Short I/O memory are provided by * * two Fancy-214 memory cards. * * Leave the buffers set in the C1L, V1L, C2R, V2R select state. * * Initialize all of the SHORT IO 214 Memory to all zeros (2k bytes). * * Initialize the Ironics I/O registers. * * Slave Ready to HIGH, Data Cable Driver Finished to LOW. * * Initialize the VBD. * * Un-Lock the CSR block load DMA time-out. * * Load the Crate Type. * * Load the Event Number Address. * * Load the Crate ID Address. * * Load the D Control Register, the format for data reads. * * Load the P Control Reg., the format for parameter reads. * * Load the I/O Address high order bits. * * Load the VBD withthe pointer list to the Word Counts. * * Load the Word Counts into their Short IO storage locations. * * Load the VBD with the list of data block Base Addresses. * * Initialize the VBD (continued). * * Reset the VBD (make these parameters active). * * Lock the VBD parameters and load DMA time-out. * * Build words #2, #3, and #4 of the Crate Header and Display * * the Crate ID, the Version Number and the Rivision Numbers. * * Initialize the VBD Last Used Buffer Register to VBD Buffer 0. * * Clear any old COMINT Slave Ready requests by pulsing the * * Data Cable Driver signal line high and then low twice. * * Display an Initialization Complete message. * * * *************************************************************************** ************************************************************************* * This sections calls all of the include files. * * * * 68020_EQUATES.INC defines macros to be used to call MVME133ABUG ROM. * ************************************************************************* INCLUDE 68020_EQUATES.INC ; Get the MVME133A BUG ROM Calls. INCLUDE VTC_Version_Number.SRC ; Get the Version Number data. INCLUDE VTC_Revision_Number.SRC ; Get the Revision Number data. ************************************************************************* * This section defines program-specific macros: * * * * WrIO: Write bit(s) to the IRONICS I/O card * * SoftWait: Software delay timer for short waits * * * ************************************************************************* WrIO MACRO ; Write byte to Ironics I/O Port. NOT.B \1 ; Complement data byte \1. MOVE.B \1,\2 ; Move to Ironics port at adrs \2. ENDM SoftWait MACRO ; Software timer loop. LOCAL WaitMore ; Define a local symbol. MOVE.L \1,D4 ; Load delay time \1 into D4. WaitMore SUBI.L #1,D4 ; Decrement loop counter. BNE WaitMore ; Test for end of delay. ENDM ; Called with an argument ; of $1000 and with cashe off causes a delay of about 4 ; mill seconds, with cashe on the delay is 2.4 mill sec. ************************************************************************* * * * Initialize all of the MVME-214 VMX-VME Memory to be all zeros. * * * * This will zero all four of the MVME-214 VME Buffers; C1,C2,V1,V2. * * First set the Ironics Port #5 to select C1R,V1R,C2L,V2L. * * Then select buffers; C1L,V1L,C2R,V2R. Leave the buffer select * * in this state as this is how the Cycle_Master will expect to * * find it. * * Clear both the "C" Type MVME-214's that are used by the Pilot * * COMINT and the "C" Type MVME-214's that are used by the * * Assistant COMINT. * * Sometime in the future, the "C" type buffers are provided by two * * Fancy-214 cards which also provide the Short I/O memory. * ************************************************************************* Begin_Initialize_Hard_Soft NOP ; Initialize Hard Soft Entry Point Move.B #$EA,Ironics_Port_5 ; $EA is the invers of $15, i.e. ; buffers C1R,C3R,V1R, C2L,C4L,V2L. MoveA.L #TrgBuffer,A0 ; Clear the Pilot COMINT type MVME-214. FOR.L D7 = #TrgBuffer TO #TrgBuffer+$7FFC BY #4 DO.S CLR.L (A0)+ ENDF ; Clear the MVME-214 VMX-VME Memory Module. MoveA.L #TrgBuffer+$20000,A0 ; Clear the Assistant "C" type 214. FOR.L D7 = #TrgBuffer+$20000 TO #TrgBuffer+$20000+$7FFC BY #4 DO.S CLR.L (A0)+ ENDF ; Clear the MVME-214 VMX-VME Memory Module. MoveA.L #Vert214Buf,A0 ; Clear the Vertical type MVME-214. FOR.L D7 = #Vert214Buf TO #Vert214Buf+$7FFC BY #4 DO.S CLR.L (A0)+ ENDF ; Clear the Vetical Interconnect ; MVME-214 Memory Module. Move.B #$D5,Ironics_Port_5 ; $D5 is the invers of $2A, i.e. ; buffers C1L,C3L,V1L, C2R,C4R,V2R. MoveA.L #TrgBuffer,A0 ; Clear the Pilot COMINT type MVME-214. FOR.L D7 = #TrgBuffer TO #TrgBuffer+$7FFC BY #4 DO.S CLR.L (A0)+ ENDF ; Clear the MVME-214 VMX-VME Memory Module. MoveA.L #TrgBuffer+$20000,A0 ; Clear the Assistant "C" type 214. FOR.L D7 = #TrgBuffer+$20000 TO #TrgBuffer+$20000+$7FFC BY #4 DO.S CLR.L (A0)+ ENDF ; Clear the MVME-214 VMX-VME Memory Module. MoveA.L #Vert214Buf,A0 ; Clear the Vertical type MVME-214. FOR.L D7 = #Vert214Buf TO #Vert214Buf+$7FFC BY #4 DO.S CLR.L (A0)+ ENDF ; Clear the Vetical Interconnect ; MVME-214 Memory Module. ************************************************************************* * * * Initialize all of the Short I/O Memory to be all zeros. * * * * The Short I/O memory is on two Fancy-214 cards. These Fancy-214's * * also provide the "COMINT" memory i.e. the "C" type memory. * * Because there are two of the Fancy-214's we need to zero both of * * them. First set the Ironics Port #5 to select C1R,V1R,C2L,V2L. * * Then select buffers; C1L,V1L,C2R,V2R. Leave the buffer select in * * this state as this is how the Cycle_Master will expect to find it. * ************************************************************************* Move.B #$EA,Ironics_Port_5 ; $EA is the invers of $15, i.e. ; buffers C1R,C3R,V1R, C2L,C4L,V2L. MoveA.L #IOMemBase+$FFFF0000,A0 FOR.L D7 = #IOMemBase+$FFFF0000 TO #IOMemBase+$FFFF07FE BY #2 DO.S CLR.W (A0)+ ENDF ; Clear the SHORT-214 Memory Module. Move.B #$D5,Ironics_Port_5 ; $D5 is the invers of $2A, i.e. ; buffers C1L,C3L,V1L, C2R,C4R,V2R. MoveA.L #IOMemBase+$FFFF0000,A0 FOR.L D7 = #IOMemBase+$FFFF0000 TO #IOMemBase+$FFFF07FE BY #2 DO.S CLR.W (A0)+ ENDF ; Clear the SHORT-214 Memory Module. ************************************************************************* * * * Initialize the IRONICS card Slave Ready HI and DCDr Finished LOW. * * * ************************************************************************* Move.B #$33,D0 ; Initialize the Ironics port that WrIO D0,Ironics_Port_3 ; reads Slave Ready and Start Jet ; List to $33, i.e. 00110011 ; to allow reading both the Pilot ; and the Assistant SlvRdy & SJL. Move.B #AllBitsLow,D0 ; Initialize the Ironics Port that WrIO D0,Ironics_Port_2 ; sends out the DCDr Finished to ; $00 i.e set DCDr Finished to ; low for both Pilot and Assistant ; COMINT cards. ************************************************************************* * * * Initialize all of the Trouble Warning Bits to indicate NO trouble * * and send them out their Ironics Port. * * * ************************************************************************* CLR.L TWBData ; Initialize the Trouble Warning Move.B TWBData,D0 ; Bits to all indicate no trouble WrIO D0,TWBPortAdrs ; and send them out the port. ************************************************************************* * * * Initialize the VBD Control Registers. * * * ************************************************************************* Move.W VBDDMATO,VBDCSR0 ; Load the VBD DMA time-out value. Move.W CrateType,CrateTypeReg ; Load the VBD Crate Type Register. Move.W #EvtNmbAdr,EvtNmbAdrReg ; Load pointer to the Event Number. Move.W CrateIDAdrs,CrtIDAdrReg ; Load the pointer to the Crate ID. Move.W DCtrlData,DControlReg ; Load data read format ctrl reg. Move.W PCtrlData,PControlReg ; Load param read format ctrl reg. Move.W IOUPAdrs,IOUPAdrsReg ; Load upper adrs bits for IO reads. ************************************************************************* * * * Load the VBD with the list of the addresses of Word Count storage * * locations in the Short IO Address Space (i.e. the Word Counter * * Pointer List). A null terminates the list. * * * ************************************************************************* Move.L #WCPntList,A3 ; Load address of the start of the. ; VBD Word CNT Pointer list into A3. Move.W #WCStore1,(A3)+ ; Load the pointer to the Header WC. Move.W #WCStore2,(A3)+ ; Load pointer to Current Framework WC. Move.W #WCStore3,(A3)+ ; Load pointer to Current Cal Trig WC. Move.W #WCStore4,(A3)+ ; Load pointer to Previous Framework WC. Move.W #WCStore5,(A3)+ ; Load pointer to Previous Cal Trig WC. Move.W #WCStore6,(A3)+ ; Load pointer to EM Jet List Word Cnt. Move.W #WCStore7,(A3)+ ; Load pointer to Total Et Jet List WC. Move.W #WCStore8,(A3)+ ; Load pointer to CHTCR Jet Masks WC. Move.W #WCStore9,(A3)+ ; Load pointer to TRD Hot Tower Data WC. Move.W #WCStore10,(A3)+ ; Load pointer to Spec Trig Prog Data WC. Move.W #WCStore11,(A3)+ ; Load pointr to Super Tower Jet Patrn WC. Move.W #WCStore12,(A3)+ ; Load pointer to Level 1.5 Data WC. Move.W #WCStore13,(A3)+ ; Load pointer to Absolute Time Data WC. Move.W #WCStore14,(A3)+ ; Load pntr to New L1 & Foreign Scalers WC. Move.W #WCStore15,(A3)+ ; Load pointer to Pulser Progrming Data WC. Move.W #0000,(A3)+ ; Load a null to terminate ; the WC list. Move.W #0000,(A3)+ ; Load a null to terminate ; the WC list. ************************************************************************* * * * Load the Word Counts into their storage locations in the Short IO * * Address Space. VBD will read them from here during its DMA cycles. * * * * The Short I/O memory is on two Fancy-214 cards. These Fancy-214's * * also provide the "COMINT" memory i.e. the "C" type memory. * * Because there are two of the Fancy-214's we need to Load both of * * them. First set the Ironics Port #5 to select C1R,V1R,C2L,V2L. * * Then select buffers; C1L,V1L,C2R,V2R. Leave the buffer select in * * this state as this is how the Cycle_Master will expect to find it. * ************************************************************************* Move.B #$EA,Ironics_Port_5 ; $EA is the invers of $15, i.e. ; buffers C1R,C3R,V1R, C2L,C4L,V2L. MoveA.L #$FFFF0000+WCStore1,A3 ; Short IO Adrs for WC storage location 1. Move.W WCHeader,(A3) ; Store the Header Word Count in it. MoveA.L #$FFFF0000+WCStore2,A3 ; Short IO Adrs for WC storage location 2. Move.W WCCurFrWk,(A3) ; Store the Current FrmWrk Word Cnt in it. MoveA.L #$FFFF0000+WCStore3,A3 ; Short IO Adrs for WC storage location 3. Move.W WCCurCalT,(A3) ; Store the Current Cal Trg Word Cnt in it. MoveA.L #$FFFF0000+WCStore4,A3 ; Short IO Adrs for WC storage location 4. Move.W WCPrvFrWk,(A3) ; Store the Prev FrameWork Word Count in it. MoveA.L #$FFFF0000+WCStore5,A3 ; Short IO Adrs for WC storage location 5. Move.W WCPrvCalT,(A3) ; Store the Prev Cal Trg Word Count in it. MoveA.L #$FFFF0000+WCStore6,A3 ; Short IO Adrs for WC storage location 6. Move.W WCEMJetL,(A3) ; Store the EM Jet List Word Count in it. MoveA.L #$FFFF0000+WCStore7,A3 ; Short IO Adrs for WC storage location 7. Move.W WCTEtJetL,(A3) ; Store the Tot Et Jet List Word Cnt in it. MoveA.L #$FFFF0000+WCStore8,A3 ; Short IO Adrs for WC storage location 8. Move.W WCJetMask,(A3) ; Store the Jet Mask Word Count in it. MoveA.L #$FFFF0000+WCStore9,A3 ; Short IO Adrs for WC storage location 9. Move.W WCTRDHotT,(A3) ; Store the Hot Tower Table Word Cnt in it. MoveA.L #$FFFF0000+WCStore10,A3 ;Short IO Adrs for WC storage location 10. Move.W WCSpTrPrg,(A3) ;Store Spec Trg Programing Word Cnt in it. MoveA.L #$FFFF0000+WCStore11,A3 ;Short IO Adrs for WC storage location 11. Move.W WCSupTowPtrn,(A3) ;Store Supr Tow Jet Ptrn Word Count in it. MoveA.L #$FFFF0000+WCStore12,A3 ;Short IO Adrs for WC storage location 12. Move.W WCL15Data,(A3) ;Store Level 1.5 data Word Count in it. MoveA.L #$FFFF0000+WCStore13,A3 ;Short IO Adrs for WC storage location 13. Move.W WCAbsoTime,(A3) ;Store the Absolute Time Word Count in it. MoveA.L #$FFFF0000+WCStore14,A3 ;Short IO Adrs for WC storage location 14. Move.W WCL1ForScaler,(A3) ;Store L1&Foreign Scaler Word Count in it. MoveA.L #$FFFF0000+WCStore15,A3 ;Short IO Adrs for WC storage location 15. Move.W WCPulser,(A3) ;Store the Pulser Data Word Count in it. Move.B #$D5,Ironics_Port_5 ; $D5 is the invers of $2A, i.e. ; buffers C1L,C3L,V1L, C2R,C4R,V2R. MoveA.L #$FFFF0000+WCStore1,A3 ; Short IO Adrs for WC storage location 1. Move.W WCHeader,(A3) ; Store the Header Word Count in it. MoveA.L #$FFFF0000+WCStore2,A3 ; Short IO Adrs for WC storage location 2. Move.W WCCurFrWk,(A3) ; Store the Current FrmWrk Word Cnt in it. MoveA.L #$FFFF0000+WCStore3,A3 ; Short IO Adrs for WC storage location 3. Move.W WCCurCalT,(A3) ; Store the Current Cal Trg Word Cnt in it. MoveA.L #$FFFF0000+WCStore4,A3 ; Short IO Adrs for WC storage location 4. Move.W WCPrvFrWk,(A3) ; Store the Prev FrameWork Word Count in it. MoveA.L #$FFFF0000+WCStore5,A3 ; Short IO Adrs for WC storage location 5. Move.W WCPrvCalT,(A3) ; Store the Prev Cal Trg Word Count in it. MoveA.L #$FFFF0000+WCStore6,A3 ; Short IO Adrs for WC storage location 6. Move.W WCEMJetL,(A3) ; Store the EM Jet List Word Count in it. MoveA.L #$FFFF0000+WCStore7,A3 ; Short IO Adrs for WC storage location 7. Move.W WCTEtJetL,(A3) ; Store the Tot Et Jet List Word Cnt in it. MoveA.L #$FFFF0000+WCStore8,A3 ; Short IO Adrs for WC storage location 8. Move.W WCJetMask,(A3) ; Store the Jet Mask Word Count in it. MoveA.L #$FFFF0000+WCStore9,A3 ; Short IO Adrs for WC storage location 9. Move.W WCTRDHotT,(A3) ; Store the Hot Tower Table Word Cnt in it. MoveA.L #$FFFF0000+WCStore10,A3 ;Short IO Adrs for WC storage location 10. Move.W WCSpTrPrg,(A3) ;Store Spec Trg Programing Word Cnt in it. MoveA.L #$FFFF0000+WCStore11,A3 ;Short IO Adrs for WC storage location 11. Move.W WCSupTowPtrn,(A3) ;Store Supr Tow Jet Ptrn Word Count in it. MoveA.L #$FFFF0000+WCStore12,A3 ;Short IO Adrs for WC storage location 12. Move.W WCL15Data,(A3) ;Store Level 1.5 data Word Count in it. MoveA.L #$FFFF0000+WCStore13,A3 ;Short IO Adrs for WC storage location 13. Move.W WCAbsoTime,(A3) ;Store the Absolute Time Word Count in it. MoveA.L #$FFFF0000+WCStore14,A3 ;Short IO Adrs for WC storage location 14. Move.W WCL1ForScaler,(A3) ;Store L1&Foreign Scaler Word Count in it. MoveA.L #$FFFF0000+WCStore15,A3 ;Short IO Adrs for WC storage location 15. Move.W WCPulser,(A3) ;Store the Pulser Data Word Count in it. ************************************************************************* * * * Load the VBD with the list of the data block Base Addresses. * * These are the Base Addresses where the VBD will start to read * * during the DMA cycles. * * * ************************************************************************* MoveA.L #DataPntList,A3 ; Load address of the start of the ; VBD Data Pointer list into A3. Move.L BAHeader,(A3)+ ; Load Base Adrs of Crate Header. Move.L BACurFrWk,(A3)+ ; Load Base Adrs of Current Framework. Move.L BACurCalT,(A3)+ ; Load Base Adrs of Current Cal Trig. Move.L BAPrvFrWk,(A3)+ ; Load Base Adrs of Prev Trg Framewrk. Move.L BAPrvCalT,(A3)+ ; Load Base Adrs of Prev Calor Trig. Move.L BAEMJetL,(A3)+ ; Load Base Adrs of the EM Jet List. Move.L BATEtJetL,(A3)+ ; Load Base Adrs of Total Et Jet List. Move.L BAJetMask,(A3)+ ; Load Base Adrs of the Jet Mask. Move.L BATRDHotT,(A3)+ ; Load Base Adrs of TRD Hot Tower Tbl. Move.L BASpTrPrg,(A3)+ ; Load Base Adrs of Spec Trg Progming. Move.L BASupTowPtrn,(A3)+ ; Load Base Adrs of Super Tower Ptrn. Move.L BAL15Data,(A3)+ ; Load Base Adrs of Level 1.5 data. Move.L BAAbsoTime,(A3)+ ; Load Base Adrs of Absolute Time. Move.L BAL1ForScaler,(A3)+ ; Load Base Adrs of L1&Foreign Scaler. Move.L BAPulser,(A3)+ ; Load Base Adrs of Pulser data. ************************************************************************* * * * Lock the VBD Control Memory. * * * ************************************************************************* Move.W VBDReset,VBDCSR0 ; Reset the VBD and its err FIFO. SoftWait #$1000 ; Wait a few mill seconds. Move.W VBDToLock,VBDCSR0 ; Load the VBD DMA time-out value ; and lock the VBD Control Memory. ***************************************************************************** * * * Build words #2, #3 and #4 of the Crate Header. * * These Crate Header words are event to event static. Words #1 * * and #5 are built for each event during the transfer to the VBD. * * * * Crate Header Word 1 Sync Word 2 MSByts Evt Num 2 LSByts of F's * * Crate Header Word 2 Controller Word MSByte is the low byte Crate ID * * Crate Header Word 3 Version Number 4-JAN-1990 Document definition * * Crate Header Word 4 Revision Number defined in D0 Note #967 * * Crate Header Word 5 Specific Triggers Fired list 32 bits * * * * Display these words on the 68k console as they are being built. This * * display is part of the initialization message. * * * * Version Number information for making Crate Header Word #3 is obtained * * from the VBD_VERSION_NUMBER.SRC include file which is called above. * * * * Revision Number information for making Crate Header Word #4 is obtained * * from the VBD_REVISION_NUMBER.SRC include file which is called above. * * * * Crate Header Words #2, #3, and #4 are stored in BOTH "C" type MVME-214 * * memory modules. Display the detailed values of these 3 Crate Header * * words while they are being loaded in the first set of MVME-214's and * * then load these Crate Header words into the second set of MVME-214's. * * * ***************************************************************************** ; Fisrt select MVME-214 buffers. ; and store Crate Header words ; #2, #3, #4 in the first set. Move.B #$EA,Ironics_Port_5 ; $EA is the invers of $15, i.e. ; buffers C1R,C3R,V1R, C2L,C4L,V2L. CLR.L D0 ; Clear D0 it will receive Crate ID. Move.L #DataStack,A5 ; Data Stack for console display. Move.L #$FFFF0000,A3 ; Make the 133A version of the Short Move.W CrateIDAdrs,A3 ; IO Address for the Crate ID card. Move.W (A3),D0 ; Load the Crate ID into Data Reg 0. Move.L D0,(A5)+ ; Store Crate ID as read from Shea's ; brd on the data stack for display. AndI.L #$000000FF,D0 ; Mask off all but Low byte of Crt ID Swap D0 ; Move the low byte of the Crate ID LSL.L #$8,D0 ; into the top byte of data reg D0. Move.L D0,CrtHDWord2 ; Store the Controller word as the ; second word of the Crate Header. Move.L D0,(A5)+ ; Store the Controller word on the ; data stack for display. PEA.L DataStack ; Push the pointer for the data stack. PEA.L DispCrate ; Push the Crate ID message format. SysCall .WRITDLN ; Call the system to output message. Move.L VersNum,CrtHDWord3 ; Store the Version Number in the ; 3rd word of the Crate Header. Move.L #DataStack,A5 ; Data Stack for console display. Move.L VersNum,(A5)+ ; Store the Version Number on the ; data stack for display. PEA.L DataStack ; Push the pointer for the data stack. PEA.L DisVerNum ; Push Version Number message format. SysCall .WRITDLN ; Call the system to output message. CLR.L D0 ; Clear Data Register D0. Move.B VMECPURevNum,D0 ; Load the VME CPU Revision Number. LSL.L #$8,D0 ; SHIFT it to the left 8 places Move.B COMINTPROMRN,D0 ; Load the COMINT PROM Revision Num. LSL.L #$8,D0 ; SHIFT it to the left 8 places Move.B LookUpRevNum,D0 ; Load the Look Up System Rev. Num. LSL.L #$8,D0 ; SHIFT it to the left 8 places Move.B HardWRRevNum,D0 ; Load the Trigger Hardware Rev. Num. Move.L D0,CrtHDWord4 ; Store the Revision Number in the ; 4th word of the Crate Header. Move.L #DataStack,A5 ; Data Stack for console display. Move.L D0,(A5)+ ; Store the Crate Header 4th word ; (Rev. Num.) on display data stack. PEA.L DataStack ; Push the pointer for the data stack. PEA.L DisRevNo1 ; Push Revision Number message 1 form. SysCall .WRITDLN ; Call the system to output message. Move.L #DataStack,A5 ; Data Stack for console display. CLR.L D0 ; Clear data register 0. Move.B VMECPURevNum,D0 ; Load VME CPU Program Revision Num. Move.L D0,(A5)+ ; Store the VME CPU Program Revision ; Number on the display data stack. CLR.L D0 ; Clear data register 0. Move.B COMINTPROMRN,D0 ; Load COMINT PROM Revision Num. Move.L D0,(A5)+ ; Store the COMINT PROM Revision ; Number on the display data stack. PEA.L DataStack ; Push the pointer for the data stack. PEA.L DisRevNo2 ; Push Revision Number message 2 form. SysCall .WRITDLN ; Call the system to output message. Move.L #DataStack,A5 ; Data Stack for console display. CLR.L D0 ; Clear data register 0. Move.B LookUpRevNum,D0 ; Load Look Up System Revision Num. Move.L D0,(A5)+ ; Store the Look Up System Revision ; Number on the display data stack. CLR.L D0 ; Clear data register 0. Move.B HardWRRevNum,D0 ; Load Trigger Hardware Revision Num. Move.L D0,(A5)+ ; Store the Trigger Hardware Revision ; Number on the display data stack. PEA.L DataStack ; Push the pointer for the data stack. PEA.L DisRevNo3 ; Push Revision Number message 3 form. SysCall .WRITDLN ; Call the system to output message. ; Now select the other set of ; MVME-214 buffers and store Crate ; Header words #2, #3, #4 again. Move.B #$D5,Ironics_Port_5 ; $D5 is the invers of $2A, i.e. ; buffers C1L,C3L,V1L, C2R,C4R,V2R. CLR.L D0 ; Clear D0 it will receive Crate ID. Move.L #$FFFF0000,A3 ; Make the 133A version of the Short Move.W CrateIDAdrs,A3 ; IO Address for the Crate ID card. Move.W (A3),D0 ; Load the Crate ID into Data Reg 0. AndI.L #$000000FF,D0 ; Mask off all but Low byte of Crt ID Swap D0 ; Move the low byte of the Crate ID LSL.L #$8,D0 ; into the top byte of data reg D0. Move.L D0,CrtHDWord2 ; Store the Controller word as the ; second word of the Crate Header. Move.L VersNum,CrtHDWord3 ; Store the Version Number in the ; 3rd word of the Crate Header. CLR.L D0 ; Clear Data Register D0. Move.B VMECPURevNum,D0 ; Load the VME CPU Revision Number. LSL.L #$8,D0 ; SHIFT it to the left 8 places Move.B COMINTPROMRN,D0 ; Load the COMINT PROM Revision Num. LSL.L #$8,D0 ; SHIFT it to the left 8 places Move.B LookUpRevNum,D0 ; Load the Look Up System Rev. Num. LSL.L #$8,D0 ; SHIFT it to the left 8 places Move.B HardWRRevNum,D0 ; Load the Trigger Hardware Rev. Num. Move.L D0,CrtHDWord4 ; Store the Revision Number in the ; 4th word of the Crate Header. ************************************************************************* * * * Set the Last Used VME Buffer Register to pick buffer 0. * * * ************************************************************************* CLR.L BufSelect ; Set Buffer Select for VBD buffer 0. ************************************************************************* * * * Clear any old COMINT Slave Ready requests by pulsing the Data Cable * * Driver Finished line high and low and high and low. * * * ************************************************************************* Move.B #Bits1and2Hi,D0 ; Send a Data Cable Driver WrIO D0,Ironics_Port_2 ; Finished signal to both the ; Pilot and Assistant COMINT's. SoftWait #$1000 ; Wait about 5 mill seconds. Move.B #AllBitsLow,D0 ; Drop the Data Cable Driver WrIO D0,Ironics_Port_2 ; Finished signal. SoftWait #$1000 ; Wait about 5 mill seconds. Move.B #Bits1and2Hi,D0 ; Send a Data Cable Driver WrIO D0,Ironics_Port_2 ; Finished signal to both the ; Pilot and Assistant COMINT's. SoftWait #$1000 ; Wait about 5 mill seconds. Move.B #AllBitsLow,D0 ; Drop the Data Cable Driver WrIO D0,Ironics_Port_2 ; Finished signal. ************************************************************************* * * * Send the Initialization Complete Message to the 68k terminal. * * * ************************************************************************* PEA.L InitCmpt1 ; push message address on stack. SysCall .WRITELN ; and send it out. PEA.L InitCmpt2 ; push message address on stack. SysCall .WRITELN ; and send it out. RTS ; Return to the calling routine. ************************************************************************* * Define Constants: * * * * Data used to send messages to the 68k terminal screen. * * * ************************************************************************* ALIGN 4 ; Align to longword address. DataStack DCB.L 8,$00000000 ; data stack for Write Line call DispCrate DC.B 44,'Crate ID = |10,8| Controller Word = |10,8|' DisVerNum DC.B 56,'Version Number of the Trigger Data Block Format = |10,8|' DisRevNo1 DC.B 53,'Revision Number in the Crate Header 4th word = |10,8|' DisRevNo2 DC.B 57,'VME CPU Program Rev = |10,8Z| COMINT PROMs Rev = |10,8Z|' DisRevNo3 DC.B 57,'Look Up Sys Rev = |10,8Z| Trigger Hardware Rev = |10,8Z|' InitCmpt1 DC.B 30,'Finished the initialization of' InitCmpt2 DC.B 36,'the VBD, COMINT, and IRONICS modules' ************************************************************************* * * * Constants Section for Initialize Hardware and Software * * * ************************************************************************* XDEF Begin_Initialize_Hard_Soft ; Symbol exported to ; other modules. XREF TrgBuffer,IOMemBase,Bits1and2Hi ; Symbols used in this XREF AllBitsLow ; module but defined in XREF Bits1and5Hi ; another program module XREF Ironics_Port_2,Ironics_Port_3 ; Main_Symbols.Include XREF Ironics_Port_5 XREF VBDDMATO,VBDCSR0 XREF VBDReset,VBDToLock XREF CrateType,CrateTypeReg XREF EvtNmbAdr,EvtNmbAdrReg XREF CrateIDAdrs,CrtIDAdrReg,DCtrlData,DControlReg XREF PCtrlData,PControlReg,IOUPAdrs,IOUPAdrsReg XREF WCPntList,WCStore1,WCStore2,WCStore3 XREF WCStore4,WCStore5,WCStore6,WCStore7 XREF WCStore8,WCStore9,WCStore10,WCStore11 XREF WCStore12,WCStore13,WCStore14,WCStore15 XREF WCHeader,WCCurFrWk,WCCurCalT,WCPrvFrWk XREF WCPrvCalT,WCEMJetL,WCTEtJetL,WCJetMask XREF WCTRDHotT,WCSpTrPrg,WCSupTowPtrn XREF WCL15Data,WCAbsoTime,WCL1ForScaler,WCPulser XREF BAHeader,BACurFrWk,BACurCalT,BAPrvFrWk XREF BAPrvCalT,BAEMJetL,BATEtJetL,BAJetMask XREF BATRDHotT,BASpTrPrg,BASupTowPtrn XREF BAL15Data,BAAbsoTime,BAL1ForScaler,BAPulser XREF DataPntList,CrtHDWord2,CrtHDWord3,CrtHDWord4 XREF BufSelect,TWBData,TWBPortAdrs XREF Vert214Buf END