1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 #define BUFSZ (4096 * 9 / 2)
  20 
  21 struct tape_state
  22   {
  23     
  24     enum tape_mode
  25       {
  26         tape_no_mode, tape_rd_ctlr, tape_rd_9, tape_rd_bin, tape_initiate_rd_mem,
  27         tape_wr_9, tape_wr_bin, tape_initiate_wr_mem, tape_MTP_wr, tape_wr_ctrl_regs, tape_survey,
  28       } io_mode;
  29     bool is9;
  30     uint8 buf [BUFSZ];
  31     t_mtrlnt tbc; 
  32     uint words_processed; 
  33 
  34     int rec_num; 
  35     char device_name [MAX_DEV_NAME_LEN];
  36     word16 cntlrAddress;
  37     word16 cntlrTally;
  38     int tape_length;
  39   };
  40 
  41 extern struct tape_state tape_states [N_MT_UNITS_MAX];
  42 
  43 extern UNIT mt_unit [N_MT_UNITS_MAX];
  44 extern DEVICE tape_dev;
  45 extern UNIT mtp_unit [N_MTP_UNITS_MAX];
  46 extern DEVICE mtp_dev;
  47 
  48 void mt_init(void);
  49 void mt_exit (void);
  50 int get_mt_numunits (void);
  51 
  52 
  53 t_stat loadTape (uint driveNumber, char * tapeFilename, bool ro);
  54 t_stat attachTape (char * label, bool withring, char * drive);
  55 #if !defined(QUIET_UNUSED)
  56 t_stat detachTape (char * drive);
  57 #endif
  58 iom_cmd_rc_t mt_iom_cmd (uint iomUnitIdx, uint chan);
  59 t_stat unloadTape (uint driveNumber);
  60 t_stat mount_tape (int32 arg, const char * buf);
  61 t_stat signal_tape (uint tap_unit_idx, word8 status0, word8 status1);