-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatadisk.h
44 lines (37 loc) · 850 Bytes
/
atadisk.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef ATADISK_H
#define ATADISK_H
#include "eden.h"
#include <iostream>
class AtaDisk
{
public:
bool DebugLogInOut;
bool DebugLogCmd;
AtaDisk();
bool IsAtaAddr(uchar Addr);
uchar DoIN(uchar Addr);
void DoOUT(uchar Addr, uchar Val);
string Disk0Name;
string Disk1Name;
int Disk0Sector;
int Disk1Sector;
private:
int LBA;
bool DiskRead(int Offset, int Length);
bool DiskWrite(int Offset, int Length);
bool DiskCheck(int Offset, int Length);
char DiskSector[1024];
bool DiskSlave;
int DiskSectorSize;
int ReadWriteCounter;
void DebugLogData(string str);
// 0 - Stan bezczynny
// 1 - Odczyt
// 2 - Zapis
int ReadWriteState;
int ReadWriteSectorCount;
int ReadWriteSectorCounter;
bool ReadWriteError;
bool DebugMsg;
};
#endif // ATADISK_H