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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [tools/] [src/] [librw11/] [Rw11UnitDisk.ipp] - Blame information for rev 40

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 20 wfjm
// $Id: Rw11UnitDisk.ipp 509 2013-04-21 20:46:20Z mueller $
2
//
3
// Copyright 2013- by Walter F.J. Mueller 
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
// 2013-04-19   507   1.0    Initial version
17
// 2013-02-19   490   0.1    First draft
18
// ---------------------------------------------------------------------------
19
 
20
/*!
21
  \file
22
  \version $Id: Rw11UnitDisk.ipp 509 2013-04-21 20:46:20Z mueller $
23
  \brief   Implemenation (inline) of Rw11UnitDisk.
24
*/
25
 
26
// all method definitions in namespace Retro
27
namespace Retro {
28
 
29
//------------------------------------------+-----------------------------------
30
//! FIXME_docs
31
 
32
inline const std::string& Rw11UnitDisk::Type() const
33
{
34
  return fType;
35
}
36
 
37
//------------------------------------------+-----------------------------------
38
//! FIXME_docs
39
 
40
inline size_t Rw11UnitDisk::NCylinder() const
41
{
42
  return fNCyl;
43
}
44
 
45
//------------------------------------------+-----------------------------------
46
//! FIXME_docs
47
 
48
inline size_t Rw11UnitDisk::NHead() const
49
{
50
  return fNHead;
51
}
52
 
53
//------------------------------------------+-----------------------------------
54
//! FIXME_docs
55
 
56
inline size_t Rw11UnitDisk::NSector() const
57
{
58
  return fNSect;
59
}
60
 
61
//------------------------------------------+-----------------------------------
62
//! FIXME_docs
63
 
64
inline size_t Rw11UnitDisk::BlockSize() const
65
{
66
  return fBlksize;
67
}
68
 
69
//------------------------------------------+-----------------------------------
70
//! FIXME_docs
71
 
72
inline size_t Rw11UnitDisk::NBlock() const
73
{
74
  return fNBlock;
75
}
76
 
77
//------------------------------------------+-----------------------------------
78
//! FIXME_docs
79
 
80
inline uint32_t Rw11UnitDisk::Chs2Lba(uint16_t cy, uint16_t hd, uint16_t se)
81
{
82
  return se + fNSect * (hd + fNHead*cy);
83
}
84
 
85
//------------------------------------------+-----------------------------------
86
//! FIXME_docs
87
 
88
inline void Rw11UnitDisk::Lba2Chs(uint32_t lba, uint16_t& cy, uint16_t& hd,
89
                                  uint16_t& se)
90
{
91
  se = lba % fNSect;
92
  hd = (lba/fNSect) % fNHead;
93
  cy = lba / (fNSect*fNHead);
94
  return;
95
}
96
 
97
 
98
//------------------------------------------+-----------------------------------
99
//! FIXME_docs
100
 
101
inline void Rw11UnitDisk::SetWProt(bool wprot)
102
{
103
  fWProt = wprot;
104
  return;
105
}
106
 
107
//------------------------------------------+-----------------------------------
108
//! FIXME_docs
109
 
110
inline bool Rw11UnitDisk::WProt() const
111
{
112
  return fWProt;
113
}
114
 
115
 
116
} // end namespace Retro

powered by: WebSVN 2.1.0

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