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