openMSX
ide
WD33C93.hh
Go to the documentation of this file.
1
/* Ported from:
2
** Source: /cvsroot/bluemsx/blueMSX/Src/IoDevice/wd33c93.h,v
3
** Revision: 1.6
4
** Date: 2007/03/22 10:55:08
5
**
6
** More info: http://www.bluemsx.com
7
**
8
** Copyright (C) 2003-2007 Daniel Vik, Ricardo Bittencourt, white cat
9
*/
10
11
#ifndef WD33C93_HH
12
#define WD33C93_HH
13
14
#include "
SCSI.hh
"
15
#include "
SCSIDevice.hh
"
16
17
#include "
AlignedBuffer.hh
"
18
19
#include <array>
20
#include <memory>
21
22
namespace
openmsx
{
23
24
class
DeviceConfig;
25
26
class
WD33C93
27
{
28
public
:
29
explicit
WD33C93
(
const
DeviceConfig
& config);
30
31
void
reset
(
bool
scsiReset);
32
33
[[nodiscard]] uint8_t
readAuxStatus
();
34
[[nodiscard]] uint8_t
readCtrl
();
35
[[nodiscard]] uint8_t
peekAuxStatus
()
const
;
36
[[nodiscard]] uint8_t
peekCtrl
()
const
;
37
void
writeAdr
(uint8_t value);
38
void
writeCtrl
(uint8_t value);
39
40
template
<
typename
Archive>
41
void
serialize
(Archive& ar,
unsigned
version);
42
43
private
:
44
void
disconnect();
45
void
execCmd(uint8_t value);
46
47
private
:
48
AlignedByteArray<SCSIDevice::BUFFER_SIZE>
buffer;
49
std::array<std::unique_ptr<SCSIDevice>, 8> dev;
50
unsigned
bufIdx;
51
unsigned
counter = 0;
52
unsigned
blockCounter = 0;
53
int
tc;
54
SCSI::Phase
phase;
55
uint8_t myId;
56
uint8_t targetId = 0;
57
std::array<uint8_t, 32> regs;
58
uint8_t latch;
59
bool
devBusy =
false
;
60
};
61
62
}
// namespace openmsx
63
64
#endif
AlignedBuffer.hh
SCSIDevice.hh
SCSI.hh
openmsx::AlignedByteArray
Definition
AlignedBuffer.hh:60
openmsx::DeviceConfig
Definition
DeviceConfig.hh:21
openmsx::WD33C93
Definition
WD33C93.hh:27
openmsx::WD33C93::serialize
void serialize(Archive &ar, unsigned version)
Definition
WD33C93.cc:459
openmsx::WD33C93::reset
void reset(bool scsiReset)
Definition
WD33C93.cc:423
openmsx::WD33C93::writeAdr
void writeAdr(uint8_t value)
Definition
WD33C93.cc:247
openmsx::WD33C93::peekCtrl
uint8_t peekCtrl() const
Definition
WD33C93.cc:409
openmsx::WD33C93::peekAuxStatus
uint8_t peekAuxStatus() const
Definition
WD33C93.cc:404
openmsx::WD33C93::writeCtrl
void writeCtrl(uint8_t value)
Definition
WD33C93.cc:254
openmsx::WD33C93::readCtrl
uint8_t readCtrl()
Definition
WD33C93.cc:340
openmsx::WD33C93::readAuxStatus
uint8_t readAuxStatus()
Definition
WD33C93.cc:313
openmsx::SCSI::Phase
Phase
Definition
SCSI.hh:99
openmsx
This file implemented 3 utility functions:
Definition
Autofire.cc:11
Generated on Mon Oct 7 2024 21:13:40 for openMSX by
1.9.8