root/src/dps8/dps8_mt.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * vim: filetype=c:tabstop=4:ai:expandtab
   3  * SPDX-License-Identifier: ICU
   4  * scspell-id: b39ac98e-f62e-11ec-98a8-80ee73e9b8e7
   5  *
   6  * ---------------------------------------------------------------------------
   7  *
   8  * Copyright (c) 2007-2013 Michael Mondy
   9  * Copyright (c) 2012-2016 Harry Reed
  10  * Copyright (c) 2013-2016 Charles Anthony
  11  * Copyright (c) 2021-2024 The DPS8M Development Team
  12  *
  13  * This software is made available under the terms of the ICU License.
  14  * See the LICENSE.md file at the top-level directory of this distribution.
  15  *
  16  * ---------------------------------------------------------------------------
  17  */
  18 
  19 #define BUFSZ (4096 * 9 / 2)
  20 
  21 struct tape_state
  22   {
  23     //enum tape_mode { tape_no_mode, tape_read_mode, tape_write_mode, tape_survey_mode } io_mode;
  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; // Number of bytes read into buffer
  32     uint words_processed; // Number of Word36 processed from the buffer
  33 // XXX bug: 'sim> set tapeN rewind' doesn't reset rec_num
  34     int rec_num; // track tape position
  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 //UNIT * getTapeUnit (uint driveNumber);
  52 //void tape_send_special_interrupt (uint driveNumber);
  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);

/* [previous][next][first][last][top][bottom][index][help] */