ROLAND  0.70
Amstrad Emulator based on Caprice Source rewritten in C++.
sector.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Fred Klaus *
3  * frednet@web.de *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 #ifndef CPC_DISKSECTOR_H
21 #define CPC_DISKSECTOR_H
22 
23 #include "compspec.h"
24 #include "types.h"
25 
26 namespace cpcx
27 {
29  class Sector final
30  {
31  public:
32  Sector();
34 
35  tUBYTE* CHRN() {return mCHRN;}
36  tUBYTE CHRN(int num) {return mCHRN[num];}
37  tUBYTE* flags() {return mFlags;}
38  tUBYTE flag(int num) {return mFlags[num];}
39  tUBYTE* data() {return mData;}
40  uint size() {return mSize;}
41 
43  void setFlag(int idx, int val) {mFlags[idx] = val;}
44  void setSize(uint num) {mSize = num;}
45 
46  private:
51  };
52 } // namespace cpcx
53 #endif
tUBYTE flag(int num)
Definition: sector.h:38
void setSize(uint num)
Definition: sector.h:44
Namespace for all CPC components.
Definition: colours.cpp:22
tUBYTE * flags()
Definition: sector.h:37
uint size()
Definition: sector.h:40
void setFlag(int idx, int val)
Definition: sector.h:43
void setData(tUBYTE *data)
Definition: sector.h:42
Sector()
Definition: sector.cpp:24
tUBYTE mFlags[4]
the CHRN for this sector
Definition: sector.h:48
tUBYTE mCHRN[4]
Definition: sector.h:47
~Sector() ROLAND_DEFAULT tUBYTE *CHRN()
Definition: sector.h:33
tUBYTE CHRN(int num)
Definition: sector.h:36
tUBYTE * mData
ST1 and ST2 - reflects any possible error conditions.
Definition: sector.h:49
uint mSize
pointer to sector data
Definition: sector.h:50
A sector of a disk.
Definition: sector.h:29
#define ROLAND_DEFAULT
Definition: compspec.h:46
uint8_t tUBYTE
Definition: types.h:74
unsigned int uint
Definition: types.h:121
tUBYTE * data()
Definition: sector.h:39