OpenCores
URL https://opencores.org/ocsvn/w11/w11/trunk

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.74/] [tools/] [src/] [librw11/] [Rw11UnitTape.hpp] - Blame information for rev 38

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 31 wfjm
// $Id: Rw11UnitTape.hpp 686 2015-06-04 21:08:08Z mueller $
2
//
3
// Copyright 2015- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4
//
5
// This program is free software; you may redistribute and/or modify it under
6
// the terms of the GNU General Public License as published by the Free
7
// Software Foundation, either version 2, or at your option any later version.
8
//
9
// This program is distributed in the hope that it will be useful, but
10
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
11
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
// for complete details.
13
// 
14
// Revision History: 
15
// Date         Rev Version  Comment
16
// 2015-06-04   686   1.0    Initial version
17
// 2015-05-17   683   0.1    First draft
18
// ---------------------------------------------------------------------------
19
 
20
 
21
/*!
22
  \file
23
  \version $Id: Rw11UnitTape.hpp 686 2015-06-04 21:08:08Z mueller $
24
  \brief   Declaration of class Rw11UnitTape.
25
*/
26
 
27
#ifndef included_Retro_Rw11UnitTape
28
#define included_Retro_Rw11UnitTape 1
29
 
30
#include "Rw11VirtTape.hpp"
31
 
32
#include "Rw11UnitVirt.hpp"
33
 
34
namespace Retro {
35
 
36
  class Rw11UnitTape : public Rw11UnitVirt<Rw11VirtTape> {
37
    public:
38
                    Rw11UnitTape(Rw11Cntl* pcntl, size_t index);
39
                   ~Rw11UnitTape();
40
 
41
      virtual void  SetType(const std::string& type);
42
 
43
      const std::string& Type() const;
44
      virtual bool  Enabled() const;
45
 
46
      void          SetWProt(bool wprot);
47
      void          SetCapacity(size_t nbyte);
48
      bool          WProt() const;
49
      size_t        Capacity() const;
50
 
51
      void          SetPosFile(int posfile);
52
      void          SetPosRecord(int posrec);
53
 
54
      bool          Bot() const;
55
      bool          Eot() const;
56
      bool          Eom() const;
57
 
58
      int           PosFile() const;
59
      int           PosRecord() const;
60
 
61
      bool          VirtReadRecord(size_t nbyte, uint8_t* data, size_t& ndone,
62
                               int& opcode, RerrMsg& emsg);
63
      bool          VirtWriteRecord(size_t nbyte, const uint8_t* data,
64
                                int& opcode, RerrMsg& emsg);
65
      bool          VirtWriteEof(RerrMsg& emsg);
66
      bool          VirtSpaceForw(size_t nrec, size_t& ndone,
67
                              int& opcode, RerrMsg& emsg);
68
      bool          VirtSpaceBack(size_t nrec, size_t& ndone,
69
                              int& opcode, RerrMsg& emsg);
70
      bool          VirtRewind(int& opcode, RerrMsg& emsg);
71
 
72
      virtual void  Dump(std::ostream& os, int ind=0, const char* text=0) const;
73
 
74
    protected:
75
      std::string   fType;                  //!< drive type
76
      bool          fEnabled;               //!< unit enabled
77
      bool          fWProt;                 //!< unit write protected
78
      size_t        fCapacity;              //<! capacity in byte (0=unlimited)
79
  };
80
 
81
} // end namespace Retro
82
 
83
#include "Rw11UnitTape.ipp"
84
 
85
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.