# File: tap_burst.src
#
program "%Z% MODULE: %M% RELEASE: %R%.%L% CREATED: %G% %U%"
source "tap_burst.ips"
descr "tap_burst - Takes a series of images and DLs 'em"
#
# DSBQUE                ; Disable Queue
tcblock mbipldin 0x0154 
#
#=======================================================
#
#
#;
#; FILE:    tap_burst.ips
#; PURPOSE: To take a quick series of images, and then to take sev
#;	   to telemeter them down.
#; METHOD:  This source is used for several different IP program e
#;	   depending on how many images are to be taken and saved.
#;	
#;	   The observation is written such that there are twice as many
#;	   in the frame list as a person wan't downlinked.  If you want
#;	   taken and downlinked, then you write the sequence to take th
#;	   in quick succession (probably separated by 3 seconds), and t
#;	   an image every 60(?) seconds to do the downlinking (10 image
#; RESTRICTIONS:
#;	   Pages used:  0 (for input of the raw camera image)
#;			1 (for output of 1024x1024 extracted image with a header)
#;			?? (for storing of the image)
#; HISTORY: Written 25-Aug-95 by M.Morrison
#;          30-Aug-95 (MDM) - Changed the name
#;	   20-Sep-95 (MDM) - Worked on debugging it so it can work
#;	    2-Oct-95 (MDM) - fixed timing problem
#;	   19-Oct-95 (MDM) - Changed how FLTGRAM_PARAM is used
#; NOTES:
#;	   N_FRMS = 6
#;
#;	Frm:         		1  2  3  4  5  6  7  8  9  10  11  12  13  14  1
#;	N_FRM - Frm: 		5  4  3  2  1  0 -1 -2 -3  -4  -5  -6  -7  -8  -
#;	N_FRM - Frm + N_FRM:	.  .  .  .  .  .  5  4  3   2   1   0  -1 
#;	Store images:		*****************
#;	DL images:		                 *********************
#;	Ignore:			                                       **********
#
#QPROG_TAPB_6FRM::
#    SETREG $IPRL_TAPB_N_FRMS 6			;set up how many frames will be 
tcblock mbipcmd 0x0091 0x15F5   0x0140 0x1188 0x0006 
#    GOTO &QPROG_TAPB
tcblock mbipcmd 0x0091 0x15F8   0x0156 0x160E 
#
#QPROG_TAPB_7FRM::
#    SETREG $IPRL_TAPB_N_FRMS 7
tcblock mbipcmd 0x0091 0x15FA   0x0140 0x1188 0x0007 
#    GOTO &QPROG_TAPB
tcblock mbipcmd 0x0091 0x15FD   0x0156 0x160E 
#
#QPROG_TAPB_8FRM::
#    SETREG $IPRL_TAPB_N_FRMS 8
tcblock mbipcmd 0x0091 0x15FF   0x0140 0x1188 0x0008 
#    GOTO &QPROG_TAPB
tcblock mbipcmd 0x0091 0x1602   0x0156 0x160E 
#
#QPROG_TAPB_9FRM::
#    SETREG $IPRL_TAPB_N_FRMS 9
tcblock mbipcmd 0x0091 0x1604   0x0140 0x1188 0x0009 
#    GOTO &QPROG_TAPB
tcblock mbipcmd 0x0091 0x1607   0x0156 0x160E 
#
#QPROG_TAPB_10FRM::
#    SETREG $IPRL_TAPB_N_FRMS 10
tcblock mbipcmd 0x0091 0x1609   0x0140 0x1188 0x000A 
#    GOTO &QPROG_TAPB
tcblock mbipcmd 0x0091 0x160C   0x0156 0x160E 
#
#QPROG_TAPB:							;----- Common code starts here
#
#        GETQADR  $IPRL_DEBUG_ADDR
tcblock mbipcmd 0x0091 0x160E   0x015C 0x1FFD 
#        CALLQUE  $QSR_DUMP_IPREG                                ;
tcblock mbipcmd 0x0091 0x1610   0x01F8 0x1028 
#
#    COPYREG  R3072 $IPRL_TAPB_Q_DL				;copies the frame number in
tcblock mbipcmd 0x0091 0x1612   0x0142 0x0C00 0x1189 
#    REGSUB   $IPRL_TAPB_N_FRMS $IPRL_TAPB_Q_DL $IPRL_TAPB_Q_DL	;s
tcblock mbipcmd 0x0091 0x1615   0x2146 0x1188 0x1189 0x1189 
#    BRANCHLT $IPRL_TAPB_Q_DL 0 &DL_PART				;If we've already got 
tcblock mbipcmd 0x0091 0x1619   0x01B8 0x1189 0x0000 0x164A 
#
#
#    ;--- Frames 1 to N_FRMS
#								;<<<< Receiving the image, making the header, and storing
#    COPYREG  R3072 $IPRL_TAPB_FRMNUM				;first half they are the 
tcblock mbipcmd 0x0091 0x161D   0x0142 0x0C00 0x1183 
#    ADDREGD  $IPRL_TAPB_FRMNUM -1				;really want N-1
tcblock mbipcmd 0x0091 0x1620   0x01BC 0x1183 0xFFFF 
#    SETREG   $IPRP_TAPB_PAGENUM $IPRL_TAPB_PAGELST		;put the star
tcblock mbipcmd 0x0091 0x1623   0x0140 0x1184 0x1174 
#    REGADD   $IPRP_TAPB_PAGENUM $IPRL_TAPB_FRMNUM $IPRP_TAPB_PAGE
tcblock mbipcmd 0x0091 0x1626   0x0146 0x1184 0x1183 0x1184 
#    COPYRI2D $IPRP_TAPB_PAGENUM $IPRL_TAPB_PAGENUM 3		;copy the p
tcblock mbipcmd 0x0091 0x162A   0x01AC 0x1184 0x1185 0x0003 
#
#    SETREGS  $IPRL_FLTGRAM_PARAM 4 0:0x0000 0:0x0226		;set source
tcblock mbipcmd 0x0091 0x162E   0x01B2 0x118C 0x0004 0x0000 \
                                0x0000 0x0226 0x0000 
#    COPYREG  $IPRL_TAPB_PAGENUM $IPRL_FLTGRAM_PARAM+3		;set the h
tcblock mbipcmd 0x0091 0x1635   0x0142 0x1185 0x118F 
#    COPYRD2D $IPRL_FLTGRAM_TAPB $IPRL_FLTGRAM_PARAM+8 3		;last th
tcblock mbipcmd 0x0091 0x1638   0x0144 0x119A 0x1194 0x0003 
#
#    CALLQUE  $QSR_MK_FLTGRAM
tcblock mbipcmd 0x0091 0x163C   0x01F8 0x1456 
#
#	SETREG $IPRL_DEBUG_SKIP 0
tcblock mbipcmd 0x0091 0x163E   0x0140 0x1FFE 0x0000 
#        GETQADR  $IPRL_DEBUG_ADDR
tcblock mbipcmd 0x0091 0x1641   0x015C 0x1FFD 
#        CALLQUE  $QSR_DUMP_IPREG                                ;
tcblock mbipcmd 0x0091 0x1643   0x01F8 0x1028 
#	SETREG $IPRL_DEBUG_SKIP 1
tcblock mbipcmd 0x0091 0x1645   0x0140 0x1FFE 0x0001 
#
#    GOTO &TAPD_EXIT
tcblock mbipcmd 0x0091 0x1648   0x0156 0x166D 
#
#DL_PART:
#;    SETREGS 4104 2 0x04000L		;fake it out to only downlink 128x1
#;    SETREGS 4114 2 0x04000L
#;    SETREGS 4124 2 0x04000L
#;    SETREGS 4134 2 0x04000L
#;    SETREGS 4144 2 0x04000L
#;    SETREGS 4154 2 0x04000L
#;    SETREGS 4164 2 0x04000L
#;    SETREGS 4174 2 0x04000L
#;    SETREGS 4184 2 0x04000L
#;    SETREGS 4194 2 0x04000L
#;    SETREGS 4204 2 0x04000L
#
#
#    REGADD   $IPRL_TAPB_N_FRMS $IPRL_TAPB_Q_DL $IPRL_TAPB_Q_DL	;s
tcblock mbipcmd 0x0091 0x164A   0x0146 0x1188 0x1189 0x1189 
#    BRANCHLT $IPRL_TAPB_Q_DL 0 &TAPD_EXIT			;If we've already dow
tcblock mbipcmd 0x0091 0x164E   0x01B8 0x1189 0x0000 0x166D 
#
#    ;--- Frames N_FRMS+1 to N_FRMS*2
#
#    REGSUB   R3072 $IPRL_TAPB_N_FRMS $IPRL_TAPB_FRMNUM		;the fram
tcblock mbipcmd 0x0091 0x1652   0x2146 0x0C00 0x1188 0x1183 
#    ADDREGD  $IPRL_TAPB_FRMNUM -1				;really want N-1
tcblock mbipcmd 0x0091 0x1656   0x01BC 0x1183 0xFFFF 
#    SETREG   $IPRP_TAPB_PAGENUM $IPRL_TAPB_PAGELST		;put the star
tcblock mbipcmd 0x0091 0x1659   0x0140 0x1184 0x1174 
#    REGADD   $IPRP_TAPB_PAGENUM $IPRL_TAPB_FRMNUM $IPRP_TAPB_PAGE
tcblock mbipcmd 0x0091 0x165C   0x0146 0x1184 0x1183 0x1184 
#    COPYRI2D $IPRP_TAPB_PAGENUM $IPRL_TAPB_PAGENUM 3		;copy the p
tcblock mbipcmd 0x0091 0x1660   0x01AC 0x1184 0x1185 0x0003 
#
#    COPYREG  $IPRL_TAPB_PAGENUM $IPRL_DL_PARAM			;set up the sour
tcblock mbipcmd 0x0091 0x1664   0x0142 0x1185 0x113A 
#        GETQADR  $IPRL_DEBUG_ADDR
tcblock mbipcmd 0x0091 0x1667   0x015C 0x1FFD 
#        CALLQUE  $QSR_DUMP_IPREG                                ;
tcblock mbipcmd 0x0091 0x1669   0x01F8 0x1028 
#
#
#    CALLQUE  $QSR_DL_1PAGE
tcblock mbipcmd 0x0091 0x166B   0x01F8 0x1320 
#
#TAPD_EXIT:
#    END
tcblock mbipcmd 0x0091 0x166D   0x01FC 
#
#
#
#=======================================================
#
# ENBQUE                ; Enable Queue
tcblock mbipldin 0x0136
#
#
return
#
#=======================================================
